@genesislcap/foundation-fdc3 14.192.1 → 14.192.2-FUI-2127.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,17 +1,344 @@
1
- import { FASTElement } from '@genesislcap/web-core';
1
+ import { FoundationElement } from '@genesislcap/web-core';
2
2
  import { FDC3 } from '../fdc3';
3
+ declare const Fdc3RaiseIntent_base: (new (...args: any[]) => {
4
+ "__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
5
+ "__#1@#_latestTokenCode": string;
6
+ "__#1@#_hasFirstLoaded": boolean;
7
+ "__#1@#_cleanupTimeout": NodeJS.Timeout;
8
+ "__#1@#_shouldForceLifecycle": boolean;
9
+ cloneNode(deep?: boolean): Node;
10
+ deepClone(): Node;
11
+ readonly shouldRunDisconnect: boolean;
12
+ readonly shouldRunConnect: boolean;
13
+ "__#1@#_blockLifecycleDueToTokenChange"(lifecycleType: "connect" | "disconnect" | "reconnect"): boolean;
14
+ "__#1@#_tryFindContainingLayout"(e: Element): import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
15
+ connectedCallback(): void;
16
+ readonly $fastController: import("@microsoft/fast-element").Controller;
17
+ $emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail">): boolean | void;
18
+ disconnectedCallback(): void;
19
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
20
+ accessKey: string;
21
+ readonly accessKeyLabel: string;
22
+ autocapitalize: string;
23
+ dir: string;
24
+ draggable: boolean;
25
+ hidden: boolean;
26
+ inert: boolean;
27
+ innerText: string;
28
+ lang: string;
29
+ readonly offsetHeight: number;
30
+ readonly offsetLeft: number;
31
+ readonly offsetParent: Element;
32
+ readonly offsetTop: number;
33
+ readonly offsetWidth: number;
34
+ outerText: string;
35
+ spellcheck: boolean;
36
+ title: string;
37
+ translate: boolean;
38
+ attachInternals(): ElementInternals;
39
+ click(): void;
40
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
41
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
42
+ removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions): void;
43
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
44
+ readonly attributes: NamedNodeMap;
45
+ readonly classList: DOMTokenList;
46
+ className: string;
47
+ readonly clientHeight: number;
48
+ readonly clientLeft: number;
49
+ readonly clientTop: number;
50
+ readonly clientWidth: number;
51
+ id: string;
52
+ readonly localName: string;
53
+ readonly namespaceURI: string;
54
+ onfullscreenchange: (this: Element, ev: Event) => any;
55
+ onfullscreenerror: (this: Element, ev: Event) => any;
56
+ outerHTML: string;
57
+ readonly ownerDocument: Document;
58
+ readonly part: DOMTokenList;
59
+ readonly prefix: string;
60
+ readonly scrollHeight: number;
61
+ scrollLeft: number;
62
+ scrollTop: number;
63
+ readonly scrollWidth: number;
64
+ readonly shadowRoot: ShadowRoot;
65
+ slot: string;
66
+ readonly tagName: string;
67
+ attachShadow(init: ShadowRootInit): ShadowRoot;
68
+ closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
69
+ closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
70
+ closest<E extends Element = Element>(selectors: string): E;
71
+ getAttribute(qualifiedName: string): string;
72
+ getAttributeNS(namespace: string, localName: string): string;
73
+ getAttributeNames(): string[];
74
+ getAttributeNode(qualifiedName: string): Attr;
75
+ getAttributeNodeNS(namespace: string, localName: string): Attr;
76
+ getBoundingClientRect(): DOMRect;
77
+ getClientRects(): DOMRectList;
78
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
79
+ getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
80
+ getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
81
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
82
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
83
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
84
+ getElementsByTagNameNS(namespace: string, localName: string): HTMLCollectionOf<Element>;
85
+ hasAttribute(qualifiedName: string): boolean;
86
+ hasAttributeNS(namespace: string, localName: string): boolean;
87
+ hasAttributes(): boolean;
88
+ hasPointerCapture(pointerId: number): boolean;
89
+ insertAdjacentElement(where: InsertPosition, element: Element): Element;
90
+ insertAdjacentHTML(position: InsertPosition, text: string): void;
91
+ insertAdjacentText(where: InsertPosition, data: string): void;
92
+ matches(selectors: string): boolean;
93
+ releasePointerCapture(pointerId: number): void;
94
+ removeAttribute(qualifiedName: string): void;
95
+ removeAttributeNS(namespace: string, localName: string): void;
96
+ removeAttributeNode(attr: Attr): Attr;
97
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
98
+ requestPointerLock(): void;
99
+ scroll(options?: ScrollToOptions): void;
100
+ scroll(x: number, y: number): void;
101
+ scrollBy(options?: ScrollToOptions): void;
102
+ scrollBy(x: number, y: number): void;
103
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
104
+ scrollTo(options?: ScrollToOptions): void;
105
+ scrollTo(x: number, y: number): void;
106
+ setAttribute(qualifiedName: string, value: string): void;
107
+ setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
108
+ setAttributeNode(attr: Attr): Attr;
109
+ setAttributeNodeNS(attr: Attr): Attr;
110
+ setPointerCapture(pointerId: number): void;
111
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
112
+ webkitMatchesSelector(selectors: string): boolean;
113
+ readonly baseURI: string;
114
+ readonly childNodes: NodeListOf<ChildNode>;
115
+ readonly firstChild: ChildNode;
116
+ readonly isConnected: boolean;
117
+ readonly lastChild: ChildNode;
118
+ readonly nextSibling: ChildNode;
119
+ readonly nodeName: string;
120
+ readonly nodeType: number;
121
+ nodeValue: string;
122
+ readonly parentElement: HTMLElement;
123
+ readonly parentNode: ParentNode;
124
+ readonly previousSibling: ChildNode;
125
+ textContent: string;
126
+ appendChild<T_1 extends Node>(node: T_1): T_1;
127
+ compareDocumentPosition(other: Node): number;
128
+ contains(other: Node): boolean;
129
+ getRootNode(options?: GetRootNodeOptions): Node;
130
+ hasChildNodes(): boolean;
131
+ insertBefore<T_2 extends Node>(node: T_2, child: Node): T_2;
132
+ isDefaultNamespace(namespace: string): boolean;
133
+ isEqualNode(otherNode: Node): boolean;
134
+ isSameNode(otherNode: Node): boolean;
135
+ lookupNamespaceURI(prefix: string): string;
136
+ lookupPrefix(namespace: string): string;
137
+ normalize(): void;
138
+ removeChild<T_3 extends Node>(child: T_3): T_3;
139
+ replaceChild<T_4 extends Node>(node: Node, child: T_4): T_4;
140
+ readonly ATTRIBUTE_NODE: number;
141
+ readonly CDATA_SECTION_NODE: number;
142
+ readonly COMMENT_NODE: number;
143
+ readonly DOCUMENT_FRAGMENT_NODE: number;
144
+ readonly DOCUMENT_NODE: number;
145
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
146
+ readonly DOCUMENT_POSITION_CONTAINS: number;
147
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
148
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
149
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
150
+ readonly DOCUMENT_POSITION_PRECEDING: number;
151
+ readonly DOCUMENT_TYPE_NODE: number;
152
+ readonly ELEMENT_NODE: number;
153
+ readonly ENTITY_NODE: number;
154
+ readonly ENTITY_REFERENCE_NODE: number;
155
+ readonly NOTATION_NODE: number;
156
+ readonly PROCESSING_INSTRUCTION_NODE: number;
157
+ readonly TEXT_NODE: number;
158
+ dispatchEvent(event: Event): boolean;
159
+ ariaAtomic: string;
160
+ ariaAutoComplete: string;
161
+ ariaBusy: string;
162
+ ariaChecked: string;
163
+ ariaColCount: string;
164
+ ariaColIndex: string;
165
+ ariaColIndexText: string;
166
+ ariaColSpan: string;
167
+ ariaCurrent: string;
168
+ ariaDisabled: string;
169
+ ariaExpanded: string;
170
+ ariaHasPopup: string;
171
+ ariaHidden: string;
172
+ ariaInvalid: string;
173
+ ariaKeyShortcuts: string;
174
+ ariaLabel: string;
175
+ ariaLevel: string;
176
+ ariaLive: string;
177
+ ariaModal: string;
178
+ ariaMultiLine: string;
179
+ ariaMultiSelectable: string;
180
+ ariaOrientation: string;
181
+ ariaPlaceholder: string;
182
+ ariaPosInSet: string;
183
+ ariaPressed: string;
184
+ ariaReadOnly: string;
185
+ ariaRequired: string;
186
+ ariaRoleDescription: string;
187
+ ariaRowCount: string;
188
+ ariaRowIndex: string;
189
+ ariaRowIndexText: string;
190
+ ariaRowSpan: string;
191
+ ariaSelected: string;
192
+ ariaSetSize: string;
193
+ ariaSort: string;
194
+ ariaValueMax: string;
195
+ ariaValueMin: string;
196
+ ariaValueNow: string;
197
+ ariaValueText: string;
198
+ role: string;
199
+ animate(keyframes: PropertyIndexedKeyframes | Keyframe[], options?: number | KeyframeAnimationOptions): Animation;
200
+ getAnimations(options?: GetAnimationsOptions): Animation[];
201
+ after(...nodes: (string | Node)[]): void;
202
+ before(...nodes: (string | Node)[]): void;
203
+ remove(): void;
204
+ replaceWith(...nodes: (string | Node)[]): void;
205
+ innerHTML: string;
206
+ readonly nextElementSibling: Element;
207
+ readonly previousElementSibling: Element;
208
+ readonly childElementCount: number;
209
+ readonly children: HTMLCollection;
210
+ readonly firstElementChild: Element;
211
+ readonly lastElementChild: Element;
212
+ append(...nodes: (string | Node)[]): void;
213
+ prepend(...nodes: (string | Node)[]): void;
214
+ querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
215
+ querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
216
+ querySelector<E_1 extends Element = Element>(selectors: string): E_1;
217
+ querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
218
+ querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
219
+ querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
220
+ replaceChildren(...nodes: (string | Node)[]): void;
221
+ readonly assignedSlot: HTMLSlotElement;
222
+ oncopy: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
223
+ oncut: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
224
+ onpaste: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
225
+ readonly style: CSSStyleDeclaration;
226
+ contentEditable: string;
227
+ enterKeyHint: string;
228
+ inputMode: string;
229
+ readonly isContentEditable: boolean;
230
+ onabort: (this: GlobalEventHandlers, ev: UIEvent) => any;
231
+ onanimationcancel: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
232
+ onanimationend: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
233
+ onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
234
+ onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
235
+ onauxclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
236
+ onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any;
237
+ onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any;
238
+ oncancel: (this: GlobalEventHandlers, ev: Event) => any;
239
+ oncanplay: (this: GlobalEventHandlers, ev: Event) => any;
240
+ oncanplaythrough: (this: GlobalEventHandlers, ev: Event) => any;
241
+ onchange: (this: GlobalEventHandlers, ev: Event) => any;
242
+ onclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
243
+ onclose: (this: GlobalEventHandlers, ev: Event) => any;
244
+ oncontextmenu: (this: GlobalEventHandlers, ev: MouseEvent) => any;
245
+ oncuechange: (this: GlobalEventHandlers, ev: Event) => any;
246
+ ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
247
+ ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any;
248
+ ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any;
249
+ ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any;
250
+ ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any;
251
+ ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any;
252
+ ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any;
253
+ ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any;
254
+ ondurationchange: (this: GlobalEventHandlers, ev: Event) => any;
255
+ onemptied: (this: GlobalEventHandlers, ev: Event) => any;
256
+ onended: (this: GlobalEventHandlers, ev: Event) => any;
257
+ onerror: OnErrorEventHandlerNonNull;
258
+ onfocus: (this: GlobalEventHandlers, ev: FocusEvent) => any;
259
+ onformdata: (this: GlobalEventHandlers, ev: FormDataEvent) => any;
260
+ ongotpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any;
261
+ oninput: (this: GlobalEventHandlers, ev: Event) => any;
262
+ oninvalid: (this: GlobalEventHandlers, ev: Event) => any;
263
+ onkeydown: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
264
+ onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
265
+ onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
266
+ onload: (this: GlobalEventHandlers, ev: Event) => any;
267
+ onloadeddata: (this: GlobalEventHandlers, ev: Event) => any;
268
+ onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any;
269
+ onloadstart: (this: GlobalEventHandlers, ev: Event) => any;
270
+ onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any;
271
+ onmousedown: (this: GlobalEventHandlers, ev: MouseEvent) => any;
272
+ onmouseenter: (this: GlobalEventHandlers, ev: MouseEvent) => any;
273
+ onmouseleave: (this: GlobalEventHandlers, ev: MouseEvent) => any;
274
+ onmousemove: (this: GlobalEventHandlers, ev: MouseEvent) => any;
275
+ onmouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
276
+ onmouseover: (this: GlobalEventHandlers, ev: MouseEvent) => any;
277
+ onmouseup: (this: GlobalEventHandlers, ev: MouseEvent) => any;
278
+ onpause: (this: GlobalEventHandlers, ev: Event) => any;
279
+ onplay: (this: GlobalEventHandlers, ev: Event) => any;
280
+ onplaying: (this: GlobalEventHandlers, ev: Event) => any;
281
+ onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
282
+ onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
283
+ onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
284
+ onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
285
+ onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
286
+ onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
287
+ onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
288
+ onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
289
+ onprogress: (this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any;
290
+ onratechange: (this: GlobalEventHandlers, ev: Event) => any;
291
+ onreset: (this: GlobalEventHandlers, ev: Event) => any;
292
+ onresize: (this: GlobalEventHandlers, ev: UIEvent) => any;
293
+ onscroll: (this: GlobalEventHandlers, ev: Event) => any;
294
+ onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any;
295
+ onseeked: (this: GlobalEventHandlers, ev: Event) => any;
296
+ onseeking: (this: GlobalEventHandlers, ev: Event) => any;
297
+ onselect: (this: GlobalEventHandlers, ev: Event) => any;
298
+ onselectionchange: (this: GlobalEventHandlers, ev: Event) => any;
299
+ onselectstart: (this: GlobalEventHandlers, ev: Event) => any;
300
+ onslotchange: (this: GlobalEventHandlers, ev: Event) => any;
301
+ onstalled: (this: GlobalEventHandlers, ev: Event) => any;
302
+ onsubmit: (this: GlobalEventHandlers, ev: SubmitEvent) => any;
303
+ onsuspend: (this: GlobalEventHandlers, ev: Event) => any;
304
+ ontimeupdate: (this: GlobalEventHandlers, ev: Event) => any;
305
+ ontoggle: (this: GlobalEventHandlers, ev: Event) => any;
306
+ ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
307
+ ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
308
+ ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
309
+ ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
310
+ ontransitioncancel: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
311
+ ontransitionend: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
312
+ ontransitionrun: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
313
+ ontransitionstart: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
314
+ onvolumechange: (this: GlobalEventHandlers, ev: Event) => any;
315
+ onwaiting: (this: GlobalEventHandlers, ev: Event) => any;
316
+ onwebkitanimationend: (this: GlobalEventHandlers, ev: Event) => any;
317
+ onwebkitanimationiteration: (this: GlobalEventHandlers, ev: Event) => any;
318
+ onwebkitanimationstart: (this: GlobalEventHandlers, ev: Event) => any;
319
+ onwebkittransitionend: (this: GlobalEventHandlers, ev: Event) => any;
320
+ onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
321
+ autofocus: boolean;
322
+ readonly dataset: DOMStringMap;
323
+ nonce?: string;
324
+ tabIndex: number;
325
+ blur(): void;
326
+ focus(options?: FocusOptions): void;
327
+ }) & typeof FoundationElement;
3
328
  /**
4
329
  * fdc3-raise-intent
5
330
  * @alpha
6
331
  */
