This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
... Some UI related code here | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Method to read parameter from query string | |
export function getUrlParameter(name) { | |
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); | |
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); | |
var results = regex.exec(location.search); | |
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="slds-text-heading_large slds-text-align_center">Gravatar - Reusable Lightning Web Component</div> | |
<div class="slds-grid"> | |
<div class="slds-col slds-size_2-of-8"> | |
<c-gravatar size={size} email={email} is-round-corner={isround}></c-gravatar> | |
</div> | |
<div class="slds-col slds-size_6-of-8"> | |
<lightning-input type="number" name="input2" label="Image size in pixel" value={size} onchange={updateSize}></lightning-input> | |
<lightning-input type="email" label="Email address" value={email} onblur={updateEmail}></lightning-input> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<apiVersion>48.0</apiVersion> | |
<isExposed>true</isExposed> | |
<targets> | |
<target>lightning__AppPage</target> | |
<target>lightning__RecordPage</target> | |
<target>lightning__HomePage</target> | |
<target>lightningCommunity__Page</target> | |
<target>lightningCommunity__Default</target> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.roundImg{ | |
border-radius: 50%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Author Jitendra Zaa | |
* @Date 1 May 2020 | |
* @Desc Server Side class for Gravatar LWC component to compute Md5 equivalent of email address | |
*/ | |
public with sharing class GravatarController { | |
@AuraEnabled(cacheable=true) | |
public static String getMD5Hash(String email){ | |
if(String.isEmpty(email)){ | |
email = '[email protected]'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Interface containing methods Trigger Handlers must implement to enforce best practice | |
* and bulkification of triggers. | |
*/ | |
public interface ITrigger | |
{ | |
/** | |
* bulkBefore | |
* | |
* This method is called prior to execution of a BEFORE trigger. Use this to cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
This is Honda Component <br /> | |
{data} | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ele1{ | |
background-color: #BBB; | |
padding:50px; | |
border-radius: 25px; | |
margin-top:20px; | |
margin-left:10px; | |
margin-right:10px; | |
cursor: pointer; | |
} |