@genesislcap/foundation-fdc3 14.227.4-FUI-2256.1 → 14.227.4-FUI-2256.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,6 +29,9 @@ import { Fdc3SystemChannelListener } from './fdc3-system-channel-listener';
29
29
  * ```
30
30
  * @param Context - the fdc3 context type
31
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
32
35
  */
33
36
  export declare class Fdc3ContextListener extends Fdc3SystemChannelListener {
34
37
  /**
@@ -1 +1 @@
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
+ {"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,6 +1,6 @@
1
1
  import { FoundationElement } from '@genesislcap/web-core';
2
2
  import { Subscription } from 'rxjs';
3
- import { FDC3 } from '../fdc3';
3
+ import { FDC3, FDC3Channel } from '../fdc3';
4
4
  declare const Fdc3SystemChannelListener_base: (new (...args: any[]) => {
5
5
  "__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
6
6
  "__#1@#_latestTokenCode": string;
@@ -361,7 +361,10 @@ declare const Fdc3SystemChannelListener_base: (new (...args: any[]) => {
361
361
  * ```
362
362
  * @param Context - the fdc3 context type
363
363
  * @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
364
- */
364
+ *
365
+ * @param Context - the fdc3 context type
366
+ * @fires current-context - The current context value of the channel, if present
367
+ * */
365
368
  export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
366
369
  /**
367
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
@@ -381,6 +384,7 @@ export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener
381
384
  fdc3: FDC3;
382
385
  connectedCallback(): void;
383
386
  protected addChannelListener(): void;
387
+ protected handleCurrentContext(channel: FDC3Channel): void;
384
388
  disconnectedCallback(): void;
385
389
  }
386
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,EAAQ,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAS,YAAY,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B;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"}
@@ -32,6 +32,9 @@ import { Fdc3SystemChannelListener } from './fdc3-system-channel-listener';
32
32
  * ```
33
33
  * @param Context - the fdc3 context type
34
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
35
38
  */
36
39
  let Fdc3ContextListener = class Fdc3ContextListener extends Fdc3SystemChannelListener {
37
40
  addChannelListener() {
@@ -46,11 +49,7 @@ let Fdc3ContextListener = class Fdc3ContextListener extends Fdc3SystemChannelLis
46
49
  const channel = yield this.fdc3.addChannelListener(this.channelName, this.contextType, (context) => {
47
50
  this.$emit('channel-event', context);
48
51
  });
49
- this.fdc3.handleChannelCurrentContext(channel, this.contextType, (context) => {
50
- if (context) {
51
- this.$emit('channel-event', context);
52
- }
53
- });
52
+ this.handleCurrentContext(channel);
54
53
  }
55
54
  });
56
55
  }
@@ -39,7 +39,10 @@ import { logger } from '../utils';
39
39
  * ```
40
40
  * @param Context - the fdc3 context type
41
41
  * @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
42
- */
42
+ *
43
+ * @param Context - the fdc3 context type
44
+ * @fires current-context - The current context value of the channel, if present
45
+ * */
43
46
  let Fdc3SystemChannelListener = class Fdc3SystemChannelListener extends LifecycleMixin(FoundationElement) {
44
47
  constructor() {
45
48
  super(...arguments);
@@ -63,14 +66,17 @@ let Fdc3SystemChannelListener = class Fdc3SystemChannelListener extends Lifecycl
63
66
  channel.addContextListener(this.contextType, (context) => {
64
67
  this.$emit('channel-event', context);
65
68
  });
66
- this.fdc3.handleChannelCurrentContext(channel, this.contextType, (context) => {
67
- if (context) {
68
- this.$emit('channel-event', context);
69
- }
70
- });
69
+ this.handleCurrentContext(channel);
71
70
  }));
72
71
  }
73
72
  }
73
+ handleCurrentContext(channel) {
74
+ this.fdc3.handleChannelCurrentContext(channel, this.contextType, (context) => {
75
+ if (context) {
76
+ this.$emit('current-context', context);
77
+ }
78
+ });
79
+ }
74
80
  disconnectedCallback() {
75
81
  var _a;
76
82
  (_a = this.channelSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
@@ -1417,7 +1417,7 @@
1417
1417
  {
1418
1418
  "kind": "Class",
1419
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",
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
1421
  "excerptTokens": [
1422
1422
  {
1423
1423
  "kind": "Content",
@@ -1573,7 +1573,7 @@
1573
1573
  {
1574
1574
  "kind": "Class",
1575
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",
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
1577
  "excerptTokens": [
1578
1578
  {
1579
1579
  "kind": "Content",
@@ -1717,6 +1717,55 @@
1717
1717
  "isOptional": false,
1718
1718
  "isAbstract": false,
1719
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"
1720
1769
  }
1721
1770
  ],
1722
1771
  "extendsTokenRange": {
@@ -601,6 +601,9 @@ export declare type FDC3ContextHandler = ContextHandler;
601
601
  * ```