7
- export declare class Fdc3RaiseIntent extends FASTElement {
332
+ export declare class Fdc3RaiseIntent extends Fdc3RaiseIntent_base {
8
333
  fdc3: FDC3;
9
334
  eventName: string;
10
335
  intentType: string;
11
336
  intentName: string;
12
337
  mappingFunction: (any: any) => any;
338
+ deepClone(): Node;
13
339
  connectedCallback(): void;
14
340
  disconnectedCallback(): void;
15
341
  private sendEventOnChannel;
16
342
  }
343
+ export {};
17
344
  //# sourceMappingURL=fdc3-raise-intent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fdc3-raise-intent.d.ts","sourceRoot":"","sources":["../../../src/util/fdc3-raise-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,IAAI,EAA4B,MAAM,SAAS,CAAC;AAEzD;;;GAGG;AACH,qBAGa,eAAgB,SAAQ,WAAW;IACxC,IAAI,EAAE,IAAI,CAAC;IACkB,SAAS,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAEvD,eAAe,EAAE,CAAC,GAAG,KAAA,KAAK,GAAG,CAAC;IAE9B,iBAAiB;IAIjB,oBAAoB;IAIpB,OAAO,CAAC,kBAAkB,CAaxB;CACH"}
1
+ {"version":3,"file":"fdc3-raise-intent.d.ts","sourceRoot":"","sources":["../../../src/util/fdc3-raise-intent.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAA4B,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzD;;;GAGG;AACH,qBAGa,eAAgB,SAAQ,oBAAiC;IAC9D,IAAI,EAAE,IAAI,CAAC;IACkB,SAAS,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAEvD,eAAe,EAAE,CAAC,GAAG,KAAA,KAAK,GAAG,CAAC;IAErB,SAAS,IAAI,IAAI;IAU1B,iBAAiB;IAIjB,oBAAoB;IAIpB,OAAO,CAAC,kBAAkB,CAaxB;CACH"}
@@ -14,7 +14,12 @@ let Fdc3ChannelEvent = class Fdc3ChannelEvent extends LifecycleMixin(FoundationE
14
14
  if (this.mappingFunction && typeof this.mappingFunction === 'function') {
15
15
  payload = this.mappingFunction(payload);
16
16
  }
17
- yield this.fdc3.broadcastOnChannel(this.channelName, this.channelType, payload);
17
+ if (this.channelName) {
18
+ yield this.fdc3.broadcastOnChannel(this.channelName, this.channelType, payload);
19
+ }
20
+ else {
21
+ yield this.fdc3.broadcastOnCurrentChannel(payload, this.channelType);
22
+ }
18
23
  });
19
24
  }
