@genesislcap/foundation-fdc3 14.192.2-fdc3-enhancements.5 → 14.192.2-fdc3-enhancements.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/fdc3.d.ts +1 -0
- package/dist/dts/fdc3.d.ts.map +1 -1
- package/dist/esm/fdc3.js +16 -3
- package/dist/foundation-fdc3.d.ts +1 -0
- package/package.json +14 -14
package/dist/dts/fdc3.d.ts
CHANGED
@@ -133,6 +133,7 @@ export interface FDC3 {
|
|
133
133
|
export declare class DefaultFDC3 implements FDC3 {
|
134
134
|
isReady: boolean;
|
135
135
|
private _currentChannel$;
|
136
|
+
private _currentChannel;
|
136
137
|
currentChannelObs: Observable<Channel>;
|
137
138
|
isInteropFdc3: () => boolean;
|
138
139
|
constructor();
|
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,
|
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,EAAiB,MAAM,MAAM,CAAC;AAIjD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,SAAS;CAAG;AAEnD;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO;CAAG;AAE/C;;GAEG;AACH,MAAM,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G,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,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
@@ -5,7 +5,7 @@ import { __awaiter, __decorate } from "tslib";
|
|
5
5
|
import { addIntentListener, fdc3Ready, findIntent, findIntentsByContext, getCurrentChannel, getOrCreateChannel, getInfo, joinChannel, raiseIntent, raiseIntentForContext, versionIsAtLeast, } from '@finos/fdc3';
|
6
6
|
import { observable } from '@microsoft/fast-element';
|
7
7
|
import { DI } from '@microsoft/fast-foundation';
|
8
|
-
import {
|
8
|
+
import { ReplaySubject } from 'rxjs';
|
9
9
|
import { stripOutBigInt } from './util/fdc3-util';
|
10
10
|
import { logger } from './utils';
|
11
11
|
/**
|
@@ -15,7 +15,7 @@ import { logger } from './utils';
|
|
15
15
|
export class DefaultFDC3 {
|
16
16
|
constructor() {
|
17
17
|
this.isReady = false;
|
18
|
-
this._currentChannel$ = new
|
18
|
+
this._currentChannel$ = new ReplaySubject();
|
19
19
|
this.currentChannelObs = this._currentChannel$.asObservable();
|
20
20
|
this.isInteropFdc3 = () => !!window.io;
|
21
21
|
this.connect();
|
@@ -35,7 +35,15 @@ export class DefaultFDC3 {
|
|
35
35
|
// Listen to changes from the io channel selector.
|
36
36
|
// This can be done on the interop container window which is outside this app scope
|
37
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((
|
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
|
+
}));
|
39
47
|
}
|
40
48
|
}
|
41
49
|
catch (err) {
|
@@ -70,10 +78,15 @@ export class DefaultFDC3 {
|
|
70
78
|
logger.error(`fdc3 unable to raiseIntent using context '${context}' and intent '${intent}'.`);
|
71
79
|
}
|
72
80
|
joinChannel(channelId) {
|
81
|
+
var _a;
|
73
82
|
return __awaiter(this, void 0, void 0, function* () {
|
74
83
|
logger.debug(`fdc3 joinChannel '${channelId}'`);
|
84
|
+
if (((_a = this._currentChannel) === null || _a === void 0 ? void 0 : _a.id) === channelId) {
|
85
|
+
return;
|
86
|
+
}
|
75
87
|
yield joinChannel(channelId);
|
76
88
|
const channel = yield this.getCurrentChannel();
|
89
|
+
this._currentChannel = channel;
|
77
90
|
this._currentChannel$.next(channel);
|
78
91
|
return;
|
79
92
|
});
|
@@ -35,6 +35,7 @@ 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>;
|
39
40
|
isInteropFdc3: () => boolean;
|
40
41
|
constructor();
|
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.7",
|
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.7",
|
63
|
+
"@genesislcap/genx": "14.192.2-fdc3-enhancements.7",
|
64
|
+
"@genesislcap/rollup-builder": "14.192.2-fdc3-enhancements.7",
|
65
|
+
"@genesislcap/ts-builder": "14.192.2-fdc3-enhancements.7",
|
66
|
+
"@genesislcap/uvu-playwright-builder": "14.192.2-fdc3-enhancements.7",
|
67
|
+
"@genesislcap/vite-builder": "14.192.2-fdc3-enhancements.7",
|
68
|
+
"@genesislcap/webpack-builder": "14.192.2-fdc3-enhancements.7",
|
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.7",
|
74
|
+
"@genesislcap/foundation-notifications": "14.192.2-fdc3-enhancements.7",
|
75
|
+
"@genesislcap/foundation-ui": "14.192.2-fdc3-enhancements.7",
|
76
|
+
"@genesislcap/foundation-utils": "14.192.2-fdc3-enhancements.7",
|
77
|
+
"@genesislcap/web-core": "14.192.2-fdc3-enhancements.7",
|
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": "c898c9b35e54f75abf6a6ca474a0a006f563a5cb"
|
93
93
|
}
|