@openfin/core 34.78.7 → 34.78.10
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 +586 -59
- package/out/mock-beta.d.ts +586 -59
- package/out/mock-public.d.ts +586 -59
- package/out/mock.d.ts +588 -61
- package/out/mock.js +214 -184
- package/package.json +1 -1
package/out/mock.js
CHANGED
|
@@ -893,6 +893,9 @@ function requireFactory$3 () {
|
|
|
893
893
|
const base_1 = base;
|
|
894
894
|
const validate_1 = validate;
|
|
895
895
|
const index_1 = requireView();
|
|
896
|
+
/**
|
|
897
|
+
* Static namespace for OpenFin API methods that interact with the {@link View} class, available under `fin.View`.
|
|
898
|
+
*/
|
|
896
899
|
class ViewModule extends base_1.Base {
|
|
897
900
|
/**
|
|
898
901
|
* Creates a new View.
|
|
@@ -4378,6 +4381,9 @@ function requireFactory$2 () {
|
|
|
4378
4381
|
const base_1 = base;
|
|
4379
4382
|
const validate_1 = validate;
|
|
4380
4383
|
const Instance_1 = requireInstance$1();
|
|
4384
|
+
/**
|
|
4385
|
+
* Static namespace for OpenFin API methods that interact with the {@link Application} class, available under `fin.Application`.
|
|
4386
|
+
*/
|
|
4381
4387
|
class ApplicationModule extends base_1.Base {
|
|
4382
4388
|
/**
|
|
4383
4389
|
* Asynchronously returns an Application object that represents an existing application.
|
|
@@ -6004,11 +6010,12 @@ function requireInstance () {
|
|
|
6004
6010
|
* moveBy(580, 300).then(() => console.log('Moved')).catch(err => console.log(err));
|
|
6005
6011
|
* ```
|
|
6006
6012
|
*/
|
|
6007
|
-
moveBy(deltaLeft, deltaTop) {
|
|
6013
|
+
moveBy(deltaLeft, deltaTop, positioningOptions) {
|
|
6008
6014
|
return this.wire
|
|
6009
6015
|
.sendAction('move-window-by', {
|
|
6010
6016
|
deltaLeft,
|
|
6011
6017
|
deltaTop,
|
|
6018
|
+
positioningOptions,
|
|
6012
6019
|
...this.identity
|
|
6013
6020
|
})
|
|
6014
6021
|
.then(() => undefined);
|
|
@@ -6038,11 +6045,12 @@ function requireInstance () {
|
|
|
6038
6045
|
* moveTo(580, 300).then(() => console.log('Moved')).catch(err => console.log(err))
|
|
6039
6046
|
* ```
|
|
6040
6047
|
*/
|
|
6041
|
-
moveTo(left, top) {
|
|
6048
|
+
moveTo(left, top, positioningOptions) {
|
|
6042
6049
|
return this.wire
|
|
6043
6050
|
.sendAction('move-window', {
|
|
6044
6051
|
left,
|
|
6045
6052
|
top,
|
|
6053
|
+
positioningOptions,
|
|
6046
6054
|
...this.identity
|
|
6047
6055
|
})
|
|
6048
6056
|
.then(() => undefined);
|
|
@@ -6075,12 +6083,13 @@ function requireInstance () {
|
|
|
6075
6083
|
* resizeBy(580, 300, 'top-right').then(() => console.log('Resized')).catch(err => console.log(err));
|
|
6076
6084
|
* ```
|
|
6077
6085
|
*/
|
|
6078
|
-
resizeBy(deltaWidth, deltaHeight, anchor) {
|
|
6086
|
+
resizeBy(deltaWidth, deltaHeight, anchor, positioningOptions) {
|
|
6079
6087
|
return this.wire
|
|
6080
6088
|
.sendAction('resize-window-by', {
|
|
6081
6089
|
deltaWidth: Math.floor(deltaWidth),
|
|
6082
6090
|
deltaHeight: Math.floor(deltaHeight),
|
|
6083
6091
|
anchor,
|
|
6092
|
+
positioningOptions,
|
|
6084
6093
|
...this.identity
|
|
6085
6094
|
})
|
|
6086
6095
|
.then(() => undefined);
|
|
@@ -6113,12 +6122,13 @@ function requireInstance () {
|
|
|
6113
6122
|
* resizeTo(580, 300, 'top-left').then(() => console.log('Resized')).catch(err => console.log(err));
|
|
6114
6123
|
* ```
|
|
6115
6124
|
*/
|
|
6116
|
-
resizeTo(width, height, anchor) {
|
|
6125
|
+
resizeTo(width, height, anchor, positioningOptions) {
|
|
6117
6126
|
return this.wire
|
|
6118
6127
|
.sendAction('resize-window', {
|
|
6119
6128
|
width: Math.floor(width),
|
|
6120
6129
|
height: Math.floor(height),
|
|
6121
6130
|
anchor,
|
|
6131
|
+
positioningOptions,
|
|
6122
6132
|
...this.identity
|
|
6123
6133
|
})
|
|
6124
6134
|
.then(() => undefined);
|
|
@@ -6177,7 +6187,6 @@ function requireInstance () {
|
|
|
6177
6187
|
}
|
|
6178
6188
|
/**
|
|
6179
6189
|
* Sets the window's size and position.
|
|
6180
|
-
* @property { Bounds } bounds This is a * @type {string} name - name of the window.object that holds the propertys of
|
|
6181
6190
|
*
|
|
6182
6191
|
* @example
|
|
6183
6192
|
* ```js
|
|
@@ -6204,8 +6213,10 @@ function requireInstance () {
|
|
|
6204
6213
|
* }).then(() => console.log('Bounds set to window')).catch(err => console.log(err));
|
|
6205
6214
|
* ```
|
|
6206
6215
|
*/
|
|
6207
|
-
setBounds(bounds) {
|
|
6208
|
-
return this.wire
|
|
6216
|
+
setBounds(bounds, positioningOptions) {
|
|
6217
|
+
return this.wire
|
|
6218
|
+
.sendAction('set-window-bounds', { ...bounds, ...this.identity, positioningOptions })
|
|
6219
|
+
.then(() => undefined);
|
|
6209
6220
|
}
|
|
6210
6221
|
/**
|
|
6211
6222
|
* Shows the window if it is hidden.
|
|
@@ -6437,6 +6448,7 @@ function requireInstance () {
|
|
|
6437
6448
|
return this.wire.sendAction('close-popup-menu', { ...this.identity }).then(() => undefined);
|
|
6438
6449
|
}
|
|
6439
6450
|
/**
|
|
6451
|
+
* @PORTED
|
|
6440
6452
|
* @typedef {object} PopupOptions
|
|
6441
6453
|
* @property {string} [name] - If a window with this `name` exists, it will be shown as a popup. Otherwise, a new window with this `name` will be created. If this `name` is undefined, `initialOptions.name` will be used. If this `name` and `intialOptions.name` are both undefined, a `name` will be generated.
|
|
6442
6454
|
* @property {string} [url] - Navigates to this `url` if showing an existing window as a popup, otherwise the newly created window will load this `url`.
|
|
@@ -6454,6 +6466,7 @@ function requireInstance () {
|
|
|
6454
6466
|
* @property {boolean} [hideOnClose] - Hide the popup window instead of closing whenever `close` is called on it. Note: if this is `true` and `blurBehavior` and/or `resultDispatchBehavior` are set to `close`, the window will be hidden.
|
|
6455
6467
|
*/
|
|
6456
6468
|
/**
|
|
6469
|
+
* @PORTED
|
|
6457
6470
|
* @typedef {object} PopupResult
|
|
6458
6471
|
* @property {Identity} identity - `name` and `uuid` of the popup window that called dispatched this result.
|
|
6459
6472
|
* @property {'clicked' | 'dismissed'} result - Result of the user interaction with the popup window.
|
|
@@ -6547,6 +6560,9 @@ function requireFactory$1 () {
|
|
|
6547
6560
|
const base_1 = base;
|
|
6548
6561
|
const validate_1 = validate;
|
|
6549
6562
|
const Instance_1 = requireInstance();
|
|
6563
|
+
/**
|
|
6564
|
+
* Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
|
|
6565
|
+
*/
|
|
6550
6566
|
class _WindowModule extends base_1.Base {
|
|
6551
6567
|
/**
|
|
6552
6568
|
* Asynchronously returns a Window object that represents an existing window.
|
|
@@ -8986,17 +9002,17 @@ const channelClientsByEndpointId = new Map();
|
|
|
8986
9002
|
* provider via {@link ChannelClient#dispatch dispatch} and to listen for communication
|
|
8987
9003
|
* from the provider by registering an action via {@link ChannelClient#register register}.
|
|
8988
9004
|
*
|
|
8989
|
-
* Synchronous Methods:
|
|
9005
|
+
* ### Synchronous Methods:
|
|
8990
9006
|
* * {@link ChannelClient#onDisconnection onDisconnection(listener)}
|
|
8991
9007
|
* * {@link ChannelClient#register register(action, listener)}
|
|
8992
9008
|
* * {@link ChannelClient#remove remove(action)}
|
|
8993
9009
|
*
|
|
8994
|
-
* Asynchronous Methods:
|
|
9010
|
+
* ### Asynchronous Methods:
|
|
8995
9011
|
* * {@link ChannelClient#disconnect disconnect()}
|
|
8996
9012
|
* * {@link ChannelClient#dispatch dispatch(action, payload)}
|
|
8997
9013
|
*
|
|
8998
|
-
* Middleware:
|
|
8999
|
-
*
|
|
9014
|
+
* ### Middleware:
|
|
9015
|
+
* Middleware functions receive the following arguments: (action, payload, senderId).
|
|
9000
9016
|
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
|
9001
9017
|
* unless it is undefined, in which case the original payload is used. Middleware can be used for side effects.
|
|
9002
9018
|
* * {@link ChannelClient#setDefaultAction setDefaultAction(middleware)}
|
|
@@ -9686,20 +9702,20 @@ const runtimeVersioning_1 = runtimeVersioning;
|
|
|
9686
9702
|
* a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
|
|
9687
9703
|
* and to listen for communication from clients by registering an action via {@link ChannelProvider#register register}.
|
|
9688
9704
|
*
|
|
9689
|
-
* Synchronous Methods:
|
|
9705
|
+
* ### Synchronous Methods:
|
|
9690
9706
|
* * {@link ChannelProvider#onConnection onConnection(listener)}
|
|
9691
9707
|
* * {@link ChannelProvider#onDisconnection onDisconnection(listener)}
|
|
9692
9708
|
* * {@link ChannelProvider#publish publish(action, payload)}
|
|
9693
9709
|
* * {@link ChannelProvider#register register(action, listener)}
|
|
9694
9710
|
* * {@link ChannelProvider#remove remove(action)}
|
|
9695
9711
|
*
|
|
9696
|
-
* Asynchronous Methods:
|
|
9712
|
+
* ### Asynchronous Methods:
|
|
9697
9713
|
* * {@link ChannelProvider#destroy destroy()}
|
|
9698
9714
|
* * {@link ChannelProvider#dispatch dispatch(to, action, payload)}
|
|
9699
9715
|
* * {@link ChannelProvider#getAllClientInfo getAllClientInfo()}
|
|
9700
9716
|
*
|
|
9701
|
-
* Middleware:
|
|
9702
|
-
*
|
|
9717
|
+
* ### Middleware:
|
|
9718
|
+
* Middleware functions receive the following arguments: (action, payload, senderId).
|
|
9703
9719
|
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
|
9704
9720
|
* unless it is undefined, in which case the most recently defined payload is used. Middleware can be used for side effects.
|
|
9705
9721
|
* * {@link ChannelProvider#setDefaultAction setDefaultAction(middleware)}
|
|
@@ -11186,7 +11202,7 @@ const base_1$c = base;
|
|
|
11186
11202
|
/**
|
|
11187
11203
|
* An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
|
11188
11204
|
* the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
|
|
11189
|
-
* Discovery of connections is provided by
|
|
11205
|
+
* Discovery of connections is provided by {@link System.System.getAllExternalApplications getAllExternalApplications}.</a>
|
|
11190
11206
|
*
|
|
11191
11207
|
* Processes that can be wrapped as `ExternalApplication`s include the following:
|
|
11192
11208
|
* - Processes which have connected to an OpenFin runtime via an adapter
|
|
@@ -11300,6 +11316,9 @@ Object.defineProperty(Factory$5, "__esModule", { value: true });
|
|
|
11300
11316
|
Factory$5.ExternalApplicationModule = void 0;
|
|
11301
11317
|
const base_1$b = base;
|
|
11302
11318
|
const Instance_1$4 = Instance$4;
|
|
11319
|
+
/**
|
|
11320
|
+
* Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
|
|
11321
|
+
*/
|
|
11303
11322
|
class ExternalApplicationModule extends base_1$b.Base {
|
|
11304
11323
|
/**
|
|
11305
11324
|
* Asynchronously returns an External Application object that represents an external application.
|
|
@@ -11527,6 +11546,9 @@ Factory$4._FrameModule = void 0;
|
|
|
11527
11546
|
const base_1$9 = base;
|
|
11528
11547
|
const validate_1$2 = validate;
|
|
11529
11548
|
const Instance_1$3 = Instance$3;
|
|
11549
|
+
/**
|
|
11550
|
+
* Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
|
|
11551
|
+
*/
|
|
11530
11552
|
class _FrameModule extends base_1$9.Base {
|
|
11531
11553
|
/**
|
|
11532
11554
|
* Asynchronously returns a reference to the specified frame. The frame does not have to exist
|
|
@@ -11612,7 +11634,7 @@ Factory$4._FrameModule = _FrameModule;
|
|
|
11612
11634
|
* * {@link _FrameModule} contains static methods relating to the `Frame` type, accessible through `fin.Frame`.
|
|
11613
11635
|
* * {@link _Frame} describes an instance of an OpenFin Frame, e.g. as returned by `fin.Frame.getCurrent`.
|
|
11614
11636
|
*
|
|
11615
|
-
* These are separate code entities, and are documented separately.
|
|
11637
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
11616
11638
|
* both of these were documented on the same page.
|
|
11617
11639
|
*
|
|
11618
11640
|
* Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
|
|
@@ -12156,12 +12178,11 @@ class Platform extends base_1$7.EmitterBase {
|
|
|
12156
12178
|
});
|
|
12157
12179
|
}
|
|
12158
12180
|
/**
|
|
12159
|
-
* ***DEPRECATED - please use Platform.createView.***
|
|
12181
|
+
* ***DEPRECATED - please use {@link Platform.createView Platform.createView}.***
|
|
12160
12182
|
* Reparents a specified view in a new target window.
|
|
12161
12183
|
* @param viewIdentity View identity
|
|
12162
12184
|
* @param target new owner window identity
|
|
12163
12185
|
*
|
|
12164
|
-
* @tutorial Platform.createView
|
|
12165
12186
|
*/
|
|
12166
12187
|
async reparentView(viewIdentity, target) {
|
|
12167
12188
|
var _a;
|
|
@@ -12655,6 +12676,138 @@ const base_1$6 = base;
|
|
|
12655
12676
|
const common_utils_1 = commonUtils;
|
|
12656
12677
|
const layout_entities_1 = layoutEntities;
|
|
12657
12678
|
const layout_constants_1 = layout_constants;
|
|
12679
|
+
/**
|
|
12680
|
+
*
|
|
12681
|
+
* Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
|
|
12682
|
+
* enables the initialization and manipulation of a window's Layout. A Layout will
|
|
12683
|
+
* emit events locally on the DOM element representing the layout-container.
|
|
12684
|
+
*
|
|
12685
|
+
*
|
|
12686
|
+
* ### Layout.DOMEvents
|
|
12687
|
+
*
|
|
12688
|
+
* When a Layout is created, it emits events onto the DOM element representing the Layout container.
|
|
12689
|
+
* This Layout container is the DOM element referenced by containerId in {@link Layout.LayoutModule#init Layout.init}.
|
|
12690
|
+
* You can use the built-in event emitter to listen to these events using [addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener).
|
|
12691
|
+
* The events are emitted synchronously and only in the process where the Layout exists.
|
|
12692
|
+
* Any values returned by the called listeners are ignored and will be discarded.
|
|
12693
|
+
* If the target DOM element is destroyed, any events that have been set up on that element will be destroyed.
|
|
12694
|
+
*
|
|
12695
|
+
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
|
12696
|
+
*
|
|
12697
|
+
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
|
|
12698
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
12699
|
+
* @example
|
|
12700
|
+
* ```js
|
|
12701
|
+
* const myLayoutContainer = document.getElementById('layout-container');
|
|
12702
|
+
*
|
|
12703
|
+
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
|
12704
|
+
* const { tabSelector } = event.detail;
|
|
12705
|
+
* const tabElement = document.getElementById(tabSelector);
|
|
12706
|
+
* const existingColor = tabElement.style.backgroundColor;
|
|
12707
|
+
* tabElement.style.backgroundColor = "red";
|
|
12708
|
+
* setTimeout(() => {
|
|
12709
|
+
* tabElement.style.backgroundColor = existingColor;
|
|
12710
|
+
* }, 2000);
|
|
12711
|
+
* });
|
|
12712
|
+
* ```
|
|
12713
|
+
*
|
|
12714
|
+
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
|
|
12715
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
12716
|
+
* @example
|
|
12717
|
+
* ```js
|
|
12718
|
+
* const myLayoutContainer = document.getElementById('layout-container');
|
|
12719
|
+
*
|
|
12720
|
+
* const listener = function(event) {
|
|
12721
|
+
* console.log(event.detail);
|
|
12722
|
+
* console.log('container-created event fired once, removing listener');
|
|
12723
|
+
* myLayoutContainer.removeEventListener('container-created', listener);
|
|
12724
|
+
* };
|
|
12725
|
+
*
|
|
12726
|
+
* myLayoutContainer.addEventListener('container-created', listener);
|
|
12727
|
+
* ```
|
|
12728
|
+
*
|
|
12729
|
+
* ### Supported event types are:
|
|
12730
|
+
*
|
|
12731
|
+
* * tab-created
|
|
12732
|
+
* * container-created
|
|
12733
|
+
* * layout-state-changed
|
|
12734
|
+
* * tab-closed
|
|
12735
|
+
* * tab-dropped
|
|
12736
|
+
*
|
|
12737
|
+
* ### Layout DOM Node Events
|
|
12738
|
+
*
|
|
12739
|
+
* #### tab-created
|
|
12740
|
+
* Generated when a tab is created. As a user drags and drops tabs within window, new tabs are created. A single view may have multiple tabs created and destroyed during its lifetime attached to a single window.
|
|
12741
|
+
* ```js
|
|
12742
|
+
* // The response has the following shape in event.detail:
|
|
12743
|
+
* {
|
|
12744
|
+
* containerSelector: "container-component_A",
|
|
12745
|
+
* name: "component_A",
|
|
12746
|
+
* tabSelector: "tab-component_A",
|
|
12747
|
+
* topic: "openfin-DOM-event",
|
|
12748
|
+
* type: "tab-created",
|
|
12749
|
+
* uuid: "OpenFin POC"
|
|
12750
|
+
* }
|
|
12751
|
+
* ```
|
|
12752
|
+
*
|
|
12753
|
+
* #### container-created
|
|
12754
|
+
* Generated when a container is created. A single view will have only one container during its lifetime attached to a single window and the container's lifecycle is tied to the view. To discover when the container is destroyed, please listen to view-detached event.
|
|
12755
|
+
* ```js
|
|
12756
|
+
* // The response has the following shape in event.detail:
|
|
12757
|
+
* {
|
|
12758
|
+
* containerSelector: "container-component_A",
|
|
12759
|
+
* name: "component_A",
|
|
12760
|
+
* tabSelector: "tab-component_A",
|
|
12761
|
+
* topic: "openfin-DOM-event",
|
|
12762
|
+
* type: "container-created",
|
|
12763
|
+
* uuid: "OpenFin POC"
|
|
12764
|
+
* }
|
|
12765
|
+
* ```
|
|
12766
|
+
*
|
|
12767
|
+
* ### layout-state-changed
|
|
12768
|
+
* Generated when the state of the layout changes in any way, such as a view added/removed/replaced. Note that this event can fire frequently as the underlying layout can change multiple components from all kinds of changes (resizing for example). Given this, it is recommended to debounce this event and then you can use the {@link Layout#getConfig Layout.getConfig} API to retrieve the most up-to-date state.
|
|
12769
|
+
* ```js
|
|
12770
|
+
* // The response has the following shape in event.detail
|
|
12771
|
+
* {
|
|
12772
|
+
* containerSelector: "container-component_A",
|
|
12773
|
+
* name: "component_A",
|
|
12774
|
+
* tabSelector: "tab-component_A",
|
|
12775
|
+
* topic: "openfin-DOM-event",
|
|
12776
|
+
* type: "layout-state-changed",
|
|
12777
|
+
* uuid: "OpenFin POC"
|
|
12778
|
+
* }
|
|
12779
|
+
* ```
|
|
12780
|
+
*
|
|
12781
|
+
* #### tab-closed
|
|
12782
|
+
* Generated when a tab is closed.
|
|
12783
|
+
* ```js
|
|
12784
|
+
* // The response has the following shape in event.detail:
|
|
12785
|
+
* {
|
|
12786
|
+
* containerSelector: "container-component_A",
|
|
12787
|
+
* name: "component_A",
|
|
12788
|
+
* tabSelector: "tab-component_A",
|
|
12789
|
+
* topic: "openfin-DOM-event",
|
|
12790
|
+
* type: "tab-closed",
|
|
12791
|
+
* uuid: "OpenFin POC",
|
|
12792
|
+
* url: "http://openfin.co" // The url of the view that was closed.
|
|
12793
|
+
* }
|
|
12794
|
+
* ```
|
|
12795
|
+
*
|
|
12796
|
+
* #### tab-dropped
|
|
12797
|
+
* Generated when a tab is dropped.
|
|
12798
|
+
* ```js
|
|
12799
|
+
* // The response has the following shape in event.detail:
|
|
12800
|
+
* {
|
|
12801
|
+
* containerSelector: "container-component_A",
|
|
12802
|
+
* name: "component_A",
|
|
12803
|
+
* tabSelector: "tab-component_A",
|
|
12804
|
+
* topic: "openfin-DOM-event",
|
|
12805
|
+
* type: "tab-dropped",
|
|
12806
|
+
* uuid: "OpenFin POC",
|
|
12807
|
+
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
12808
|
+
* }
|
|
12809
|
+
* ```
|
|
12810
|
+
*/
|
|
12658
12811
|
class Layout extends base_1$6.Base {
|
|
12659
12812
|
/**
|
|
12660
12813
|
* @internal
|
|
@@ -12882,6 +13035,9 @@ Factory$2.LayoutModule = void 0;
|
|
|
12882
13035
|
/* eslint-disable no-undef, import/prefer-default-export */
|
|
12883
13036
|
const base_1$5 = base;
|
|
12884
13037
|
const Instance_1$2 = Instance$1;
|
|
13038
|
+
/**
|
|
13039
|
+
* Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
|
|
13040
|
+
*/
|
|
12885
13041
|
class LayoutModule extends base_1$5.Base {
|
|
12886
13042
|
constructor() {
|
|
12887
13043
|
super(...arguments);
|
|
@@ -13047,131 +13203,6 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap();
|
|
|
13047
13203
|
*
|
|
13048
13204
|
* @packageDocumentation
|
|
13049
13205
|
*
|
|
13050
|
-
*
|
|
13051
|
-
* ### Layout.DOMEvents
|
|
13052
|
-
*
|
|
13053
|
-
* When a Layout is created, it emits events onto the DOM element representing the Layout container.
|
|
13054
|
-
* This Layout container is the DOM element referenced by containerId in {@link Layout.LayoutModule#init Layout.init}.
|
|
13055
|
-
* You can use the built-in event emitter to listen to these events using [addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener).
|
|
13056
|
-
* The events are emitted synchronously and only in the process where the Layout exists.
|
|
13057
|
-
* Any values returned by the called listeners are ignored and will be discarded.
|
|
13058
|
-
* If the target DOM element is destroyed, any events that have been set up on that element will be destroyed.
|
|
13059
|
-
*
|
|
13060
|
-
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
|
13061
|
-
*
|
|
13062
|
-
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
|
|
13063
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
13064
|
-
* @example
|
|
13065
|
-
* ```js
|
|
13066
|
-
* const myLayoutContainer = document.getElementById('layout-container');
|
|
13067
|
-
*
|
|
13068
|
-
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
|
13069
|
-
* const { tabSelector } = event.detail;
|
|
13070
|
-
* const tabElement = document.getElementById(tabSelector);
|
|
13071
|
-
* const existingColor = tabElement.style.backgroundColor;
|
|
13072
|
-
* tabElement.style.backgroundColor = "red";
|
|
13073
|
-
* setTimeout(() => {
|
|
13074
|
-
* tabElement.style.backgroundColor = existingColor;
|
|
13075
|
-
* }, 2000);
|
|
13076
|
-
* });
|
|
13077
|
-
* ```
|
|
13078
|
-
*
|
|
13079
|
-
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
|
|
13080
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
13081
|
-
* @example
|
|
13082
|
-
* ```js
|
|
13083
|
-
* const myLayoutContainer = document.getElementById('layout-container');
|
|
13084
|
-
*
|
|
13085
|
-
* const listener = function(event) {
|
|
13086
|
-
* console.log(event.detail);
|
|
13087
|
-
* console.log('container-created event fired once, removing listener');
|
|
13088
|
-
* myLayoutContainer.removeEventListener('container-created', listener);
|
|
13089
|
-
* };
|
|
13090
|
-
*
|
|
13091
|
-
* myLayoutContainer.addEventListener('container-created', listener);
|
|
13092
|
-
* ```
|
|
13093
|
-
*
|
|
13094
|
-
* ### Supported event types are:
|
|
13095
|
-
*
|
|
13096
|
-
* * tab-created
|
|
13097
|
-
* * container-created
|
|
13098
|
-
* * layout-state-changed
|
|
13099
|
-
* * tab-closed
|
|
13100
|
-
* * tab-dropped
|
|
13101
|
-
*
|
|
13102
|
-
* ### Layout DOM Node Events
|
|
13103
|
-
*
|
|
13104
|
-
* #### tab-created
|
|
13105
|
-
* Generated when a tab is created. As a user drags and drops tabs within window, new tabs are created. A single view may have multiple tabs created and destroyed during its lifetime attached to a single window.
|
|
13106
|
-
* ```js
|
|
13107
|
-
* // The response has the following shape in event.detail:
|
|
13108
|
-
* {
|
|
13109
|
-
* containerSelector: "container-component_A",
|
|
13110
|
-
* name: "component_A",
|
|
13111
|
-
* tabSelector: "tab-component_A",
|
|
13112
|
-
* topic: "openfin-DOM-event",
|
|
13113
|
-
* type: "tab-created",
|
|
13114
|
-
* uuid: "OpenFin POC"
|
|
13115
|
-
* }
|
|
13116
|
-
* ```
|
|
13117
|
-
*
|
|
13118
|
-
* #### container-created
|
|
13119
|
-
* Generated when a container is created. A single view will have only one container during its lifetime attached to a single window and the container's lifecycle is tied to the view. To discover when the container is destroyed, please listen to view-detached event.
|
|
13120
|
-
* ```js
|
|
13121
|
-
* // The response has the following shape in event.detail:
|
|
13122
|
-
* {
|
|
13123
|
-
* containerSelector: "container-component_A",
|
|
13124
|
-
* name: "component_A",
|
|
13125
|
-
* tabSelector: "tab-component_A",
|
|
13126
|
-
* topic: "openfin-DOM-event",
|
|
13127
|
-
* type: "container-created",
|
|
13128
|
-
* uuid: "OpenFin POC"
|
|
13129
|
-
* }
|
|
13130
|
-
* ```
|
|
13131
|
-
*
|
|
13132
|
-
* ### layout-state-changed
|
|
13133
|
-
* Generated when the state of the layout changes in any way, such as a view added/removed/replaced. Note that this event can fire frequently as the underlying layout can change multiple components from all kinds of changes (resizing for example). Given this, it is recommended to debounce this event and then you can use the {@link Layout#getConfig Layout.getConfig} API to retrieve the most up-to-date state.
|
|
13134
|
-
* ```js
|
|
13135
|
-
* // The response has the following shape in event.detail
|
|
13136
|
-
* {
|
|
13137
|
-
* containerSelector: "container-component_A",
|
|
13138
|
-
* name: "component_A",
|
|
13139
|
-
* tabSelector: "tab-component_A",
|
|
13140
|
-
* topic: "openfin-DOM-event",
|
|
13141
|
-
* type: "layout-state-changed",
|
|
13142
|
-
* uuid: "OpenFin POC"
|
|
13143
|
-
* }
|
|
13144
|
-
* ```
|
|
13145
|
-
*
|
|
13146
|
-
* #### tab-closed
|
|
13147
|
-
* Generated when a tab is closed.
|
|
13148
|
-
* ```js
|
|
13149
|
-
* // The response has the following shape in event.detail:
|
|
13150
|
-
* {
|
|
13151
|
-
* containerSelector: "container-component_A",
|
|
13152
|
-
* name: "component_A",
|
|
13153
|
-
* tabSelector: "tab-component_A",
|
|
13154
|
-
* topic: "openfin-DOM-event",
|
|
13155
|
-
* type: "tab-closed",
|
|
13156
|
-
* uuid: "OpenFin POC",
|
|
13157
|
-
* url: "http://openfin.co" // The url of the view that was closed.
|
|
13158
|
-
* }
|
|
13159
|
-
* ```
|
|
13160
|
-
*
|
|
13161
|
-
* #### tab-dropped
|
|
13162
|
-
* Generated when a tab is dropped.
|
|
13163
|
-
* ```js
|
|
13164
|
-
* // The response has the following shape in event.detail:
|
|
13165
|
-
* {
|
|
13166
|
-
* containerSelector: "container-component_A",
|
|
13167
|
-
* name: "component_A",
|
|
13168
|
-
* tabSelector: "tab-component_A",
|
|
13169
|
-
* topic: "openfin-DOM-event",
|
|
13170
|
-
* type: "tab-dropped",
|
|
13171
|
-
* uuid: "OpenFin POC",
|
|
13172
|
-
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
13173
|
-
* }
|
|
13174
|
-
* ```
|
|
13175
13206
|
*/
|
|
13176
13207
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13177
13208
|
if (k2 === undefined) k2 = k;
|
|
@@ -13197,6 +13228,9 @@ Factory$3.PlatformModule = void 0;
|
|
|
13197
13228
|
const base_1$4 = base;
|
|
13198
13229
|
const Instance_1$1 = Instance$2;
|
|
13199
13230
|
const index_1$1 = layout;
|
|
13231
|
+
/**
|
|
13232
|
+
* Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
|
|
13233
|
+
*/
|
|
13200
13234
|
class PlatformModule extends base_1$4.Base {
|
|
13201
13235
|
/**
|
|
13202
13236
|
* @internal
|
|
@@ -16213,46 +16247,39 @@ class InteropClient extends base_1$2.Base {
|
|
|
16213
16247
|
InteropClient$1.InteropClient = InteropClient;
|
|
16214
16248
|
_InteropClient_clientPromise = new WeakMap(), _InteropClient_sessionContextGroups = new WeakMap();
|
|
16215
16249
|
|
|
16216
|
-
var overrideCheck = {};
|
|
16217
|
-
|
|
16218
|
-
var hasRequiredOverrideCheck;
|
|
16250
|
+
var overrideCheck$1 = {};
|
|
16219
16251
|
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
|
|
16224
|
-
|
|
16225
|
-
|
|
16226
|
-
|
|
16227
|
-
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16246
|
-
|
|
16247
|
-
|
|
16248
|
-
|
|
16249
|
-
console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${notOverridden.join('\n')}`);
|
|
16250
|
-
}
|
|
16251
|
-
}
|
|
16252
|
-
}
|
|
16253
|
-
overrideCheck.overrideCheck = overrideCheck$1;
|
|
16254
|
-
return overrideCheck;
|
|
16252
|
+
Object.defineProperty(overrideCheck$1, "__esModule", { value: true });
|
|
16253
|
+
overrideCheck$1.overrideCheck = overrideCheck$1.getDefaultViewFdc3VersionFromAppInfo = void 0;
|
|
16254
|
+
const InteropBroker_1 = requireInteropBroker();
|
|
16255
|
+
function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
|
|
16256
|
+
var _a, _b, _c, _d;
|
|
16257
|
+
const setVersion = (_c = (_b = (_a = manifest.platform) === null || _a === void 0 ? void 0 : _a.defaultViewOptions) === null || _b === void 0 ? void 0 : _b.fdc3InteropApi) !== null && _c !== void 0 ? _c : (_d = initialOptions.defaultViewOptions) === null || _d === void 0 ? void 0 : _d.fdc3InteropApi;
|
|
16258
|
+
return ['1.2', '2.0'].includes(setVersion !== null && setVersion !== void 0 ? setVersion : '') ? setVersion : undefined;
|
|
16259
|
+
}
|
|
16260
|
+
overrideCheck$1.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
|
|
16261
|
+
// TODO: Unit test this
|
|
16262
|
+
function overrideCheck(overriddenBroker, fdc3InteropApi) {
|
|
16263
|
+
if (fdc3InteropApi && fdc3InteropApi === '2.0') {
|
|
16264
|
+
const mustOverrideAPIs = [
|
|
16265
|
+
'fdc3HandleFindInstances',
|
|
16266
|
+
'handleInfoForIntent',
|
|
16267
|
+
'handleInfoForIntentsByContext',
|
|
16268
|
+
'fdc3HandleGetAppMetadata',
|
|
16269
|
+
'fdc3HandleGetInfo',
|
|
16270
|
+
'fdc3HandleOpen',
|
|
16271
|
+
'handleFiredIntent',
|
|
16272
|
+
'handleFiredIntentForContext'
|
|
16273
|
+
];
|
|
16274
|
+
const notOverridden = mustOverrideAPIs.filter((api) => {
|
|
16275
|
+
return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
|
|
16276
|
+
});
|
|
16277
|
+
if (notOverridden.length > 0) {
|
|
16278
|
+
console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${notOverridden.join('\n')}`);
|
|
16279
|
+
}
|
|
16280
|
+
}
|
|
16255
16281
|
}
|
|
16282
|
+
overrideCheck$1.overrideCheck = overrideCheck;
|
|
16256
16283
|
|
|
16257
16284
|
var hasRequiredFactory;
|
|
16258
16285
|
|
|
@@ -16266,7 +16293,7 @@ function requireFactory () {
|
|
|
16266
16293
|
const base_1 = base;
|
|
16267
16294
|
const InteropBroker_1 = requireInteropBroker();
|
|
16268
16295
|
const InteropClient_1 = InteropClient$1;
|
|
16269
|
-
const overrideCheck_1 =
|
|
16296
|
+
const overrideCheck_1 = overrideCheck$1;
|
|
16270
16297
|
const common_utils_1 = commonUtils;
|
|
16271
16298
|
const defaultOverride = (Class) => new Class();
|
|
16272
16299
|
const BrokerParamAccessError = 'You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.';
|
|
@@ -16575,6 +16602,9 @@ Factory.SnapshotSourceModule = void 0;
|
|
|
16575
16602
|
const base_1 = base;
|
|
16576
16603
|
const Instance_1 = Instance;
|
|
16577
16604
|
const utils_1 = utils;
|
|
16605
|
+
/**
|
|
16606
|
+
* Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
|
|
16607
|
+
*/
|
|
16578
16608
|
class SnapshotSourceModule extends base_1.Base {
|
|
16579
16609
|
/**
|
|
16580
16610
|
* Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
|
|
@@ -16651,7 +16681,7 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
|
|
|
16651
16681
|
* Entry points for the OpenFin `SnapshotSource` API.
|
|
16652
16682
|
*
|
|
16653
16683
|
* * {@link SnapshotSourceModule} contains static methods relating to the `SnapshotSource` type, accessible through `fin.SnapshotSource`.
|
|
16654
|
-
* * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.
|
|
16684
|
+
* * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.wrap`.
|
|
16655
16685
|
*
|
|
16656
16686
|
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
16657
16687
|
* both of these were documented on the same page.
|