@genesislcap/foundation-fdc3 14.227.2 → 14.227.4-FUI-2256.1
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/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 +39 -14
- package/dist/dts/util/fdc3-context-listener.d.ts.map +1 -1
- package/dist/dts/util/fdc3-system-channel-listener.d.ts +49 -15
- 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 +54 -14
- package/dist/esm/util/fdc3-system-channel-listener.js +58 -27
- package/dist/foundation-fdc3.api.json +253 -0
- package/dist/foundation-fdc3.d.ts +87 -30
- 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.md +54 -0
- package/docs/api/foundation-fdc3.md +2 -0
- package/docs/api-report.md +10 -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,OAA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AGG;AACH,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,44 @@
|
|
|
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
|
|
14
32
|
*/
|
|
15
33
|
export declare class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
|
16
|
-
|
|
17
|
-
|
|
34
|
+
/**
|
|
35
|
+
* 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
|
|
36
|
+
* @example this will listen to the system channel for updates on the type `my_custom_channel` with context `fdc3.position`
|
|
37
|
+
* ```ts
|
|
38
|
+
* <fdc3-context-listener context-type="fdc3.position" channel-name="my_custom_channel"></fdc3-context-listener>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
channelName: string;
|
|
42
|
+
protected addChannelListener(): Promise<void>;
|
|
18
43
|
}
|
|
19
44
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAGa,mBAAoB,SAAQ,yBAAyB;IAChE;;;;;;OAMG;IACkC,WAAW,EAAE,MAAM,CAAC;cAEzC,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;CAqBpD"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { FoundationElement } from '@genesislcap/web-core';
|
|
2
|
+
import { Subscription } from 'rxjs';
|
|
2
3
|
import { FDC3 } from '../fdc3';
|
|
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
|
-
}
|
|
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,61 @@ 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
|
-
* @
|
|
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
|
|
342
364
|
*/
|
|
343
365
|
export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
|
|
344
|
-
|
|
366
|
+
/**
|
|
367
|
+
* 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
|
|
368
|
+
* @example this will listen to the system channel for updates on the type `fdc3.position`
|
|
369
|
+
* ```ts
|
|
370
|
+
* <fdc3-system-channel-listener context-type="fdc3.position"></fdc3-system-channel-listener>
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
contextType: string;
|
|
374
|
+
/**
|
|
375
|
+
* @internal
|
|
376
|
+
*/
|
|
377
|
+
protected channelSub: Subscription;
|
|
378
|
+
/**
|
|
379
|
+
* @internal
|
|
380
|
+
*/
|
|
345
381
|
fdc3: FDC3;
|
|
346
|
-
deepClone(): Node;
|
|
347
382
|
connectedCallback(): void;
|
|
348
|
-
|
|
349
|
-
protected addChannelListeners(): void;
|
|
383
|
+
protected addChannelListener(): void;
|
|
350
384
|
disconnectedCallback(): void;
|
|
351
385
|
}
|
|
352
386
|
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;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,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;IAmBpC,oBAAoB;CAIrB"}
|
package/dist/esm/fdc3.js
CHANGED
|
@@ -1,23 +1,63 @@
|
|
|
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
|
|
7
35
|
*/
|
|
8
36
|
let Fdc3ContextListener = class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
37
|
+
addChannelListener() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
if (!this.contextType) {
|
|
40
|
+
logger.warn('Fdc3SystemChannelListener: no context type provided');
|
|
41
|
+
}
|
|
42
|
+
else if (!this.channelName) {
|
|
43
|
+
logger.warn('Fdc3SystemChannelListener: no channel name provided');
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const channel = yield this.fdc3.addChannelListener(this.channelName, this.contextType, (context) => {
|
|
47
|
+
this.$emit('channel-event', context);
|
|
48
|
+
});
|
|
49
|
+
this.fdc3.handleChannelCurrentContext(channel, this.contextType, (context) => {
|
|
50
|
+
if (context) {
|
|
51
|
+
this.$emit('channel-event', context);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
17
54
|
}
|
|
18
|
-
})
|
|
55
|
+
});
|
|
19
56
|
}
|
|
20
57
|
};
|
|
58
|
+
__decorate([
|
|
59
|
+
attr({ attribute: 'channel-name' })
|
|
60
|
+
], Fdc3ContextListener.prototype, "channelName", void 0);
|
|
21
61
|
Fdc3ContextListener = __decorate([
|
|
22
62
|
customElement({
|
|
23
63
|
name: 'fdc3-context-listener',
|
|
@@ -1,47 +1,75 @@
|
|
|
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
|
-
* @
|
|
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
|
|
10
42
|
*/
|
|
11
43
|
let Fdc3SystemChannelListener = class Fdc3SystemChannelListener extends LifecycleMixin(FoundationElement) {
|
|
12
44
|
constructor() {
|
|
13
45
|
super(...arguments);
|
|
14
|
-
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
15
49
|
this.channelSub = new Subscription();
|
|
16
50
|
}
|
|
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
51
|
connectedCallback() {
|
|
31
52
|
super.connectedCallback();
|
|
32
53
|
this.fdc3.isReady$.pipe(first()).subscribe(() => {
|
|
33
|
-
|
|
34
|
-
this.addChannelListeners();
|
|
35
|
-
}
|
|
54
|
+
this.addChannelListener();
|
|
36
55
|
});
|
|
37
56
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
addChannelListener() {
|
|
58
|
+
if (!this.contextType) {
|
|
59
|
+
logger.warn('Fdc3SystemChannelListener: no context type provided');
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
this.channelSub.add(this.fdc3.currentChannel$.subscribe((channel) => {
|
|
63
|
+
channel.addContextListener(this.contextType, (context) => {
|
|
64
|
+
this.$emit('channel-event', context);
|
|
65
|
+
});
|
|
66
|
+
this.fdc3.handleChannelCurrentContext(channel, this.contextType, (context) => {
|
|
67
|
+
if (context) {
|
|
68
|
+
this.$emit('channel-event', context);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
45
73
|
}
|
|
46
74
|
disconnectedCallback() {
|
|
47
75
|
var _a;
|
|
@@ -49,6 +77,9 @@ let Fdc3SystemChannelListener = class Fdc3SystemChannelListener extends Lifecycl
|
|
|
49
77
|
super.disconnectedCallback();
|
|
50
78
|
}
|
|
51
79
|
};
|
|
80
|
+
__decorate([
|
|
81
|
+
attr({ attribute: 'context-type' })
|
|
82
|
+
], Fdc3SystemChannelListener.prototype, "contextType", void 0);
|
|
52
83
|
__decorate([
|
|
53
84
|
FDC3
|
|
54
85
|
], 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 * @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 * @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,161 @@
|
|
|
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 * @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 * @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
|
+
"extendsTokenRange": {
|
|
1723
|
+
"startIndex": 1,
|
|
1724
|
+
"endIndex": 2
|
|
1725
|
+
},
|
|
1726
|
+
"implementsTokenRanges": []
|
|
1727
|
+
},
|
|
1475
1728
|
{
|
|
1476
1729
|
"kind": "Variable",
|
|
1477
1730
|
"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,46 @@ 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
|
|
586
604
|
*/
|
|
587
605
|
export declare class Fdc3ContextListener extends Fdc3SystemChannelListener {
|
|
588
|
-
|
|
589
|
-
|
|
606
|
+
/**
|
|
607
|
+
* 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
|
|
608
|
+
* @example this will listen to the system channel for updates on the type `my_custom_channel` with context `fdc3.position`
|
|
609
|
+
* ```ts
|
|
610
|
+
* <fdc3-context-listener context-type="fdc3.position" channel-name="my_custom_channel"></fdc3-context-listener>
|
|
611
|
+
* ```
|
|
612
|
+
*/
|
|
613
|
+
channelName: string;
|
|
614
|
+
protected addChannelListener(): Promise<void>;
|
|
590
615
|
}
|
|
591
616
|
|
|
592
617
|
/**
|
|
@@ -1285,18 +1310,61 @@ declare const Fdc3RaiseIntent_base: (new (...args: any[]) => {
|
|
|
1285
1310
|
focus(options?: FocusOptions): void;
|
|
1286
1311
|
}) & typeof FoundationElement;
|
|
1287
1312
|
|
|
1313
|
+
/**
|
|
1314
|
+
* The Grid Pro element.
|
|
1315
|
+
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
1316
|
+
* @public
|
|
1317
|
+
* @tagname %%prefix%%-grid-pro
|
|
1318
|
+
*/
|
|
1288
1319
|
/**
|
|
1289
1320
|
* fdc3-system-channel-listener
|
|
1290
1321
|
* Util element to listen to the context on a fdc3 system channel
|
|
1291
|
-
* @
|
|
1322
|
+
* @public
|
|
1323
|
+
* @tagname fdc3-system-channel-listener
|
|
1324
|
+
* @example
|
|
1325
|
+
* ```ts
|
|
1326
|
+
* import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
|
1327
|
+
* @customElement({
|
|
1328
|
+
* name: 'example-component',
|
|
1329
|
+
* template: html<ExampleComponent>`
|
|
1330
|
+
* <fdc3-system-channel-listener
|
|
1331
|
+
* @channel-event="${(x, ctx) => x.handleChannelMessage(customEvent(ctx))}"
|
|
1332
|
+
* context-type="fdc3.position">
|
|
1333
|
+
* </fdc3-system-channel-listener>
|
|
1334
|
+
* `,
|
|
1335
|
+
* })
|
|
1336
|
+
* class ExampleComponent extends GenesisElement {
|
|
1337
|
+
* handleChannelMessage(e: CustomEvent) {
|
|
1338
|
+
* const message = e.detail;
|
|
1339
|
+
* if (message?.id?.ticker) {
|
|
1340
|
+
* console.log(message.id.ticker);
|
|
1341
|
+
* // ToDo: handle the message as you like
|
|
1342
|
+
* }
|
|
1343
|
+
* }
|
|
1344
|
+
* }
|
|
1345
|
+
* ```
|
|
1346
|
+
* @param Context - the fdc3 context type
|
|
1347
|
+
* @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
|
|
1292
1348
|
*/
|
|
1293
1349
|
export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
|
|
1294
|
-
|
|
1350
|
+
/**
|
|
1351
|
+
* 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
|
|
1352
|
+
* @example this will listen to the system channel for updates on the type `fdc3.position`
|
|
1353
|
+
* ```ts
|
|
1354
|
+
* <fdc3-system-channel-listener context-type="fdc3.position"></fdc3-system-channel-listener>
|
|
1355
|
+
* ```
|
|
1356
|
+
*/
|
|
1357
|
+
contextType: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* @internal
|
|
1360
|
+
*/
|
|
1361
|
+
protected channelSub: Subscription;
|
|
1362
|
+
/**
|
|
1363
|
+
* @internal
|
|
1364
|
+
*/
|
|
1295
1365
|
fdc3: FDC3;
|
|
1296
|
-
deepClone(): Node;
|
|
1297
1366
|
connectedCallback(): void;
|
|
1298
|
-
|
|
1299
|
-
protected addChannelListeners(): void;
|
|
1367
|
+
protected addChannelListener(): void;
|
|
1300
1368
|
disconnectedCallback(): void;
|
|
1301
1369
|
}
|
|
1302
1370
|
|
|
@@ -1681,15 +1749,4 @@ export { PrivateChannel }
|
|
|
1681
1749
|
|
|
1682
1750
|
export { StandardIntent }
|
|
1683
1751
|
|
|
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
1752
|
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,54 @@
|
|
|
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
|
+
|
|
@@ -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,19 +204,18 @@ 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;
|
|
227
220
|
}
|
|
228
221
|
|
|
@@ -268,14 +261,6 @@ export { PrivateChannel }
|
|
|
268
261
|
|
|
269
262
|
export { StandardIntent }
|
|
270
263
|
|
|
271
|
-
// @alpha
|
|
272
|
-
export interface SystemChannelListenerConfig {
|
|
273
|
-
// (undocumented)
|
|
274
|
-
callback: (any: any) => void;
|
|
275
|
-
// (undocumented)
|
|
276
|
-
channelType: string;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
264
|
// (No @packageDocumentation comment for this package)
|
|
280
265
|
|
|
281
266
|
```
|
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.1",
|
|
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.1",
|
|
63
|
+
"@genesislcap/genx": "14.227.4-FUI-2256.1",
|
|
64
|
+
"@genesislcap/rollup-builder": "14.227.4-FUI-2256.1",
|
|
65
|
+
"@genesislcap/ts-builder": "14.227.4-FUI-2256.1",
|
|
66
|
+
"@genesislcap/uvu-playwright-builder": "14.227.4-FUI-2256.1",
|
|
67
|
+
"@genesislcap/vite-builder": "14.227.4-FUI-2256.1",
|
|
68
|
+
"@genesislcap/webpack-builder": "14.227.4-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-
|
|
75
|
-
"@genesislcap/foundation-
|
|
76
|
-
"@genesislcap/foundation-
|
|
77
|
-
"@genesislcap/foundation-
|
|
78
|
-
"@genesislcap/
|
|
74
|
+
"@genesislcap/foundation-events": "14.227.4-FUI-2256.1",
|
|
75
|
+
"@genesislcap/foundation-logger": "14.227.4-FUI-2256.1",
|
|
76
|
+
"@genesislcap/foundation-notifications": "14.227.4-FUI-2256.1",
|
|
77
|
+
"@genesislcap/foundation-ui": "14.227.4-FUI-2256.1",
|
|
78
|
+
"@genesislcap/foundation-utils": "14.227.4-FUI-2256.1",
|
|
79
|
+
"@genesislcap/web-core": "14.227.4-FUI-2256.1",
|
|
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": "b72e9c49c838e599f14a011ec980ec081316f4de"
|
|
94
95
|
}
|