20
25
  connectedCallback() {
package/dist/esm/fdc3.js CHANGED
@@ -1,10 +1,10 @@
1
- import { __awaiter, __decorate } from "tslib";
1
+ import { __awaiter } from "tslib";
2
2
  /**
3
3
  * See https://fdc3.finos.org/docs/fdc3-intro, and https://github.com/finos/FDC3/tree/master/src/api
4
4
  */
5
- import { addIntentListener, fdc3Ready, findIntent, findIntentsByContext, getCurrentChannel, getOrCreateChannel, getInfo, joinChannel, raiseIntent, raiseIntentForContext, versionIsAtLeast, } from '@finos/fdc3';
6
- import { observable } from '@microsoft/fast-element';
5
+ import { addIntentListener, fdc3Ready, findIntent, findIntentsByContext, getCurrentChannel, getOrCreateChannel, joinChannel, raiseIntent, raiseIntentForContext, } from '@finos/fdc3';
7
6
  import { DI } from '@microsoft/fast-foundation';
7
+ import { ReplaySubject } from 'rxjs';
8
8
  import { stripOutBigInt } from './util/fdc3-util';
9
9
  import { logger } from './utils';
10
10
  /**
@@ -14,14 +14,26 @@ import { logger } from './utils';
14
14
  export class DefaultFDC3 {
15
15
  constructor() {
16
16
  this.isReady = false;
17
- this.connect();
17
+ this._isReady$ = new ReplaySubject();
18
+ this.isReadyObs = this._isReady$.asObservable();
19
+ this._currentChannel$ = new ReplaySubject();
20
+ this.currentChannelObs = this._currentChannel$.asObservable();
21
+ this.isInteropFdc3 = () => !!window.io;
22
+ this.init();
18
23
  }
19
- connect() {
24
+ init() {
20
25
  return __awaiter(this, void 0, void 0, function* () {
26
+ if (this.isReady) {
27
+ logger.debug('fdc3 already connected');
28
+ return;
29
+ }
21
30
  try {
22
- this.isReady = false;
23
31
  yield fdc3Ready();
32
+ this.isReady = true;
33
+ this._isReady$.next(true);
24
34
  logger.debug('fdc3 connection success');
35
+ yield this.getAndUpdateCurrentChannel();
36
+ yield this.handleInteropChannelChanges();
25
37
  }
26
38
  catch (err) {
27
39
  logger.error('fdc3 connection error', err);
@@ -43,20 +55,29 @@ export class DefaultFDC3 {
43
55
  logger.debug(`fdc3 findIntentsByContext '${context}'`);
44
56
  return findIntentsByContext(context);
45
57
  }
46
- raiseIntent(context, intent) {
47
- if (getInfo && versionIsAtLeast(getInfo(), '1.2')) {
58
+ raiseIntentForContext(context) {
59
+ return __awaiter(this, void 0, void 0, function* () {
48
60
  logger.debug(`fdc3 raiseIntentForContext '${context}'`);
49
61
  return raiseIntentForContext(context);
50
- }
51
- if (intent) {
62
+ });
63
+ }
64
+ raiseIntent(context, intent) {
65
+ return __awaiter(this, void 0, void 0, function* () {
52
66
  logger.debug(`fdc3 raiseIntent '${intent}' '${context}'`);
53
67
  return raiseIntent(intent, context);
54
- }
55
- logger.error(`fdc3 unable to raiseIntent using context '${context}' and intent '${intent}'.`);
68
+ });
56
69
  }
57
70
  joinChannel(channelId) {
58
- logger.debug(`fdc3 joinChannel '${channelId}'`);
59
- return joinChannel(channelId);
71
+ var _a;
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ logger.debug(`fdc3 joinChannel '${channelId}'`);
74
+ if (((_a = this._currentChannel) === null || _a === void 0 ? void 0 : _a.id) === channelId) {
75
+ return;
76
+ }
77
+ yield joinChannel(channelId);
78
+ yield this.getAndUpdateCurrentChannel();
79
+ return;
80
+ });
60
81
  }
61
82
  getOrCreateChannel(channelId) {
62
83
  logger.debug(`fdc3 getOrCreateChannel '${channelId}'`);
@@ -65,12 +86,15 @@ export class DefaultFDC3 {
65
86
  broadcastOnChannel(channelName, type, payload) {
66
87
  return __awaiter(this, void 0, void 0, function* () {
67
88
  const channel = yield getOrCreateChannel(channelName);
68
- payload = stripOutBigInt(payload);
69
- const m = {
70
- type,
71
- id: payload,
72
- };
73
- channel.broadcast(m);
89
+ this.broadcastMessageOnChannel(channel, payload, type);
90
+ });
91
+ }
92
+ broadcastOnCurrentChannel(payload, type) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ const channel = yield getCurrentChannel();
95
+ if (channel) {
96
+ this.broadcastMessageOnChannel(channel, payload, type);
97
+ }
74
98
  });
75
99
  }
76
100
  broadcastOnChannelEventHandler(channelName, type) {
@@ -83,9 +107,8 @@ export class DefaultFDC3 {
83
107
  });
84
108
  });
85
109
  }
86
- addChannelListener(channelName, channelType, callback) {
110
+ addChannelListener(channel, channelType, callback) {
87
111
  return __awaiter(this, void 0, void 0, function* () {
88
- const channel = yield getOrCreateChannel(channelName);
89
112
  channel.addContextListener(channelType, callback);
90
113
  return channel;
91
114
  });
@@ -95,10 +118,48 @@ export class DefaultFDC3 {
95
118
  return getCurrentChannel();
96
119
  });
97
120
  }
121
+ broadcastMessageOnChannel(channel, payload, type) {
122
+ payload = stripOutBigInt(payload);
123
+ const m = {
124
+ type,
125
+ id: payload,
126
+ };
127
+ channel.broadcast(m);
128
+ }
129
+ getAndUpdateCurrentChannel() {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ try {
132
+ const channel = yield getCurrentChannel();
133
+ if (channel) {
134
+ logger.debug(`fdc3 getCurrentChannel '${channel.id}'`);
135
+ this._currentChannel = channel;
136
+ this._currentChannel$.next(channel);
137
+ }
138
+ }
139
+ catch (err) {
140
+ logger.error('fdc3 getCurrentChannel error', err);
141
+ }
142
+ });
143
+ }
144
+ handleInteropChannelChanges() {
145
+ var _a, _b;
146
+ return __awaiter(this, void 0, void 0, function* () {
147
+ if (this.isInteropFdc3()) {
148
+ // Listen to changes from the io channel selector.
149
+ // This can be done on the interop container window which is outside this app scope
150
+ // Any changes made there will be emitted here and keep channel state in sync
151
+ (_b = (_a = window.io) === null || _a === void 0 ? void 0 : _a.channels) === null || _b === void 0 ? void 0 : _b.onChanged((channelColor) => __awaiter(this, void 0, void 0, function* () {
152
+ var _c, _d;
153
+ if (((_d = (_c = this._currentChannel) === null || _c === void 0 ? void 0 : _c.displayMetadata) === null || _d === void 0 ? void 0 : _d.color) === channelColor) {
154
+ return;
155
+ }
156
+ logger.debug(`fdc3 interop.io channel changed '${channelColor}'`);
157
+ yield this.getAndUpdateCurrentChannel();
158
+ }));
159
+ }
160
+ });
161
+ }
98
162
  }
99
- __decorate([
100
- observable
101
- ], DefaultFDC3.prototype, "isReady", void 0);
102
163
  /**
103
164
  * The DI token for the FDC3 interface.
104
165
  * @internal
@@ -1,24 +1,45 @@
1
1
  import { __decorate } from "tslib";
2
- import { customElement, FASTElement } from '@genesislcap/web-core';
2
+ import { LifecycleMixin } from '@genesislcap/foundation-utils';
3
+ import { customElement, FoundationElement } from '@genesislcap/web-core';
4
+ import { Subscription } from 'rxjs';
3
5
  import { FDC3 } from '../fdc3';
4
6
  /**
5
7
  * fdc3-context-listener listen to channel context
6
8
  * @alpha
7
9
  */
8
- let Fdc3ContextListener = class Fdc3ContextListener extends FASTElement {
10
+ let Fdc3ContextListener = class Fdc3ContextListener extends LifecycleMixin(FoundationElement) {
9
11
  constructor() {
10
12
  super(...arguments);
11
13
  this.config = [];
14
+ this.fdc3ReadySub = new Subscription();
15
+ }
16
+ deepClone() {
17
+ const copy = super.deepClone();
18
+ if (this.config) {
19
+ copy.config = this.config.map((c) => {
20
+ const copyConfig = Object.assign({}, c);
21
+ if (c.callback) {
22
+ copyConfig.callback = c.callback.bind(this);
23
+ }
24
+ return copyConfig;
25
+ });
26
+ }
27
+ return copy;
12
28
  }
13
29
  connectedCallback() {
14
30
  super.connectedCallback();
15
- if (window.fdc3) {
31
+ this.fdc3ReadySub = this.fdc3.isReadyObs.subscribe(() => {
16
32
  this.config.forEach((c) => this.fdc3.addChannelListener(null, c.channelType, (message) => {
17
33
  if (message.type === c.channelType) {
18
34
  c.callback(message);
19
35
  }
20
36
  }));
21
- }
37
+ });
38
+ }
39
+ disconnectedCallback() {
40
+ var _a;
41
+ (_a = this.fdc3ReadySub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
42
+ super.disconnectedCallback();
22
43
  }
23
44
  };
24
45
  __decorate([
@@ -1,24 +1,76 @@
1
- import { __decorate } from "tslib";
2
- import { customElement, FASTElement } from '@genesislcap/web-core';
1
+ import { __awaiter, __decorate } from "tslib";
2
+ import { LifecycleMixin } from '@genesislcap/foundation-utils';
3
+ import { customElement, FoundationElement } from '@genesislcap/web-core';
4
+ import { Subscription } from 'rxjs';
3
5
  import { FDC3 } from '../fdc3';
4
6
  /**
5
7
  * fdc3-listener
6
8
  * @alpha
7
9
  */
8
- let Fdc3Listener = class Fdc3Listener extends FASTElement {
10
+ let Fdc3Listener = class Fdc3Listener extends LifecycleMixin(FoundationElement) {
9
11
  constructor() {
10
12
  super(...arguments);
11
13
  this.intentConfig = [];
12
14
  this.channelConfig = [];
15
+ this.channelSubscription = new Subscription();
16
+ this.fdc3ReadySub = new Subscription();
17
+ }
18
+ deepClone() {
19
+ const copy = super.deepClone();
20
+ if (this.intentConfig) {
21
+ copy.intentConfig = this.intentConfig.map((c) => {
22
+ const copyConfig = Object.assign({}, c);
23
+ if (c.callback) {
24
+ copyConfig.callback = c.callback.bind(this);
25
+ }
26
+ return copyConfig;
27
+ });
28
+ }
29
+ if (this.channelConfig) {
30
+ copy.channelConfig = this.channelConfig.map((c) => {
31
+ const copyConfig = Object.assign({}, c);
32
+ if (c.callback) {
33
+ copyConfig.callback = c.callback.bind(this);
34
+ }
35
+ return copyConfig;
36
+ });
37
+ }
38
+ return copy;
13
39
  }
14
40
  connectedCallback() {
15
41
  super.connectedCallback();
16
- if (window.fdc3) {
42
+ this.fdc3ReadySub = this.fdc3.isReadyObs.subscribe(() => __awaiter(this, void 0, void 0, function* () {
17
43
  const listeners = new Map();
18
44
  this.intentConfig.forEach((intent) => listeners.set(intent.intent, intent.callback));
19
45
  this.fdc3.addIntentListeners(listeners);
20
- this.channelConfig.forEach((c) => this.fdc3.addChannelListener(c.channelName, c.channelType, c.callback));
21
- }
46
+ this.channelConfig.forEach((c) => __awaiter(this, void 0, void 0, function* () {
47
+ if (c.channelName) {
48
+ const channel = yield this.fdc3.getOrCreateChannel(c.channelName);
49
+ this.handleChanelCurrentContext(channel, c.channelType, c.callback);
50
+ this.fdc3.addChannelListener(channel, c.channelType, c.callback);
51
+ }
52
+ else {
53
+ this.channelSubscription.add(this.fdc3.currentChannelObs.subscribe((channel) => {
54
+ this.handleChanelCurrentContext(channel, c.channelType, c.callback);
55
+ this.fdc3.addChannelListener(channel, c.channelType, c.callback);
56
+ }));
57
+ }
58
+ }));
59
+ }));
60
+ }
61
+ disconnectedCallback() {
62
+ var _a, _b;
63
+ (_a = this.channelSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
64
+ (_b = this.fdc3ReadySub) === null || _b === void 0 ? void 0 : _b.unsubscribe();
65
+ super.disconnectedCallback();
66
+ }
67
+ handleChanelCurrentContext(channel, contextType, listenerCallback) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const currentContextValue = yield channel.getCurrentContext(contextType);
70
+ if (currentContextValue) {
71
+ listenerCallback(currentContextValue);
72
+ }
73
+ });
22
74
  }
23
75
  };
24
76
  __decorate([