@genesislcap/foundation-fdc3 14.192.2-fdc3-enhancements.4 → 14.192.2-fdc3-enhancements.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/fdc3.d.ts +7 -0
- package/dist/dts/fdc3.d.ts.map +1 -1
- package/dist/esm/fdc3.js +25 -0
- package/dist/foundation-fdc3.api.json +27 -0
- package/dist/foundation-fdc3.d.ts +7 -0
- package/docs/api/foundation-fdc3.fdc3.isinteropfdc3.md +13 -0
- package/docs/api/foundation-fdc3.fdc3.md +1 -0
- package/docs/api-report.md +3 -0
- package/package.json +14 -14
- package/test/fdc3.mock.ts +5 -0
package/dist/dts/fdc3.d.ts
CHANGED
@@ -41,6 +41,11 @@ export interface FDC3 {
|
|
41
41
|
* @public
|
42
42
|
*/
|
43
43
|
isReady: boolean;
|
44
|
+
/**
|
45
|
+
* Check if the interop global is available.
|
46
|
+
* @public
|
47
|
+
*/
|
48
|
+
isInteropFdc3: () => boolean;
|
44
49
|
/**
|
45
50
|
* Observable which emits the current channel
|
46
51
|
* When a new channel is joined a new value is emitted
|
@@ -128,7 +133,9 @@ export interface FDC3 {
|
|
128
133
|
export declare class DefaultFDC3 implements FDC3 {
|
129
134
|
isReady: boolean;
|
130
135
|
private _currentChannel$;
|
136
|
+
private _currentChannel;
|
131
137
|
currentChannelObs: Observable<Channel>;
|
138
|
+
isInteropFdc3: () => boolean;
|
132
139
|
constructor();
|
133
140
|
private connect;
|
134
141
|
addIntentListeners(listeners: Map<FDC3Intents, FDC3ContextHandler>): void;
|
package/dist/dts/fdc3.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fdc3.d.ts","sourceRoot":"","sources":["../../src/fdc3.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,SAAS,EACT,OAAO,EACP,OAAO,EACP,cAAc,EAOd,OAAO,EACP,gBAAgB,EAKjB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,UAAU,EAAW,MAAM,MAAM,CAAC;AAI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AAG,OAAO,CAAC,IAAI,CAAC;IAKrE,8BAA8B,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAC1D,GAAG;IAOT,kBAAkB,CAC7B,OAAO,EAAE,WAAW,GAAG,OAAO,EAC9B,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI;IAMZ,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIlD,OAAO,CAAC,yBAAyB;CAUlC;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,4DAA4D,CAAC"}
|
package/dist/esm/fdc3.js
CHANGED
@@ -17,14 +17,34 @@ export class DefaultFDC3 {
|
|
17
17
|
this.isReady = false;
|
18
18
|
this._currentChannel$ = new Subject();
|
19
19
|
this.currentChannelObs = this._currentChannel$.asObservable();
|
20
|
+
this.isInteropFdc3 = () => !!window.io;
|
20
21
|
this.connect();
|
21
22
|
}
|
22
23
|
connect() {
|
24
|
+
var _a, _b;
|
23
25
|
return __awaiter(this, void 0, void 0, function* () {
|
24
26
|
try {
|
25
27
|
this.isReady = false;
|
26
28
|
yield fdc3Ready();
|
27
29
|
logger.debug('fdc3 connection success');
|
30
|
+
const channel = yield getCurrentChannel();
|
31
|
+
if (channel) {
|
32
|
+
this._currentChannel$.next(channel);
|
33
|
+
}
|
34
|
+
if (this.isInteropFdc3()) {
|
35
|
+
// Listen to changes from the io channel selector.
|
36
|
+
// This can be done on the interop container window which is outside this app scope
|
37
|
+
// Any changes made there will be emitted here and keep channel state in sync
|
38
|
+
(_b = (_a = window.io) === null || _a === void 0 ? void 0 : _a.channels) === null || _b === void 0 ? void 0 : _b.onChanged((channelColor) => __awaiter(this, void 0, void 0, function* () {
|
39
|
+
var _c, _d;
|
40
|
+
if (((_d = (_c = this._currentChannel) === null || _c === void 0 ? void 0 : _c.displayMetadata) === null || _d === void 0 ? void 0 : _d.color) === channelColor) {
|
41
|
+
return;
|
42
|
+
}
|
43
|
+
const currentChannel = yield this.getCurrentChannel();
|
44
|
+
this._currentChannel = currentChannel;
|
45
|
+
this._currentChannel$.next(currentChannel);
|
46
|
+
}));
|
47
|
+
}
|
28
48
|
}
|
29
49
|
catch (err) {
|
30
50
|
logger.error('fdc3 connection error', err);
|
@@ -58,10 +78,15 @@ export class DefaultFDC3 {
|
|
58
78
|
logger.error(`fdc3 unable to raiseIntent using context '${context}' and intent '${intent}'.`);
|
59
79
|
}
|
60
80
|
joinChannel(channelId) {
|
81
|
+
var _a;
|
61
82
|
return __awaiter(this, void 0, void 0, function* () {
|
62
83
|
logger.debug(`fdc3 joinChannel '${channelId}'`);
|
84
|
+
if (((_a = this._currentChannel) === null || _a === void 0 ? void 0 : _a.id) === channelId) {
|
85
|
+
return;
|
86
|
+
}
|
63
87
|
yield joinChannel(channelId);
|
64
88
|
const channel = yield this.getCurrentChannel();
|
89
|
+
this._currentChannel = channel;
|
65
90
|
this._currentChannel$.next(channel);
|
66
91
|
return;
|
67
92
|
});
|
@@ -870,6 +870,33 @@
|
|
870
870
|
],
|
871
871
|
"name": "getOrCreateChannel"
|
872
872
|
},
|
873
|
+
{
|
874
|
+
"kind": "PropertySignature",
|
875
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!FDC3#isInteropFdc3:member",
|
876
|
+
"docComment": "/**\n * Check if the interop global is available.\n *\n * @public\n */\n",
|
877
|
+
"excerptTokens": [
|
878
|
+
{
|
879
|
+
"kind": "Content",
|
880
|
+
"text": "isInteropFdc3: "
|
881
|
+
},
|
882
|
+
{
|
883
|
+
"kind": "Content",
|
884
|
+
"text": "() => boolean"
|
885
|
+
},
|
886
|
+
{
|
887
|
+
"kind": "Content",
|
888
|
+
"text": ";"
|
889
|
+
}
|
890
|
+
],
|
891
|
+
"isReadonly": false,
|
892
|
+
"isOptional": false,
|
893
|
+
"releaseTag": "Public",
|
894
|
+
"name": "isInteropFdc3",
|
895
|
+
"propertyTypeTokenRange": {
|
896
|
+
"startIndex": 1,
|
897
|
+
"endIndex": 2
|
898
|
+
}
|
899
|
+
},
|
873
900
|
{
|
874
901
|
"kind": "PropertySignature",
|
875
902
|
"canonicalReference": "@genesislcap/foundation-fdc3!FDC3#isReady:member",
|
@@ -35,7 +35,9 @@ export declare interface ChannelConfig {
|
|
35
35
|
export declare class DefaultFDC3 implements FDC3 {
|
36
36
|
isReady: boolean;
|
37
37
|
private _currentChannel$;
|
38
|
+
private _currentChannel;
|
38
39
|
currentChannelObs: Observable<Channel>;
|
40
|
+
isInteropFdc3: () => boolean;
|
39
41
|
constructor();
|
40
42
|
private connect;
|
41
43
|
addIntentListeners(listeners: Map<FDC3Intents, FDC3ContextHandler>): void;
|
@@ -62,6 +64,11 @@ export declare interface FDC3 {
|
|
62
64
|
* @public
|
63
65
|
*/
|
64
66
|
isReady: boolean;
|
67
|
+
/**
|
68
|
+
* Check if the interop global is available.
|
69
|
+
* @public
|
70
|
+
*/
|
71
|
+
isInteropFdc3: () => boolean;
|
65
72
|
/**
|
66
73
|
* Observable which emits the current channel
|
67
74
|
* When a new channel is joined a new value is emitted
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [FDC3](./foundation-fdc3.fdc3.md) > [isInteropFdc3](./foundation-fdc3.fdc3.isinteropfdc3.md)
|
4
|
+
|
5
|
+
## FDC3.isInteropFdc3 property
|
6
|
+
|
7
|
+
Check if the interop global is available.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
isInteropFdc3: () => boolean;
|
13
|
+
```
|
@@ -17,6 +17,7 @@ export interface FDC3
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
18
18
|
| --- | --- | --- | --- |
|
19
19
|
| [currentChannelObs](./foundation-fdc3.fdc3.currentchannelobs.md) | | Observable<[FDC3Channel](./foundation-fdc3.fdc3channel.md)<!-- -->> | Observable which emits the current channel When a new channel is joined a new value is emitted |
|
20
|
+
| [isInteropFdc3](./foundation-fdc3.fdc3.isinteropfdc3.md) | | () => boolean | Check if the interop global is available. |
|
20
21
|
| [isReady](./foundation-fdc3.fdc3.isready.md) | | boolean | Whether the FDC3 API is ready. |
|
21
22
|
|
22
23
|
## Methods
|
package/docs/api-report.md
CHANGED
@@ -60,6 +60,8 @@ export class DefaultFDC3 implements FDC3 {
|
|
60
60
|
// (undocumented)
|
61
61
|
getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
|
62
62
|
// (undocumented)
|
63
|
+
isInteropFdc3: () => boolean;
|
64
|
+
// (undocumented)
|
63
65
|
isReady: boolean;
|
64
66
|
// (undocumented)
|
65
67
|
joinChannel(channelId: string): Promise<void>;
|
@@ -81,6 +83,7 @@ export interface FDC3 {
|
|
81
83
|
findIntentsByContext(context: FDC3Context): Promise<FDC3AppIntent[]>;
|
82
84
|
getCurrentChannel(): Promise<Channel>;
|
83
85
|
getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
|
86
|
+
isInteropFdc3: () => boolean;
|
84
87
|
isReady: boolean;
|
85
88
|
joinChannel(channelId: string): Promise<void>;
|
86
89
|
raiseIntent(context: FDC3Context, intent?: FDC3Intents): Promise<FDC3IntentResolution>;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@genesislcap/foundation-fdc3",
|
3
3
|
"description": "Genesis Foundation FDC3",
|
4
|
-
"version": "14.192.2-fdc3-enhancements.
|
4
|
+
"version": "14.192.2-fdc3-enhancements.6",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -59,22 +59,22 @@
|
|
59
59
|
}
|
60
60
|
},
|
61
61
|
"devDependencies": {
|
62
|
-
"@genesislcap/foundation-testing": "14.192.2-fdc3-enhancements.
|
63
|
-
"@genesislcap/genx": "14.192.2-fdc3-enhancements.
|
64
|
-
"@genesislcap/rollup-builder": "14.192.2-fdc3-enhancements.
|
65
|
-
"@genesislcap/ts-builder": "14.192.2-fdc3-enhancements.
|
66
|
-
"@genesislcap/uvu-playwright-builder": "14.192.2-fdc3-enhancements.
|
67
|
-
"@genesislcap/vite-builder": "14.192.2-fdc3-enhancements.
|
68
|
-
"@genesislcap/webpack-builder": "14.192.2-fdc3-enhancements.
|
62
|
+
"@genesislcap/foundation-testing": "14.192.2-fdc3-enhancements.6",
|
63
|
+
"@genesislcap/genx": "14.192.2-fdc3-enhancements.6",
|
64
|
+
"@genesislcap/rollup-builder": "14.192.2-fdc3-enhancements.6",
|
65
|
+
"@genesislcap/ts-builder": "14.192.2-fdc3-enhancements.6",
|
66
|
+
"@genesislcap/uvu-playwright-builder": "14.192.2-fdc3-enhancements.6",
|
67
|
+
"@genesislcap/vite-builder": "14.192.2-fdc3-enhancements.6",
|
68
|
+
"@genesislcap/webpack-builder": "14.192.2-fdc3-enhancements.6",
|
69
69
|
"rimraf": "^5.0.0"
|
70
70
|
},
|
71
71
|
"dependencies": {
|
72
72
|
"@finos/fdc3": "^1.2.0",
|
73
|
-
"@genesislcap/foundation-logger": "14.192.2-fdc3-enhancements.
|
74
|
-
"@genesislcap/foundation-notifications": "14.192.2-fdc3-enhancements.
|
75
|
-
"@genesislcap/foundation-ui": "14.192.2-fdc3-enhancements.
|
76
|
-
"@genesislcap/foundation-utils": "14.192.2-fdc3-enhancements.
|
77
|
-
"@genesislcap/web-core": "14.192.2-fdc3-enhancements.
|
73
|
+
"@genesislcap/foundation-logger": "14.192.2-fdc3-enhancements.6",
|
74
|
+
"@genesislcap/foundation-notifications": "14.192.2-fdc3-enhancements.6",
|
75
|
+
"@genesislcap/foundation-ui": "14.192.2-fdc3-enhancements.6",
|
76
|
+
"@genesislcap/foundation-utils": "14.192.2-fdc3-enhancements.6",
|
77
|
+
"@genesislcap/web-core": "14.192.2-fdc3-enhancements.6",
|
78
78
|
"@interopio/desktop": "^6.3.1",
|
79
79
|
"@microsoft/fast-element": "^1.12.0",
|
80
80
|
"@microsoft/fast-foundation": "^2.49.4",
|
@@ -89,5 +89,5 @@
|
|
89
89
|
"publishConfig": {
|
90
90
|
"access": "public"
|
91
91
|
},
|
92
|
-
"gitHead": "
|
92
|
+
"gitHead": "2777623163fe02d031a6f3486bb78336f493a655"
|
93
93
|
}
|
package/test/fdc3.mock.ts
CHANGED
@@ -4,8 +4,10 @@ export const mockFdc3 = () => {
|
|
4
4
|
if (!('fdc3' in window)) {
|
5
5
|
const broadcast = sinon.stub();
|
6
6
|
const addContextListener = sinon.stub();
|
7
|
+
const channel = sinon.stub();
|
7
8
|
window.fdc3 = {
|
8
9
|
broadcast,
|
10
|
+
channel,
|
9
11
|
addContextListener,
|
10
12
|
getOrCreateChannel: sinon.stub().returns({
|
11
13
|
broadcast,
|
@@ -19,6 +21,9 @@ export const mockFdc3 = () => {
|
|
19
21
|
fireIntent: (value) => callback(value),
|
20
22
|
});
|
21
23
|
},
|
24
|
+
getCurrentChannel: sinon.stub().returns({
|
25
|
+
channel,
|
26
|
+
}),
|
22
27
|
};
|
23
28
|
}
|
24
29
|
};
|