@genesislcap/foundation-fdc3 14.170.0 → 14.171.0

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.
@@ -0,0 +1,16 @@
1
+ import { FASTElement } from '@genesislcap/web-core';
2
+ import { FDC3 } from './fdc3';
3
+ /**
4
+ * fdc3-channel-event
5
+ * @internal
6
+ */
7
+ export declare class Fdc3ChannelEvent extends FASTElement {
8
+ fdc3: FDC3;
9
+ eventName: string;
10
+ channelType: string;
11
+ channelName: string;
12
+ connectedCallback(): void;
13
+ disconnectedCallback(): void;
14
+ private sendEventOnChannel;
15
+ }
16
+ //# sourceMappingURL=fdc3-channel-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fdc3-channel-event.d.ts","sourceRoot":"","sources":["../../src/fdc3-channel-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAQ,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,qBAGa,gBAAiB,SAAQ,WAAW;IACzC,IAAI,EAAE,IAAI,CAAC;IACkB,SAAS,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAEzD,iBAAiB;IAIjB,oBAAoB;IAIpB,OAAO,CAAC,kBAAkB,CAGxB;CACH"}
@@ -34,7 +34,7 @@ export interface FDC3Channel extends Channel {
34
34
  * The FDC3 API interface.
35
35
  * @public
36
36
  */
37
- interface FDC3 {
37
+ export interface FDC3 {
38
38
  /**
39
39
  * Whether the FDC3 API is ready.
40
40
  * @public
@@ -84,13 +84,18 @@ interface FDC3 {
84
84
  */
85
85
  getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
86
86
  /**
87
- * Broadcasts the specified context on the specified channel.
88
- * @public
89
- * @param channelId - The ID of the channel to broadcast on.
90
- * @param context - The context to broadcast.
91
- * @returns A promise that resolves when the broadcast is successful.
87
+ * Broadcasts a message on a given channel with a given type
88
+ * @param channelName - name of the channel
89
+ * @param type - type of the channel
90
+ * @param payload - payload sent to the channel
91
+ */
92
+ broadcastOnChannel(channelName: string, type: string, payload: any): Promise<void>;
93
+ /**
94
+ * Helper function to broadcast message on channel in response to dispatched event
95
+ * @param channelName - name of the channel
96
+ * @param type - type of the channel
92
97
  */
93
- broadcastOnChannel(channelId: string, context: FDC3Context): Promise<void>;
98
+ broadcastOnChannelEventHandler(channelName: string, type: string): Promise<(e: any) => Promise<void>>;
94
99
  }
95
100
  /**
96
101
  * The FDC3 implementation.
@@ -106,12 +111,12 @@ export declare class DefaultFDC3 implements FDC3 {
106
111
  raiseIntent(context: FDC3Context, intent?: FDC3Intents): Promise<FDC3IntentResolution>;
107
112
  joinChannel(channelId: string): Promise<void>;
108
113
  getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
109
- broadcastOnChannel(channelId: string, context: FDC3Context): Promise<void>;
114
+ broadcastOnChannel(channelName: string, type: string, payload: any): Promise<void>;
115
+ broadcastOnChannelEventHandler(channelName: string, type: string): Promise<(e: any) => Promise<void>>;
110
116
  }
111
117
  /**
112
118
  * The DI token for the FDC3 interface.
113
119
  * @internal
114
120
  */
115
121
  export declare const FDC3: import("@microsoft/fast-foundation").InterfaceSymbol<FDC3>;
116
- export {};
117
122
  //# sourceMappingURL=fdc3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fdc3.d.ts","sourceRoot":"","sources":["../../src/fdc3.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,SAAS,EACT,OAAO,EACP,OAAO,EACP,cAAc,EAMd,OAAO,EACP,gBAAgB,EAKjB,MAAM,aAAa,CAAC;AAKrB;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,SAAS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AAoB,CAAC;IActF,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7C,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKrD,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAWlF,8BAA8B,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAC1D,GAAG;CAMvB;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,4DAA4D,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './fdc3';
2
+ export * from './fdc3-channel-event';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { __awaiter, __decorate } from "tslib";
2
+ import { customElement, FASTElement, attr } from '@genesislcap/web-core';
3
+ import { FDC3 } from './fdc3';
4
+ /**
5
+ * fdc3-channel-event
6
+ * @internal
7
+ */
8
+ let Fdc3ChannelEvent = class Fdc3ChannelEvent extends FASTElement {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.sendEventOnChannel = (e) => __awaiter(this, void 0, void 0, function* () {
12
+ var _a;
13
+ const payload = ((_a = e.data) === null || _a === void 0 ? void 0 : _a.payload) || e.detail;
14
+ yield this.fdc3.broadcastOnChannel(this.channelName, this.channelType, payload);
15
+ });
16
+ }
17
+ connectedCallback() {
18
+ this.parentElement.addEventListener(this.eventName, this.sendEventOnChannel);
19
+ }
20
+ disconnectedCallback() {
21
+ this.parentElement.removeEventListener(this.eventName, this.sendEventOnChannel);
22
+ }
23
+ };
24
+ __decorate([
25
+ FDC3
26
+ ], Fdc3ChannelEvent.prototype, "fdc3", void 0);
27
+ __decorate([
28
+ attr({ attribute: 'event-name' })
29
+ ], Fdc3ChannelEvent.prototype, "eventName", void 0);
30
+ __decorate([
31
+ attr({ attribute: 'channel-type' })
32
+ ], Fdc3ChannelEvent.prototype, "channelType", void 0);
33
+ __decorate([
34
+ attr({ attribute: 'channel-name' })
35
+ ], Fdc3ChannelEvent.prototype, "channelName", void 0);
36
+ Fdc3ChannelEvent = __decorate([
37
+ customElement({
38
+ name: 'fdc3-channel-event',
39
+ })
40
+ ], Fdc3ChannelEvent);
41
+ export { Fdc3ChannelEvent };
package/dist/esm/fdc3.js CHANGED
@@ -61,11 +61,24 @@ export class DefaultFDC3 {
61
61
  logger.debug(`fdc3 getOrCreateChannel '${channelId}'`);
62
62
  return getOrCreateChannel(channelId);
63
63
  }
64
- broadcastOnChannel(channelId, context) {
64
+ broadcastOnChannel(channelName, type, payload) {
65
65
  return __awaiter(this, void 0, void 0, function* () {
66
- const channel = yield this.getOrCreateChannel(channelId);
67
- logger.debug(`fdc3 broadcast '${channelId}' '${context}'`);
68
- channel.broadcast(context);
66
+ const channel = yield getOrCreateChannel(channelName);
67
+ const m = {
68
+ type,
69
+ id: payload,
70
+ };
71
+ yield channel.broadcast(m);
72
+ });
73
+ }
74
+ broadcastOnChannelEventHandler(channelName, type) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ return (e) => __awaiter(this, void 0, void 0, function* () {
77
+ var _a;
78
+ // check for ag-grid-specific events, fall back to standard events
79
+ const payload = ((_a = e.data) === null || _a === void 0 ? void 0 : _a.payload) || e.detail;
80
+ yield this.broadcastOnChannel(channelName, type, payload);
81
+ });
69
82
  });
