@genesislcap/foundation-fdc3 14.224.3-alpha-96e79b3.0 → 14.224.3-fui-2256.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/logger.d.ts +2 -0
- package/dist/dts/logger.d.ts.map +1 -0
- package/dist/dts/util/fdc3-context-listener.d.ts +2 -0
- package/dist/dts/util/fdc3-context-listener.d.ts.map +1 -1
- package/dist/dts/util/fdc3-system-channel-listener.d.ts +4 -1
- package/dist/dts/util/fdc3-system-channel-listener.d.ts.map +1 -1
- package/dist/esm/logger.js +2 -0
- package/dist/esm/util/fdc3-context-listener.js +15 -2
- package/dist/esm/util/fdc3-system-channel-listener.js +19 -1
- package/dist/foundation-fdc3.d.ts +6 -1
- package/docs/api-report.md +11 -0
- package/package.json +14 -14
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,iDAAkC,CAAC"}
|
@@ -14,6 +14,8 @@ export interface AppChannelListenerConfig extends SystemChannelListenerConfig {
|
|
14
14
|
*/
|
15
15
|
export declare class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
16
16
|
config: AppChannelListenerConfig[];
|
17
|
+
channelName: string;
|
17
18
|
protected addChannelListeners(): void;
|
19
|
+
protected addChannelListener(): void;
|
18
20
|
}
|
19
21
|
//# sourceMappingURL=fdc3-context-listener.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fdc3-context-listener.d.ts","sourceRoot":"","sources":["../../../src/util/fdc3-context-listener.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"fdc3-context-listener.d.ts","sourceRoot":"","sources":["../../../src/util/fdc3-context-listener.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,gCAAgC,CAAC;AAExC;;;;;GAKG;AACH,MAAM,WAAW,wBAAyB,SAAQ,2BAA2B;IAC3E,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAGa,mBAAoB,SAAQ,yBAAyB;IAChE,MAAM,EAAE,wBAAwB,EAAE,CAAM;IAEH,WAAW,EAAE,MAAM,CAAC;IAEzD,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAUrC,SAAS,CAAC,kBAAkB,IAAI,IAAI;CAWrC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { FoundationElement } from '@genesislcap/web-core';
|
2
|
+
import { Subscription } from 'rxjs';
|
2
3
|
import { FDC3 } from '../fdc3';
|
3
4
|
/**
|
4
5
|
* System channel listener config. System channels are also known as color channels
|
@@ -342,11 +343,13 @@ declare const Fdc3SystemChannelListener_base: (new (...args: any[]) => {
|
|
342
343
|
*/
|
343
344
|
export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
|
344
345
|
config: SystemChannelListenerConfig[];
|
346
|
+
contextType: string;
|
347
|
+
protected channelSub: Subscription;
|
345
348
|
fdc3: FDC3;
|
346
349
|
deepClone(): Node;
|
347
350
|
connectedCallback(): void;
|
348
|
-
private channelSub;
|
349
351
|
protected addChannelListeners(): void;
|
352
|
+
protected addChannelListener(): void;
|
350
353
|
disconnectedCallback(): void;
|
351
354
|
}
|
352
355
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fdc3-system-channel-listener.d.ts","sourceRoot":"","sources":["../../../src/util/fdc3-system-channel-listener.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,iBAAiB,
|
1
|
+
{"version":3,"file":"fdc3-system-channel-listener.d.ts","sourceRoot":"","sources":["../../../src/util/fdc3-system-channel-listener.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,iBAAiB,EAAQ,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAS,YAAY,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;CACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;;GAIG;AACH,qBAGa,yBAA0B,SAAQ,8BAAiC;IAC9E,MAAM,EAAE,2BAA2B,EAAE,CAAM;IAEN,WAAW,EAAE,MAAM,CAAC;IAEzD,SAAS,CAAC,UAAU,eAAsB;IAEpC,IAAI,EAAE,IAAI,CAAC;IAER,SAAS,IAAI,IAAI;IAgB1B,iBAAiB;IAejB,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAarC,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAapC,oBAAoB;CAIrB"}
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { customElement } from '@genesislcap/web-core';
|
1
|
+
import { __awaiter, __decorate } from "tslib";
|
2
|
+
import { attr, customElement } from '@genesislcap/web-core';
|
3
|
+
import { first } from 'rxjs';
|
3
4
|
import { Fdc3SystemChannelListener, } from './fdc3-system-channel-listener';
|
4
5
|
/**
|
5
6
|
* fdc3-context-listener listen to app channel context
|
@@ -17,7 +18,19 @@ let Fdc3ContextListener = class Fdc3ContextListener extends Fdc3SystemChannelLis
|
|
17
18
|
}
|
18
19
|
}));
|
19
20
|
}
|
21
|
+
addChannelListener() {
|
22
|
+
this.fdc3.isReady$.pipe(first()).subscribe(() => __awaiter(this, void 0, void 0, function* () {
|
23
|
+
return this.channelSub.add(this.fdc3.currentChannel$.subscribe((channel) => {
|
24
|
+
this.fdc3.addChannelListener(this.channelName, this.contextType, (context) => {
|
25
|
+
this.$emit('channel-event', context);
|
26
|
+
});
|
27
|
+
}));
|
28
|
+
}));
|
29
|
+
}
|
20
30
|
};
|
31
|
+
__decorate([
|
32
|
+
attr({ attribute: 'channel-name' })
|
33
|
+
], Fdc3ContextListener.prototype, "channelName", void 0);
|
21
34
|
Fdc3ContextListener = __decorate([
|
22
35
|
customElement({
|
23
36
|
name: 'fdc3-context-listener',
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
2
2
|
import { LifecycleMixin } from '@genesislcap/foundation-utils';
|
3
|
-
import { customElement, FoundationElement } from '@genesislcap/web-core';
|
3
|
+
import { customElement, FoundationElement, attr } from '@genesislcap/web-core';
|
4
4
|
import { first, Subscription } from 'rxjs';
|
5
5
|
import { FDC3 } from '../fdc3';
|
6
|
+
import { logger } from '../utils';
|
6
7
|
/**
|
7
8
|
* fdc3-system-channel-listener
|
8
9
|
* Util element to listen to the context on a fdc3 system channel
|
@@ -29,9 +30,13 @@ let Fdc3SystemChannelListener = class Fdc3SystemChannelListener extends Lifecycl
|
|
29
30
|
}
|
30
31
|
connectedCallback() {
|
31
32
|
super.connectedCallback();
|
33
|
+
if (!this.contextType) {
|
34
|
+
logger.warn('Fdc3SystemChannelListener: no context type provided');
|
35
|
+
}
|
32
36
|
this.fdc3.isReady$.pipe(first()).subscribe(() => {
|
33
37
|
if (this.config) {
|
34
38
|
this.addChannelListeners();
|
39
|
+
this.addChannelListener();
|
35
40
|
}
|
36
41
|
});
|
37
42
|
}
|
@@ -43,12 +48,25 @@ let Fdc3SystemChannelListener = class Fdc3SystemChannelListener extends Lifecycl
|
|
43
48
|
})));
|
44
49
|
}));
|
45
50
|
}
|
51
|
+
addChannelListener() {
|
52
|
+
this.fdc3.isReady$.pipe(first()).subscribe(() => __awaiter(this, void 0, void 0, function* () {
|
53
|
+
return this.channelSub.add(this.fdc3.currentChannel$.subscribe((channel) => {
|
54
|
+
this.fdc3.handleChannelCurrentContext(channel, this.contextType, (context) => {
|
55
|
+
this.$emit('channel-event', context);
|
56
|
+
});
|
57
|
+
channel.addContextListener(this.contextType, (context) => this.$emit('channel-event'));
|
58
|
+
}));
|
59
|
+
}));
|
60
|
+
}
|
46
61
|
disconnectedCallback() {
|
47
62
|
var _a;
|
48
63
|
(_a = this.channelSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
49
64
|
super.disconnectedCallback();
|
50
65
|
}
|
51
66
|
};
|
67
|
+
__decorate([
|
68
|
+
attr({ attribute: 'context-type' })
|
69
|
+
], Fdc3SystemChannelListener.prototype, "contextType", void 0);
|
52
70
|
__decorate([
|
53
71
|
FDC3
|
54
72
|
], Fdc3SystemChannelListener.prototype, "fdc3", void 0);
|
@@ -23,6 +23,7 @@ import { Observable } from 'rxjs';
|
|
23
23
|
import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
|
24
24
|
import type { PrivateChannel } from '@finos/fdc3';
|
25
25
|
import type { StandardIntent } from '@finos/fdc3';
|
26
|
+
import { Subscription } from 'rxjs';
|
26
27
|
import { ViewTemplate } from '@microsoft/fast-element';
|
27
28
|
|
28
29
|
/**
|
@@ -586,7 +587,9 @@ export declare type FDC3ContextHandler = ContextHandler;
|
|
586
587
|
*/
|
587
588
|
export declare class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
588
589
|
config: AppChannelListenerConfig[];
|
590
|
+
channelName: string;
|
589
591
|
protected addChannelListeners(): void;
|
592
|
+
protected addChannelListener(): void;
|
590
593
|
}
|
591
594
|
|
592
595
|
/**
|
@@ -1292,11 +1295,13 @@ declare const Fdc3RaiseIntent_base: (new (...args: any[]) => {
|
|
1292
1295
|
*/
|
1293
1296
|
export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
|
1294
1297
|
config: SystemChannelListenerConfig[];
|
1298
|
+
contextType: string;
|
1299
|
+
protected channelSub: Subscription;
|
1295
1300
|
fdc3: FDC3;
|
1296
1301
|
deepClone(): Node;
|
1297
1302
|
connectedCallback(): void;
|
1298
|
-
private channelSub;
|
1299
1303
|
protected addChannelListeners(): void;
|
1304
|
+
protected addChannelListener(): void;
|
1300
1305
|
disconnectedCallback(): void;
|
1301
1306
|
}
|
1302
1307
|
|
package/docs/api-report.md
CHANGED
@@ -29,6 +29,7 @@ import { Observable } from 'rxjs';
|
|
29
29
|
import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
|
30
30
|
import type { PrivateChannel } from '@finos/fdc3';
|
31
31
|
import type { StandardIntent } from '@finos/fdc3';
|
32
|
+
import { Subscription } from 'rxjs';
|
32
33
|
import { ViewTemplate } from '@microsoft/fast-element';
|
33
34
|
|
34
35
|
// @alpha
|
@@ -159,9 +160,13 @@ export type FDC3ContextHandler = ContextHandler;
|
|
159
160
|
|
160
161
|
// @alpha
|
161
162
|
export class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
163
|
+
// (undocumented)
|
164
|
+
protected addChannelListener(): void;
|
162
165
|
// (undocumented)
|
163
166
|
protected addChannelListeners(): void;
|
164
167
|
// (undocumented)
|
168
|
+
channelName: string;
|
169
|
+
// (undocumented)
|
165
170
|
config: AppChannelListenerConfig[];
|
166
171
|
}
|
167
172
|
|
@@ -212,13 +217,19 @@ export class Fdc3RaiseIntent extends Fdc3RaiseIntent_base {
|
|
212
217
|
//
|
213
218
|
// @alpha
|
214
219
|
export class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
|
220
|
+
// (undocumented)
|
221
|
+
protected addChannelListener(): void;
|
215
222
|
// (undocumented)
|
216
223
|
protected addChannelListeners(): void;
|
217
224
|
// (undocumented)
|
225
|
+
protected channelSub: Subscription;
|
226
|
+
// (undocumented)
|
218
227
|
config: SystemChannelListenerConfig[];
|
219
228
|
// (undocumented)
|
220
229
|
connectedCallback(): void;
|
221
230
|
// (undocumented)
|
231
|
+
contextType: string;
|
232
|
+
// (undocumented)
|
222
233
|
deepClone(): Node;
|
223
234
|
// (undocumented)
|
224
235
|
disconnectedCallback(): void;
|
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.224.3-
|
4
|
+
"version": "14.224.3-fui-2256.1",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -59,23 +59,23 @@
|
|
59
59
|
}
|
60
60
|
},
|
61
61
|
"devDependencies": {
|
62
|
-
"@genesislcap/foundation-testing": "14.224.3-
|
63
|
-
"@genesislcap/genx": "14.224.3-
|
64
|
-
"@genesislcap/rollup-builder": "14.224.3-
|
65
|
-
"@genesislcap/ts-builder": "14.224.3-
|
66
|
-
"@genesislcap/uvu-playwright-builder": "14.224.3-
|
67
|
-
"@genesislcap/vite-builder": "14.224.3-
|
68
|
-
"@genesislcap/webpack-builder": "14.224.3-
|
62
|
+
"@genesislcap/foundation-testing": "14.224.3-fui-2256.1",
|
63
|
+
"@genesislcap/genx": "14.224.3-fui-2256.1",
|
64
|
+
"@genesislcap/rollup-builder": "14.224.3-fui-2256.1",
|
65
|
+
"@genesislcap/ts-builder": "14.224.3-fui-2256.1",
|
66
|
+
"@genesislcap/uvu-playwright-builder": "14.224.3-fui-2256.1",
|
67
|
+
"@genesislcap/vite-builder": "14.224.3-fui-2256.1",
|
68
|
+
"@genesislcap/webpack-builder": "14.224.3-fui-2256.1",
|
69
69
|
"rimraf": "^5.0.0",
|
70
70
|
"sinon": "^17.0.1"
|
71
71
|
},
|
72
72
|
"dependencies": {
|
73
73
|
"@finos/fdc3": "2.1.1",
|
74
|
-
"@genesislcap/foundation-logger": "14.224.3-
|
75
|
-
"@genesislcap/foundation-notifications": "14.224.3-
|
76
|
-
"@genesislcap/foundation-ui": "14.224.3-
|
77
|
-
"@genesislcap/foundation-utils": "14.224.3-
|
78
|
-
"@genesislcap/web-core": "14.224.3-
|
74
|
+
"@genesislcap/foundation-logger": "14.224.3-fui-2256.1",
|
75
|
+
"@genesislcap/foundation-notifications": "14.224.3-fui-2256.1",
|
76
|
+
"@genesislcap/foundation-ui": "14.224.3-fui-2256.1",
|
77
|
+
"@genesislcap/foundation-utils": "14.224.3-fui-2256.1",
|
78
|
+
"@genesislcap/web-core": "14.224.3-fui-2256.1",
|
79
79
|
"@interopio/desktop": "^6.3.1",
|
80
80
|
"@microsoft/fast-element": "1.14.0",
|
81
81
|
"@microsoft/fast-foundation": "2.49.6",
|
@@ -90,5 +90,5 @@
|
|
90
90
|
"publishConfig": {
|
91
91
|
"access": "public"
|
92
92
|
},
|
93
|
-
"gitHead": "
|
93
|
+
"gitHead": "5fd28ed47a2170112502041376a10996188861d9"
|
94
94
|
}
|