Skip to content
This repository was archived by the owner on Jan 27, 2024. It is now read-only.

Commit cf6a753

Browse files
Merge pull request #13 from douglascayers/develop
Release 2.2.0
2 parents 5663239 + 026b4a1 commit cf6a753

20 files changed

+222
-80
lines changed

.gitignore

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
.idea/
1+
# Salesforce DX configuration files.
22
.sfdx/
3-
.vscode/
4-
*.iml
3+
4+
# IlluminatedCloud configuration files.
5+
.idea/
56
IlluminatedCloud/
7+
*.iml
8+
9+
# Visual Studio Code configuration files.
10+
.vscode/
11+
12+
# A temp directory where build scripts convert
13+
# source files to metadata format.
14+
mdapi/
15+
16+
# NPM cache directory.
617
node_modules/

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ write Apex or configure Named Credentials. Just install and use.
2525
2. Enable My Domain
2626
3. Allow IFraming of Visualforce Pages with Clickjack Protection
2727

28-
You can find step-by-step instructions with screen shots in the [Mass Action Scheduler](https://github.com/douglascayers-org/sfdx-mass-action-scheduler/wiki/Prerequisites) wiki, which is my primary app that uses this component.
28+
You can find step-by-step instructions with screen shots in the [Mass Action Scheduler](https://github.com/douglascayers-org/sfdx-mass-action-scheduler/wiki/Prerequisites) wiki, which is my primary app that uses this component.
2929

3030
## 👋 Getting Started
3131

3232
1. Deploy this project to your org (you only need what's in `force-app` folder).
3333

3434
```
3535
git clone https://github.com/douglascayers/sfdx-lightning-api-component.git
36-
36+
3737
cd sfdx-lightning-api-component
38-
38+
3939
sfdx force:org:create -a lapi -s -f config/project-scratch-def.json
40-
40+
4141
sfdx force:source:deploy -u lapi -p force-app
4242
```
4343
@@ -47,9 +47,9 @@ You can find step-by-step instructions with screen shots in the [Mass Action Sch
4747
4848
```
4949
sfdx force:source:deploy -u lapi -p force-demo
50-
50+
5151
sfdx force:user:permset:assign -n LC_Demo
52-
52+
5353
sfdx force:org:open -u lapi -p //lightning/n/LC_Demo
5454
```
5555
@@ -75,15 +75,15 @@ Add the `<c:lc_api>` to your aura component and give it an `aura:id` for referen
7575

7676
Find the `<c:lc_api>` by its `aura:id` then call one of the request methods:
7777
* The `restRequest(..)` method passing in a JSON object with the `url`, `method`, `body`, and any `headers` properties, or
78-
* The `fetchRequest(..)` method passing in a JSON object with the `url` and `options` properties
78+
* The `fetchRequest(..)` method passing in a JSON object with the `url` and `options` properties
7979

8080
```js
8181
// YourComponentController.js
8282
({
8383
createAccount: function( component, event, helper ) {
8484

8585
component.find( 'lc_api' ).restRequest({
86-
'url' : '/services/data/v46.0/sobjects/Account',
86+
'url' : '/services/data/v47.0/sobjects/Account',
8787
'method' : 'post',
8888
'body' : JSON.stringify({
8989
"Name" : "LC Demo Account"

config/project-scratch-def.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"edition" : "Developer",
44
"features" : [],
55
"settings" : {
6-
"orgPreferenceSettings" : {
7-
"s1EncryptedStoragePref2" : false
6+
"mobileSettings" : {
7+
"enableS1EncryptedStoragePref2" : false
88
}
99
}
1010
}

force-app/main/aura/LC_API/LC_API.cmp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ License: BSD 3-Clause License
4545

4646
Example usage:
4747
component.find( 'lcAPI' ).restRequest({
48-
'url' : '/services/data/v46.0/sobjects/Account',
48+
'url' : '/services/data/v47.0/sobjects/Account',
4949
'method' : 'post',
5050
'body' : JSON.stringify({
5151
'Name' : 'Salesforce',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>46.0</apiVersion>
3+
<apiVersion>47.0</apiVersion>
44
<description>LC_API</description>
55
</AuraDefinitionBundle>

force-app/main/aura/LC_API/LC_APIHelper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ License: BSD 3-Clause License
4747

4848
const helper = this;
4949

50-
return new Promise( function( resolve, reject ) {
50+
return new Promise( $A.getCallback( function( resolve, reject ) {
5151

5252
let child = helper._penpal.child;
5353

@@ -89,7 +89,7 @@ License: BSD 3-Clause License
8989

9090
}
9191

92-
});
92+
}));
9393

9494
},
9595

@@ -143,7 +143,7 @@ License: BSD 3-Clause License
143143

144144
const helper = this;
145145

146-
return new Promise( function( resolve, reject ) {
146+
return new Promise( $A.getCallback( function( resolve, reject ) {
147147

148148
const action = component.get( actionName );
149149

@@ -174,7 +174,7 @@ License: BSD 3-Clause License
174174

175175
$A.enqueueAction( action );
176176

177-
});
177+
}));
178178

179179
},
180180

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>46.0</apiVersion>
3+
<apiVersion>47.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>

force-app/main/pages/LC_APIPage.page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ License: BSD 3-Clause License
2828

2929
const jsforceConn = new jsforce.Connection({
3030
accessToken: '{!$Api.Session_Id}',
31-
version: '46.0'
31+
version: '47.0'
3232
});
3333

3434
const penpalConn = Penpal.connectToParent({

force-app/main/pages/LC_APIPage.page-meta.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>46.0</apiVersion>
3+
<apiVersion>47.0</apiVersion>
44
<availableInTouch>false</availableInTouch>
55
<confirmationTokenRequired>false</confirmationTokenRequired>
66
<label>LC_APIPage</label>

force-app/main/pages/LC_VisualforceDomainPage.page-meta.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>46.0</apiVersion>
3+
<apiVersion>47.0</apiVersion>
44
<availableInTouch>false</availableInTouch>
55
<confirmationTokenRequired>false</confirmationTokenRequired>
66
<label>LC_VisualforceDomainPage</label>

0 commit comments

Comments
 (0)