@genesislcap/foundation-fdc3 14.227.3 → 14.227.4-FUI-2256.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/fdc3.d.ts.map +1 -1
- 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 +42 -14
- package/dist/dts/util/fdc3-context-listener.d.ts.map +1 -1
- package/dist/dts/util/fdc3-system-channel-listener.d.ts +55 -17
- package/dist/dts/util/fdc3-system-channel-listener.d.ts.map +1 -1
- package/dist/esm/fdc3.js +3 -0
- package/dist/esm/logger.js +2 -0
- package/dist/esm/util/fdc3-context-listener.js +53 -14
- package/dist/esm/util/fdc3-system-channel-listener.js +65 -28
- package/dist/foundation-fdc3.api.json +302 -0
- package/dist/foundation-fdc3.d.ts +95 -31
- package/docs/api/foundation-fdc3.fdc3contextlistener.addchannellistener.md +15 -0
- package/docs/api/foundation-fdc3.fdc3contextlistener.channelname.md +22 -0
- package/docs/api/foundation-fdc3.fdc3contextlistener.md +53 -0
- package/docs/api/foundation-fdc3.fdc3systemchannellistener.addchannellistener.md +15 -0
- package/docs/api/foundation-fdc3.fdc3systemchannellistener.connectedcallback.md +15 -0
- package/docs/api/foundation-fdc3.fdc3systemchannellistener.contexttype.md +22 -0
- package/docs/api/foundation-fdc3.fdc3systemchannellistener.disconnectedcallback.md +15 -0
- package/docs/api/foundation-fdc3.fdc3systemchannellistener.handlecurrentcontext.md +22 -0
- package/docs/api/foundation-fdc3.fdc3systemchannellistener.md +55 -0
- package/docs/api/foundation-fdc3.md +2 -0
- package/docs/api-report.md +12 -25
- package/package.json +15 -14
- package/test/fdc3.mock.ts +1 -1
package/dist/dts/fdc3.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fdc3.d.ts","sourceRoot":"","sources":["../../src/fdc3.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,OAAO,EACP,aAAa,EACb,OAAO,EAC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H,eAAO,MAAM,IAAI,4DAA4D,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,iDAAkC,CAAC"}
|
@@ -1,19 +1,47 @@
|
|
1
|
-
import { Fdc3SystemChannelListener
|
1
|
+
import { Fdc3SystemChannelListener } from './fdc3-system-channel-listener';
|
2
2
|
/**
|
3
|
-
* fdc3-context-listener
|
4
|
-
*
|
5
|
-
* @
|
6
|
-
* @
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
*
|
13
|
-
*
|
3
|
+
* fdc3-context-listener
|
4
|
+
* Util element to listen to the context on a fdc3 app channel
|
5
|
+
* @public
|
6
|
+
* @tagname fdc3-context-listener
|
7
|
+
* @example
|
8
|
+
* ```ts
|
9
|
+
* import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
10
|
+
* @customElement({
|
11
|
+
* name: 'example-component',
|
12
|
+
* template: html<ExampleComponent>`
|
13
|
+
* <fdc3-context-listener
|
14
|
+
* @channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
15
|
+
* context-type="fdc3.position"
|
16
|
+
* channel-name="my_custom_channel">
|
17
|
+
* </fdc3-context-listener>
|
18
|
+
* `,
|
19
|
+
* })
|
20
|
+
* class ExampleComponent extends GenesisElement {
|
21
|
+
* handleChannelMessage(e: CustomEvent) {
|
22
|
+
* const message = e.detail;
|
23
|
+
* if (message?.id?.ticker) {
|
24
|
+
* console.log(message.id.ticker);
|
25
|
+
* // ToDo: handle the message as you like
|
26
|
+
* }
|
27
|
+
* }
|
28
|
+
* }
|
29
|
+
* ```
|
30
|
+
* @param Context - the fdc3 context type
|
31
|
+
* @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
|
32
|
+
*
|
33
|
+
* @param Context - the fdc3 context type
|
34
|
+
* @fires current-context - The current context value of the channel, if present
|
14
35
|
*/
|
15
36
|
export declare class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
16
|
-
|
17
|
-
|
37
|
+
/**
|
38
|
+
* The name of the channel you want to listen to. Read more about fdc3 app channels at https://fdc3.finos.org/docs/api/spec#app-channels
|
39
|
+
* @example this will listen to the system channel for updates on the type `my_custom_channel` with context `fdc3.position`
|
40
|
+
* ```ts
|
41
|
+
* <fdc3-context-listener context-type="fdc3.position" channel-name="my_custom_channel"></fdc3-context-listener>
|
42
|
+
* ```
|
43
|
+
*/
|
44
|
+
channelName: string;
|
45
|
+
protected addChannelListener(): Promise<void>;
|
18
46
|
}
|
19
47
|
//# 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,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAGa,mBAAoB,SAAQ,yBAAyB;IAChE;;;;;;OAMG;IACkC,WAAW,EAAE,MAAM,CAAC;cAEzC,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;CAiBpD"}
|
@@ -1,15 +1,6 @@
|
|
1
1
|
import { FoundationElement } from '@genesislcap/web-core';
|
2
|
-
import {
|
3
|
-
|
4
|
-
* System channel listener config. System channels are also known as color channels
|
5
|
-
* @alpha
|
6
|
-
* @param channelType - string for the context channel type
|
7
|
-
* @param callback - function that is called if a message with a matching context is emitted
|
8
|
-
*/
|
9
|
-
export interface SystemChannelListenerConfig {
|
10
|
-
channelType: string;
|
11
|
-
callback: (any: any) => void;
|
12
|
-
}
|
2
|
+
import { Subscription } from 'rxjs';
|
3
|
+
import { FDC3, FDC3Channel } from '../fdc3';
|
13
4
|
declare const Fdc3SystemChannelListener_base: (new (...args: any[]) => {
|
14
5
|
"__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
|
15
6
|
"__#1@#_latestTokenCode": string;
|
@@ -335,18 +326,65 @@ declare const Fdc3SystemChannelListener_base: (new (...args: any[]) => {
|
|
335
326
|
blur(): void;
|
336
327
|
focus(options?: FocusOptions): void;
|
337
328
|
}) & typeof FoundationElement;
|
329
|
+
/**
|
330
|
+
* The Grid Pro element.
|
331
|
+
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
332
|
+
* @public
|
333
|
+
* @tagname %%prefix%%-grid-pro
|
334
|
+
*/
|
338
335
|
/**
|
339
336
|
* fdc3-system-channel-listener
|
340
337
|
* Util element to listen to the context on a fdc3 system channel
|
341
|
-
* @
|
342
|
-
|
338
|
+
* @public
|
339
|
+
* @tagname fdc3-system-channel-listener
|
340
|
+
* @example
|
341
|
+
* ```ts
|
342
|
+
* import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
343
|
+
* @customElement({
|
344
|
+
* name: 'example-component',
|
345
|
+
* template: html<ExampleComponent>`
|
346
|
+
* <fdc3-system-channel-listener
|
347
|
+
* @channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
348
|
+
* context-type="fdc3.position">
|
349
|
+
* </fdc3-system-channel-listener>
|
350
|
+
* `,
|
351
|
+
* })
|
352
|
+
* class ExampleComponent extends GenesisElement {
|
353
|
+
* handleChannelMessage(e: CustomEvent) {
|
354
|
+
* const message = e.detail;
|
355
|
+
* if (message?.id?.ticker) {
|
356
|
+
* console.log(message.id.ticker);
|
357
|
+
* // ToDo: handle the message as you like
|
358
|
+
* }
|
359
|
+
* }
|
360
|
+
* }
|
361
|
+
* ```
|
362
|
+
* @param Context - the fdc3 context type
|
363
|
+
* @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
|
364
|
+
*
|
365
|
+
* @param Context - the fdc3 context type
|
366
|
+
* @fires current-context - The current context value of the channel, if present
|
367
|
+
* */
|
343
368
|
export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
|
344
|
-
|
369
|
+
/**
|
370
|
+
* The context type on the channel you want to listen to. Read more about fdc3 context type at https://fdc3.finos.org/docs/context/ref/Context
|
371
|
+
* @example this will listen to the system channel for updates on the type `fdc3.position`
|
372
|
+
* ```ts
|
373
|
+
* <fdc3-system-channel-listener context-type="fdc3.position"></fdc3-system-channel-listener>
|
374
|
+
* ```
|
375
|
+
*/
|
376
|
+
contextType: string;
|
377
|
+
/**
|
378
|
+
* @internal
|
379
|
+
*/
|
380
|
+
protected channelSub: Subscription;
|
381
|
+
/**
|
382
|
+
* @internal
|
383
|
+
*/
|
345
384
|
fdc3: FDC3;
|
346
|
-
deepClone(): Node;
|
347
385
|
connectedCallback(): void;
|
348
|
-
|
349
|
-
protected
|
386
|
+
protected addChannelListener(): void;
|
387
|
+
protected handleCurrentContext(channel: FDC3Channel): void;
|
350
388
|
disconnectedCallback(): void;
|
351
389
|
}
|
352
390
|
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,WAAW,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG5C;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCK;AACL,qBAGa,yBAA0B,SAAQ,8BAAiC;IAC9E;;;;;;OAMG;IACkC,WAAW,EAAE,MAAM,CAAC;IAEzD;;OAEG;IACH,SAAS,CAAC,UAAU,eAAsB;IAE1C;;OAEG;IACG,IAAI,EAAE,IAAI,CAAC;IAEjB,iBAAiB;IAOjB,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAepC,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAQ1D,oBAAoB;CAIrB"}
|
package/dist/esm/fdc3.js
CHANGED
@@ -1,23 +1,62 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { customElement } from '@genesislcap/web-core';
|
3
|
-
import {
|
1
|
+
import { __awaiter, __decorate } from "tslib";
|
2
|
+
import { attr, customElement } from '@genesislcap/web-core';
|
3
|
+
import { logger } from '../utils';
|
4
|
+
import { Fdc3SystemChannelListener } from './fdc3-system-channel-listener';
|
4
5
|
/**
|
5
|
-
* fdc3-context-listener
|
6
|
-
*
|
6
|
+
* fdc3-context-listener
|
7
|
+
* Util element to listen to the context on a fdc3 app channel
|
8
|
+
* @public
|
9
|
+
* @tagname fdc3-context-listener
|
10
|
+
* @example
|
11
|
+
* ```ts
|
12
|
+
* import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
13
|
+
* @customElement({
|
14
|
+
* name: 'example-component',
|
15
|
+
* template: html<ExampleComponent>`
|
16
|
+
* <fdc3-context-listener
|
17
|
+
* @channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
18
|
+
* context-type="fdc3.position"
|
19
|
+
* channel-name="my_custom_channel">
|
20
|
+
* </fdc3-context-listener>
|
21
|
+
* `,
|
22
|
+
* })
|
23
|
+
* class ExampleComponent extends GenesisElement {
|
24
|
+
* handleChannelMessage(e: CustomEvent) {
|
25
|
+
* const message = e.detail;
|
26
|
+
* if (message?.id?.ticker) {
|
27
|
+
* console.log(message.id.ticker);
|
28
|
+
* // ToDo: handle the message as you like
|
29
|
+
* }
|
30
|
+
* }
|
31
|
+
* }
|
32
|
+
* ```
|
33
|
+
* @param Context - the fdc3 context type
|
34
|
+
* @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
|
35
|
+
*
|
36
|
+
* @param Context - the fdc3 context type
|
37
|
+
* @fires current-context - The current context value of the channel, if present
|
7
38
|
*/
|
8
39
|
let Fdc3ContextListener = class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
40
|
+
addChannelListener() {
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
42
|
+
if (!this.contextType) {
|
43
|
+
logger.warn('Fdc3SystemChannelListener: no context type provided');
|
44
|
+
}
|
45
|
+
else if (!this.channelName) {
|
46
|
+
logger.warn('Fdc3SystemChannelListener: no channel name provided');
|
47
|
+
}
|
48
|
+
else {
|
49
|
+
const channel = yield this.fdc3.addChannelListener(this.channelName, this.contextType, (context) => {
|
50
|
+
this.$emit('channel-event', context);
|
51
|
+
});
|
52
|
+
this.handleCurrentContext(channel);
|
17
53
|
}
|
18
|
-
})
|
54
|
+
});
|
19
55
|
}
|
20
56
|
};
|
57
|
+
__decorate([
|
58
|
+
attr({ attribute: 'channel-name' })
|
59
|
+
], Fdc3ContextListener.prototype, "channelName", void 0);
|
21
60
|
Fdc3ContextListener = __decorate([
|
22
61
|
customElement({
|
23
62
|
name: 'fdc3-context-listener',
|
@@ -1,47 +1,81 @@
|
|
1
|
-
import {
|
1
|
+
import { __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';
|
7
|
+
/**
|
8
|
+
* The Grid Pro element.
|
9
|
+
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
10
|
+
* @public
|
11
|
+
* @tagname %%prefix%%-grid-pro
|
12
|
+
*/
|
6
13
|
/**
|
7
14
|
* fdc3-system-channel-listener
|
8
15
|
* Util element to listen to the context on a fdc3 system channel
|
9
|
-
* @
|
10
|
-
|
16
|
+
* @public
|
17
|
+
* @tagname fdc3-system-channel-listener
|
18
|
+
* @example
|
19
|
+
* ```ts
|
20
|
+
* import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
21
|
+
* @customElement({
|
22
|
+
* name: 'example-component',
|
23
|
+
* template: html<ExampleComponent>`
|
24
|
+
* <fdc3-system-channel-listener
|
25
|
+
* @channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
26
|
+
* context-type="fdc3.position">
|
27
|
+
* </fdc3-system-channel-listener>
|
28
|
+
* `,
|
29
|
+
* })
|
30
|
+
* class ExampleComponent extends GenesisElement {
|
31
|
+
* handleChannelMessage(e: CustomEvent) {
|
32
|
+
* const message = e.detail;
|
33
|
+
* if (message?.id?.ticker) {
|
34
|
+
* console.log(message.id.ticker);
|
35
|
+
* // ToDo: handle the message as you like
|
36
|
+
* }
|
37
|
+
* }
|
38
|
+
* }
|
39
|
+
* ```
|
40
|
+
* @param Context - the fdc3 context type
|
41
|
+
* @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
|
42
|
+
*
|
43
|
+
* @param Context - the fdc3 context type
|
44
|
+
* @fires current-context - The current context value of the channel, if present
|
45
|
+
* */
|
11
46
|
let Fdc3SystemChannelListener = class Fdc3SystemChannelListener extends LifecycleMixin(FoundationElement) {
|
12
47
|
constructor() {
|
13
48
|
super(...arguments);
|
14
|
-
|
49
|
+
/**
|
50
|
+
* @internal
|
51
|
+
*/
|
15
52
|
this.channelSub = new Subscription();
|
16
53
|
}
|
17
|
-
deepClone() {
|
18
|
-
const copy = super.deepClone();
|
19
|
-
if (this.config) {
|
20
|
-
copy.config = this.config.map((c) => {
|
21
|
-
const copyConfig = Object.assign({}, c);
|
22
|
-
if (c.callback) {
|
23
|
-
copyConfig.callback = c.callback.bind(this);
|
24
|
-
}
|
25
|
-
return copyConfig;
|
26
|
-
});
|
27
|
-
}
|
28
|
-
return copy;
|
29
|
-
}
|
30
54
|
connectedCallback() {
|
31
55
|
super.connectedCallback();
|
32
56
|
this.fdc3.isReady$.pipe(first()).subscribe(() => {
|
33
|
-
|
34
|
-
this.addChannelListeners();
|
35
|
-
}
|
57
|
+
this.addChannelListener();
|
36
58
|
});
|
37
59
|
}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
60
|
+
addChannelListener() {
|
61
|
+
if (!this.contextType) {
|
62
|
+
logger.warn('Fdc3SystemChannelListener: no context type provided');
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
this.channelSub.add(this.fdc3.currentChannel$.subscribe((channel) => {
|
66
|
+
channel.addContextListener(this.contextType, (context) => {
|
67
|
+
this.$emit('channel-event', context);
|
68
|
+
});
|
69
|
+
this.handleCurrentContext(channel);
|
70
|
+
}));
|
71
|
+
}
|
72
|
+
}
|
73
|
+
handleCurrentContext(channel) {
|
74
|
+
this.fdc3.handleChannelCurrentContext(channel, this.contextType, (context) => {
|
75
|
+
if (context) {
|
76
|
+
this.$emit('current-context', context);
|
77
|
+
}
|
78
|
+
});
|
45
79
|
}
|
46
80
|
disconnectedCallback() {
|
47
81
|
var _a;
|
@@ -49,6 +83,9 @@ let Fdc3SystemChannelListener = class Fdc3SystemChannelListener extends Lifecycl
|
|
49
83
|
super.disconnectedCallback();
|
50
84
|
}
|
51
85
|
};
|
86
|
+
__decorate([
|
87
|
+
attr({ attribute: 'context-type' })
|
88
|
+
], Fdc3SystemChannelListener.prototype, "contextType", void 0);
|
52
89
|
__decorate([
|
53
90
|
FDC3
|
54
91
|
], Fdc3SystemChannelListener.prototype, "fdc3", void 0);
|
@@ -1414,6 +1414,104 @@
|
|
1414
1414
|
"endIndex": 2
|
1415
1415
|
}
|
1416
1416
|
},
|
1417
|
+
{
|
1418
|
+
"kind": "Class",
|
1419
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3ContextListener:class",
|
1420
|
+
"docComment": "/**\n * fdc3-context-listener Util element to listen to the context on a fdc3 app channel\n *\n * @param Context - the fdc3 context type\n *\n * @param Context - the fdc3 context type\n *\n * @tagname\n *\n * fdc3-context-listener\n *\n * @example\n * ```ts\n * import { customElement, GenesisElement, html } from '@genesislcap/web-core';\n * @customElement({\n * name: 'example-component',\n * template: html<ExampleComponent>`\n * <fdc3-context-listener\n * @channel-event=\"${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}\"\n * context-type=\"fdc3.position\"\n * channel-name=\"my_custom_channel\">\n * </fdc3-context-listener>\n * `,\n * })\n * class ExampleComponent extends GenesisElement {\n * handleChannelMessage(e: CustomEvent) {\n * const message = e.detail;\n * if (message?.id?.ticker) {\n * console.log(message.id.ticker);\n * // ToDo: handle the message as you like\n * }\n * }\n * }\n * ```\n *\n * @fires\n *\n * channel-event - Dispatched when an event matching the context is dispatched from the system channel\n *\n * @fires\n *\n * current-context - The current context value of the channel, if present\n *\n * @public\n */\n",
|
1421
|
+
"excerptTokens": [
|
1422
|
+
{
|
1423
|
+
"kind": "Content",
|
1424
|
+
"text": "export declare class Fdc3ContextListener extends "
|
1425
|
+
},
|
1426
|
+
{
|
1427
|
+
"kind": "Reference",
|
1428
|
+
"text": "Fdc3SystemChannelListener",
|
1429
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3SystemChannelListener:class"
|
1430
|
+
},
|
1431
|
+
{
|
1432
|
+
"kind": "Content",
|
1433
|
+
"text": " "
|
1434
|
+
}
|
1435
|
+
],
|
1436
|
+
"fileUrlPath": "src/util/fdc3-context-listener.ts",
|
1437
|
+
"releaseTag": "Public",
|
1438
|
+
"isAbstract": false,
|
1439
|
+
"name": "Fdc3ContextListener",
|
1440
|
+
"preserveMemberOrder": false,
|
1441
|
+
"members": [
|
1442
|
+
{
|
1443
|
+
"kind": "Method",
|
1444
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3ContextListener#addChannelListener:member(1)",
|
1445
|
+
"docComment": "",
|
1446
|
+
"excerptTokens": [
|
1447
|
+
{
|
1448
|
+
"kind": "Content",
|
1449
|
+
"text": "protected addChannelListener(): "
|
1450
|
+
},
|
1451
|
+
{
|
1452
|
+
"kind": "Reference",
|
1453
|
+
"text": "Promise",
|
1454
|
+
"canonicalReference": "!Promise:interface"
|
1455
|
+
},
|
1456
|
+
{
|
1457
|
+
"kind": "Content",
|
1458
|
+
"text": "<void>"
|
1459
|
+
},
|
1460
|
+
{
|
1461
|
+
"kind": "Content",
|
1462
|
+
"text": ";"
|
1463
|
+
}
|
1464
|
+
],
|
1465
|
+
"isStatic": false,
|
1466
|
+
"returnTypeTokenRange": {
|
1467
|
+
"startIndex": 1,
|
1468
|
+
"endIndex": 3
|
1469
|
+
},
|
1470
|
+
"releaseTag": "Public",
|
1471
|
+
"isProtected": true,
|
1472
|
+
"overloadIndex": 1,
|
1473
|
+
"parameters": [],
|
1474
|
+
"isOptional": false,
|
1475
|
+
"isAbstract": false,
|
1476
|
+
"name": "addChannelListener"
|
1477
|
+
},
|
1478
|
+
{
|
1479
|
+
"kind": "Property",
|
1480
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3ContextListener#channelName:member",
|
1481
|
+
"docComment": "/**\n * The name of the channel you want to listen to. Read more about fdc3 app channels at https://fdc3.finos.org/docs/api/spec#app-channels\n *\n * @example\n *\n * this will listen to the system channel for updates on the type `my_custom_channel` with context `fdc3.position`\n * ```ts\n * <fdc3-context-listener context-type=\"fdc3.position\" channel-name=\"my_custom_channel\"></fdc3-context-listener>\n * ```\n *\n */\n",
|
1482
|
+
"excerptTokens": [
|
1483
|
+
{
|
1484
|
+
"kind": "Content",
|
1485
|
+
"text": "channelName: "
|
1486
|
+
},
|
1487
|
+
{
|
1488
|
+
"kind": "Content",
|
1489
|
+
"text": "string"
|
1490
|
+
},
|
1491
|
+
{
|
1492
|
+
"kind": "Content",
|
1493
|
+
"text": ";"
|
1494
|
+
}
|
1495
|
+
],
|
1496
|
+
"isReadonly": false,
|
1497
|
+
"isOptional": false,
|
1498
|
+
"releaseTag": "Public",
|
1499
|
+
"name": "channelName",
|
1500
|
+
"propertyTypeTokenRange": {
|
1501
|
+
"startIndex": 1,
|
1502
|
+
"endIndex": 2
|
1503
|
+
},
|
1504
|
+
"isStatic": false,
|
1505
|
+
"isProtected": false,
|
1506
|
+
"isAbstract": false
|
1507
|
+
}
|
1508
|
+
],
|
1509
|
+
"extendsTokenRange": {
|
1510
|
+
"startIndex": 1,
|
1511
|
+
"endIndex": 2
|
1512
|
+
},
|
1513
|
+
"implementsTokenRanges": []
|
1514
|
+
},
|
1417
1515
|
{
|
1418
1516
|
"kind": "Interface",
|
1419
1517
|
"canonicalReference": "@genesislcap/foundation-fdc3!FDC3IntentResolution:interface",
|
@@ -1472,6 +1570,210 @@
|
|
1472
1570
|
"endIndex": 2
|
1473
1571
|
}
|
1474
1572
|
},
|
1573
|
+
{
|
1574
|
+
"kind": "Class",
|
1575
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3SystemChannelListener:class",
|
1576
|
+
"docComment": "/**\n * fdc3-system-channel-listener Util element to listen to the context on a fdc3 system channel\n *\n * @param Context - the fdc3 context type\n *\n * @param Context - the fdc3 context type\n *\n * @tagname\n *\n * fdc3-system-channel-listener\n *\n * @example\n * ```ts\n * import { customElement, GenesisElement, html } from '@genesislcap/web-core';\n * @customElement({\n * name: 'example-component',\n * template: html<ExampleComponent>`\n * <fdc3-system-channel-listener\n * @channel-event=\"${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}\"\n * context-type=\"fdc3.position\">\n * </fdc3-system-channel-listener>\n * `,\n * })\n * class ExampleComponent extends GenesisElement {\n * handleChannelMessage(e: CustomEvent) {\n * const message = e.detail;\n * if (message?.id?.ticker) {\n * console.log(message.id.ticker);\n * // ToDo: handle the message as you like\n * }\n * }\n * }\n * ```\n *\n * @fires\n *\n * channel-event - Dispatched when an event matching the context is dispatched from the system channel\n *\n * @fires\n *\n * current-context - The current context value of the channel, if present\n *\n * @public\n */\n",
|
1577
|
+
"excerptTokens": [
|
1578
|
+
{
|
1579
|
+
"kind": "Content",
|
1580
|
+
"text": "export declare class Fdc3SystemChannelListener extends "
|
1581
|
+
},
|
1582
|
+
{
|
1583
|
+
"kind": "Reference",
|
1584
|
+
"text": "Fdc3SystemChannelListener_base",
|
1585
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!~Fdc3SystemChannelListener_base"
|
1586
|
+
},
|
1587
|
+
{
|
1588
|
+
"kind": "Content",
|
1589
|
+
"text": " "
|
1590
|
+
}
|
1591
|
+
],
|
1592
|
+
"fileUrlPath": "src/util/fdc3-system-channel-listener.ts",
|
1593
|
+
"releaseTag": "Public",
|
1594
|
+
"isAbstract": false,
|
1595
|
+
"name": "Fdc3SystemChannelListener",
|
1596
|
+
"preserveMemberOrder": false,
|
1597
|
+
"members": [
|
1598
|
+
{
|
1599
|
+
"kind": "Method",
|
1600
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3SystemChannelListener#addChannelListener:member(1)",
|
1601
|
+
"docComment": "",
|
1602
|
+
"excerptTokens": [
|
1603
|
+
{
|
1604
|
+
"kind": "Content",
|
1605
|
+
"text": "protected addChannelListener(): "
|
1606
|
+
},
|
1607
|
+
{
|
1608
|
+
"kind": "Content",
|
1609
|
+
"text": "void"
|
1610
|
+
},
|
1611
|
+
{
|
1612
|
+
"kind": "Content",
|
1613
|
+
"text": ";"
|
1614
|
+
}
|
1615
|
+
],
|
1616
|
+
"isStatic": false,
|
1617
|
+
"returnTypeTokenRange": {
|
1618
|
+
"startIndex": 1,
|
1619
|
+
"endIndex": 2
|
1620
|
+
},
|
1621
|
+
"releaseTag": "Public",
|
1622
|
+
"isProtected": true,
|
1623
|
+
"overloadIndex": 1,
|
1624
|
+
"parameters": [],
|
1625
|
+
"isOptional": false,
|
1626
|
+
"isAbstract": false,
|
1627
|
+
"name": "addChannelListener"
|
1628
|
+
},
|
1629
|
+
{
|
1630
|
+
"kind": "Method",
|
1631
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3SystemChannelListener#connectedCallback:member(1)",
|
1632
|
+
"docComment": "",
|
1633
|
+
"excerptTokens": [
|
1634
|
+
{
|
1635
|
+
"kind": "Content",
|
1636
|
+
"text": "connectedCallback(): "
|
1637
|
+
},
|
1638
|
+
{
|
1639
|
+
"kind": "Content",
|
1640
|
+
"text": "void"
|
1641
|
+
},
|
1642
|
+
{
|
1643
|
+
"kind": "Content",
|
1644
|
+
"text": ";"
|
1645
|
+
}
|
1646
|
+
],
|
1647
|
+
"isStatic": false,
|
1648
|
+
"returnTypeTokenRange": {
|
1649
|
+
"startIndex": 1,
|
1650
|
+
"endIndex": 2
|
1651
|
+
},
|
1652
|
+
"releaseTag": "Public",
|
1653
|
+
"isProtected": false,
|
1654
|
+
"overloadIndex": 1,
|
1655
|
+
"parameters": [],
|
1656
|
+
"isOptional": false,
|
1657
|
+
"isAbstract": false,
|
1658
|
+
"name": "connectedCallback"
|
1659
|
+
},
|
1660
|
+
{
|
1661
|
+
"kind": "Property",
|
1662
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3SystemChannelListener#contextType:member",
|
1663
|
+
"docComment": "/**\n * The context type on the channel you want to listen to. Read more about fdc3 context type at https://fdc3.finos.org/docs/context/ref/Context\n *\n * @example\n *\n * this will listen to the system channel for updates on the type `fdc3.position`\n * ```ts\n * <fdc3-system-channel-listener context-type=\"fdc3.position\"></fdc3-system-channel-listener>\n * ```\n *\n */\n",
|
1664
|
+
"excerptTokens": [
|
1665
|
+
{
|
1666
|
+
"kind": "Content",
|
1667
|
+
"text": "contextType: "
|
1668
|
+
},
|
1669
|
+
{
|
1670
|
+
"kind": "Content",
|
1671
|
+
"text": "string"
|
1672
|
+
},
|
1673
|
+
{
|
1674
|
+
"kind": "Content",
|
1675
|
+
"text": ";"
|
1676
|
+
}
|
1677
|
+
],
|
1678
|
+
"isReadonly": false,
|
1679
|
+
"isOptional": false,
|
1680
|
+
"releaseTag": "Public",
|
1681
|
+
"name": "contextType",
|
1682
|
+
"propertyTypeTokenRange": {
|
1683
|
+
"startIndex": 1,
|
1684
|
+
"endIndex": 2
|
1685
|
+
},
|
1686
|
+
"isStatic": false,
|
1687
|
+
"isProtected": false,
|
1688
|
+
"isAbstract": false
|
1689
|
+
},
|
1690
|
+
{
|
1691
|
+
"kind": "Method",
|
1692
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3SystemChannelListener#disconnectedCallback:member(1)",
|
1693
|
+
"docComment": "",
|
1694
|
+
"excerptTokens": [
|
1695
|
+
{
|
1696
|
+
"kind": "Content",
|
1697
|
+
"text": "disconnectedCallback(): "
|
1698
|
+
},
|
1699
|
+
{
|
1700
|
+
"kind": "Content",
|
1701
|
+
"text": "void"
|
1702
|
+
},
|
1703
|
+
{
|
1704
|
+
"kind": "Content",
|
1705
|
+
"text": ";"
|
1706
|
+
}
|
1707
|
+
],
|
1708
|
+
"isStatic": false,
|
1709
|
+
"returnTypeTokenRange": {
|
1710
|
+
"startIndex": 1,
|
1711
|
+
"endIndex": 2
|
1712
|
+
},
|
1713
|
+
"releaseTag": "Public",
|
1714
|
+
"isProtected": false,
|
1715
|
+
"overloadIndex": 1,
|
1716
|
+
"parameters": [],
|
1717
|
+
"isOptional": false,
|
1718
|
+
"isAbstract": false,
|
1719
|
+
"name": "disconnectedCallback"
|
1720
|
+
},
|
1721
|
+
{
|
1722
|
+
"kind": "Method",
|
1723
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!Fdc3SystemChannelListener#handleCurrentContext:member(1)",
|
1724
|
+
"docComment": "",
|
1725
|
+
"excerptTokens": [
|
1726
|
+
{
|
1727
|
+
"kind": "Content",
|
1728
|
+
"text": "protected handleCurrentContext(channel: "
|
1729
|
+
},
|
1730
|
+
{
|
1731
|
+
"kind": "Reference",
|
1732
|
+
"text": "FDC3Channel",
|
1733
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!FDC3Channel:interface"
|
1734
|
+
},
|
1735
|
+
{
|
1736
|
+
"kind": "Content",
|
1737
|
+
"text": "): "
|
1738
|
+
},
|
1739
|
+
{
|
1740
|
+
"kind": "Content",
|
1741
|
+
"text": "void"
|
1742
|
+
},
|
1743
|
+
{
|
1744
|
+
"kind": "Content",
|
1745
|
+
"text": ";"
|
1746
|
+
}
|
1747
|
+
],
|
1748
|
+
"isStatic": false,
|
1749
|
+
"returnTypeTokenRange": {
|
1750
|
+
"startIndex": 3,
|
1751
|
+
"endIndex": 4
|
1752
|
+
},
|
1753
|
+
"releaseTag": "Public",
|
1754
|
+
"isProtected": true,
|
1755
|
+
"overloadIndex": 1,
|
1756
|
+
"parameters": [
|
1757
|
+
{
|
1758
|
+
"parameterName": "channel",
|
1759
|
+
"parameterTypeTokenRange": {
|
1760
|
+
"startIndex": 1,
|
1761
|
+
"endIndex": 2
|
1762
|
+
},
|
1763
|
+
"isOptional": false
|
1764
|
+
}
|
1765
|
+
],
|
1766
|
+
"isOptional": false,
|
1767
|
+
"isAbstract": false,
|
1768
|
+
"name": "handleCurrentContext"
|
1769
|
+
}
|
1770
|
+
],
|
1771
|
+
"extendsTokenRange": {
|
1772
|
+
"startIndex": 1,
|
1773
|
+
"endIndex": 2
|
1774
|
+
},
|
1775
|
+
"implementsTokenRanges": []
|
1776
|
+
},
|
1475
1777
|
{
|
1476
1778
|
"kind": "Variable",
|
1477
1779
|
"canonicalReference": "@genesislcap/foundation-fdc3!interopFoundationNotificationListener:var",
|
@@ -23,18 +23,9 @@ 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
|
-
* fdc3-context-listener listen channel config
|
30
|
-
* @alpha
|
31
|
-
* @param channelType - string for the context channel type
|
32
|
-
* @param callback - async function that is called if a message with a matching context is emitted
|
33
|
-
*/
|
34
|
-
export declare interface AppChannelListenerConfig extends SystemChannelListenerConfig {
|
35
|
-
channelName: string;
|
36
|
-
}
|
37
|
-
|
38
29
|
export { AppIdentifier }
|
39
30
|
|
40
31
|
export { AppIntent }
|
@@ -581,12 +572,49 @@ export declare interface FDC3Context extends Context {
|
|
581
572
|
export declare type FDC3ContextHandler = ContextHandler;
|
582
573
|
|
583
574
|
/**
|
584
|
-
* fdc3-context-listener
|
585
|
-
*
|
575
|
+
* fdc3-context-listener
|
576
|
+
* Util element to listen to the context on a fdc3 app channel
|
577
|
+
* @public
|
578
|
+
* @tagname fdc3-context-listener
|
579
|
+
* @example
|
580
|
+
* ```ts
|
581
|
+
* import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
582
|
+
* @customElement({
|
583
|
+
* name: 'example-component',
|
584
|
+
* template: html<ExampleComponent>`
|
585
|
+
* <fdc3-context-listener
|
586
|
+
* @channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
587
|
+
* context-type="fdc3.position"
|
588
|
+
* channel-name="my_custom_channel">
|
589
|
+
* </fdc3-context-listener>
|
590
|
+
* `,
|
591
|
+
* })
|
592
|
+
* class ExampleComponent extends GenesisElement {
|
593
|
+
* handleChannelMessage(e: CustomEvent) {
|
594
|
+
* const message = e.detail;
|
595
|
+
* if (message?.id?.ticker) {
|
596
|
+
* console.log(message.id.ticker);
|
597
|
+
* // ToDo: handle the message as you like
|
598
|
+
* }
|
599
|
+
* }
|
600
|
+
* }
|
601
|
+
* ```
|
602
|
+
* @param Context - the fdc3 context type
|
603
|
+
* @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
|
604
|
+
*
|
605
|
+
* @param Context - the fdc3 context type
|
606
|
+
* @fires current-context - The current context value of the channel, if present
|
586
607
|
*/
|
587
608
|
export declare class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
588
|
-
|
589
|
-
|
609
|
+
/**
|
610
|
+
* The name of the channel you want to listen to. Read more about fdc3 app channels at https://fdc3.finos.org/docs/api/spec#app-channels
|
611
|
+
* @example this will listen to the system channel for updates on the type `my_custom_channel` with context `fdc3.position`
|
612
|
+
* ```ts
|
613
|
+
* <fdc3-context-listener context-type="fdc3.position" channel-name="my_custom_channel"></fdc3-context-listener>
|
614
|
+
* ```
|
615
|
+
*/
|
616
|
+
channelName: string;
|
617
|
+
protected addChannelListener(): Promise<void>;
|
590
618
|
}
|
591
619
|
|
592
620
|
/**
|
@@ -1285,18 +1313,65 @@ declare const Fdc3RaiseIntent_base: (new (...args: any[]) => {
|
|
1285
1313
|
focus(options?: FocusOptions): void;
|
1286
1314
|
}) & typeof FoundationElement;
|
1287
1315
|
|
1316
|
+
/**
|
1317
|
+
* The Grid Pro element.
|
1318
|
+
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
1319
|
+
* @public
|
1320
|
+
* @tagname %%prefix%%-grid-pro
|
1321
|
+
*/
|
1288
1322
|
/**
|
1289
1323
|
* fdc3-system-channel-listener
|
1290
1324
|
* Util element to listen to the context on a fdc3 system channel
|
1291
|
-
* @
|
1292
|
-
|
1325
|
+
* @public
|
1326
|
+
* @tagname fdc3-system-channel-listener
|
1327
|
+
* @example
|
1328
|
+
* ```ts
|
1329
|
+
* import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
1330
|
+
* @customElement({
|
1331
|
+
* name: 'example-component',
|
1332
|
+
* template: html<ExampleComponent>`
|
1333
|
+
* <fdc3-system-channel-listener
|
1334
|
+
* @channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
1335
|
+
* context-type="fdc3.position">
|
1336
|
+
* </fdc3-system-channel-listener>
|
1337
|
+
* `,
|
1338
|
+
* })
|
1339
|
+
* class ExampleComponent extends GenesisElement {
|
1340
|
+
* handleChannelMessage(e: CustomEvent) {
|
1341
|
+
* const message = e.detail;
|
1342
|
+
* if (message?.id?.ticker) {
|
1343
|
+
* console.log(message.id.ticker);
|
1344
|
+
* // ToDo: handle the message as you like
|
1345
|
+
* }
|
1346
|
+
* }
|
1347
|
+
* }
|
1348
|
+
* ```
|
1349
|
+
* @param Context - the fdc3 context type
|
1350
|
+
* @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
|
1351
|
+
*
|
1352
|
+
* @param Context - the fdc3 context type
|
1353
|
+
* @fires current-context - The current context value of the channel, if present
|
1354
|
+
* */
|
1293
1355
|
export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
|
1294
|
-
|
1356
|
+
/**
|
1357
|
+
* The context type on the channel you want to listen to. Read more about fdc3 context type at https://fdc3.finos.org/docs/context/ref/Context
|
1358
|
+
* @example this will listen to the system channel for updates on the type `fdc3.position`
|
1359
|
+
* ```ts
|
1360
|
+
* <fdc3-system-channel-listener context-type="fdc3.position"></fdc3-system-channel-listener>
|
1361
|
+
* ```
|
1362
|
+
*/
|
1363
|
+
contextType: string;
|
1364
|
+
/**
|
1365
|
+
* @internal
|
1366
|
+
*/
|
1367
|
+
protected channelSub: Subscription;
|
1368
|
+
/**
|
1369
|
+
* @internal
|
1370
|
+
*/
|
1295
1371
|
fdc3: FDC3;
|
1296
|
-
deepClone(): Node;
|
1297
1372
|
connectedCallback(): void;
|
1298
|
-
|
1299
|
-
protected
|
1373
|
+
protected addChannelListener(): void;
|
1374
|
+
protected handleCurrentContext(channel: FDC3Channel): void;
|
1300
1375
|
disconnectedCallback(): void;
|
1301
1376
|
}
|
1302
1377
|
|
@@ -1681,15 +1756,4 @@ export { PrivateChannel }
|
|
1681
1756
|
|
1682
1757
|
export { StandardIntent }
|
1683
1758
|
|
1684
|
-
/**
|
1685
|
-
* System channel listener config. System channels are also known as color channels
|
1686
|
-
* @alpha
|
1687
|
-
* @param channelType - string for the context channel type
|
1688
|
-
* @param callback - function that is called if a message with a matching context is emitted
|
1689
|
-
*/
|
1690
|
-
export declare interface SystemChannelListenerConfig {
|
1691
|
-
channelType: string;
|
1692
|
-
callback: (any: any) => void;
|
1693
|
-
}
|
1694
|
-
|
1695
1759
|
export { }
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3ContextListener](./foundation-fdc3.fdc3contextlistener.md) > [addChannelListener](./foundation-fdc3.fdc3contextlistener.addchannellistener.md)
|
4
|
+
|
5
|
+
## Fdc3ContextListener.addChannelListener() method
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
protected addChannelListener(): Promise<void>;
|
11
|
+
```
|
12
|
+
**Returns:**
|
13
|
+
|
14
|
+
Promise<void>
|
15
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3ContextListener](./foundation-fdc3.fdc3contextlistener.md) > [channelName](./foundation-fdc3.fdc3contextlistener.channelname.md)
|
4
|
+
|
5
|
+
## Fdc3ContextListener.channelName property
|
6
|
+
|
7
|
+
The name of the channel you want to listen to. Read more about fdc3 app channels at https://fdc3.finos.org/docs/api/spec\#app-channels
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
channelName: string;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
this will listen to the system channel for updates on the type `my_custom_channel` with context `fdc3.position`
|
18
|
+
|
19
|
+
```ts
|
20
|
+
<fdc3-context-listener context-type="fdc3.position" channel-name="my_custom_channel"></fdc3-context-listener>
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3ContextListener](./foundation-fdc3.fdc3contextlistener.md)
|
4
|
+
|
5
|
+
## Fdc3ContextListener class
|
6
|
+
|
7
|
+
fdc3-context-listener Util element to listen to the context on a fdc3 app channel
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export declare class Fdc3ContextListener extends Fdc3SystemChannelListener
|
13
|
+
```
|
14
|
+
**Extends:** [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md)
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
|
19
|
+
```ts
|
20
|
+
import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
21
|
+
@customElement({
|
22
|
+
name: 'example-component',
|
23
|
+
template: html<ExampleComponent>`
|
24
|
+
<fdc3-context-listener
|
25
|
+
@channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
26
|
+
context-type="fdc3.position"
|
27
|
+
channel-name="my_custom_channel">
|
28
|
+
</fdc3-context-listener>
|
29
|
+
`,
|
30
|
+
})
|
31
|
+
class ExampleComponent extends GenesisElement {
|
32
|
+
handleChannelMessage(e: CustomEvent) {
|
33
|
+
const message = e.detail;
|
34
|
+
if (message?.id?.ticker) {
|
35
|
+
console.log(message.id.ticker);
|
36
|
+
// ToDo: handle the message as you like
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
```
|
41
|
+
|
42
|
+
## Properties
|
43
|
+
|
44
|
+
| Property | Modifiers | Type | Description |
|
45
|
+
| --- | --- | --- | --- |
|
46
|
+
| [channelName](./foundation-fdc3.fdc3contextlistener.channelname.md) | | string | The name of the channel you want to listen to. Read more about fdc3 app channels at https://fdc3.finos.org/docs/api/spec\#app-channels |
|
47
|
+
|
48
|
+
## Methods
|
49
|
+
|
50
|
+
| Method | Modifiers | Description |
|
51
|
+
| --- | --- | --- |
|
52
|
+
| [addChannelListener()](./foundation-fdc3.fdc3contextlistener.addchannellistener.md) | <code>protected</code> | |
|
53
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md) > [addChannelListener](./foundation-fdc3.fdc3systemchannellistener.addchannellistener.md)
|
4
|
+
|
5
|
+
## Fdc3SystemChannelListener.addChannelListener() method
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
protected addChannelListener(): void;
|
11
|
+
```
|
12
|
+
**Returns:**
|
13
|
+
|
14
|
+
void
|
15
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md) > [connectedCallback](./foundation-fdc3.fdc3systemchannellistener.connectedcallback.md)
|
4
|
+
|
5
|
+
## Fdc3SystemChannelListener.connectedCallback() method
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
connectedCallback(): void;
|
11
|
+
```
|
12
|
+
**Returns:**
|
13
|
+
|
14
|
+
void
|
15
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md) > [contextType](./foundation-fdc3.fdc3systemchannellistener.contexttype.md)
|
4
|
+
|
5
|
+
## Fdc3SystemChannelListener.contextType property
|
6
|
+
|
7
|
+
The context type on the channel you want to listen to. Read more about fdc3 context type at https://fdc3.finos.org/docs/context/ref/Context
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
contextType: string;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
this will listen to the system channel for updates on the type `fdc3.position`
|
18
|
+
|
19
|
+
```ts
|
20
|
+
<fdc3-system-channel-listener context-type="fdc3.position"></fdc3-system-channel-listener>
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md) > [disconnectedCallback](./foundation-fdc3.fdc3systemchannellistener.disconnectedcallback.md)
|
4
|
+
|
5
|
+
## Fdc3SystemChannelListener.disconnectedCallback() method
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
disconnectedCallback(): void;
|
11
|
+
```
|
12
|
+
**Returns:**
|
13
|
+
|
14
|
+
void
|
15
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md) > [handleCurrentContext](./foundation-fdc3.fdc3systemchannellistener.handlecurrentcontext.md)
|
4
|
+
|
5
|
+
## Fdc3SystemChannelListener.handleCurrentContext() method
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
protected handleCurrentContext(channel: FDC3Channel): void;
|
11
|
+
```
|
12
|
+
|
13
|
+
## Parameters
|
14
|
+
|
15
|
+
| Parameter | Type | Description |
|
16
|
+
| --- | --- | --- |
|
17
|
+
| channel | [FDC3Channel](./foundation-fdc3.fdc3channel.md) | |
|
18
|
+
|
19
|
+
**Returns:**
|
20
|
+
|
21
|
+
void
|
22
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md)
|
4
|
+
|
5
|
+
## Fdc3SystemChannelListener class
|
6
|
+
|
7
|
+
fdc3-system-channel-listener Util element to listen to the context on a fdc3 system channel
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base
|
13
|
+
```
|
14
|
+
**Extends:** Fdc3SystemChannelListener\_base
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
|
19
|
+
```ts
|
20
|
+
import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
21
|
+
@customElement({
|
22
|
+
name: 'example-component',
|
23
|
+
template: html<ExampleComponent>`
|
24
|
+
<fdc3-system-channel-listener
|
25
|
+
@channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
26
|
+
context-type="fdc3.position">
|
27
|
+
</fdc3-system-channel-listener>
|
28
|
+
`,
|
29
|
+
})
|
30
|
+
class ExampleComponent extends GenesisElement {
|
31
|
+
handleChannelMessage(e: CustomEvent) {
|
32
|
+
const message = e.detail;
|
33
|
+
if (message?.id?.ticker) {
|
34
|
+
console.log(message.id.ticker);
|
35
|
+
// ToDo: handle the message as you like
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
```
|
40
|
+
|
41
|
+
## Properties
|
42
|
+
|
43
|
+
| Property | Modifiers | Type | Description |
|
44
|
+
| --- | --- | --- | --- |
|
45
|
+
| [contextType](./foundation-fdc3.fdc3systemchannellistener.contexttype.md) | | string | The context type on the channel you want to listen to. Read more about fdc3 context type at https://fdc3.finos.org/docs/context/ref/Context |
|
46
|
+
|
47
|
+
## Methods
|
48
|
+
|
49
|
+
| Method | Modifiers | Description |
|
50
|
+
| --- | --- | --- |
|
51
|
+
| [addChannelListener()](./foundation-fdc3.fdc3systemchannellistener.addchannellistener.md) | <code>protected</code> | |
|
52
|
+
| [connectedCallback()](./foundation-fdc3.fdc3systemchannellistener.connectedcallback.md) | | |
|
53
|
+
| [disconnectedCallback()](./foundation-fdc3.fdc3systemchannellistener.disconnectedcallback.md) | | |
|
54
|
+
| [handleCurrentContext(channel)](./foundation-fdc3.fdc3systemchannellistener.handlecurrentcontext.md) | <code>protected</code> | |
|
55
|
+
|
@@ -8,6 +8,8 @@
|
|
8
8
|
|
9
9
|
| Class | Description |
|
10
10
|
| --- | --- |
|
11
|
+
| [Fdc3ContextListener](./foundation-fdc3.fdc3contextlistener.md) | fdc3-context-listener Util element to listen to the context on a fdc3 app channel |
|
12
|
+
| [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md) | fdc3-system-channel-listener Util element to listen to the context on a fdc3 system channel |
|
11
13
|
| [InteropNotificationsListener](./foundation-fdc3.interopnotificationslistener.md) | |
|
12
14
|
|
13
15
|
## Interfaces
|
package/docs/api-report.md
CHANGED
@@ -29,14 +29,9 @@ 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
|
-
// @alpha
|
35
|
-
export interface AppChannelListenerConfig extends SystemChannelListenerConfig {
|
36
|
-
// (undocumented)
|
37
|
-
channelName: string;
|
38
|
-
}
|
39
|
-
|
40
35
|
export { AppIdentifier }
|
41
36
|
|
42
37
|
export { AppIntent }
|
@@ -157,12 +152,11 @@ export interface FDC3Context extends Context {
|
|
157
152
|
// @public @deprecated (undocumented)
|
158
153
|
export type FDC3ContextHandler = ContextHandler;
|
159
154
|
|
160
|
-
// @
|
155
|
+
// @public
|
161
156
|
export class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
162
157
|
// (undocumented)
|
163
|
-
protected
|
164
|
-
|
165
|
-
config: AppChannelListenerConfig[];
|
158
|
+
protected addChannelListener(): Promise<void>;
|
159
|
+
channelName: string;
|
166
160
|
}
|
167
161
|
|
168
162
|
// Warning: (ae-forgotten-export) The symbol "Fdc3IntentListener_base" needs to be exported by the entry point index.d.ts
|
@@ -210,20 +204,21 @@ export class Fdc3RaiseIntent extends Fdc3RaiseIntent_base {
|
|
210
204
|
|
211
205
|
// Warning: (ae-forgotten-export) The symbol "Fdc3SystemChannelListener_base" needs to be exported by the entry point index.d.ts
|
212
206
|
//
|
213
|
-
// @
|
207
|
+
// @public
|
214
208
|
export class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
|
215
209
|
// (undocumented)
|
216
|
-
protected
|
217
|
-
// (undocumented)
|
218
|
-
|
210
|
+
protected addChannelListener(): void;
|
211
|
+
// @internal (undocumented)
|
212
|
+
protected channelSub: Subscription;
|
219
213
|
// (undocumented)
|
220
214
|
connectedCallback(): void;
|
221
|
-
|
222
|
-
deepClone(): Node;
|
215
|
+
contextType: string;
|
223
216
|
// (undocumented)
|
224
217
|
disconnectedCallback(): void;
|
225
|
-
// (undocumented)
|
218
|
+
// @internal (undocumented)
|
226
219
|
fdc3: FDC3;
|
220
|
+
// (undocumented)
|
221
|
+
protected handleCurrentContext(channel: FDC3Channel): void;
|
227
222
|
}
|
228
223
|
|
229
224
|
// @alpha
|
@@ -268,14 +263,6 @@ export { PrivateChannel }
|
|
268
263
|
|
269
264
|
export { StandardIntent }
|
270
265
|
|
271
|
-
// @alpha
|
272
|
-
export interface SystemChannelListenerConfig {
|
273
|
-
// (undocumented)
|
274
|
-
callback: (any: any) => void;
|
275
|
-
// (undocumented)
|
276
|
-
channelType: string;
|
277
|
-
}
|
278
|
-
|
279
266
|
// (No @packageDocumentation comment for this package)
|
280
267
|
|
281
268
|
```
|
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.227.
|
4
|
+
"version": "14.227.4-FUI-2256.2",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -59,23 +59,24 @@
|
|
59
59
|
}
|
60
60
|
},
|
61
61
|
"devDependencies": {
|
62
|
-
"@genesislcap/foundation-testing": "14.227.
|
63
|
-
"@genesislcap/genx": "14.227.
|
64
|
-
"@genesislcap/rollup-builder": "14.227.
|
65
|
-
"@genesislcap/ts-builder": "14.227.
|
66
|
-
"@genesislcap/uvu-playwright-builder": "14.227.
|
67
|
-
"@genesislcap/vite-builder": "14.227.
|
68
|
-
"@genesislcap/webpack-builder": "14.227.
|
62
|
+
"@genesislcap/foundation-testing": "14.227.4-FUI-2256.2",
|
63
|
+
"@genesislcap/genx": "14.227.4-FUI-2256.2",
|
64
|
+
"@genesislcap/rollup-builder": "14.227.4-FUI-2256.2",
|
65
|
+
"@genesislcap/ts-builder": "14.227.4-FUI-2256.2",
|
66
|
+
"@genesislcap/uvu-playwright-builder": "14.227.4-FUI-2256.2",
|
67
|
+
"@genesislcap/vite-builder": "14.227.4-FUI-2256.2",
|
68
|
+
"@genesislcap/webpack-builder": "14.227.4-FUI-2256.2",
|
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-
|
75
|
-
"@genesislcap/foundation-
|
76
|
-
"@genesislcap/foundation-
|
77
|
-
"@genesislcap/foundation-
|
78
|
-
"@genesislcap/
|
74
|
+
"@genesislcap/foundation-events": "14.227.4-FUI-2256.2",
|
75
|
+
"@genesislcap/foundation-logger": "14.227.4-FUI-2256.2",
|
76
|
+
"@genesislcap/foundation-notifications": "14.227.4-FUI-2256.2",
|
77
|
+
"@genesislcap/foundation-ui": "14.227.4-FUI-2256.2",
|
78
|
+
"@genesislcap/foundation-utils": "14.227.4-FUI-2256.2",
|
79
|
+
"@genesislcap/web-core": "14.227.4-FUI-2256.2",
|
79
80
|
"@interopio/desktop": "^6.3.1",
|
80
81
|
"@microsoft/fast-element": "1.14.0",
|
81
82
|
"@microsoft/fast-foundation": "2.49.6",
|
@@ -90,5 +91,5 @@
|
|
90
91
|
"publishConfig": {
|
91
92
|
"access": "public"
|
92
93
|
},
|
93
|
-
"gitHead": "
|
94
|
+
"gitHead": "a1c0cc59a8cf53e44f131f9251be45c785771248"
|
94
95
|
}
|