@openfin/salesforce-lwc 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -35
- package/openfin.salesforce-lwc.js +1 -1
- package/package.json +5 -1
- package/preload.js +1 -1
- package/openfin-salesforce-lwc-v1.1.0.tgz +0 -0
- package/version.txt +0 -1
package/README.md
CHANGED
|
@@ -1,50 +1,31 @@
|
|
|
1
1
|
# Salesforce Integration for Lightning Web Components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Access OpenFin’s [Container APIs](https://developers.openfin.co/of-docs/docs/container-overview) from custom [Salesforce components](https://developer.salesforce.com/docs/component-library/documentation/en/lwc).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
_Alternatively, when calling Salesforce’s REST APIs directly from OpenFin apps, use the [@openfin/salesforce](https://www.npmjs.com/package/@openfin/salesforce) package._
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- [@openfin/salesforce](https://www.npmjs.com/package/@openfin/salesforce): Connect OpenFin Container with Salesforce
|
|
7
|
+
## Install
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
With npm:
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
> npm -i @openfin/salesforce-lwc
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
With yarn:
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
> yarn add @openfin/salesforce-lwc
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
// myComponent.js
|
|
17
|
+
## Usage and more information
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import { LightningElement } from 'lwc';
|
|
19
|
+
- [Developer guide](https://developers.openfin.co/of-docs/docs/salesforce-integration)
|
|
20
|
+
- [API reference](https://cdn.openfin.co/docs/integrations/salesforce)
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
async connectedCallback() {
|
|
27
|
-
try {
|
|
28
|
-
await loadScript(this, finApi);
|
|
29
|
-
} catch (err) {
|
|
30
|
-
console.warn('Failed to load static resource, has it been added in Salesforce org settings?');
|
|
31
|
-
}
|
|
22
|
+
## License
|
|
32
23
|
|
|
33
|
-
|
|
34
|
-
window.fin.salesforce.initFinApiInLwc();
|
|
24
|
+
Copyright 2021-2022 OpenFin
|
|
35
25
|
|
|
36
|
-
|
|
37
|
-
if (!window.fin.System?.isOpenFinEnvironment()) {
|
|
38
|
-
console.warn('OpenFin API not available, exiting');
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
26
|
+
The code in this package is distributed under the MIT license.
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
console.log(await window.fin.System.getRuntimeInfo());
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
```
|
|
28
|
+
However, if you run this code, it may call on the OpenFin RVM or OpenFin Runtime, which are covered by OpenFin's Developer, Community, and Enterprise licenses. You can learn more about OpenFin licensing at the links listed below or email us at support@openfin.co with questions.
|
|
47
29
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Refer to the [developer documentation](https://developers.openfin.co/of-docs/docs/salesforce-integration) in order to begin using the Salesforce integration, where you will also find additional code examples and the full API reference.
|
|
30
|
+
- [Licensing](https://www.openfin.co/licensing/)
|
|
31
|
+
- [Developer agreement](https://openfin.co/developer-agreement/)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.fin=n():(e.fin=e.fin||{},e.fin.salesforce=n())}(self,(function(){return(()=>{"use strict";var e={d:(n,o)=>{for(var i in o)e.o(o,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:o[i]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{initFinApiInLwc:()=>i,prepareFinApiInPreload:()=>o});const o=()=>{void 0!==window.fin&&(CustomEvent.prototype.fin=window.fin,CustomEvent.prototype.fdc3=window.fdc3)},i=()=>{const e=new CustomEvent(""),n=e.fin;if(void 0===n)return void console.warn("Unable to locate fin API. Ensure Salesforce is running in OpenFin and 'prepareFinApiInPreload' is run in a preload script before attempting to call 'initFinApiInLwc'.");void 0!==window.fin?Object.assign(window.fin,n):window.fin=n;const o=e.fdc3;void 0!==window.fdc3?Object.assign(window.fdc3,o):window.fdc3=o};return n})()}));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("fin",[],n):"object"==typeof exports?exports.fin=n():(e.fin=e.fin||{},e.fin.salesforce=n())}(self,(function(){return(()=>{"use strict";var e={d:(n,o)=>{for(var i in o)e.o(o,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:o[i]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{initFinApiInLwc:()=>i,prepareFinApiInPreload:()=>o});const o=()=>{void 0!==window.fin&&(CustomEvent.prototype.fin=window.fin,CustomEvent.prototype.fdc3=window.fdc3)},i=()=>{const e=new CustomEvent(""),n=e.fin;if(void 0===n)return void console.warn("Unable to locate fin API. Ensure Salesforce is running in OpenFin and 'prepareFinApiInPreload' is run in a preload script before attempting to call 'initFinApiInLwc'.");void 0!==window.fin?Object.assign(window.fin,n):window.fin=n;const o=e.fdc3;void 0!==window.fdc3?Object.assign(window.fdc3,o):window.fdc3=o};return n})()}));
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/salesforce-lwc",
|
|
3
3
|
"description": "Connect custom Salesforce components with OpenFin Container",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"author": "OpenFin Inc.",
|
|
6
6
|
"homepage": "https://www.openfin.co/",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"openfin",
|
|
9
|
+
"salesforce"
|
|
10
|
+
],
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"main": "openfin.salesforce-lwc.js",
|
|
9
13
|
"types": "types/index.d.ts"
|
package/preload.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(()=>{"use strict";void 0!==window.fin&&(CustomEvent.prototype.fin=window.fin,CustomEvent.prototype.fdc3=window.fdc3)})();
|
|
Binary file
|
package/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.1.0
|