@openfin/core 46.100.84 → 46.100.87
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/out/mock-alpha.d.ts +16 -17
- package/out/mock-beta.d.ts +16 -17
- package/out/mock-public.d.ts +16 -17
- package/out/stub.d.ts +16 -6
- package/out/stub.js +37 -22
- package/out/stub.mjs +37 -22
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
1
|
import { EventEmitter } from 'events';
|
|
4
2
|
import { v1_2 } from '@openfin/fdc3';
|
|
5
3
|
import { v2_0 } from '@openfin/fdc3';
|
|
@@ -1933,7 +1931,6 @@ declare type BaseEvent_9 = BaseEvents.BaseEvent & {
|
|
|
1933
1931
|
|
|
1934
1932
|
declare namespace BaseEvents {
|
|
1935
1933
|
export {
|
|
1936
|
-
NotCloseRequested,
|
|
1937
1934
|
PropagatedEventType,
|
|
1938
1935
|
PropagatedEvent,
|
|
1939
1936
|
Payload_2 as Payload,
|
|
@@ -2000,6 +1997,8 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
|
|
|
2000
1997
|
type: 'begin-user-bounds-changing';
|
|
2001
1998
|
};
|
|
2002
1999
|
|
|
2000
|
+
declare type BFCacheRestoreListener = () => void | Promise<void>;
|
|
2001
|
+
|
|
2003
2002
|
/**
|
|
2004
2003
|
* A rule prescribing content creation that should be blocked.
|
|
2005
2004
|
*
|
|
@@ -5387,6 +5386,16 @@ declare interface Environment {
|
|
|
5387
5386
|
resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
|
|
5388
5387
|
initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
|
|
5389
5388
|
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
|
5389
|
+
/**
|
|
5390
|
+
* Registers a listener invoked when the current page has been restored from the
|
|
5391
|
+
* browser's back/forward cache. Stateful APIs (e.g. channels) use this to re-establish
|
|
5392
|
+
* connections that were torn down while the page was cached.
|
|
5393
|
+
*
|
|
5394
|
+
* No-op in environments that cannot be bfcached.
|
|
5395
|
+
*
|
|
5396
|
+
* @returns a function that unregisters the listener.
|
|
5397
|
+
*/
|
|
5398
|
+
onBFCacheRestore(listener: BFCacheRestoreListener): () => void;
|
|
5390
5399
|
writeToken(path: string, token: string): Promise<string>;
|
|
5391
5400
|
retrievePort(config: NewConnectConfig): Promise<number>;
|
|
5392
5401
|
getNextMessageId(): any;
|
|
@@ -5841,7 +5850,7 @@ declare type ExtensionWindowCreatedEvent = BaseEvent_5 & {
|
|
|
5841
5850
|
* these api calls are not implemented in the javscript api, only in the external adapter
|
|
5842
5851
|
* If they don't exist in the external adapter they should be removed.
|
|
5843
5852
|
*/
|
|
5844
|
-
declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | '
|
|
5853
|
+
declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
|
|
5845
5854
|
|
|
5846
5855
|
declare type ExternalAdapterOnlyCallsMap = {
|
|
5847
5856
|
[k in ExternalAdapterOnlyCalls]: {
|
|
@@ -6054,7 +6063,7 @@ declare namespace FDC3 {
|
|
|
6054
6063
|
|
|
6055
6064
|
declare type FDC3Factory = typeof fdc3Factory;
|
|
6056
6065
|
|
|
6057
|
-
declare const fdc3Factory: (version:
|
|
6066
|
+
declare const fdc3Factory: (version: "1.2" | "2.0", interopClient: OpenFin_2.InteropClient, wire: Transport<"unknown">) => OpenFin_2.FDC3.v2_0.DesktopAgent | OpenFin_2.FDC3.v1_2.DesktopAgent;
|
|
6058
6067
|
|
|
6059
6068
|
/**
|
|
6060
6069
|
* @interface
|
|
@@ -7883,14 +7892,14 @@ declare class InteropClient extends Base {
|
|
|
7883
7892
|
* @param listener Callback invoked whenever the event occurs.
|
|
7884
7893
|
* @returns Promise resolving with void once the listener is registered.
|
|
7885
7894
|
*/
|
|
7886
|
-
addListener: (type: OpenFin_2.InteropClientEvents[
|
|
7895
|
+
addListener: (type: OpenFin_2.InteropClientEvents["type"], listener: (event: OpenFin_2.InteropClientEvents["event"]) => void) => Promise<void>;
|
|
7887
7896
|
/**
|
|
7888
7897
|
* `removeListener` removes a registered event listener.
|
|
7889
7898
|
* @param type The event type to subscribe to.
|
|
7890
7899
|
* @param listener Callback to be removed.
|
|
7891
7900
|
* @returns Promise resolving with void even if no callback was found.
|
|
7892
7901
|
*/
|
|
7893
|
-
removeListener: (type: OpenFin_2.InteropClientEvents[
|
|
7902
|
+
removeListener: (type: OpenFin_2.InteropClientEvents["type"], listener: (event: OpenFin_2.InteropClientEvents["event"]) => void) => Promise<void>;
|
|
7894
7903
|
/**
|
|
7895
7904
|
* Sets a context for the context group of the current entity.
|
|
7896
7905
|
*
|
|
@@ -10794,7 +10803,6 @@ declare namespace OpenFin_2 {
|
|
|
10794
10803
|
LogPath,
|
|
10795
10804
|
LogTarget,
|
|
10796
10805
|
MutableWindowOptions,
|
|
10797
|
-
WorkspacePlatformOptions,
|
|
10798
10806
|
WebRequestHeader,
|
|
10799
10807
|
CustomRequestHeaders,
|
|
10800
10808
|
WindowOptionDiff,
|
|
@@ -17239,8 +17247,6 @@ declare type SystemEvent_2 = Events.SystemEvents.SystemEvent;
|
|
|
17239
17247
|
|
|
17240
17248
|
declare namespace SystemEvents {
|
|
17241
17249
|
export {
|
|
17242
|
-
NotRequested,
|
|
17243
|
-
ExcludeRequested,
|
|
17244
17250
|
BaseEvent_9 as BaseEvent,
|
|
17245
17251
|
IdleStateChangedEvent,
|
|
17246
17252
|
IdleEvent,
|
|
@@ -17249,15 +17255,8 @@ declare namespace SystemEvents {
|
|
|
17249
17255
|
SessionChangedEvent,
|
|
17250
17256
|
AppVersionEvent,
|
|
17251
17257
|
AppVersionEventType,
|
|
17252
|
-
IdEventType,
|
|
17253
|
-
WithId,
|
|
17254
|
-
WithoutId,
|
|
17255
|
-
AppVersionTypeFromIdEvent,
|
|
17256
|
-
EventWithId,
|
|
17257
|
-
AppVersionEventWithId,
|
|
17258
17258
|
ApplicationCreatedEvent,
|
|
17259
17259
|
DesktopIconClickedEvent,
|
|
17260
|
-
SystemShutdownEvent,
|
|
17261
17260
|
ExtensionsEnabledEvent,
|
|
17262
17261
|
ExtensionsDisabledEvent,
|
|
17263
17262
|
ExtensionsExcludedEvent,
|
package/out/mock-beta.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
1
|
import { EventEmitter } from 'events';
|
|
4
2
|
import { v1_2 } from '@openfin/fdc3';
|
|
5
3
|
import { v2_0 } from '@openfin/fdc3';
|
|
@@ -1933,7 +1931,6 @@ declare type BaseEvent_9 = BaseEvents.BaseEvent & {
|
|
|
1933
1931
|
|
|
1934
1932
|
declare namespace BaseEvents {
|
|
1935
1933
|
export {
|
|
1936
|
-
NotCloseRequested,
|
|
1937
1934
|
PropagatedEventType,
|
|
1938
1935
|
PropagatedEvent,
|
|
1939
1936
|
Payload_2 as Payload,
|
|
@@ -2000,6 +1997,8 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
|
|
|
2000
1997
|
type: 'begin-user-bounds-changing';
|
|
2001
1998
|
};
|
|
2002
1999
|
|
|
2000
|
+
declare type BFCacheRestoreListener = () => void | Promise<void>;
|
|
2001
|
+
|
|
2003
2002
|
/**
|
|
2004
2003
|
* A rule prescribing content creation that should be blocked.
|
|
2005
2004
|
*
|
|
@@ -5387,6 +5386,16 @@ declare interface Environment {
|
|
|
5387
5386
|
resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
|
|
5388
5387
|
initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
|
|
5389
5388
|
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
|
5389
|
+
/**
|
|
5390
|
+
* Registers a listener invoked when the current page has been restored from the
|
|
5391
|
+
* browser's back/forward cache. Stateful APIs (e.g. channels) use this to re-establish
|
|
5392
|
+
* connections that were torn down while the page was cached.
|
|
5393
|
+
*
|
|
5394
|
+
* No-op in environments that cannot be bfcached.
|
|
5395
|
+
*
|
|
5396
|
+
* @returns a function that unregisters the listener.
|
|
5397
|
+
*/
|
|
5398
|
+
onBFCacheRestore(listener: BFCacheRestoreListener): () => void;
|
|
5390
5399
|
writeToken(path: string, token: string): Promise<string>;
|
|
5391
5400
|
retrievePort(config: NewConnectConfig): Promise<number>;
|
|
5392
5401
|
getNextMessageId(): any;
|
|
@@ -5841,7 +5850,7 @@ declare type ExtensionWindowCreatedEvent = BaseEvent_5 & {
|
|
|
5841
5850
|
* these api calls are not implemented in the javscript api, only in the external adapter
|
|
5842
5851
|
* If they don't exist in the external adapter they should be removed.
|
|
5843
5852
|
*/
|
|
5844
|
-
declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | '
|
|
5853
|
+
declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
|
|
5845
5854
|
|
|
5846
5855
|
declare type ExternalAdapterOnlyCallsMap = {
|
|
5847
5856
|
[k in ExternalAdapterOnlyCalls]: {
|
|
@@ -6054,7 +6063,7 @@ declare namespace FDC3 {
|
|
|
6054
6063
|
|
|
6055
6064
|
declare type FDC3Factory = typeof fdc3Factory;
|
|
6056
6065
|
|
|
6057
|
-
declare const fdc3Factory: (version:
|
|
6066
|
+
declare const fdc3Factory: (version: "1.2" | "2.0", interopClient: OpenFin_2.InteropClient, wire: Transport<"unknown">) => OpenFin_2.FDC3.v2_0.DesktopAgent | OpenFin_2.FDC3.v1_2.DesktopAgent;
|
|
6058
6067
|
|
|
6059
6068
|
/**
|
|
6060
6069
|
* @interface
|
|
@@ -7883,14 +7892,14 @@ declare class InteropClient extends Base {
|
|
|
7883
7892
|
* @param listener Callback invoked whenever the event occurs.
|
|
7884
7893
|
* @returns Promise resolving with void once the listener is registered.
|
|
7885
7894
|
*/
|
|
7886
|
-
addListener: (type: OpenFin_2.InteropClientEvents[
|
|
7895
|
+
addListener: (type: OpenFin_2.InteropClientEvents["type"], listener: (event: OpenFin_2.InteropClientEvents["event"]) => void) => Promise<void>;
|
|
7887
7896
|
/**
|
|
7888
7897
|
* `removeListener` removes a registered event listener.
|
|
7889
7898
|
* @param type The event type to subscribe to.
|
|
7890
7899
|
* @param listener Callback to be removed.
|
|
7891
7900
|
* @returns Promise resolving with void even if no callback was found.
|
|
7892
7901
|
*/
|
|
7893
|
-
removeListener: (type: OpenFin_2.InteropClientEvents[
|
|
7902
|
+
removeListener: (type: OpenFin_2.InteropClientEvents["type"], listener: (event: OpenFin_2.InteropClientEvents["event"]) => void) => Promise<void>;
|
|
7894
7903
|
/**
|
|
7895
7904
|
* Sets a context for the context group of the current entity.
|
|
7896
7905
|
*
|
|
@@ -10794,7 +10803,6 @@ declare namespace OpenFin_2 {
|
|
|
10794
10803
|
LogPath,
|
|
10795
10804
|
LogTarget,
|
|
10796
10805
|
MutableWindowOptions,
|
|
10797
|
-
WorkspacePlatformOptions,
|
|
10798
10806
|
WebRequestHeader,
|
|
10799
10807
|
CustomRequestHeaders,
|
|
10800
10808
|
WindowOptionDiff,
|
|
@@ -17239,8 +17247,6 @@ declare type SystemEvent_2 = Events.SystemEvents.SystemEvent;
|
|
|
17239
17247
|
|
|
17240
17248
|
declare namespace SystemEvents {
|
|
17241
17249
|
export {
|
|
17242
|
-
NotRequested,
|
|
17243
|
-
ExcludeRequested,
|
|
17244
17250
|
BaseEvent_9 as BaseEvent,
|
|
17245
17251
|
IdleStateChangedEvent,
|
|
17246
17252
|
IdleEvent,
|
|
@@ -17249,15 +17255,8 @@ declare namespace SystemEvents {
|
|
|
17249
17255
|
SessionChangedEvent,
|
|
17250
17256
|
AppVersionEvent,
|
|
17251
17257
|
AppVersionEventType,
|
|
17252
|
-
IdEventType,
|
|
17253
|
-
WithId,
|
|
17254
|
-
WithoutId,
|
|
17255
|
-
AppVersionTypeFromIdEvent,
|
|
17256
|
-
EventWithId,
|
|
17257
|
-
AppVersionEventWithId,
|
|
17258
17258
|
ApplicationCreatedEvent,
|
|
17259
17259
|
DesktopIconClickedEvent,
|
|
17260
|
-
SystemShutdownEvent,
|
|
17261
17260
|
ExtensionsEnabledEvent,
|
|
17262
17261
|
ExtensionsDisabledEvent,
|
|
17263
17262
|
ExtensionsExcludedEvent,
|
package/out/mock-public.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
1
|
import { EventEmitter } from 'events';
|
|
4
2
|
import { v1_2 } from '@openfin/fdc3';
|
|
5
3
|
import { v2_0 } from '@openfin/fdc3';
|
|
@@ -1933,7 +1931,6 @@ declare type BaseEvent_9 = BaseEvents.BaseEvent & {
|
|
|
1933
1931
|
|
|
1934
1932
|
declare namespace BaseEvents {
|
|
1935
1933
|
export {
|
|
1936
|
-
NotCloseRequested,
|
|
1937
1934
|
PropagatedEventType,
|
|
1938
1935
|
PropagatedEvent,
|
|
1939
1936
|
Payload_2 as Payload,
|
|
@@ -2000,6 +1997,8 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
|
|
|
2000
1997
|
type: 'begin-user-bounds-changing';
|
|
2001
1998
|
};
|
|
2002
1999
|
|
|
2000
|
+
declare type BFCacheRestoreListener = () => void | Promise<void>;
|
|
2001
|
+
|
|
2003
2002
|
/**
|
|
2004
2003
|
* A rule prescribing content creation that should be blocked.
|
|
2005
2004
|
*
|
|
@@ -5387,6 +5386,16 @@ declare interface Environment {
|
|
|
5387
5386
|
resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
|
|
5388
5387
|
initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
|
|
5389
5388
|
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
|
5389
|
+
/**
|
|
5390
|
+
* Registers a listener invoked when the current page has been restored from the
|
|
5391
|
+
* browser's back/forward cache. Stateful APIs (e.g. channels) use this to re-establish
|
|
5392
|
+
* connections that were torn down while the page was cached.
|
|
5393
|
+
*
|
|
5394
|
+
* No-op in environments that cannot be bfcached.
|
|
5395
|
+
*
|
|
5396
|
+
* @returns a function that unregisters the listener.
|
|
5397
|
+
*/
|
|
5398
|
+
onBFCacheRestore(listener: BFCacheRestoreListener): () => void;
|
|
5390
5399
|
writeToken(path: string, token: string): Promise<string>;
|
|
5391
5400
|
retrievePort(config: NewConnectConfig): Promise<number>;
|
|
5392
5401
|
getNextMessageId(): any;
|
|
@@ -5841,7 +5850,7 @@ declare type ExtensionWindowCreatedEvent = BaseEvent_5 & {
|
|
|
5841
5850
|
* these api calls are not implemented in the javscript api, only in the external adapter
|
|
5842
5851
|
* If they don't exist in the external adapter they should be removed.
|
|
5843
5852
|
*/
|
|
5844
|
-
declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | '
|
|
5853
|
+
declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
|
|
5845
5854
|
|
|
5846
5855
|
declare type ExternalAdapterOnlyCallsMap = {
|
|
5847
5856
|
[k in ExternalAdapterOnlyCalls]: {
|
|
@@ -6054,7 +6063,7 @@ declare namespace FDC3 {
|
|
|
6054
6063
|
|
|
6055
6064
|
declare type FDC3Factory = typeof fdc3Factory;
|
|
6056
6065
|
|
|
6057
|
-
declare const fdc3Factory: (version:
|
|
6066
|
+
declare const fdc3Factory: (version: "1.2" | "2.0", interopClient: OpenFin_2.InteropClient, wire: Transport<"unknown">) => OpenFin_2.FDC3.v2_0.DesktopAgent | OpenFin_2.FDC3.v1_2.DesktopAgent;
|
|
6058
6067
|
|
|
6059
6068
|
/**
|
|
6060
6069
|
* @interface
|
|
@@ -7883,14 +7892,14 @@ declare class InteropClient extends Base {
|
|
|
7883
7892
|
* @param listener Callback invoked whenever the event occurs.
|
|
7884
7893
|
* @returns Promise resolving with void once the listener is registered.
|
|
7885
7894
|
*/
|
|
7886
|
-
addListener: (type: OpenFin_2.InteropClientEvents[
|
|
7895
|
+
addListener: (type: OpenFin_2.InteropClientEvents["type"], listener: (event: OpenFin_2.InteropClientEvents["event"]) => void) => Promise<void>;
|
|
7887
7896
|
/**
|
|
7888
7897
|
* `removeListener` removes a registered event listener.
|
|
7889
7898
|
* @param type The event type to subscribe to.
|
|
7890
7899
|
* @param listener Callback to be removed.
|
|
7891
7900
|
* @returns Promise resolving with void even if no callback was found.
|
|
7892
7901
|
*/
|
|
7893
|
-
removeListener: (type: OpenFin_2.InteropClientEvents[
|
|
7902
|
+
removeListener: (type: OpenFin_2.InteropClientEvents["type"], listener: (event: OpenFin_2.InteropClientEvents["event"]) => void) => Promise<void>;
|
|
7894
7903
|
/**
|
|
7895
7904
|
* Sets a context for the context group of the current entity.
|
|
7896
7905
|
*
|
|
@@ -10794,7 +10803,6 @@ declare namespace OpenFin_2 {
|
|
|
10794
10803
|
LogPath,
|
|
10795
10804
|
LogTarget,
|
|
10796
10805
|
MutableWindowOptions,
|
|
10797
|
-
WorkspacePlatformOptions,
|
|
10798
10806
|
WebRequestHeader,
|
|
10799
10807
|
CustomRequestHeaders,
|
|
10800
10808
|
WindowOptionDiff,
|
|
@@ -17239,8 +17247,6 @@ declare type SystemEvent_2 = Events.SystemEvents.SystemEvent;
|
|
|
17239
17247
|
|
|
17240
17248
|
declare namespace SystemEvents {
|
|
17241
17249
|
export {
|
|
17242
|
-
NotRequested,
|
|
17243
|
-
ExcludeRequested,
|
|
17244
17250
|
BaseEvent_9 as BaseEvent,
|
|
17245
17251
|
IdleStateChangedEvent,
|
|
17246
17252
|
IdleEvent,
|
|
@@ -17249,15 +17255,8 @@ declare namespace SystemEvents {
|
|
|
17249
17255
|
SessionChangedEvent,
|
|
17250
17256
|
AppVersionEvent,
|
|
17251
17257
|
AppVersionEventType,
|
|
17252
|
-
IdEventType,
|
|
17253
|
-
WithId,
|
|
17254
|
-
WithoutId,
|
|
17255
|
-
AppVersionTypeFromIdEvent,
|
|
17256
|
-
EventWithId,
|
|
17257
|
-
AppVersionEventWithId,
|
|
17258
17258
|
ApplicationCreatedEvent,
|
|
17259
17259
|
DesktopIconClickedEvent,
|
|
17260
|
-
SystemShutdownEvent,
|
|
17261
17260
|
ExtensionsEnabledEvent,
|
|
17262
17261
|
ExtensionsDisabledEvent,
|
|
17263
17262
|
ExtensionsExcludedEvent,
|
package/out/stub.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
1
|
import { EventEmitter } from 'events';
|
|
4
2
|
import { v1_2 } from './fdc3';
|
|
5
3
|
import { v2_0 } from './fdc3';
|
|
@@ -2032,6 +2030,8 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
|
|
|
2032
2030
|
type: 'begin-user-bounds-changing';
|
|
2033
2031
|
};
|
|
2034
2032
|
|
|
2033
|
+
declare type BFCacheRestoreListener = () => void | Promise<void>;
|
|
2034
|
+
|
|
2035
2035
|
/**
|
|
2036
2036
|
* A rule prescribing content creation that should be blocked.
|
|
2037
2037
|
*
|
|
@@ -5498,6 +5498,16 @@ declare interface Environment {
|
|
|
5498
5498
|
resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
|
|
5499
5499
|
initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
|
|
5500
5500
|
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
|
5501
|
+
/**
|
|
5502
|
+
* Registers a listener invoked when the current page has been restored from the
|
|
5503
|
+
* browser's back/forward cache. Stateful APIs (e.g. channels) use this to re-establish
|
|
5504
|
+
* connections that were torn down while the page was cached.
|
|
5505
|
+
*
|
|
5506
|
+
* No-op in environments that cannot be bfcached.
|
|
5507
|
+
*
|
|
5508
|
+
* @returns a function that unregisters the listener.
|
|
5509
|
+
*/
|
|
5510
|
+
onBFCacheRestore(listener: BFCacheRestoreListener): () => void;
|
|
5501
5511
|
writeToken(path: string, token: string): Promise<string>;
|
|
5502
5512
|
retrievePort(config: NewConnectConfig): Promise<number>;
|
|
5503
5513
|
getNextMessageId(): any;
|
|
@@ -5970,7 +5980,7 @@ declare type ExtensionWindowCreatedEvent = BaseEvent_5 & {
|
|
|
5970
5980
|
* these api calls are not implemented in the javscript api, only in the external adapter
|
|
5971
5981
|
* If they don't exist in the external adapter they should be removed.
|
|
5972
5982
|
*/
|
|
5973
|
-
declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | '
|
|
5983
|
+
declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
|
|
5974
5984
|
|
|
5975
5985
|
declare type ExternalAdapterOnlyCallsMap = {
|
|
5976
5986
|
[k in ExternalAdapterOnlyCalls]: {
|
|
@@ -6186,7 +6196,7 @@ declare namespace FDC3 {
|
|
|
6186
6196
|
|
|
6187
6197
|
declare type FDC3Factory = typeof fdc3Factory;
|
|
6188
6198
|
|
|
6189
|
-
declare const fdc3Factory: (version:
|
|
6199
|
+
declare const fdc3Factory: (version: "1.2" | "2.0", interopClient: OpenFin_2.InteropClient, wire: Transport<"unknown">) => OpenFin_2.FDC3.v2_0.DesktopAgent | OpenFin_2.FDC3.v1_2.DesktopAgent;
|
|
6190
6200
|
|
|
6191
6201
|
/**
|
|
6192
6202
|
* @interface
|
|
@@ -8048,14 +8058,14 @@ declare class InteropClient extends Base {
|
|
|
8048
8058
|
* @param listener Callback invoked whenever the event occurs.
|
|
8049
8059
|
* @returns Promise resolving with void once the listener is registered.
|
|
8050
8060
|
*/
|
|
8051
|
-
addListener: (type: OpenFin_2.InteropClientEvents[
|
|
8061
|
+
addListener: (type: OpenFin_2.InteropClientEvents["type"], listener: (event: OpenFin_2.InteropClientEvents["event"]) => void) => Promise<void>;
|
|
8052
8062
|
/**
|
|
8053
8063
|
* `removeListener` removes a registered event listener.
|
|
8054
8064
|
* @param type The event type to subscribe to.
|
|
8055
8065
|
* @param listener Callback to be removed.
|
|
8056
8066
|
* @returns Promise resolving with void even if no callback was found.
|
|
8057
8067
|
*/
|
|
8058
|
-
removeListener: (type: OpenFin_2.InteropClientEvents[
|
|
8068
|
+
removeListener: (type: OpenFin_2.InteropClientEvents["type"], listener: (event: OpenFin_2.InteropClientEvents["event"]) => void) => Promise<void>;
|
|
8059
8069
|
/**
|
|
8060
8070
|
* Sets a context for the context group of the current entity.
|
|
8061
8071
|
*
|
package/out/stub.js
CHANGED
|
@@ -8458,7 +8458,7 @@ var __classPrivateFieldSet$f = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
8458
8458
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8459
8459
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
8460
8460
|
};
|
|
8461
|
-
var _ChannelProvider_connections, _ChannelProvider_protectedObj, _ChannelProvider_strategy, _ChannelProvider_removeEndpoint, _ChannelProvider_close;
|
|
8461
|
+
var _a$3, _ChannelProvider_connections, _ChannelProvider_protectedObj, _ChannelProvider_strategy, _ChannelProvider_removeEndpoint, _ChannelProvider_close;
|
|
8462
8462
|
/**
|
|
8463
8463
|
* Instance created to enable use of a channel as a provider. Allows for communication with the {@link ChannelClient ChannelClients} by invoking an action on
|
|
8464
8464
|
* a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
|
|
@@ -8506,7 +8506,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8506
8506
|
channel.disconnectListener(payload);
|
|
8507
8507
|
}
|
|
8508
8508
|
static setProviderRemoval(provider, remove) {
|
|
8509
|
-
|
|
8509
|
+
_a$3.removalMap.set(provider, remove);
|
|
8510
8510
|
}
|
|
8511
8511
|
/**
|
|
8512
8512
|
* @internal
|
|
@@ -8523,7 +8523,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8523
8523
|
});
|
|
8524
8524
|
// Must be bound.
|
|
8525
8525
|
this.processAction = async (action, payload, senderIdentity) => {
|
|
8526
|
-
if (
|
|
8526
|
+
if (_a$3.clientIsMultiRuntime(senderIdentity) &&
|
|
8527
8527
|
!runtimeUuidMeetsMinimumRuntimeVersion(senderIdentity.runtimeUuid, '18.87.56.0')) {
|
|
8528
8528
|
this.handleMultiRuntimeLegacyClient(senderIdentity);
|
|
8529
8529
|
}
|
|
@@ -8534,7 +8534,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8534
8534
|
};
|
|
8535
8535
|
_ChannelProvider_close.set(this, () => {
|
|
8536
8536
|
__classPrivateFieldGet$g(this, _ChannelProvider_strategy, "f").close();
|
|
8537
|
-
const remove =
|
|
8537
|
+
const remove = _a$3.removalMap.get(this);
|
|
8538
8538
|
if (remove) {
|
|
8539
8539
|
remove();
|
|
8540
8540
|
}
|
|
@@ -8730,7 +8730,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8730
8730
|
}
|
|
8731
8731
|
}
|
|
8732
8732
|
isClientConnected(clientIdentity) {
|
|
8733
|
-
if (
|
|
8733
|
+
if (_a$3.clientIdentityIncludesEndpointId(clientIdentity)) {
|
|
8734
8734
|
return this.connections.some((identity) => {
|
|
8735
8735
|
return (
|
|
8736
8736
|
// Might be redundant to check for uuid and name here after we get an endpointId match, but just in case
|
|
@@ -8780,7 +8780,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8780
8780
|
await wire.sendAction('destroy-channel', { channelName });
|
|
8781
8781
|
}
|
|
8782
8782
|
}
|
|
8783
|
-
_ChannelProvider_connections = new WeakMap(), _ChannelProvider_protectedObj = new WeakMap(), _ChannelProvider_strategy = new WeakMap(), _ChannelProvider_removeEndpoint = new WeakMap(), _ChannelProvider_close = new WeakMap();
|
|
8783
|
+
_a$3 = ChannelProvider, _ChannelProvider_connections = new WeakMap(), _ChannelProvider_protectedObj = new WeakMap(), _ChannelProvider_strategy = new WeakMap(), _ChannelProvider_removeEndpoint = new WeakMap(), _ChannelProvider_close = new WeakMap();
|
|
8784
8784
|
// The following line should be changed following a typescript update.
|
|
8785
8785
|
// static #removalMap = new WeakMap<ChannelProvider, Function>();
|
|
8786
8786
|
ChannelProvider.removalMap = new WeakMap();
|
|
@@ -10292,7 +10292,7 @@ var __classPrivateFieldGet$d = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
10292
10292
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10293
10293
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10294
10294
|
};
|
|
10295
|
-
var _Platform_channelName, _Platform_connectToProvider;
|
|
10295
|
+
var _a$2, _Platform_channelName, _Platform_connectToProvider;
|
|
10296
10296
|
/** Manages the life cycle of windows and views in the application.
|
|
10297
10297
|
*
|
|
10298
10298
|
* Enables taking snapshots of itself and applying them to restore a previous configuration
|
|
@@ -10314,29 +10314,29 @@ class Platform extends EmitterBase {
|
|
|
10314
10314
|
if (identity.uuid !== this.identity.uuid) {
|
|
10315
10315
|
// I have no idea why we allow passing in a different identity, but we do.
|
|
10316
10316
|
// Doing this above the analytics call so we only register one call.
|
|
10317
|
-
return new
|
|
10317
|
+
return new _a$2(this.wire, identity).getClient();
|
|
10318
10318
|
}
|
|
10319
10319
|
this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
|
|
10320
10320
|
// don't expose
|
|
10321
10321
|
});
|
|
10322
|
-
if (!
|
|
10322
|
+
if (!_a$2.clientMap.has(__classPrivateFieldGet$d(this, _Platform_channelName, "f"))) {
|
|
10323
10323
|
const clientPromise = __classPrivateFieldGet$d(this, _Platform_connectToProvider, "f").call(this);
|
|
10324
|
-
|
|
10324
|
+
_a$2.clientMap.set(__classPrivateFieldGet$d(this, _Platform_channelName, "f"), clientPromise);
|
|
10325
10325
|
}
|
|
10326
10326
|
// we set it above
|
|
10327
10327
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
10328
|
-
return
|
|
10328
|
+
return _a$2.clientMap.get(__classPrivateFieldGet$d(this, _Platform_channelName, "f"));
|
|
10329
10329
|
};
|
|
10330
10330
|
_Platform_connectToProvider.set(this, async () => {
|
|
10331
10331
|
try {
|
|
10332
10332
|
const client = await this._channel.connect(__classPrivateFieldGet$d(this, _Platform_channelName, "f"), { wait: false });
|
|
10333
10333
|
client.onDisconnection(() => {
|
|
10334
|
-
|
|
10334
|
+
_a$2.clientMap.delete(__classPrivateFieldGet$d(this, _Platform_channelName, "f"));
|
|
10335
10335
|
});
|
|
10336
10336
|
return client;
|
|
10337
10337
|
}
|
|
10338
10338
|
catch (e) {
|
|
10339
|
-
|
|
10339
|
+
_a$2.clientMap.delete(__classPrivateFieldGet$d(this, _Platform_channelName, "f"));
|
|
10340
10340
|
throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
|
|
10341
10341
|
}
|
|
10342
10342
|
});
|
|
@@ -11114,7 +11114,7 @@ class Platform extends EmitterBase {
|
|
|
11114
11114
|
return client.dispatch('close-window', { windowId, options });
|
|
11115
11115
|
}
|
|
11116
11116
|
}
|
|
11117
|
-
_Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
|
|
11117
|
+
_a$2 = Platform, _Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
|
|
11118
11118
|
/**
|
|
11119
11119
|
* @internal
|
|
11120
11120
|
* Reuse clients to avoid overwriting already-registered client in provider
|
|
@@ -11216,7 +11216,7 @@ var __classPrivateFieldGet$c = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
11216
11216
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11217
11217
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11218
11218
|
};
|
|
11219
|
-
var _LayoutNode_client, _TabStack_client, _ColumnOrRow_client;
|
|
11219
|
+
var _a$1, _LayoutNode_client, _TabStack_client, _ColumnOrRow_client;
|
|
11220
11220
|
/*
|
|
11221
11221
|
This file includes LayoutNode, ColumnOrRow and TabStack classes, which are all closely
|
|
11222
11222
|
intertwined, and share members via parent abstract class LayoutNode. To prevent circular
|
|
@@ -11306,7 +11306,7 @@ class LayoutNode {
|
|
|
11306
11306
|
if (!parent) {
|
|
11307
11307
|
return undefined;
|
|
11308
11308
|
}
|
|
11309
|
-
return
|
|
11309
|
+
return _a$1.getEntity(parent, __classPrivateFieldGet$c(this, _LayoutNode_client, "f"));
|
|
11310
11310
|
};
|
|
11311
11311
|
/**
|
|
11312
11312
|
* Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
|
|
@@ -11358,7 +11358,7 @@ class LayoutNode {
|
|
|
11358
11358
|
*/
|
|
11359
11359
|
this.createAdjacentStack = async (views, options) => {
|
|
11360
11360
|
const entityId = await __classPrivateFieldGet$c(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
|
|
11361
|
-
return
|
|
11361
|
+
return _a$1.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$c(this, _LayoutNode_client, "f"));
|
|
11362
11362
|
};
|
|
11363
11363
|
/**
|
|
11364
11364
|
* Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
|
|
@@ -11390,7 +11390,7 @@ class LayoutNode {
|
|
|
11390
11390
|
targetId: this.entityId,
|
|
11391
11391
|
edge
|
|
11392
11392
|
});
|
|
11393
|
-
return adjacentStacks.map((stack) =>
|
|
11393
|
+
return adjacentStacks.map((stack) => _a$1.getEntity({
|
|
11394
11394
|
type: 'stack',
|
|
11395
11395
|
entityId: stack.entityId
|
|
11396
11396
|
}, __classPrivateFieldGet$c(this, _LayoutNode_client, "f")));
|
|
@@ -11399,7 +11399,7 @@ class LayoutNode {
|
|
|
11399
11399
|
this.entityId = entityId;
|
|
11400
11400
|
}
|
|
11401
11401
|
}
|
|
11402
|
-
_LayoutNode_client = new WeakMap();
|
|
11402
|
+
_a$1 = LayoutNode, _LayoutNode_client = new WeakMap();
|
|
11403
11403
|
/**
|
|
11404
11404
|
* @ignore
|
|
11405
11405
|
* @internal
|
|
@@ -14531,6 +14531,7 @@ class SessionContextGroupClient extends Base {
|
|
|
14531
14531
|
}
|
|
14532
14532
|
}
|
|
14533
14533
|
_SessionContextGroupClient_clientPromise = new WeakMap();
|
|
14534
|
+
var SessionContextGroupClient$1 = SessionContextGroupClient;
|
|
14534
14535
|
|
|
14535
14536
|
var __classPrivateFieldSet$7 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
14536
14537
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
@@ -14557,10 +14558,10 @@ class ChannelEvents {
|
|
|
14557
14558
|
_ChannelEvents_isChannelReady.set(this, false);
|
|
14558
14559
|
_ChannelEvents_getActions.set(this, async () => {
|
|
14559
14560
|
const channelClient = await __classPrivateFieldGet$7(this, _ChannelEvents_channelClient, "f");
|
|
14560
|
-
let actions = __classPrivateFieldGet$7(
|
|
14561
|
+
let actions = __classPrivateFieldGet$7(_a, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
|
|
14561
14562
|
if (!actions) {
|
|
14562
14563
|
actions = {};
|
|
14563
|
-
__classPrivateFieldGet$7(
|
|
14564
|
+
__classPrivateFieldGet$7(_a, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
|
|
14564
14565
|
}
|
|
14565
14566
|
return actions;
|
|
14566
14567
|
});
|
|
@@ -15229,7 +15230,7 @@ class InteropClient extends Base {
|
|
|
15229
15230
|
if (hasConflict) {
|
|
15230
15231
|
console.warn(`A (non-session) context group with the name "${sessionContextGroupId}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);
|
|
15231
15232
|
}
|
|
15232
|
-
const newSessionContextGroup = new SessionContextGroupClient(this.wire, __classPrivateFieldGet$6(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
|
|
15233
|
+
const newSessionContextGroup = new SessionContextGroupClient$1(this.wire, __classPrivateFieldGet$6(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
|
|
15233
15234
|
__classPrivateFieldGet$6(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
|
|
15234
15235
|
return newSessionContextGroup.getUserInstance();
|
|
15235
15236
|
}
|
|
@@ -17133,6 +17134,15 @@ class Transport extends events.EventEmitter {
|
|
|
17133
17134
|
const { uuid, name } = config;
|
|
17134
17135
|
const entityType = this.environment.getCurrentEntityType();
|
|
17135
17136
|
this.me = getBaseMe(entityType, uuid, name);
|
|
17137
|
+
// Registered here rather than per-caller so that a restoration is logged exactly once,
|
|
17138
|
+
// however many parts of the adapter go on to subscribe.
|
|
17139
|
+
this.environment.onBFCacheRestore(async () => {
|
|
17140
|
+
await this.sendAction('write-to-log', {
|
|
17141
|
+
level: 'verbose',
|
|
17142
|
+
message: `Page restored from the back/forward cache for ${uuid}/${name}`,
|
|
17143
|
+
target: {}
|
|
17144
|
+
});
|
|
17145
|
+
});
|
|
17136
17146
|
}
|
|
17137
17147
|
getFin() {
|
|
17138
17148
|
if (!__classPrivateFieldGet(this, _Transport_fin, "f")) {
|
|
@@ -17375,6 +17385,11 @@ class StubEnvironment {
|
|
|
17375
17385
|
observeBounds() {
|
|
17376
17386
|
throw new Error(environmentUnsupportedMessage);
|
|
17377
17387
|
}
|
|
17388
|
+
onBFCacheRestore(listener) {
|
|
17389
|
+
// Deliberately not throwing: callers register unconditionally, including from the
|
|
17390
|
+
// Transport constructor, which the stub environment has to survive.
|
|
17391
|
+
return () => undefined;
|
|
17392
|
+
}
|
|
17378
17393
|
writeToken(path, token) {
|
|
17379
17394
|
throw new Error(environmentUnsupportedMessage);
|
|
17380
17395
|
}
|
package/out/stub.mjs
CHANGED
|
@@ -8455,7 +8455,7 @@ var __classPrivateFieldSet$f = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
8455
8455
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8456
8456
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
8457
8457
|
};
|
|
8458
|
-
var _ChannelProvider_connections, _ChannelProvider_protectedObj, _ChannelProvider_strategy, _ChannelProvider_removeEndpoint, _ChannelProvider_close;
|
|
8458
|
+
var _a$3, _ChannelProvider_connections, _ChannelProvider_protectedObj, _ChannelProvider_strategy, _ChannelProvider_removeEndpoint, _ChannelProvider_close;
|
|
8459
8459
|
/**
|
|
8460
8460
|
* Instance created to enable use of a channel as a provider. Allows for communication with the {@link ChannelClient ChannelClients} by invoking an action on
|
|
8461
8461
|
* a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
|
|
@@ -8503,7 +8503,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8503
8503
|
channel.disconnectListener(payload);
|
|
8504
8504
|
}
|
|
8505
8505
|
static setProviderRemoval(provider, remove) {
|
|
8506
|
-
|
|
8506
|
+
_a$3.removalMap.set(provider, remove);
|
|
8507
8507
|
}
|
|
8508
8508
|
/**
|
|
8509
8509
|
* @internal
|
|
@@ -8520,7 +8520,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8520
8520
|
});
|
|
8521
8521
|
// Must be bound.
|
|
8522
8522
|
this.processAction = async (action, payload, senderIdentity) => {
|
|
8523
|
-
if (
|
|
8523
|
+
if (_a$3.clientIsMultiRuntime(senderIdentity) &&
|
|
8524
8524
|
!runtimeUuidMeetsMinimumRuntimeVersion(senderIdentity.runtimeUuid, '18.87.56.0')) {
|
|
8525
8525
|
this.handleMultiRuntimeLegacyClient(senderIdentity);
|
|
8526
8526
|
}
|
|
@@ -8531,7 +8531,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8531
8531
|
};
|
|
8532
8532
|
_ChannelProvider_close.set(this, () => {
|
|
8533
8533
|
__classPrivateFieldGet$g(this, _ChannelProvider_strategy, "f").close();
|
|
8534
|
-
const remove =
|
|
8534
|
+
const remove = _a$3.removalMap.get(this);
|
|
8535
8535
|
if (remove) {
|
|
8536
8536
|
remove();
|
|
8537
8537
|
}
|
|
@@ -8727,7 +8727,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8727
8727
|
}
|
|
8728
8728
|
}
|
|
8729
8729
|
isClientConnected(clientIdentity) {
|
|
8730
|
-
if (
|
|
8730
|
+
if (_a$3.clientIdentityIncludesEndpointId(clientIdentity)) {
|
|
8731
8731
|
return this.connections.some((identity) => {
|
|
8732
8732
|
return (
|
|
8733
8733
|
// Might be redundant to check for uuid and name here after we get an endpointId match, but just in case
|
|
@@ -8777,7 +8777,7 @@ class ChannelProvider extends ChannelBase {
|
|
|
8777
8777
|
await wire.sendAction('destroy-channel', { channelName });
|
|
8778
8778
|
}
|
|
8779
8779
|
}
|
|
8780
|
-
_ChannelProvider_connections = new WeakMap(), _ChannelProvider_protectedObj = new WeakMap(), _ChannelProvider_strategy = new WeakMap(), _ChannelProvider_removeEndpoint = new WeakMap(), _ChannelProvider_close = new WeakMap();
|
|
8780
|
+
_a$3 = ChannelProvider, _ChannelProvider_connections = new WeakMap(), _ChannelProvider_protectedObj = new WeakMap(), _ChannelProvider_strategy = new WeakMap(), _ChannelProvider_removeEndpoint = new WeakMap(), _ChannelProvider_close = new WeakMap();
|
|
8781
8781
|
// The following line should be changed following a typescript update.
|
|
8782
8782
|
// static #removalMap = new WeakMap<ChannelProvider, Function>();
|
|
8783
8783
|
ChannelProvider.removalMap = new WeakMap();
|
|
@@ -10289,7 +10289,7 @@ var __classPrivateFieldGet$d = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
10289
10289
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10290
10290
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10291
10291
|
};
|
|
10292
|
-
var _Platform_channelName, _Platform_connectToProvider;
|
|
10292
|
+
var _a$2, _Platform_channelName, _Platform_connectToProvider;
|
|
10293
10293
|
/** Manages the life cycle of windows and views in the application.
|
|
10294
10294
|
*
|
|
10295
10295
|
* Enables taking snapshots of itself and applying them to restore a previous configuration
|
|
@@ -10311,29 +10311,29 @@ class Platform extends EmitterBase {
|
|
|
10311
10311
|
if (identity.uuid !== this.identity.uuid) {
|
|
10312
10312
|
// I have no idea why we allow passing in a different identity, but we do.
|
|
10313
10313
|
// Doing this above the analytics call so we only register one call.
|
|
10314
|
-
return new
|
|
10314
|
+
return new _a$2(this.wire, identity).getClient();
|
|
10315
10315
|
}
|
|
10316
10316
|
this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
|
|
10317
10317
|
// don't expose
|
|
10318
10318
|
});
|
|
10319
|
-
if (!
|
|
10319
|
+
if (!_a$2.clientMap.has(__classPrivateFieldGet$d(this, _Platform_channelName, "f"))) {
|
|
10320
10320
|
const clientPromise = __classPrivateFieldGet$d(this, _Platform_connectToProvider, "f").call(this);
|
|
10321
|
-
|
|
10321
|
+
_a$2.clientMap.set(__classPrivateFieldGet$d(this, _Platform_channelName, "f"), clientPromise);
|
|
10322
10322
|
}
|
|
10323
10323
|
// we set it above
|
|
10324
10324
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
10325
|
-
return
|
|
10325
|
+
return _a$2.clientMap.get(__classPrivateFieldGet$d(this, _Platform_channelName, "f"));
|
|
10326
10326
|
};
|
|
10327
10327
|
_Platform_connectToProvider.set(this, async () => {
|
|
10328
10328
|
try {
|
|
10329
10329
|
const client = await this._channel.connect(__classPrivateFieldGet$d(this, _Platform_channelName, "f"), { wait: false });
|
|
10330
10330
|
client.onDisconnection(() => {
|
|
10331
|
-
|
|
10331
|
+
_a$2.clientMap.delete(__classPrivateFieldGet$d(this, _Platform_channelName, "f"));
|
|
10332
10332
|
});
|
|
10333
10333
|
return client;
|
|
10334
10334
|
}
|
|
10335
10335
|
catch (e) {
|
|
10336
|
-
|
|
10336
|
+
_a$2.clientMap.delete(__classPrivateFieldGet$d(this, _Platform_channelName, "f"));
|
|
10337
10337
|
throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
|
|
10338
10338
|
}
|
|
10339
10339
|
});
|
|
@@ -11111,7 +11111,7 @@ class Platform extends EmitterBase {
|
|
|
11111
11111
|
return client.dispatch('close-window', { windowId, options });
|
|
11112
11112
|
}
|
|
11113
11113
|
}
|
|
11114
|
-
_Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
|
|
11114
|
+
_a$2 = Platform, _Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
|
|
11115
11115
|
/**
|
|
11116
11116
|
* @internal
|
|
11117
11117
|
* Reuse clients to avoid overwriting already-registered client in provider
|
|
@@ -11213,7 +11213,7 @@ var __classPrivateFieldGet$c = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
11213
11213
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11214
11214
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11215
11215
|
};
|
|
11216
|
-
var _LayoutNode_client, _TabStack_client, _ColumnOrRow_client;
|
|
11216
|
+
var _a$1, _LayoutNode_client, _TabStack_client, _ColumnOrRow_client;
|
|
11217
11217
|
/*
|
|
11218
11218
|
This file includes LayoutNode, ColumnOrRow and TabStack classes, which are all closely
|
|
11219
11219
|
intertwined, and share members via parent abstract class LayoutNode. To prevent circular
|
|
@@ -11303,7 +11303,7 @@ class LayoutNode {
|
|
|
11303
11303
|
if (!parent) {
|
|
11304
11304
|
return undefined;
|
|
11305
11305
|
}
|
|
11306
|
-
return
|
|
11306
|
+
return _a$1.getEntity(parent, __classPrivateFieldGet$c(this, _LayoutNode_client, "f"));
|
|
11307
11307
|
};
|
|
11308
11308
|
/**
|
|
11309
11309
|
* Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
|
|
@@ -11355,7 +11355,7 @@ class LayoutNode {
|
|
|
11355
11355
|
*/
|
|
11356
11356
|
this.createAdjacentStack = async (views, options) => {
|
|
11357
11357
|
const entityId = await __classPrivateFieldGet$c(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
|
|
11358
|
-
return
|
|
11358
|
+
return _a$1.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$c(this, _LayoutNode_client, "f"));
|
|
11359
11359
|
};
|
|
11360
11360
|
/**
|
|
11361
11361
|
* Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
|
|
@@ -11387,7 +11387,7 @@ class LayoutNode {
|
|
|
11387
11387
|
targetId: this.entityId,
|
|
11388
11388
|
edge
|
|
11389
11389
|
});
|
|
11390
|
-
return adjacentStacks.map((stack) =>
|
|
11390
|
+
return adjacentStacks.map((stack) => _a$1.getEntity({
|
|
11391
11391
|
type: 'stack',
|
|
11392
11392
|
entityId: stack.entityId
|
|
11393
11393
|
}, __classPrivateFieldGet$c(this, _LayoutNode_client, "f")));
|
|
@@ -11396,7 +11396,7 @@ class LayoutNode {
|
|
|
11396
11396
|
this.entityId = entityId;
|
|
11397
11397
|
}
|
|
11398
11398
|
}
|
|
11399
|
-
_LayoutNode_client = new WeakMap();
|
|
11399
|
+
_a$1 = LayoutNode, _LayoutNode_client = new WeakMap();
|
|
11400
11400
|
/**
|
|
11401
11401
|
* @ignore
|
|
11402
11402
|
* @internal
|
|
@@ -14489,6 +14489,7 @@ class SessionContextGroupClient extends Base {
|
|
|
14489
14489
|
}
|
|
14490
14490
|
}
|
|
14491
14491
|
_SessionContextGroupClient_clientPromise = new WeakMap();
|
|
14492
|
+
var SessionContextGroupClient$1 = SessionContextGroupClient;
|
|
14492
14493
|
|
|
14493
14494
|
var __classPrivateFieldSet$7 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
14494
14495
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
@@ -14515,10 +14516,10 @@ class ChannelEvents {
|
|
|
14515
14516
|
_ChannelEvents_isChannelReady.set(this, false);
|
|
14516
14517
|
_ChannelEvents_getActions.set(this, async () => {
|
|
14517
14518
|
const channelClient = await __classPrivateFieldGet$7(this, _ChannelEvents_channelClient, "f");
|
|
14518
|
-
let actions = __classPrivateFieldGet$7(
|
|
14519
|
+
let actions = __classPrivateFieldGet$7(_a, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
|
|
14519
14520
|
if (!actions) {
|
|
14520
14521
|
actions = {};
|
|
14521
|
-
__classPrivateFieldGet$7(
|
|
14522
|
+
__classPrivateFieldGet$7(_a, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
|
|
14522
14523
|
}
|
|
14523
14524
|
return actions;
|
|
14524
14525
|
});
|
|
@@ -15187,7 +15188,7 @@ class InteropClient extends Base {
|
|
|
15187
15188
|
if (hasConflict) {
|
|
15188
15189
|
console.warn(`A (non-session) context group with the name "${sessionContextGroupId}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);
|
|
15189
15190
|
}
|
|
15190
|
-
const newSessionContextGroup = new SessionContextGroupClient(this.wire, __classPrivateFieldGet$6(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
|
|
15191
|
+
const newSessionContextGroup = new SessionContextGroupClient$1(this.wire, __classPrivateFieldGet$6(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
|
|
15191
15192
|
__classPrivateFieldGet$6(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
|
|
15192
15193
|
return newSessionContextGroup.getUserInstance();
|
|
15193
15194
|
}
|
|
@@ -17091,6 +17092,15 @@ class Transport extends EventEmitter {
|
|
|
17091
17092
|
const { uuid, name } = config;
|
|
17092
17093
|
const entityType = this.environment.getCurrentEntityType();
|
|
17093
17094
|
this.me = getBaseMe(entityType, uuid, name);
|
|
17095
|
+
// Registered here rather than per-caller so that a restoration is logged exactly once,
|
|
17096
|
+
// however many parts of the adapter go on to subscribe.
|
|
17097
|
+
this.environment.onBFCacheRestore(async () => {
|
|
17098
|
+
await this.sendAction('write-to-log', {
|
|
17099
|
+
level: 'verbose',
|
|
17100
|
+
message: `Page restored from the back/forward cache for ${uuid}/${name}`,
|
|
17101
|
+
target: {}
|
|
17102
|
+
});
|
|
17103
|
+
});
|
|
17094
17104
|
}
|
|
17095
17105
|
getFin() {
|
|
17096
17106
|
if (!__classPrivateFieldGet(this, _Transport_fin, "f")) {
|
|
@@ -17333,6 +17343,11 @@ class StubEnvironment {
|
|
|
17333
17343
|
observeBounds() {
|
|
17334
17344
|
throw new Error(environmentUnsupportedMessage);
|
|
17335
17345
|
}
|
|
17346
|
+
onBFCacheRestore(listener) {
|
|
17347
|
+
// Deliberately not throwing: callers register unconditionally, including from the
|
|
17348
|
+
// Transport constructor, which the stub environment has to survive.
|
|
17349
|
+
return () => undefined;
|
|
17350
|
+
}
|
|
17336
17351
|
writeToken(path, token) {
|
|
17337
17352
|
throw new Error(environmentUnsupportedMessage);
|
|
17338
17353
|
}
|