602
602
  * @param Context - the fdc3 context type
603
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
604
607
  */
605
608
  export declare class Fdc3ContextListener extends Fdc3SystemChannelListener {
606
609
  /**
@@ -1345,7 +1348,10 @@ declare const Fdc3RaiseIntent_base: (new (...args: any[]) => {
1345
1348
  * ```
1346
1349
  * @param Context - the fdc3 context type
1347
1350
  * @fires channel-event - Dispatched when an event matching the context is dispatched from the system channel
1348
- */
1351
+ *
1352
+ * @param Context - the fdc3 context type
1353
+ * @fires current-context - The current context value of the channel, if present
1354
+ * */
1349
1355
  export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
1350
1356
  /**
1351
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
@@ -1365,6 +1371,7 @@ export declare class Fdc3SystemChannelListener extends Fdc3SystemChannelListener
1365
1371
  fdc3: FDC3;
1366
1372
  connectedCallback(): void;
1367
1373
  protected addChannelListener(): void;
1374
+ protected handleCurrentContext(channel: FDC3Channel): void;
1368
1375
  disconnectedCallback(): void;
1369
1376
  }
1370
1377
 
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-fdc3](./foundation-fdc3.md) &gt; [Fdc3SystemChannelListener](./foundation-fdc3.fdc3systemchannellistener.md) &gt; [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
+
@@ -51,4 +51,5 @@ class ExampleComponent extends GenesisElement {
51
51
  | [addChannelListener()](./foundation-fdc3.fdc3systemchannellistener.addchannellistener.md) | <code>protected</code> | |
52
52
  | [connectedCallback()](./foundation-fdc3.fdc3systemchannellistener.connectedcallback.md) | | |
53
53
  | [disconnectedCallback()](./foundation-fdc3.fdc3systemchannellistener.disconnectedcallback.md) | | |
54
+ | [handleCurrentContext(channel)](./foundation-fdc3.fdc3systemchannellistener.handlecurrentcontext.md) | <code>protected</code> | |
54
55
 
@@ -217,6 +217,8 @@ export class Fdc3SystemChannelListener extends Fdc3SystemChannelListener_base {
217
217
  disconnectedCallback(): void;
218
218
  // @internal (undocumented)
219
219
  fdc3: FDC3;
220
+ // (undocumented)
221
+ protected handleCurrentContext(channel: FDC3Channel): void;
220
222
  }
221
223
 
222
224
  // @alpha
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-FUI-2256.1",
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,24 +59,24 @@
59
59
  }
60
60
  },
61
61
  "devDependencies": {
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",
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-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",
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",
80
80
  "@interopio/desktop": "^6.3.1",
81
81
  "@microsoft/fast-element": "1.14.0",
82
82
  "@microsoft/fast-foundation": "2.49.6",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "b72e9c49c838e599f14a011ec980ec081316f4de"
94
+ "gitHead": "a1c0cc59a8cf53e44f131f9251be45c785771248"
95
95
  }