├── .gitignore
├── CODEOWNERS
├── CONTRIBUTING-ARCHIVED.md
├── LICENSE.txt
├── README.md
├── flow_local_actions
├── GetOracleSSNViaAWS
│ ├── .forceignore
│ ├── .project
│ ├── README.md
│ ├── config
│ │ └── project-scratch-def.json
│ ├── force-app
│ │ └── main
│ │ │ └── default
│ │ │ ├── aura
│ │ │ └── getOracleSSNViaAWS
│ │ │ │ ├── getOracleSSNViaAWS.cmp
│ │ │ │ ├── getOracleSSNViaAWS.cmp-meta.xml
│ │ │ │ ├── getOracleSSNViaAWS.design
│ │ │ │ ├── getOracleSSNViaAWSController.js
│ │ │ │ └── getOracleSSNViaAWSHelper.js
│ │ │ └── cspTrustedSites
│ │ │ └── amazonawsCspTrustedDef.cspTrustedSite-meta.xml
│ └── sfdx-project.json
├── GetRESTData
│ ├── .project
│ ├── README.md
│ ├── config
│ │ └── project-scratch-def.json
│ ├── force-app
│ │ ├── main
│ │ │ └── default
│ │ │ │ ├── aura
│ │ │ │ └── getRESTData
│ │ │ │ │ ├── getRESTData.cmp
│ │ │ │ │ ├── getRESTData.cmp-meta.xml
│ │ │ │ │ ├── getRESTData.design
│ │ │ │ │ └── getRESTDataController.js
│ │ │ │ ├── cspTrustedSites
│ │ │ │ └── aws_url.cspTrustedSite-meta.xml
│ │ │ │ ├── flexipages
│ │ │ │ └── Account_Record_Page.flexipage-meta.xml
│ │ │ │ ├── flowDefinitions
│ │ │ │ └── Sample_GetRESTData_Action_Component.flowDefinition-meta.xml
│ │ │ │ └── flows
│ │ │ │ └── Sample_GetRESTData_Action_Component-1.flow-meta.xml
│ │ └── test
│ │ │ └── default
│ │ │ ├── aura
│ │ │ └── jasmineTests
│ │ │ │ ├── jasmineTests.app
│ │ │ │ ├── jasmineTests.app-meta.xml
│ │ │ │ └── jasmineTests.auradoc
│ │ │ └── staticresources
│ │ │ ├── getRESTDataTests.resource
│ │ │ └── getRESTDataTests.resource-meta.xml
│ └── sfdx-project.json
├── LoadWebPage
│ ├── .forceignore
│ ├── .project
│ ├── README.md
│ ├── config
│ │ └── project-scratch-def.json
│ ├── force-app
│ │ └── main
│ │ │ └── default
│ │ │ └── aura
│ │ │ └── loadWebPage
│ │ │ ├── loadWebPage.cmp
│ │ │ ├── loadWebPage.cmp-meta.xml
│ │ │ ├── loadWebPage.design
│ │ │ └── loadWebPageController.js
│ └── sfdx-project.json
├── PlaySound
│ ├── .forceignore
│ ├── .gitignore
│ ├── README.md
│ ├── config
│ │ └── project-scratch-def.json
│ ├── force-app
│ │ └── main
│ │ │ └── default
│ │ │ ├── aura
│ │ │ └── playSound
│ │ │ │ ├── playSound.cmp
│ │ │ │ ├── playSound.cmp-meta.xml
│ │ │ │ ├── playSound.design
│ │ │ │ ├── playSoundController.js
│ │ │ │ ├── playSoundHelper.js
│ │ │ │ └── playSoundRenderer.js
│ │ │ ├── cspTrustedSites
│ │ │ └── HearIt.cspTrustedSite-meta.xml
│ │ │ ├── flowDefinitions
│ │ │ ├── PlaySoundInLocalAction.flowDefinition-meta.xml
│ │ │ ├── PlaySoundInScreen.flowDefinition-meta.xml
│ │ │ └── PlaySoundInScreenAndLA.flowDefinition-meta.xml
│ │ │ ├── flows
│ │ │ ├── PlaySoundInLocalAction-1.flow-meta.xml
│ │ │ ├── PlaySoundInScreen-1.flow-meta.xml
│ │ │ └── PlaySoundInScreenAndLA-1.flow-meta.xml
│ │ │ └── staticresources
│ │ │ ├── crowcheering.mpga
│ │ │ ├── crowcheering.resource-meta.xml
│ │ │ ├── wave.mpga
│ │ │ └── wave.resource-meta.xml
│ └── sfdx-project.json
├── README.md
├── ShowToast
│ ├── .forceignore
│ ├── .gitignore
│ ├── README.md
│ ├── config
│ │ └── project-scratch-def.json
│ ├── data
│ │ └── CollaborationGroup.json
│ ├── force-app
│ │ └── main
│ │ │ └── default
│ │ │ ├── aura
│ │ │ └── showToast
│ │ │ │ ├── showToast.cmp
│ │ │ │ ├── showToast.cmp-meta.xml
│ │ │ │ ├── showToast.design
│ │ │ │ ├── showToastController.js
│ │ │ │ └── showToastHelper.js
│ │ │ ├── flexipages
│ │ │ └── Opportunity_Record_Page.flexipage-meta.xml
│ │ │ ├── flowDefinitions
│ │ │ └── My_Flow_with_Toast.flowDefinition-meta.xml
│ │ │ └── flows
│ │ │ └── My_Flow_with_Toast-1.flow-meta.xml
│ └── sfdx-project.json
└── UpdateScreen
│ ├── .forceignore
│ ├── README.md
│ ├── config
│ └── project-scratch-def.json
│ ├── force-app
│ └── main
│ │ └── default
│ │ └── aura
│ │ └── updateScreen
│ │ ├── updateScreen.cmp
│ │ ├── updateScreen.cmp-meta.xml
│ │ ├── updateScreen.design
│ │ └── updateScreenController.js
│ └── sfdx-project.json
├── install.md
└── sfdxintro.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .sfdx
2 | .DS_store
3 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Comment line immediately above ownership line is reserved for related gus information. Please be careful while editing.
2 | #ECCN:Open Source
3 |
--------------------------------------------------------------------------------
/CONTRIBUTING-ARCHIVED.md:
--------------------------------------------------------------------------------
1 | # ARCHIVED
2 |
3 | This project is `Archived` and is no longer actively maintained;
4 | We are not accepting contributions or Pull Requests.
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018, Salesforce.com, Inc.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | list of conditions and the following disclaimer in the documentation and/or
12 | other materials provided with the distribution.
13 |
14 | * Neither the name of Salesforce.com nor the names of its contributors may be
15 | used to endorse or promote products derived from this software without specific
16 | prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | This repository contains a collection of Lightning Components that can be used to enhance Lightning Flow from Salesforce. Note that you do not need to write code, read code, or use developer console to install these into your Flow Designer! You can install them with a few commands by using the new Salesforce DX deployment tools. (See "Installation")
3 |
4 | # Lightning Flow Action Components
5 | [Lightning Action Components](/flow_local_actions/) folder contains lightning components (aura classes) that have been optimized to be added to Lightning Flows as standalone actions. This mainly means that they:
6 | 1) implement the "lightning:availableForFlowActions" interface so they show up in the tools palette of Cloud Flow Designer as Local Actions that can be dragged onto the canvas and added to flows as discrete actions.
7 | 2) provide an #invoke method that allows the Flow engine to call them at the appropriate point during flow execution. The invoke method need to return a promise that is fulfilled when it is done.
8 |
9 | Flow Action Components generally do not have a visual focus, although they have to run in Screen Flows to ensure the presence of a client-side javascript runtime.
10 |
11 | # [A Note about SFDX](./sfdxintro.md)
12 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/.forceignore:
--------------------------------------------------------------------------------
1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
3 | #
4 |
5 | package.xml
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/.project:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | GetOracleSSNViaAWS
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/README.md:
--------------------------------------------------------------------------------
1 | # SFDX App
2 |
3 | This Local Action makes a GET call to an endpoint exposing an Oracle database hosted on Amazon RDS.
4 |
5 | ## Dev, Build
6 |
7 | ```
8 | sfdx force:org:create -s -f config/project-scratch-def.json -a getOracleViaAWS-org
9 | ```
10 |
11 | ```
12 | sfdx force:source:push -u getOracleViaAWS-org
13 | ```
14 |
15 | ## Description of Files and Directories
16 |
17 | [force-app/main/default:](/flow_local_actions/GetOracleSSNViaAWS/force-app/main/default)
18 | * Oracle sample component
19 | * CSP definition:
20 | We are making a request to an external (non-Salesforce) server so we needed to add the server as a CSP Trusted Site. See [Create CSP Trusted Sites to Access Third-Party APIs](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/csp_trusted_sites.htm)
21 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "Demo Company",
3 | "edition": "Developer",
4 | "orgPreferences" : {
5 | "enabled": ["S1DesktopEnabled"]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/force-app/main/default/aura/getOracleSSNViaAWS/getOracleSSNViaAWS.cmp:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/force-app/main/default/aura/getOracleSSNViaAWS/getOracleSSNViaAWS.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | 42.0
13 | A Lightning Component Bundle
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/force-app/main/default/aura/getOracleSSNViaAWS/getOracleSSNViaAWS.design:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/force-app/main/default/aura/getOracleSSNViaAWS/getOracleSSNViaAWSController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | invoke : function(component, event, helper) {
9 | var userId = component.get("v.userId"),
10 | cancelToken = event.getParam("arguments").cancelToken;
11 | return helper.fetchSSN(userId, cancelToken).then($A.getCallback(function(result) {
12 | component.set("v.ssn", result);
13 | }));
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/force-app/main/default/aura/getOracleSSNViaAWS/getOracleSSNViaAWSHelper.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | fetchSSN : function(userId, cancelToken) {
9 | return new Promise(function(resolve, reject) {
10 | var xhttp = new XMLHttpRequest();
11 | xhttp.onreadystatechange = $A.getCallback(function() {
12 | if (this.readyState === this.DONE) {
13 | if (this.status >= 200 && this.status < 300) {
14 | var result = JSON.parse(xhttp.responseText);
15 | resolve(result);
16 | } else {
17 | var errorText = this.status === 0 ?
18 | 'Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.':
19 | this.statusText || this.status;
20 | reject(new Error(errorText));
21 | }
22 | }
23 |
24 | // Gracelly abort the Promise if it times out
25 | cancelToken && cancelToken.promise.then(function(error) {
26 | xhttp.abort();
27 | reject(new Error(error + " Promise has been cancelled."));
28 | });
29 |
30 | });
31 | xhttp.open("GET", "https://e45sfxhtub.execute-api.eu-west-1.amazonaws.com/demo/ssn?userid=" + userId, true);
32 | xhttp.send(null);
33 | });
34 | }
35 | })
36 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/force-app/main/default/cspTrustedSites/amazonawsCspTrustedDef.cspTrustedSite-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | https://e45sfxhtub.execute-api.eu-west-1.amazonaws.com
13 | true
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/GetOracleSSNViaAWS/sfdx-project.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageDirectories": [
3 | {
4 | "path": "force-app",
5 | "default": true
6 | }
7 | ],
8 | "namespace": "",
9 | "sfdcLoginUrl": "https://login.salesforce.com",
10 | "sourceApiVersion": "42.0"
11 | }
12 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/.project:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | GetRESTData
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/README.md:
--------------------------------------------------------------------------------
1 | # SFDX App
2 |
3 | This Local Action sample makes a simple GET call to an endpoint.
4 |
5 | ## Dev, Build and Test
6 |
7 | ```
8 | sfdx force:org:create -s -f config/project-scratch-def.json -a GetRESTDataLocalActionOrg
9 | sfdx force:source:push -u GetRESTDataLocalActionOrg
10 | ```
11 |
12 | To run the tests using the [Lightning Testing Service](https://github.com/forcedotcom/LightningTestingService) :
13 | ```
14 | sfdx force:lightning:test:install
15 | sfdx force:lightning:test:run -a jasmineTests.app
16 | ```
17 |
18 | ## Description of Files and Directories
19 | force-app/main :
20 | * getRESTData component
21 | * CSP definition :
22 | We are making a request to an external (non-Salesforce) server so we needed to add the server as a CSP Trusted Site. See [Create CSP Trusted Sites to Access Third-Party APIs](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/csp_trusted_sites.htm)
23 | * sample flow
24 |
25 | force-app/test :
26 | * test spec file (getRESTDataTests.resource) and aura test app
27 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "Demo Company",
3 | "edition": "Developer",
4 | "orgPreferences" : {
5 | "enabled": ["S1DesktopEnabled"]
6 | }
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/main/default/aura/getRESTData/getRESTData.cmp:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/main/default/aura/getRESTData/getRESTData.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | 42.0
13 | A Lightning Component Bundle
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/main/default/aura/getRESTData/getRESTData.design:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/main/default/aura/getRESTData/getRESTDataController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | invoke : function(component, event, helper) {
9 | var cancelToken = event.getParam("arguments").cancelToken;
10 | return new Promise(function(resolve, reject) {
11 | var xhttp = new XMLHttpRequest();
12 | xhttp.onreadystatechange = $A.getCallback(function() {
13 | if (this.readyState === 4) { // DONE
14 | if (this.status >= 200 && this.status < 300) {
15 | var response = JSON.parse(xhttp.responseText);
16 | component.set("v.churnVal", response);
17 | resolve();
18 | } else {
19 | var errorText = "";
20 | if (this.status === 0) {
21 | errorText = 'Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.';
22 | } else {
23 | errorText = this.statusText;
24 | }
25 | reject(errorText);
26 | }
27 | }
28 | });
29 | var customerId = component.get("v.customerId");
30 | xhttp.open("GET", "https://upp57qbj5b.execute-api.us-west-1.amazonaws.com/production/customer/"+customerId+"/churn", true);
31 | xhttp.send(null);
32 | cancelToken.promise.then(function(error) {
33 | xhttp.abort();
34 | reject(error);
35 | });
36 | });
37 | }
38 | })
39 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/main/default/cspTrustedSites/aws_url.cspTrustedSite-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | https://upp57qbj5b.execute-api.us-west-1.amazonaws.com
13 | true
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/main/default/flexipages/Account_Record_Page.flexipage-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 | collapsed
16 | false
17 |
18 | force:highlightsPanel
19 |
20 |
21 |
22 | flowLayout
23 | oneColumn
24 |
25 |
26 | flowName
27 | Sample_GetRESTData_Action_Component
28 |
29 | flowruntime:interview
30 |
31 | Replace
32 | header
33 | Region
34 |
35 |
36 |
37 | runtime_sales_merge:mergeCandidatesPreviewCard
38 |
39 |
40 | force:relatedListContainer
41 |
42 | Replace
43 | relatedTabContent
44 | Facet
45 |
46 |
47 |
48 | force:detailPanel
49 |
50 | Replace
51 | detailTabContent
52 | Facet
53 |
54 |
55 |
56 | runtime_sales_social:socialPanel
57 |
58 | Replace
59 | newsTabContent
60 | Facet
61 |
62 |
63 |
64 |
65 | active
66 | true
67 |
68 |
69 | body
70 | relatedTabContent
71 |
72 |
73 | title
74 | Standard.Tab.relatedLists
75 |
76 | flexipage:tab
77 |
78 |
79 |
80 | body
81 | detailTabContent
82 |
83 |
84 | title
85 | Standard.Tab.detail
86 |
87 | flexipage:tab
88 |
89 |
90 |
91 | body
92 | newsTabContent
93 |
94 |
95 | title
96 | Standard.Tab.news
97 |
98 | flexipage:tab
99 |
100 | Replace
101 | maintabs
102 | Facet
103 |
104 |
105 |
106 |
107 | tabs
108 | maintabs
109 |
110 | flexipage:tabset
111 |
112 | Replace
113 | main
114 | Region
115 |
116 |
117 |
118 | runtime_sales_activities:activityPanel
119 |
120 | Replace
121 | activityTabContent
122 | Facet
123 |
124 |
125 |
126 | forceChatter:recordFeedContainer
127 |
128 | Replace
129 | feedTabContent
130 | Facet
131 |
132 |
133 |
134 |
135 | active
136 | true
137 |
138 |
139 | body
140 | activityTabContent
141 |
142 |
143 | title
144 | Standard.Tab.activity
145 |
146 | flexipage:tab
147 |
148 |
149 |
150 | body
151 | feedTabContent
152 |
153 |
154 | title
155 | Standard.Tab.collaborate
156 |
157 | flexipage:tab
158 |
159 | Replace
160 | sidebartabs
161 | Facet
162 |
163 |
164 |
165 |
166 | tabs
167 | sidebartabs
168 |
169 | flexipage:tabset
170 |
171 | Replace
172 | sidebar
173 | Region
174 |
175 | Account Record Page
176 | sfa__Account_rec_L
177 | Account
178 |
179 | flexipage:recordHomeTemplateDesktop
180 |
181 | RecordPage
182 |
183 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/main/default/flowDefinitions/Sample_GetRESTData_Action_Component.flowDefinition-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | 1
13 |
14 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/main/default/flows/Sample_GetRESTData_Action_Component-1.flow-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | churn
14 |
15 | 257
16 | 169
17 | c:getRESTData
18 | component
19 |
20 | screen
21 |
22 |
23 | customerId
24 |
25 | 46.0
26 |
27 |
28 |
29 | churnValue
30 | churnVal
31 |
32 |
33 | Sample - GetRESTData Action Component {!$Flow.CurrentDateTime}
34 |
35 | Flow
36 |
37 | screen
38 |
39 | 255
40 | 321
41 | true
42 | true
43 | true
44 |
45 | text
46 | churn value is : {!churnValue}
47 | DisplayText
48 |
49 |
50 | churn
51 |
52 | churnValue
53 | Number
54 | false
55 | false
56 | false
57 | 2
58 |
59 |
60 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/test/default/aura/jasmineTests/jasmineTests.app:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/test/default/aura/jasmineTests/jasmineTests.app-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | 41.0
13 | A Lightning Component Bundle
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/test/default/aura/jasmineTests/jasmineTests.auradoc:
--------------------------------------------------------------------------------
1 |
10 |
11 | Application that passes jasmine test spec files to LTS test Runner
12 |
13 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/test/default/staticresources/getRESTDataTests.resource:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 |
8 | /**
9 | * Churn jasmine test spec file.
10 | *
11 | */
12 |
13 | describe("getRESTData component testing", function(){
14 | afterEach(function() {
15 | // Each spec (test) renders its components into the same div,
16 | // so we need to clear that div out at the end of each spec.
17 | $T.clearRenderedTestComponents();
18 | });
19 |
20 | describe("local action", function() {
21 | beforeEach(function(done) {
22 | var that = this;
23 | $T.createComponent("c:getRESTData", { customerId:46 }, true).then(function(component) {
24 | that.component = component;
25 | var cancelToken = {
26 | requested : false,
27 | promise : new Promise(function(resolve, reject) {
28 | })
29 | };
30 | $T.run(function() {
31 | that.result = component.invoke(cancelToken);
32 | that.result.then(function() {
33 | done();
34 | }, function() {
35 | done();
36 | });
37 | });
38 | });
39 | });
40 | it("should not raise an error", function(done) {
41 | this.result.then(function() {
42 | done();
43 | }, function(reason) {
44 | done.fail("Error occured while calling the local action "+reason);
45 | });
46 | });
47 | it("output should be 0.85", function() {
48 | expect(this.component.get("v.churnVal")).toBe(0.85);
49 | });
50 | });
51 |
52 | });
53 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/force-app/test/default/staticresources/getRESTDataTests.resource-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | Private
13 | application/javascript
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/GetRESTData/sfdx-project.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageDirectories": [
3 | {
4 | "path": "force-app",
5 | "default": true
6 | }
7 | ],
8 | "namespace": "",
9 | "sfdcLoginUrl": "https://login.salesforce.com",
10 | "sourceApiVersion": "42.0"
11 | }
12 |
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/.forceignore:
--------------------------------------------------------------------------------
1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
3 | #
4 |
5 | package.xml
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/.project:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | LoadWebPage
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/README.md:
--------------------------------------------------------------------------------
1 | # SFDX App
2 |
3 | This Local Action open a new browser window with an url given as parameter.
4 |
5 | ## Dev, Build
6 |
7 | ```
8 | sfdx force:org:create -s -f config/project-scratch-def.json -a loadWebPage-org
9 | ```
10 |
11 | ```
12 | sfdx force:source:push -u loadWebPage-org
13 | ```
14 |
15 | ## Description of Files and Directories
16 |
17 | force-app/main :
18 | * load web page component
19 |
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "Demo Company",
3 | "edition": "Developer",
4 | "orgPreferences" : {
5 | "enabled": ["S1DesktopEnabled"]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/force-app/main/default/aura/loadWebPage/loadWebPage.cmp:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/force-app/main/default/aura/loadWebPage/loadWebPage.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | 42.0
13 | A Lightning Component Bundle
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/force-app/main/default/aura/loadWebPage/loadWebPage.design:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/force-app/main/default/aura/loadWebPage/loadWebPageController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | invoke : function(component, event, helper) {
9 | var destUrl = component.get("v.url");
10 | var pattern = new RegExp('^(http|https):\/\/[^ "]+$');
11 | if (!pattern.test(destUrl)) {
12 | destUrl = 'http://' + destUrl;
13 | }
14 | var urlEvent = $A.get("e.force:navigateToURL");
15 | urlEvent.setParams({
16 | "url": destUrl
17 | });
18 | urlEvent.fire();
19 | }
20 | })
21 |
--------------------------------------------------------------------------------
/flow_local_actions/LoadWebPage/sfdx-project.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageDirectories": [
3 | {
4 | "path": "force-app",
5 | "default": true
6 | }
7 | ],
8 | "namespace": "",
9 | "sfdcLoginUrl": "https://login.salesforce.com",
10 | "sourceApiVersion": "42.0"
11 | }
12 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/.forceignore:
--------------------------------------------------------------------------------
1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
3 | #
4 |
5 | package.xml
6 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/README.md:
--------------------------------------------------------------------------------
1 | # SFDX App
2 |
3 | ## Dev, Build and Test
4 | 1. Create scratch org:
5 | ```
6 | sfdx force:org:create -f config/project-scratch-def.json -a PlaySoundOrgScratch
7 | ```
8 | 2. Push the source to org:
9 | ```
10 | sfdx force:source:push -u PlaySoundOrgScratch
11 | ```
12 | ## Help
13 | - PlaySound can play audio for both in screen and in Local Action
14 | - If you pass an url to source, you need to add source's url to Setup > CSP Trusted Sites
15 | - You can also upload the source as a static resources
16 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "Demo Company",
3 | "edition": "Developer",
4 | "orgPreferences" : {
5 | "enabled": ["S1DesktopEnabled"]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/aura/playSound/playSound.cmp:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/aura/playSound/playSound.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | 42.0
13 | A Lightning Component Bundle
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/aura/playSound/playSound.design:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/aura/playSound/playSoundController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | invoke : function(cmp, event, helper) {
9 | cmp.set("v._priv_usedInLocalAction", "true");
10 | cmp.set("v.showUI", "false");
11 | var cancelToken = event.getParam("arguments").cancelToken;
12 | return new Promise(function(resolve, reject) {
13 | setTimeout(function() {
14 | helper.playSound(cmp, resolve, reject);
15 | });
16 | cancelToken.promise.then(function(error) {
17 | helper.pauseSound(cmp);
18 | reject(error);
19 | });
20 | });
21 | },
22 |
23 | toggleSound: function (cmp, event, helper) {
24 | helper.toggleSound(cmp);
25 | }
26 | })
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/aura/playSound/playSoundHelper.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | playSound : function(cmp, resolve, reject) {
9 | var audioPlayer = cmp.find("audioPlayer");
10 | var audioElement = audioPlayer.getElement();
11 | audioElement.muted = false;
12 | audioElement.loop = false;
13 | audioElement.onerror = reject;
14 | audioElement.onended = resolve;
15 | audioElement.play();
16 | },
17 |
18 | toggleSound: function (cmp) {
19 | cmp.set("v.muted", !cmp.get("v.muted"));
20 | },
21 |
22 | pauseSound: function (cmp) {
23 | cmp.find("audioPlayer").getElement().pause();
24 | }
25 | })
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/aura/playSound/playSoundRenderer.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | afterRender: function (cmp, helper) {
9 | this.superAfterRender();
10 | if (!cmp.get("v._priv_usedInLocalAction")) {
11 | var audioPlayer = cmp.find("audioPlayer");
12 | if (!$A.util.isUndefinedOrNull(audioPlayer)) {
13 | audioPlayer.getElement().play();
14 | }
15 | }
16 | }
17 | })
18 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/cspTrustedSites/HearIt.cspTrustedSite-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | https://www.hear-it.org
13 | true
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/flowDefinitions/PlaySoundInLocalAction.flowDefinition-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/flowDefinitions/PlaySoundInScreen.flowDefinition-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/flowDefinitions/PlaySoundInScreenAndLA.flowDefinition-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/flows/PlaySoundInLocalAction-1.flow-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | PlaySoundLA
14 |
15 | 380
16 | 156
17 | c:playSound
18 | component
19 |
20 | EndScreen
21 |
22 |
23 | source
24 |
25 | /resource/wave
26 |
27 |
28 |
29 | PlaySoundInLocalAction {!$Flow.CurrentDateTime}
30 |
31 | Flow
32 |
33 | EndScreen
34 |
35 | 381
36 | 292
37 | true
38 | true
39 | true
40 |
41 | ThanksMsg
42 | Thank you for watching our demo!
43 | DisplayText
44 |
45 | true
46 | true
47 |
48 |
49 | WelcomeScreen
50 |
51 | 377
52 | 26
53 | true
54 | true
55 | true
56 |
57 | PlaySoundLA
58 |
59 |
60 | WelcomeMsg
61 | PlaySound plays directly in Local Action
62 | DisplayText
63 |
64 | true
65 | true
66 |
67 | WelcomeScreen
68 |
69 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/flows/PlaySoundInScreen-1.flow-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | PlaySoundInScreen {!$Flow.CurrentDateTime}
13 |
14 | Flow
15 |
16 | EndScreen
17 |
18 | 544
19 | 400
20 | true
21 | true
22 | true
23 |
24 | ThanksMsg
25 | Thank you for watching our demo!
26 | DisplayText
27 |
28 |
29 |
30 | PlaySoundAction
31 |
32 | 537
33 | 251
34 | true
35 | true
36 | true
37 |
38 | EndScreen
39 |
40 |
41 | PlaySoundActionCmp
42 | c:playSound
43 | ComponentInstance
44 |
45 | source
46 |
47 | Source
48 |
49 |
50 |
51 | loop
52 |
53 | Loop
54 |
55 |
56 |
57 | muted
58 |
59 | Muted
60 |
61 |
62 |
63 | showUI
64 |
65 | ShowUI
66 |
67 |
68 | true
69 |
70 |
71 |
72 | PlaySoundInScreen
73 |
74 | 537
75 | 126
76 | true
77 | true
78 | true
79 |
80 | PlaySoundAction
81 |
82 |
83 | Source
84 | String
85 |
86 | https://www.hear-it.org/sites/default/files/sound_files/Normal.mp3
87 |
88 | Source
89 | InputField
90 | You can pass the source url here (and do not forget to add CSP Trusted Sites if needed)
91 | true
92 |
93 |
94 | Muted
95 | Boolean
96 |
97 | false
98 |
99 | Muted
100 | InputField
101 | true
102 |
103 |
104 | Loop
105 | Boolean
106 | Loop
107 | InputField
108 | true
109 |
110 |
111 | ShowUI
112 | Boolean
113 |
114 | true
115 |
116 | ShowUI
117 | InputField
118 | true
119 |
120 |
121 | PlaySoundInScreen
122 |
123 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/flows/PlaySoundInScreenAndLA-1.flow-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | PlaySoundActionInLA
14 |
15 | 746
16 | 428
17 | c:playSound
18 | component
19 |
20 | EndScreen
21 |
22 |
23 | source
24 |
25 | Source
26 |
27 |
28 |
29 | PlaySoundInScreenAndLA {!$Flow.CurrentDateTime}
30 |
31 | Flow
32 |
33 | EndScreen
34 |
35 | 568
36 | 497
37 | true
38 | true
39 | true
40 |
41 | ThanksMsg
42 | Thank you for watching our demo!
43 | DisplayText
44 |
45 |
46 |
47 | IntroScreen
48 |
49 | 727
50 | 330
51 | true
52 | true
53 | true
54 |
55 | PlaySoundActionInLA
56 |
57 |
58 | IntroMsg
59 | Click Next to see how PlaySound component plays in Local Action
60 | DisplayText
61 |
62 |
63 |
64 | PlaySoundInBothScreenAndLocalAction
65 |
66 | 552
67 | 121
68 | true
69 | true
70 | true
71 |
72 | PlaySoundInScreen
73 |
74 |
75 | Source
76 | String
77 |
78 | https://www.hear-it.org/sites/default/files/sound_files/Normal.mp3
79 |
80 | Source
81 | InputField
82 | true
83 |
84 |
85 | Muted
86 | Boolean
87 |
88 | false
89 |
90 | Muted
91 | InputField
92 | true
93 |
94 |
95 | Loop
96 | Boolean
97 |
98 | false
99 |
100 | Loop
101 | InputField
102 | true
103 |
104 |
105 | Show_UI
106 | Boolean
107 |
108 | true
109 |
110 | Show UI
111 | InputField
112 | true
113 |
114 |
115 |
116 | PlaySoundInScreen
117 |
118 | 554
119 | 239
120 | true
121 | true
122 | true
123 |
124 | IntroScreen
125 |
126 |
127 | PlaySoundActionInScreen
128 | c:playSound
129 | ComponentInstance
130 |
131 | source
132 |
133 | Source
134 |
135 |
136 |
137 | loop
138 |
139 | Loop
140 |
141 |
142 |
143 | muted
144 |
145 | Muted
146 |
147 |
148 |
149 | showUI
150 |
151 | Show_UI
152 |
153 |
154 | true
155 |
156 |
157 | NextMsg
158 | Click Next to see how PlaySound component plays in Local Action
159 | DisplayText
160 |
161 |
162 | PlaySoundInBothScreenAndLocalAction
163 |
164 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/staticresources/crowcheering.mpga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forcedotcom/LightningFlowComponents/2b4fff4110df42eb40d7d23c20bf83368a178e39/flow_local_actions/PlaySound/force-app/main/default/staticresources/crowcheering.mpga
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/staticresources/crowcheering.resource-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | Private
13 | audio/mpeg
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/staticresources/wave.mpga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forcedotcom/LightningFlowComponents/2b4fff4110df42eb40d7d23c20bf83368a178e39/flow_local_actions/PlaySound/force-app/main/default/staticresources/wave.mpga
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/force-app/main/default/staticresources/wave.resource-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | Private
13 | audio/mpeg
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/PlaySound/sfdx-project.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageDirectories": [
3 | {
4 | "path": "force-app",
5 | "default": true
6 | }
7 | ],
8 | "namespace": "",
9 | "sfdcLoginUrl": "https://login.salesforce.com",
10 | "sourceApiVersion": "42.0"
11 | }
12 |
--------------------------------------------------------------------------------
/flow_local_actions/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | **Installation Instructions - Flow Action Components**
4 |
5 | **Install using SFDX**
6 |
7 | 1) Make sure that you are authenticated to your target org
8 | 2) from the root of the action component project, type:
9 | ```
10 | mkdir mdapioutput
11 | sfdx force:source:convert -d mdapioutput/
12 | sfdx force:mdapi:deploy -d mdapioutput/ -w 10 -u [username of target org]
13 | ```
14 | Example:
15 | ```
16 | $ mkdir mdapioutput
17 | $ sfdx force:source:convert -d mdapioutput/
18 | $ sfdx force:mdapi:deploy -d mdapioutput/ -w 10 -u eware@df17-cc-keynote.brightbank
19 | ```
20 | **Install manually**
21 |
22 | Copy the files into a new set of Lightning Component files on the target org using your preferred development environment. (A video is on the way so non-developers can do the manual installation with just copy and paste).
23 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/.forceignore:
--------------------------------------------------------------------------------
1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
3 | #
4 |
5 | package.xml
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/.gitignore:
--------------------------------------------------------------------------------
1 | .sfdx/
2 | mdapiout
3 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/README.md:
--------------------------------------------------------------------------------
1 | # SFDX App
2 |
3 |
4 | ## Dev, Build and Test
5 | ```
6 | sfdx force:org:create -f config/project-scratch-def.json -a MyToastLocalActionOrg
7 | sfdx force:source:push -u MyToastLocalActionOrg
8 | sfdx force:data:tree:import -f data/CollaborationGroup.json -u MyToastLocalActionOrg
9 | ```
10 | Assign as Org Default the custom Opportunity layout
11 |
12 | Go to any opportunity (desktop) and fill the form on the top
13 |
14 |
15 | ## Resources
16 |
17 |
18 | ## Description of Files and Directories
19 |
20 |
21 | ## Issues
22 |
23 |
24 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "Demo Company",
3 | "edition": "Developer",
4 | "orgPreferences" : {
5 | "enabled": ["S1DesktopEnabled"]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/data/CollaborationGroup.json:
--------------------------------------------------------------------------------
1 | {
2 | "records": [
3 | {
4 | "attributes": {
5 | "type": "CollaborationGroup",
6 | "referenceId": "CollaborationGroupRef1"
7 | },
8 | "Name": "New Opportunity Layout Feedback",
9 | "CollaborationType": "Public"
10 | }
11 | ]
12 | }
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/force-app/main/default/aura/showToast/showToast.cmp:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/force-app/main/default/aura/showToast/showToast.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | 42.0
13 | A Lightning Component Bundle
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/force-app/main/default/aura/showToast/showToast.design:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/force-app/main/default/aura/showToast/showToastController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | invoke : function(component, event, helper) {
9 | var message = component.get("v.message");
10 | var type = component.get("v.type");
11 | helper.showToast(type, message);
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/force-app/main/default/aura/showToast/showToastHelper.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | showToast : function(type, message) {
9 | var toastEvent = $A.get("e.force:showToast");
10 | toastEvent.setParams({
11 | "message": message,
12 | "type": type,
13 | "duration": 10000,
14 | "mode": "dismissible",
15 | });
16 | toastEvent.fire();
17 | }
18 | })
19 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/force-app/main/default/flexipages/Opportunity_Record_Page.flexipage-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 | collapsed
16 | false
17 |
18 | force:highlightsPanel
19 |
20 | Replace
21 | header
22 | Region
23 |
24 |
25 |
26 | runtime_sales_activities:activityPanel
27 |
28 | Replace
29 | activityTabContent
30 | Facet
31 |
32 |
33 |
34 | forceChatter:recordFeedContainer
35 |
36 | Replace
37 | feedTabContent
38 | Facet
39 |
40 |
41 |
42 | force:detailPanel
43 |
44 | Replace
45 | detailTabContent
46 | Facet
47 |
48 |
49 |
50 |
51 | active
52 | true
53 |
54 |
55 | body
56 | activityTabContent
57 |
58 |
59 | title
60 | Standard.Tab.activity
61 |
62 | flexipage:tab
63 |
64 |
65 |
66 | body
67 | feedTabContent
68 |
69 |
70 | title
71 | Standard.Tab.collaborate
72 |
73 | flexipage:tab
74 |
75 |
76 |
77 | body
78 | detailTabContent
79 |
80 |
81 | title
82 | Standard.Tab.detail
83 |
84 | flexipage:tab
85 |
86 | Replace
87 | tabs
88 | Facet
89 |
90 |
91 |
92 |
93 | tabs
94 | tabs
95 |
96 | flexipage:tabset
97 |
98 | Replace
99 | main
100 | Region
101 |
102 |
103 |
104 |
105 | flowLayout
106 | oneColumn
107 |
108 |
109 | flowName
110 | My_Flow_with_Toast
111 |
112 | flowruntime:interview
113 |
114 |
115 |
116 | hideUpdateButton
117 | false
118 |
119 | runtime_sales_pathassistant:pathAssistant
120 |
121 | Replace
122 | subheader
123 | Region
124 |
125 |
126 |
127 | force:relatedListContainer
128 |
129 | Replace
130 | sidebar
131 | Region
132 |
133 | Opportunity Record Page
134 | sfa__Opportunity_rec_L
135 | Opportunity
136 |
137 | flexipage:recordHomeWithSubheaderTemplateDesktop
138 |
139 | RecordPage
140 |
141 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/force-app/main/default/flowDefinitions/My_Flow_with_Toast.flowDefinition-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 | 1
13 |
14 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/force-app/main/default/flows/My_Flow_with_Toast-1.flow-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | Failure
14 |
15 | 737
16 | 432
17 | c:showToast
18 | component
19 |
20 | Empty_Screen
21 |
22 |
23 | type
24 |
25 | error
26 |
27 |
28 |
29 | message
30 |
31 | Oops! An error occurred while sharing your feedback.
32 |
33 |
34 |
35 |
36 | Post_to_Group
37 |
38 | 594
39 | 303
40 | chatterPost
41 | chatterPost
42 |
43 | Success
44 |
45 |
46 | Failure
47 |
48 |
49 | subjectNameOrId
50 |
51 | FeedbackGroup.Id
52 |
53 |
54 |
55 | text
56 |
57 | LongTextArea
58 |
59 |
60 |
61 |
62 | Success
63 |
64 | 595
65 | 431
66 | c:showToast
67 | component
68 |
69 | Empty_Screen
70 |
71 |
72 | message
73 |
74 | Thanks for sharing your feedback with the admin team!
75 |
76 |
77 |
78 | My Flow with Toast {!$Flow.CurrentDateTime}
79 |
80 | Flow
81 |
82 | Find_Feedback_Group
83 |
84 | 594
85 | 197
86 | true
87 |
88 | Post_to_Group
89 |
90 |
91 | Name
92 | EqualTo
93 |
94 | New Opportunity Layout Feedback
95 |
96 |
97 |
98 | FeedbackGroup
99 | Id
100 |
101 |
102 | Empty_Screen
103 |
104 | 596
105 | 612
106 | false
107 | true
108 | false
109 |
110 |
111 | Question_Screen
112 |
113 | 595
114 | 92
115 | false
116 | true
117 | false
118 |
119 | Find_Feedback_Group
120 |
121 |
122 | DisplayText01
123 | What do you think of this new page layout?
124 | DisplayText
125 |
126 |
127 | LongTextArea
128 | LargeTextArea
129 | true
130 |
131 |
132 | Question_Screen
133 |
134 | FeedbackGroup
135 | SObject
136 | false
137 | true
138 | true
139 | CollaborationGroup
140 |
141 |
142 |
--------------------------------------------------------------------------------
/flow_local_actions/ShowToast/sfdx-project.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageDirectories": [
3 | {
4 | "path": "force-app",
5 | "default": true
6 | }
7 | ],
8 | "namespace": "",
9 | "sfdcLoginUrl": "https://login.salesforce.com",
10 | "sourceApiVersion": "42.0"
11 | }
12 |
--------------------------------------------------------------------------------
/flow_local_actions/UpdateScreen/.forceignore:
--------------------------------------------------------------------------------
1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
3 | #
4 |
5 | package.xml
--------------------------------------------------------------------------------
/flow_local_actions/UpdateScreen/README.md:
--------------------------------------------------------------------------------
1 | # UpdateScreen Flow Action Component
2 |
3 | ### Installation
4 |
5 | Follow the general instructions [here](../README.md)
6 |
--------------------------------------------------------------------------------
/flow_local_actions/UpdateScreen/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "Demo Company",
3 | "edition": "Developer",
4 | "orgPreferences" : {
5 | "enabled": ["S1DesktopEnabled"]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/flow_local_actions/UpdateScreen/force-app/main/default/aura/updateScreen/updateScreen.cmp:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
14 |
15 |
20 |
21 |
--------------------------------------------------------------------------------
/flow_local_actions/UpdateScreen/force-app/main/default/aura/updateScreen/updateScreen.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 | 42.0
13 | A Lightning Component Bundle
14 |
15 |
--------------------------------------------------------------------------------
/flow_local_actions/UpdateScreen/force-app/main/default/aura/updateScreen/updateScreen.design:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/flow_local_actions/UpdateScreen/force-app/main/default/aura/updateScreen/updateScreenController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, salesforce.com, inc.
3 | * All rights reserved.
4 | * Licensed under the BSD 3-Clause license.
5 | * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6 | */
7 | ({
8 | invoke : function(component, event, helper) {
9 | return new Promise(function(resolve, reject) {
10 | component.find("recordLoader").reloadRecord(true, $A.getCallback(function() {
11 | // ignore errors, we don't want to stop the flow if we cannot refresh the record
12 | resolve();
13 | }));
14 | });
15 | }
16 | })
--------------------------------------------------------------------------------
/flow_local_actions/UpdateScreen/sfdx-project.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageDirectories": [
3 | {
4 | "path": "force-app",
5 | "default": true
6 | }
7 | ],
8 | "namespace": "",
9 | "sfdcLoginUrl": "https://login.salesforce.com",
10 | "sourceApiVersion": "42.0"
11 | }
12 |
--------------------------------------------------------------------------------
/install.md:
--------------------------------------------------------------------------------
1 | Different installation approaches can be used:
2 |
3 | ## Installing with SFDX
4 |
5 | Starting in the root of one of the SFDX projects (either the screen component one or the actions component one, and not the same as the root of the Github parent project):
6 |
7 | - if you want to push to a scratch org, run:
8 | ```
9 | sfdx force:source:push
10 | ```
11 | - if you want to deploy to a regular org:
12 | 1. create a metadata version of the project:
13 |
14 | 1. make a tempdir to hold the metadata:
15 | ```
16 | mkdir mdapioutput
17 | ```
18 | 2. convert the source to metadata:
19 | ```
20 | sfdx force:source:convert -d mdapioutput/
21 | ```
22 |
23 | 2. deploy to your org:
24 | ```
25 | sfdx force:mdapi:deploy -d mdapioutput/ -u MyOrgAlias -w 100
26 | ```
27 |
28 | Note: if you only want to try deploying a subset of the components, create a package.xml specifying the specific ones to use.
29 | Note: for great tutorials on all of this, see (https://trailhead.salesforce.com/trails/sfdx_get_started)
30 |
31 | ## Using Developer Console
32 | 1. Select a component from either the Flow Screen Components page or the Flow Action Components page.
33 | 2. Drill down into its aura folder and make a note of the various subcomponents involved.
34 | 2. In Developer Console, create copies of the subcomponents.
35 |
36 | ## Copy/Paste Install for Non-Developers
37 | Click-installable packages are maintained by the community at this [location](https://sites.google.com/view/flowunofficial/home). Note that community content is not provided by or supported by Salesforce.
38 |
--------------------------------------------------------------------------------
/sfdxintro.md:
--------------------------------------------------------------------------------
1 | # A Note about SFDX
2 |
3 | This repo contains code structured as SFDX projects. However, you don't have to use SFDX in order to access these components. Each component has its own folder inside force_app/main/default/aura, and you can simply copy and paste the component files to your development environment and deploy your usual way. That said, we recommend you give SFDX a try. It makes deployment of components like these a matter of a few command line keystrokes, and we think it's wonderful. Also, it's free. Learn more at:
4 |
5 | https://developer.salesforce.com/platform/dx
6 |
7 | https://trailhead.salesforce.com/en/trails/sfdx_get_started
8 |
--------------------------------------------------------------------------------