70
83
  }
71
84
  }
package/dist/esm/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export * from './fdc3';
2
+ export * from './fdc3-channel-event';
@@ -172,6 +172,599 @@
172
172
  "name": "",
173
173
  "preserveMemberOrder": false,
174
174
  "members": [
175
+ {
176
+ "kind": "Interface",
177
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3:interface",
178
+ "docComment": "/**\n * The FDC3 API interface.\n *\n * @public\n */\n",
179
+ "excerptTokens": [
180
+ {
181
+ "kind": "Content",
182
+ "text": "export interface FDC3 "
183
+ }
184
+ ],
185
+ "fileUrlPath": "src/fdc3.ts",
186
+ "releaseTag": "Public",
187
+ "name": "FDC3",
188
+ "preserveMemberOrder": false,
189
+ "members": [
190
+ {
191
+ "kind": "MethodSignature",
192
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#addIntentListeners:member(1)",
193
+ "docComment": "/**\n * Adds intent listeners for the specified intents.\n *\n * @param listeners - The intent listeners to add.\n *\n * @public\n */\n",
194
+ "excerptTokens": [
195
+ {
196
+ "kind": "Content",
197
+ "text": "addIntentListeners(listeners: "
198
+ },
199
+ {
200
+ "kind": "Reference",
201
+ "text": "Map",
202
+ "canonicalReference": "!Map:interface"
203
+ },
204
+ {
205
+ "kind": "Content",
206
+ "text": "<"
207
+ },
208
+ {
209
+ "kind": "Reference",
210
+ "text": "FDC3Intents",
211
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Intents:type"
212
+ },
213
+ {
214
+ "kind": "Content",
215
+ "text": ", "
216
+ },
217
+ {
218
+ "kind": "Reference",
219
+ "text": "FDC3ContextHandler",
220
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3ContextHandler:type"
221
+ },
222
+ {
223
+ "kind": "Content",
224
+ "text": ">"
225
+ },
226
+ {
227
+ "kind": "Content",
228
+ "text": "): "
229
+ },
230
+ {
231
+ "kind": "Content",
232
+ "text": "void"
233
+ },
234
+ {
235
+ "kind": "Content",
236
+ "text": ";"
237
+ }
238
+ ],
239
+ "isOptional": false,
240
+ "returnTypeTokenRange": {
241
+ "startIndex": 8,
242
+ "endIndex": 9
243
+ },
244
+ "releaseTag": "Public",
245
+ "overloadIndex": 1,
246
+ "parameters": [
247
+ {
248
+ "parameterName": "listeners",
249
+ "parameterTypeTokenRange": {
250
+ "startIndex": 1,
251
+ "endIndex": 7
252
+ },
253
+ "isOptional": false
254
+ }
255
+ ],
256
+ "name": "addIntentListeners"
257
+ },
258
+ {
259
+ "kind": "MethodSignature",
260
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#broadcastOnChannel:member(1)",
261
+ "docComment": "/**\n * Broadcasts a message on a given channel with a given type\n *\n * @param channelName - name of the channel\n *\n * @param type - type of the channel\n *\n * @param payload - payload sent to the channel\n */\n",
262
+ "excerptTokens": [
263
+ {
264
+ "kind": "Content",
265
+ "text": "broadcastOnChannel(channelName: "
266
+ },
267
+ {
268
+ "kind": "Content",
269
+ "text": "string"
270
+ },
271
+ {
272
+ "kind": "Content",
273
+ "text": ", type: "
274
+ },
275
+ {
276
+ "kind": "Content",
277
+ "text": "string"
278
+ },
279
+ {
280
+ "kind": "Content",
281
+ "text": ", payload: "
282
+ },
283
+ {
284
+ "kind": "Content",
285
+ "text": "any"
286
+ },
287
+ {
288
+ "kind": "Content",
289
+ "text": "): "
290
+ },
291
+ {
292
+ "kind": "Reference",
293
+ "text": "Promise",
294
+ "canonicalReference": "!Promise:interface"
295
+ },
296
+ {
297
+ "kind": "Content",
298
+ "text": "<void>"
299
+ },
300
+ {
301
+ "kind": "Content",
302
+ "text": ";"
303
+ }
304
+ ],
305
+ "isOptional": false,
306
+ "returnTypeTokenRange": {
307
+ "startIndex": 7,
308
+ "endIndex": 9
309
+ },
310
+ "releaseTag": "Public",
311
+ "overloadIndex": 1,
312
+ "parameters": [
313
+ {
314
+ "parameterName": "channelName",
315
+ "parameterTypeTokenRange": {
316
+ "startIndex": 1,
317
+ "endIndex": 2
318
+ },
319
+ "isOptional": false
320
+ },
321
+ {
322
+ "parameterName": "type",
323
+ "parameterTypeTokenRange": {
324
+ "startIndex": 3,
325
+ "endIndex": 4
326
+ },
327
+ "isOptional": false
328
+ },
329
+ {
330
+ "parameterName": "payload",
331
+ "parameterTypeTokenRange": {
332
+ "startIndex": 5,
333
+ "endIndex": 6
334
+ },
335
+ "isOptional": false
336
+ }
337
+ ],
338
+ "name": "broadcastOnChannel"
339
+ },
340
+ {
341
+ "kind": "MethodSignature",
342
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#broadcastOnChannelEventHandler:member(1)",
343
+ "docComment": "/**\n * Helper function to broadcast message on channel in response to dispatched event\n *\n * @param channelName - name of the channel\n *\n * @param type - type of the channel\n */\n",
344
+ "excerptTokens": [
345
+ {
346
+ "kind": "Content",
347
+ "text": "broadcastOnChannelEventHandler(channelName: "
348
+ },
349
+ {
350
+ "kind": "Content",
351
+ "text": "string"
352
+ },
353
+ {
354
+ "kind": "Content",
355
+ "text": ", type: "
356
+ },
357
+ {
358
+ "kind": "Content",
359
+ "text": "string"
360
+ },
361
+ {
362
+ "kind": "Content",
363
+ "text": "): "
364
+ },
365
+ {
366
+ "kind": "Reference",
367
+ "text": "Promise",
368
+ "canonicalReference": "!Promise:interface"
369
+ },
370
+ {
371
+ "kind": "Content",
372
+ "text": "<(e: any) => "
373
+ },
374
+ {
375
+ "kind": "Reference",
376
+ "text": "Promise",
377
+ "canonicalReference": "!Promise:interface"
378
+ },
379
+ {
380
+ "kind": "Content",
381
+ "text": "<void>>"
382
+ },
383
+ {
384
+ "kind": "Content",
385
+ "text": ";"
386
+ }
387
+ ],
388
+ "isOptional": false,
389
+ "returnTypeTokenRange": {
390
+ "startIndex": 5,
391
+ "endIndex": 9
392
+ },
393
+ "releaseTag": "Public",
394
+ "overloadIndex": 1,
395
+ "parameters": [
396
+ {
397
+ "parameterName": "channelName",
398
+ "parameterTypeTokenRange": {
399
+ "startIndex": 1,
400
+ "endIndex": 2
401
+ },
402
+ "isOptional": false
403
+ },
404
+ {
405
+ "parameterName": "type",
406
+ "parameterTypeTokenRange": {
407
+ "startIndex": 3,
408
+ "endIndex": 4
409
+ },
410
+ "isOptional": false
411
+ }
412
+ ],
413
+ "name": "broadcastOnChannelEventHandler"
414
+ },
415
+ {
416
+ "kind": "MethodSignature",
417
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#findIntent:member(1)",
418
+ "docComment": "/**\n * Finds an app that supports the specified intent.\n *\n * @param intent - The intent to find an app for.\n *\n * @param context - The context to use.\n *\n * @returns A promise that resolves with the app and its metadata.\n *\n * @public\n */\n",
419
+ "excerptTokens": [
420
+ {
421
+ "kind": "Content",
422
+ "text": "findIntent(intent: "
423
+ },
424
+ {
425
+ "kind": "Reference",
426
+ "text": "FDC3Intents",
427
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Intents:type"
428
+ },
429
+ {
430
+ "kind": "Content",
431
+ "text": ", context?: "
432
+ },
433
+ {
434
+ "kind": "Reference",
435
+ "text": "FDC3Context",
436
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Context:interface"
437
+ },
438
+ {
439
+ "kind": "Content",
440
+ "text": "): "
441
+ },
442
+ {
443
+ "kind": "Reference",
444
+ "text": "Promise",
445
+ "canonicalReference": "!Promise:interface"
446
+ },
447
+ {
448
+ "kind": "Content",
449
+ "text": "<"
450
+ },
451
+ {
452
+ "kind": "Reference",
453
+ "text": "FDC3AppIntent",
454
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3AppIntent:interface"
455
+ },
456
+ {
457
+ "kind": "Content",
458
+ "text": ">"
459
+ },
460
+ {
461
+ "kind": "Content",
462
+ "text": ";"
463
+ }
464
+ ],
465
+ "isOptional": false,
466
+ "returnTypeTokenRange": {
467
+ "startIndex": 5,
468
+ "endIndex": 9
469
+ },
470
+ "releaseTag": "Public",
471
+ "overloadIndex": 1,
472
+ "parameters": [
473
+ {
474
+ "parameterName": "intent",
475
+ "parameterTypeTokenRange": {
476
+ "startIndex": 1,
477
+ "endIndex": 2
478
+ },
479
+ "isOptional": false
480
+ },
481
+ {
482
+ "parameterName": "context",
483
+ "parameterTypeTokenRange": {
484
+ "startIndex": 3,
485
+ "endIndex": 4
486
+ },
487
+ "isOptional": true
488
+ }
489
+ ],
490
+ "name": "findIntent"
491
+ },
492
+ {
493
+ "kind": "MethodSignature",
494
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#findIntentsByContext:member(1)",
495
+ "docComment": "/**\n * Finds all the intents supported by the specified context.\n *\n * @param context - The context to use.\n *\n * @returns A promise that resolves with an array of all matching intents and their metadata.\n *\n * @public\n */\n",
496
+ "excerptTokens": [
497
+ {
498
+ "kind": "Content",
499
+ "text": "findIntentsByContext(context: "
500
+ },
501
+ {
502
+ "kind": "Reference",
503
+ "text": "FDC3Context",
504
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Context:interface"
505
+ },
506
+ {
507
+ "kind": "Content",
508
+ "text": "): "
509
+ },
510
+ {
511
+ "kind": "Reference",
512
+ "text": "Promise",
513
+ "canonicalReference": "!Promise:interface"
514
+ },
515
+ {
516
+ "kind": "Content",
517
+ "text": "<"
518
+ },
519
+ {
520
+ "kind": "Reference",
521
+ "text": "FDC3AppIntent",
522
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3AppIntent:interface"
523
+ },
524
+ {
525
+ "kind": "Content",
526
+ "text": "[]>"
527
+ },
528
+ {
529
+ "kind": "Content",
530
+ "text": ";"
531
+ }
532
+ ],
533
+ "isOptional": false,
534
+ "returnTypeTokenRange": {
535
+ "startIndex": 3,
536
+ "endIndex": 7
537
+ },
538
+ "releaseTag": "Public",
539
+ "overloadIndex": 1,
540
+ "parameters": [
541
+ {
542
+ "parameterName": "context",
543
+ "parameterTypeTokenRange": {
544
+ "startIndex": 1,
545
+ "endIndex": 2
546
+ },
547
+ "isOptional": false
548
+ }
549
+ ],
550
+ "name": "findIntentsByContext"
551
+ },
552
+ {
553
+ "kind": "MethodSignature",
554
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#getOrCreateChannel:member(1)",
555
+ "docComment": "/**\n * Gets or creates the specified channel.\n *\n * @param channelId - The ID of the channel to get or create.\n *\n * @returns A promise that resolves with the channel object.\n *\n * @public\n */\n",
556
+ "excerptTokens": [
557
+ {
558
+ "kind": "Content",
559
+ "text": "getOrCreateChannel(channelId: "
560
+ },
561
+ {
562
+ "kind": "Content",
563
+ "text": "string"
564
+ },
565
+ {
566
+ "kind": "Content",
567
+ "text": "): "
568
+ },
569
+ {
570
+ "kind": "Reference",
571
+ "text": "Promise",
572
+ "canonicalReference": "!Promise:interface"
573
+ },
574
+ {
575
+ "kind": "Content",
576
+ "text": "<"
577
+ },
578
+ {
579
+ "kind": "Reference",
580
+ "text": "FDC3Channel",
581
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Channel:interface"
582
+ },
583
+ {
584
+ "kind": "Content",
585
+ "text": ">"
586
+ },
587
+ {
588
+ "kind": "Content",
589
+ "text": ";"
590
+ }
591
+ ],
592
+ "isOptional": false,
593
+ "returnTypeTokenRange": {
594
+ "startIndex": 3,
595
+ "endIndex": 7
596
+ },
597
+ "releaseTag": "Public",
598
+ "overloadIndex": 1,
599
+ "parameters": [
600
+ {
601
+ "parameterName": "channelId",
602
+ "parameterTypeTokenRange": {
603
+ "startIndex": 1,
604
+ "endIndex": 2
605
+ },
606
+ "isOptional": false
607
+ }
608
+ ],
609
+ "name": "getOrCreateChannel"
610
+ },
611
+ {
612
+ "kind": "PropertySignature",
613
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#isReady:member",
614
+ "docComment": "/**\n * Whether the FDC3 API is ready.\n *\n * @public\n */\n",
615
+ "excerptTokens": [
616
+ {
617
+ "kind": "Content",
618
+ "text": "isReady: "
619
+ },
620
+ {
621
+ "kind": "Content",
622
+ "text": "boolean"
623
+ },
624
+ {
625
+ "kind": "Content",
626
+ "text": ";"
627
+ }
628
+ ],
629
+ "isReadonly": false,
630
+ "isOptional": false,
631
+ "releaseTag": "Public",
632
+ "name": "isReady",
633
+ "propertyTypeTokenRange": {
634
+ "startIndex": 1,
635
+ "endIndex": 2
636
+ }
637
+ },
638
+ {
639
+ "kind": "MethodSignature",
640
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#joinChannel:member(1)",
641
+ "docComment": "/**\n * Joins the specified channel.\n *\n * @param channelId - The ID of the channel to join.\n *\n * @returns A promise that resolves when the join is successful.\n *\n * @public\n */\n",
642
+ "excerptTokens": [
643
+ {
644
+ "kind": "Content",
645
+ "text": "joinChannel(channelId: "
646
+ },
647
+ {
648
+ "kind": "Content",
649
+ "text": "string"
650
+ },
651
+ {
652
+ "kind": "Content",
653
+ "text": "): "
654
+ },
655
+ {
656
+ "kind": "Reference",
657
+ "text": "Promise",
658
+ "canonicalReference": "!Promise:interface"
659
+ },
660
+ {
661
+ "kind": "Content",
662
+ "text": "<void>"
663
+ },
664
+ {
665
+ "kind": "Content",
666
+ "text": ";"
667
+ }
668
+ ],
669
+ "isOptional": false,
670
+ "returnTypeTokenRange": {
671
+ "startIndex": 3,
672
+ "endIndex": 5
673
+ },
674
+ "releaseTag": "Public",
675
+ "overloadIndex": 1,
676
+ "parameters": [
677
+ {
678
+ "parameterName": "channelId",
679
+ "parameterTypeTokenRange": {
680
+ "startIndex": 1,
681
+ "endIndex": 2
682
+ },
683
+ "isOptional": false
684
+ }
685
+ ],
686
+ "name": "joinChannel"
687
+ },
688
+ {
689
+ "kind": "MethodSignature",
690
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#raiseIntent:member(1)",
691
+ "docComment": "/**\n * Raises the specified intent with the specified context.\n *\n * @param context - The context to use.\n *\n * @param intent - The intent to raise.\n *\n * @returns A promise that resolves with the result of the intent resolution.\n *\n * @public\n */\n",
692
+ "excerptTokens": [
693
+ {
694
+ "kind": "Content",
695
+ "text": "raiseIntent(context: "
696
+ },
697
+ {
698
+ "kind": "Reference",
699
+ "text": "FDC3Context",
700
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Context:interface"
701
+ },
702
+ {
703
+ "kind": "Content",
704
+ "text": ", intent?: "
705
+ },
706
+ {
707
+ "kind": "Reference",
708
+ "text": "FDC3Intents",
709
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Intents:type"
710
+ },
711
+ {
712
+ "kind": "Content",
713
+ "text": "): "
714
+ },
715
+ {
716
+ "kind": "Reference",
717
+ "text": "Promise",
718
+ "canonicalReference": "!Promise:interface"
719
+ },
720
+ {
721
+ "kind": "Content",
722
+ "text": "<"
723
+ },
724
+ {
725
+ "kind": "Reference",
726
+ "text": "FDC3IntentResolution",
727
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3IntentResolution:interface"
728
+ },
729
+ {
730
+ "kind": "Content",
731
+ "text": ">"
732
+ },
733
+ {
734
+ "kind": "Content",
735
+ "text": ";"
736
+ }
737
+ ],
738
+ "isOptional": false,
739
+ "returnTypeTokenRange": {
740
+ "startIndex": 5,
741
+ "endIndex": 9
742
+ },
743
+ "releaseTag": "Public",
744
+ "overloadIndex": 1,
745
+ "parameters": [
746
+ {
747
+ "parameterName": "context",
748
+ "parameterTypeTokenRange": {
749
+ "startIndex": 1,
750
+ "endIndex": 2
751
+ },
752
+ "isOptional": false
753
+ },
754
+ {
755
+ "parameterName": "intent",
756
+ "parameterTypeTokenRange": {
757
+ "startIndex": 3,
758
+ "endIndex": 4
759
+ },
760
+ "isOptional": true
761
+ }
762
+ ],
763
+ "name": "raiseIntent"
764
+ }
765
+ ],
766
+ "extendsTokenRanges": []
767
+ },
175
768
  {
176
769
  "kind": "Interface",
177
770
  "canonicalReference": "@genesislcap/foundation-fdc3!FDC3AppIntent:interface",
@@ -2,6 +2,7 @@ import { AppIntent } from '@finos/fdc3';
2
2
  import { Channel } from '@finos/fdc3';
3
3
  import { Context } from '@finos/fdc3';
4
4
  import { ContextHandler } from '@finos/fdc3';
5
+ import { FASTElement } from '@genesislcap/web-core';
5
6
  import { IntentResolution } from '@finos/fdc3';
6
7
  import { Intents } from '@finos/fdc3';
7
8
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
@@ -10,7 +11,7 @@ import { InterfaceSymbol } from '@microsoft/fast-foundation';
10
11
  * The FDC3 implementation.
11
12
  * @internal
12
13
  */
13
- export declare class DefaultFDC3 implements FDC3_2 {
14
+ export declare class DefaultFDC3 implements FDC3 {
14
15
  isReady: boolean;
15
16
  constructor();
16
17
  private connect;
@@ -20,20 +21,15 @@ export declare class DefaultFDC3 implements FDC3_2 {
20
21
  raiseIntent(context: FDC3Context, intent?: FDC3Intents): Promise<FDC3IntentResolution>;
21
22
  joinChannel(channelId: string): Promise<void>;
22
23
  getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
23
- broadcastOnChannel(channelId: string, context: FDC3Context): Promise<void>;
24
+ broadcastOnChannel(channelName: string, type: string, payload: any): Promise<void>;
25
+ broadcastOnChannelEventHandler(channelName: string, type: string): Promise<(e: any) => Promise<void>>;
24
26
  }
25
27
 
26
- /**
27
- * The DI token for the FDC3 interface.
28
- * @internal
29
- */
30
- export declare const FDC3: InterfaceSymbol<FDC3_2>;
31
-
32
28
  /**
33
29
  * The FDC3 API interface.
34
30
  * @public
35
31
  */
36
- declare interface FDC3_2 {
32
+ export declare interface FDC3 {
37
33
  /**
38
34
  * Whether the FDC3 API is ready.
39
35
  * @public
@@ -83,20 +79,25 @@ declare interface FDC3_2 {
83
79
  */
84
80
  getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
85
81
  /**
86
- * Broadcasts the specified context on the specified channel.
87
- * @public
88
- * @param channelId - The ID of the channel to broadcast on.
89
- * @param context - The context to broadcast.
90
- * @returns A promise that resolves when the broadcast is successful.
82
+ * Broadcasts a message on a given channel with a given type
83
+ * @param channelName - name of the channel
84
+ * @param type - type of the channel
85
+ * @param payload - payload sent to the channel
91
86
  */
92
- broadcastOnChannel(channelId: string, context: FDC3Context): Promise<void>;
87
+ broadcastOnChannel(channelName: string, type: string, payload: any): Promise<void>;
88
+ /**
89
+ * Helper function to broadcast message on channel in response to dispatched event
90
+ * @param channelName - name of the channel
91
+ * @param type - type of the channel
92
+ */
93
+ broadcastOnChannelEventHandler(channelName: string, type: string): Promise<(e: any) => Promise<void>>;
93
94
  }
94
95
 
95
96
  /**
96
97
  * The DI token for the FDC3 interface.
97
98
  * @internal
98
99
  */
99
- declare const FDC3: InterfaceSymbol<FDC3_2>;
100
+ export declare const FDC3: InterfaceSymbol<FDC3>;
100
101
 
101
102
  /**
102
103
  * @public
@@ -110,6 +111,20 @@ export declare interface FDC3AppIntent extends AppIntent {
110
111
  export declare interface FDC3Channel extends Channel {
111
112
  }
112
113
 
114
+ /**
115
+ * fdc3-channel-event
116
+ * @internal
117
+ */
118
+ export declare class Fdc3ChannelEvent extends FASTElement {
119
+ fdc3: FDC3;
120
+ eventName: string;
121
+ channelType: string;
122
+ channelName: string;
123
+ connectedCallback(): void;
124
+ disconnectedCallback(): void;
125
+ private sendEventOnChannel;
126
+ }
127
+
113
128
  /**
114
129
  * @public
115
130
  */
@@ -0,0 +1,24 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [addIntentListeners](./foundation-fdc3.fdc3.addintentlisteners.md)
4
+
5
+ ## FDC3.addIntentListeners() method
6
+
7
+ Adds intent listeners for the specified intents.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ addIntentListeners(listeners: Map<FDC3Intents, FDC3ContextHandler>): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | listeners | Map&lt;[FDC3Intents](./foundation-fdc3.fdc3intents.md)<!-- -->, [FDC3ContextHandler](./foundation-fdc3.fdc3contexthandler.md)<!-- -->&gt; | The intent listeners to add. |
20
+
21
+ **Returns:**
22
+
23
+ void
24
+
@@ -0,0 +1,26 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [broadcastOnChannel](./foundation-fdc3.fdc3.broadcastonchannel.md)
4
+
5
+ ## FDC3.broadcastOnChannel() method
6
+
7
+ Broadcasts a message on a given channel with a given type
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ broadcastOnChannel(channelName: string, type: string, payload: any): Promise<void>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | channelName | string | name of the channel |
20
+ | type | string | type of the channel |
21
+ | payload | any | payload sent to the channel |
22
+
23
+ **Returns:**
24
+
25
+ Promise&lt;void&gt;
26
+
@@ -0,0 +1,25 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [broadcastOnChannelEventHandler](./foundation-fdc3.fdc3.broadcastonchanneleventhandler.md)
4
+
5
+ ## FDC3.broadcastOnChannelEventHandler() method
6
+
7
+ Helper function to broadcast message on channel in response to dispatched event
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ broadcastOnChannelEventHandler(channelName: string, type: string): Promise<(e: any) => Promise<void>>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | channelName | string | name of the channel |
20
+ | type | string | type of the channel |
21
+
22
+ **Returns:**
23
+
24
+ Promise&lt;(e: any) =&gt; Promise&lt;void&gt;&gt;
25
+
@@ -0,0 +1,27 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [findIntent](./foundation-fdc3.fdc3.findintent.md)
4
+
5
+ ## FDC3.findIntent() method
6
+
7
+ Finds an app that supports the specified intent.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ findIntent(intent: FDC3Intents, context?: FDC3Context): Promise<FDC3AppIntent>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | intent | [FDC3Intents](./foundation-fdc3.fdc3intents.md) | The intent to find an app for. |
20
+ | context | [FDC3Context](./foundation-fdc3.fdc3context.md) | _(Optional)_ The context to use. |
21
+
22
+ **Returns:**
23
+
24
+ Promise&lt;[FDC3AppIntent](./foundation-fdc3.fdc3appintent.md)<!-- -->&gt;
25
+
26
+ A promise that resolves with the app and its metadata.
27
+
@@ -0,0 +1,26 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [findIntentsByContext](./foundation-fdc3.fdc3.findintentsbycontext.md)
4
+
5
+ ## FDC3.findIntentsByContext() method
6
+
7
+ Finds all the intents supported by the specified context.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ findIntentsByContext(context: FDC3Context): Promise<FDC3AppIntent[]>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | context | [FDC3Context](./foundation-fdc3.fdc3context.md) | The context to use. |
20
+
21
+ **Returns:**
22
+
23
+ Promise&lt;[FDC3AppIntent](./foundation-fdc3.fdc3appintent.md)<!-- -->\[\]&gt;
24
+
25
+ A promise that resolves with an array of all matching intents and their metadata.
26
+
@@ -0,0 +1,26 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [getOrCreateChannel](./foundation-fdc3.fdc3.getorcreatechannel.md)
4
+
5
+ ## FDC3.getOrCreateChannel() method
6
+
7
+ Gets or creates the specified channel.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | channelId | string | The ID of the channel to get or create. |
20
+
21
+ **Returns:**
22
+
23
+ Promise&lt;[FDC3Channel](./foundation-fdc3.fdc3channel.md)<!-- -->&gt;
24
+
25
+ A promise that resolves with the channel object.
26
+
@@ -0,0 +1,13 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [isReady](./foundation-fdc3.fdc3.isready.md)
4
+
5
+ ## FDC3.isReady property
6
+
7
+ Whether the FDC3 API is ready.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ isReady: boolean;
13
+ ```
@@ -0,0 +1,26 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [joinChannel](./foundation-fdc3.fdc3.joinchannel.md)
4
+
5
+ ## FDC3.joinChannel() method
6
+
7
+ Joins the specified channel.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ joinChannel(channelId: string): Promise<void>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | channelId | string | The ID of the channel to join. |
20
+
21
+ **Returns:**
22
+
23
+ Promise&lt;void&gt;
24
+
25
+ A promise that resolves when the join is successful.
26
+
@@ -0,0 +1,33 @@
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; [FDC3](./foundation-fdc3.fdc3.md)
4
+
5
+ ## FDC3 interface
6
+
7
+ The FDC3 API interface.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export interface FDC3
13
+ ```
14
+
15
+ ## Properties
16
+
17
+ | Property | Modifiers | Type | Description |
18
+ | --- | --- | --- | --- |
19
+ | [isReady](./foundation-fdc3.fdc3.isready.md) | | boolean | Whether the FDC3 API is ready. |
20
+
21
+ ## Methods
22
+
23
+ | Method | Description |
24
+ | --- | --- |
25
+ | [addIntentListeners(listeners)](./foundation-fdc3.fdc3.addintentlisteners.md) | Adds intent listeners for the specified intents. |
26
+ | [broadcastOnChannel(channelName, type, payload)](./foundation-fdc3.fdc3.broadcastonchannel.md) | Broadcasts a message on a given channel with a given type |
27
+ | [broadcastOnChannelEventHandler(channelName, type)](./foundation-fdc3.fdc3.broadcastonchanneleventhandler.md) | Helper function to broadcast message on channel in response to dispatched event |
28
+ | [findIntent(intent, context)](./foundation-fdc3.fdc3.findintent.md) | Finds an app that supports the specified intent. |
29
+ | [findIntentsByContext(context)](./foundation-fdc3.fdc3.findintentsbycontext.md) | Finds all the intents supported by the specified context. |
30
+ | [getOrCreateChannel(channelId)](./foundation-fdc3.fdc3.getorcreatechannel.md) | Gets or creates the specified channel. |
31
+ | [joinChannel(channelId)](./foundation-fdc3.fdc3.joinchannel.md) | Joins the specified channel. |
32
+ | [raiseIntent(context, intent)](./foundation-fdc3.fdc3.raiseintent.md) | Raises the specified intent with the specified context. |
33
+
@@ -0,0 +1,27 @@
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; [FDC3](./foundation-fdc3.fdc3.md) &gt; [raiseIntent](./foundation-fdc3.fdc3.raiseintent.md)
4
+
5
+ ## FDC3.raiseIntent() method
6
+
7
+ Raises the specified intent with the specified context.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ raiseIntent(context: FDC3Context, intent?: FDC3Intents): Promise<FDC3IntentResolution>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | context | [FDC3Context](./foundation-fdc3.fdc3context.md) | The context to use. |
20
+ | intent | [FDC3Intents](./foundation-fdc3.fdc3intents.md) | _(Optional)_ The intent to raise. |
21
+
22
+ **Returns:**
23
+
24
+ Promise&lt;[FDC3IntentResolution](./foundation-fdc3.fdc3intentresolution.md)<!-- -->&gt;
25
+
26
+ A promise that resolves with the result of the intent resolution.
27
+
@@ -8,6 +8,7 @@
8
8
 
9
9
  | Interface | Description |
10
10
  | --- | --- |
11
+ | [FDC3](./foundation-fdc3.fdc3.md) | The FDC3 API interface. |
11
12
  | [FDC3AppIntent](./foundation-fdc3.fdc3appintent.md) | |
12
13
  | [FDC3Channel](./foundation-fdc3.fdc3channel.md) | |
13
14
  | [FDC3Context](./foundation-fdc3.fdc3context.md) | |
@@ -8,20 +8,22 @@ import { AppIntent } from '@finos/fdc3';
8
8
  import { Channel } from '@finos/fdc3';
9
9
  import { Context } from '@finos/fdc3';
10
10
  import { ContextHandler } from '@finos/fdc3';
11
+ import { FASTElement } from '@genesislcap/web-core';
11
12
  import { IntentResolution } from '@finos/fdc3';
12
13
  import { Intents } from '@finos/fdc3';
13
14
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
14
15
 
15
- // Warning: (ae-forgotten-export) The symbol "FDC3_2" needs to be exported by the entry point index.d.ts
16
16
  // Warning: (ae-internal-missing-underscore) The name "DefaultFDC3" should be prefixed with an underscore because the declaration is marked as @internal
17
17
  //
18
18
  // @internal
19
- export class DefaultFDC3 implements FDC3_2 {
19
+ export class DefaultFDC3 implements FDC3 {
20
20
  constructor();
21
21
  // (undocumented)
22
22
  addIntentListeners(listeners: Map<FDC3Intents, FDC3ContextHandler>): void;
23
23
  // (undocumented)
24
- broadcastOnChannel(channelId: string, context: FDC3Context): Promise<void>;
24
+ broadcastOnChannel(channelName: string, type: string, payload: any): Promise<void>;
25
+ // (undocumented)
26
+ broadcastOnChannelEventHandler(channelName: string, type: string): Promise<(e: any) => Promise<void>>;
25
27
  // (undocumented)
26
28
  findIntent(intent: FDC3Intents, context?: FDC3Context): Promise<FDC3AppIntent>;
27
29
  // (undocumented)
@@ -36,10 +38,23 @@ export class DefaultFDC3 implements FDC3_2 {
36
38
  raiseIntent(context: FDC3Context, intent?: FDC3Intents): Promise<FDC3IntentResolution>;
37
39
  }
38
40
 
39
- // Warning: (ae-internal-missing-underscore) The name "FDC3" should be prefixed with an underscore because the declaration is marked as @internal
41
+ // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "FDC3" because one of its declarations is marked as @internal
40
42
  //
43
+ // @public
44
+ export interface FDC3 {
45
+ addIntentListeners(listeners: Map<FDC3Intents, FDC3ContextHandler>): void;
46
+ broadcastOnChannel(channelName: string, type: string, payload: any): Promise<void>;
47
+ broadcastOnChannelEventHandler(channelName: string, type: string): Promise<(e: any) => Promise<void>>;
48
+ findIntent(intent: FDC3Intents, context?: FDC3Context): Promise<FDC3AppIntent>;
49
+ findIntentsByContext(context: FDC3Context): Promise<FDC3AppIntent[]>;
50
+ getOrCreateChannel(channelId: string): Promise<FDC3Channel>;
51
+ isReady: boolean;
52
+ joinChannel(channelId: string): Promise<void>;
53
+ raiseIntent(context: FDC3Context, intent?: FDC3Intents): Promise<FDC3IntentResolution>;
54
+ }
55
+
41
56
  // @internal
42
- export const FDC3: InterfaceSymbol<FDC3_2>;
57
+ export const FDC3: InterfaceSymbol<FDC3>;
43
58
 
44
59
  // @public (undocumented)
45
60
  export interface FDC3AppIntent extends AppIntent {
@@ -49,6 +64,24 @@ export interface FDC3AppIntent extends AppIntent {
49
64
  export interface FDC3Channel extends Channel {
50
65
  }
51
66
 
67
+ // Warning: (ae-internal-missing-underscore) The name "Fdc3ChannelEvent" should be prefixed with an underscore because the declaration is marked as @internal
68
+ //
69
+ // @internal
70
+ export class Fdc3ChannelEvent extends FASTElement {
71
+ // (undocumented)
72
+ channelName: string;
73
+ // (undocumented)
74
+ channelType: string;
75
+ // (undocumented)
76
+ connectedCallback(): void;
77
+ // (undocumented)
78
+ disconnectedCallback(): void;
79
+ // (undocumented)
80
+ eventName: string;
81
+ // (undocumented)
82
+ fdc3: FDC3;
83
+ }
84
+
52
85
  // @public (undocumented)
53
86
  export interface FDC3Context extends Context {
54
87
  }
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.170.0",
4
+ "version": "14.171.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -51,19 +51,20 @@
51
51
  "test:debug": "genx test --debug"
52
52
  },
53
53
  "devDependencies": {
54
- "@genesislcap/foundation-testing": "14.170.0",
55
- "@genesislcap/genx": "14.170.0",
56
- "@genesislcap/rollup-builder": "14.170.0",
57
- "@genesislcap/ts-builder": "14.170.0",
58
- "@genesislcap/uvu-playwright-builder": "14.170.0",
59
- "@genesislcap/vite-builder": "14.170.0",
60
- "@genesislcap/webpack-builder": "14.170.0",
54
+ "@genesislcap/foundation-testing": "14.171.0",
55
+ "@genesislcap/genx": "14.171.0",
56
+ "@genesislcap/rollup-builder": "14.171.0",
57
+ "@genesislcap/ts-builder": "14.171.0",
58
+ "@genesislcap/uvu-playwright-builder": "14.171.0",
59
+ "@genesislcap/vite-builder": "14.171.0",
60
+ "@genesislcap/webpack-builder": "14.171.0",
61
61
  "rimraf": "^3.0.2"
62
62
  },
63
63
  "dependencies": {
64
64
  "@finos/fdc3": "^1.2.0",
65
- "@genesislcap/foundation-logger": "14.170.0",
66
- "@genesislcap/foundation-utils": "14.170.0",
65
+ "@genesislcap/foundation-logger": "14.171.0",
66
+ "@genesislcap/foundation-utils": "14.171.0",
67
+ "@genesislcap/web-core": "14.171.0",
67
68
  "@microsoft/fast-element": "^1.12.0",
68
69
  "@microsoft/fast-foundation": "^2.49.4",
69
70
  "tslib": "^2.3.1"
@@ -76,5 +77,5 @@
76
77
  "publishConfig": {
77
78
  "access": "public"
78
79
  },
79
- "gitHead": "98a1e02bb120637346bd3e6be6b4c050e63a1347"
80
+ "gitHead": "312d2536cdfdd0c1b2c00dd623cc863edac31d7a"
80
81
  }