@openfin/salesforce-lwc 1.1.0 → 1.1.2
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/LICENSE.md +1 -21
- package/README.md +10 -40
- package/openfin.salesforce-lwc.js +1 -1
- package/package.json +11 -7
- package/preload.js +1 -1
- package/types/index.d.ts +6 -6
- package/types/lwc/lwc.d.ts +10 -23
- package/types/lwc/lwc.types.d.ts +15 -0
- package/types/preload.d.ts +1 -1
- package/openfin-salesforce-lwc-v1.1.0.tgz +0 -0
- package/version.txt +0 -1
package/LICENSE.md
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 OpenFin Ltd
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
Please refer to the [Developer License](https://www.here.io/developer-agreement/).
|
package/README.md
CHANGED
|
@@ -1,50 +1,20 @@
|
|
|
1
1
|
# Salesforce Integration for Lightning Web Components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Access [HERE Core](https://resources.here.io/docs/core/) APIs 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 HERE Core 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';
|
|
24
|
-
|
|
25
|
-
export default class OpenfinIntegrationTest extends LightningElement {
|
|
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
|
-
}
|
|
32
|
-
|
|
33
|
-
// Initialize window.fin for use
|
|
34
|
-
window.fin.salesforce.initFinApiInLwc();
|
|
35
|
-
|
|
36
|
-
// Check that the OpenFin API is available before continuing
|
|
37
|
-
if (!window.fin.System?.isOpenFinEnvironment()) {
|
|
38
|
-
console.warn('OpenFin API not available, exiting');
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Output the current OpenFin runtime info to the console
|
|
43
|
-
console.log(await window.fin.System.getRuntimeInfo());
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Getting started
|
|
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.
|
|
19
|
+
- [Developer guide](https://resources.here.io/docs/core/integrations/salesforce/)
|
|
20
|
+
- [API reference](https://resources.here.io/docs/integrations/salesforce/)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define("fin",[],o):"object"==typeof exports?exports.fin=o():(e.fin=e.fin||{},e.fin.salesforce=o())}(self,()=>(()=>{"use strict";const e={d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};let o={};e.r(o),e.d(o,{initFinApiInLwc:()=>t,prepareFinApiInPreload:()=>n});const n=()=>{void 0!==window.fin&&(CustomEvent.prototype.fin=window.fin,CustomEvent.prototype.fdc3=window.fdc3)},t=()=>{const{fdc3:e,fin:o}=new CustomEvent("");void 0!==o&&(void 0!==window.fin?Object.assign(window.fin,o):window.fin=o,void 0!==window.fdc3?Object.assign(window.fdc3,e):window.fdc3=e)};return o})());
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/salesforce-lwc",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "1.1.
|
|
5
|
-
"author": "
|
|
6
|
-
"homepage": "https://www.
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
"description": "Access HERE Core APIs from custom Salesforce components",
|
|
4
|
+
"version": "1.1.2",
|
|
5
|
+
"author": "Here Enterprise Inc.",
|
|
6
|
+
"homepage": "https://www.here.io/",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"openfin",
|
|
9
|
+
"salesforce"
|
|
10
|
+
],
|
|
11
|
+
"license": "SEE LICENSE IN LICENSE.MD",
|
|
12
|
+
"main": "dist/openfin.salesforce-lwc.js",
|
|
13
|
+
"types": "dist/types/index.d.ts"
|
|
10
14
|
}
|
package/preload.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(()=>{"use strict";void 0!==window.fin&&(CustomEvent.prototype.fin=window.fin,CustomEvent.prototype.fdc3=window.fdc3)})();
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @
|
|
5
|
-
*/
|
|
6
|
-
export * from './lwc/lwc';
|
|
1
|
+
/**
|
|
2
|
+
* @module @openfin/salesforce-lwc
|
|
3
|
+
*
|
|
4
|
+
* Please refer to the {@link https://developers.openfin.co/of-docs/docs/salesforce-integration | developer documentation} for additional information and code examples.
|
|
5
|
+
*/
|
|
6
|
+
export * from './lwc/lwc';
|
package/types/lwc/lwc.d.ts
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare
|
|
11
|
-
fin: typeof fin;
|
|
12
|
-
fdc3: typeof fdc3;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Prepares the OpenFin API for use in custom Salesforce components.
|
|
16
|
-
*
|
|
17
|
-
* Note: This function must be run in a preload script before any Salesforce content is loaded.
|
|
18
|
-
*/
|
|
19
|
-
export declare const prepareFinApiInPreload: () => void;
|
|
20
|
-
/**
|
|
21
|
-
* Initializes the OpenFin API for use in custom Salesforce components.
|
|
22
|
-
*/
|
|
23
|
-
export declare const initFinApiInLwc: () => void;
|
|
1
|
+
/**
|
|
2
|
+
* Prepares the OpenFin API for use in custom Salesforce components.
|
|
3
|
+
*
|
|
4
|
+
* Note: This function must be run in a preload script before any Salesforce content is loaded.
|
|
5
|
+
*/
|
|
6
|
+
export declare const prepareFinApiInPreload: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Initializes the OpenFin API for use in custom Salesforce components.
|
|
9
|
+
*/
|
|
10
|
+
export declare const initFinApiInLwc: () => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { fin } from '@openfin/core';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export type CustomFinEvent = CustomEvent & {
|
|
6
|
+
fin: typeof fin;
|
|
7
|
+
fdc3: any;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export type FinWindow = typeof window & {
|
|
13
|
+
fdc3?: any;
|
|
14
|
+
fin: typeof fin;
|
|
15
|
+
};
|
package/types/preload.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
Binary file
|
package/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.1.0
|