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
{ | |
"pass": true | |
} |
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
({ | |
debounce: function(func, wait, immediate) { | |
var timeout; | |
return $A.getCallback(function() { | |
var context = this, | |
args = arguments; | |
var later = function() { | |
timeout = null; | |
if (!immediate) { | |
func.apply(context, args); |
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
// utils.resource | |
window.utils = ({ | |
foo: function() { | |
console.log('HELLO, WORLD!'); | |
}, | |
}) |
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
<ltng:require scripts="{!$Resource.utils}" afterScriptsLoaded="{!c.doInit}"/> | |
<!-- If you had an init handler remove it, as we don't want to initialize until our scripts are loaded --> | |
<!-- <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> --> |
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
// utils.resource | |
window.utils = ({ | |
SHOW_LOG: true, // Set to false in production | |
log: function() { }, | |
warn: function() { }, | |
error: function() { }, | |
logInit: function () { | |
if(this.SHOW_LOG) { |
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
({ | |
// example helper function | |
getQuoteLines: function(component, quoteId, quoteLineId) { | |
return new Promise(function (resolve, reject) { | |
var action = component.get("c.getQuoteLines"); | |
action.setCallback(this, function(results) { | |
utils.log('getQuoteLines() results', results); | |
if(results.getState() === 'SUCCESS') { |
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
<aura:component description="DebounceExample" controller="DebounceExampleController"> | |
<!--External resources, we are using the join() function in case other resources are needed in the future--> | |
<ltng:require scripts="{!join(',', $Resource.lodash)}" afterScriptsLoaded="{!c.doInit}" /> | |
<aura:attribute name="searchedAccounts" type="List" default="[]" /> | |
<aura:attribute name="selectedAccount" type="Object" /> | |
<aura:handler name="ComboBoxChangedEvent" event="c:ComboBoxChangedEvent" action="{!c.handleComboBoxChangedEvent}"/> | |
<c:ComboBox |
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
({ | |
handleComboBoxChangedEvent: function(component, event, helper) { | |
var params = event.getParams(); | |
if(params.type === 'searchTermChanged') { | |
component.set('v.comboLoading', true); | |
helper.searchAccounts(component, params.searchTerm) | |
.then(function(data) { |
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
({ | |
searchAccounts: function(component, searchTerm, localFranchiseAcctId) { | |
return new Promise(function (resolve, reject) { | |
// Get jobs from controller | |
var action = component.get("c.searchAccounts"); | |
action.setParams({ | |
searchTerm: searchTerm, | |
}); |
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
/** | |
* | |
* @description Data models for interacting with Steelbrick CPQ | |
* // https://community.steelbrick.com/t5/Developer-Guidebook/Public-API-Technical-Documentation-amp-Code-1/ta-p/5690 | |
* | |
*/ | |
public without sharing class CPQ_ApiDataModels { | |
/** INPUT PAYLOADS */ |
OlderNewer