@openfin/core 34.78.5 → 34.78.9

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.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.
@@ -3526,12 +3529,12 @@ function requireView () {
3526
3529
  /**
3527
3530
  * Entry points for the OpenFin `View` API.
3528
3531
  *
3529
- * In the previous version of the API documentation, both static methods involving `View` and instance properties of the
3530
- * `View` type itself were documented on the same page. These are separate code entities, and are now documented separately:
3531
- *
3532
3532
  * * {@link ViewModule} contains static methods relating to the `View` type, accessible through `fin.View`.
3533
3533
  * * {@link View} describes an instance of an OpenFin View, e.g. as returned by `fin.View.getCurrent`.
3534
3534
  *
3535
+ * 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),
3536
+ * both of these were documented on the same page.
3537
+ *
3535
3538
  * @packageDocumentation
3536
3539
  */
3537
3540
  __exportStar(requireFactory$3(), exports);
@@ -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.
@@ -4661,12 +4667,12 @@ function requireApplication () {
4661
4667
  /**
4662
4668
  * Entry points for the OpenFin `Application` API.
4663
4669
  *
4664
- * In the previous version of the API documentation, both static methods involving `Application` and instance properties of the
4665
- * `Application` type itself were documented on the same page. These are separate code entities, and are now documented separately:
4666
- *
4667
4670
  * * {@link ApplicationModule} contains static methods relating to the `Application` type, accessible through `fin.Application`.
4668
4671
  * * {@link Application} describes an instance of an OpenFin Application, e.g. as returned by `fin.Application.getCurrent`.
4669
4672
  *
4673
+ * 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),
4674
+ * both of these were documented on the same page.
4675
+ *
4670
4676
  * @packageDocumentation
4671
4677
  */
4672
4678
  __exportStar(requireFactory$2(), exports);
@@ -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.sendAction('set-window-bounds', { ...bounds, ...this.identity }).then(() => undefined);
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.
@@ -6547,6 +6558,9 @@ function requireFactory$1 () {
6547
6558
  const base_1 = base;
6548
6559
  const validate_1 = validate;
6549
6560
  const Instance_1 = requireInstance();
6561
+ /**
6562
+ * Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
6563
+ */
6550
6564
  class _WindowModule extends base_1.Base {
6551
6565
  /**
6552
6566
  * Asynchronously returns a Window object that represents an existing window.
@@ -6704,12 +6718,12 @@ function requireWindow () {
6704
6718
  /**
6705
6719
  * Entry points for the OpenFin `Window` API.
6706
6720
  *
6707
- * In the previous version of the API documentation, both static methods involving `Window` and instance properties of the
6708
- * `Window` type itself were documented on the same page. These are separate code entities, and are now documented separately:
6709
- *
6710
6721
  * * {@link _WindowModule} contains static methods relating to the `Window` type, accessible through `fin.Window`.
6711
6722
  * * {@link _Window} describes an instance of an OpenFin Window, e.g. as returned by `fin.Window.getCurrent`.
6712
6723
  *
6724
+ * 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),
6725
+ * both of these were documented on the same page.
6726
+ *
6713
6727
  * Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
6714
6728
  *
6715
6729
  * @packageDocumentation
@@ -8986,17 +9000,17 @@ const channelClientsByEndpointId = new Map();
8986
9000
  * provider via {@link ChannelClient#dispatch dispatch} and to listen for communication
8987
9001
  * from the provider by registering an action via {@link ChannelClient#register register}.
8988
9002
  *
8989
- * Synchronous Methods:
9003
+ * ### Synchronous Methods:
8990
9004
  * * {@link ChannelClient#onDisconnection onDisconnection(listener)}
8991
9005
  * * {@link ChannelClient#register register(action, listener)}
8992
9006
  * * {@link ChannelClient#remove remove(action)}
8993
9007
  *
8994
- * Asynchronous Methods:
9008
+ * ### Asynchronous Methods:
8995
9009
  * * {@link ChannelClient#disconnect disconnect()}
8996
9010
  * * {@link ChannelClient#dispatch dispatch(action, payload)}
8997
9011
  *
8998
- * Middleware:
8999
- * <br>Middleware functions receive the following arguments: (action, payload, senderId).
9012
+ * ### Middleware:
9013
+ * Middleware functions receive the following arguments: (action, payload, senderId).
9000
9014
  * The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
9001
9015
  * unless it is undefined, in which case the original payload is used. Middleware can be used for side effects.
9002
9016
  * * {@link ChannelClient#setDefaultAction setDefaultAction(middleware)}
@@ -9686,20 +9700,20 @@ const runtimeVersioning_1 = runtimeVersioning;
9686
9700
  * a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
9687
9701
  * and to listen for communication from clients by registering an action via {@link ChannelProvider#register register}.
9688
9702
  *
9689
- * Synchronous Methods:
9703
+ * ### Synchronous Methods:
9690
9704
  * * {@link ChannelProvider#onConnection onConnection(listener)}
9691
9705
  * * {@link ChannelProvider#onDisconnection onDisconnection(listener)}
9692
9706
  * * {@link ChannelProvider#publish publish(action, payload)}
9693
9707
  * * {@link ChannelProvider#register register(action, listener)}
9694
9708
  * * {@link ChannelProvider#remove remove(action)}
9695
9709
  *
9696
- * Asynchronous Methods:
9710
+ * ### Asynchronous Methods:
9697
9711
  * * {@link ChannelProvider#destroy destroy()}
9698
9712
  * * {@link ChannelProvider#dispatch dispatch(to, action, payload)}
9699
9713
  * * {@link ChannelProvider#getAllClientInfo getAllClientInfo()}
9700
9714
  *
9701
- * Middleware:
9702
- * <br>Middleware functions receive the following arguments: (action, payload, senderId).
9715
+ * ### Middleware:
9716
+ * Middleware functions receive the following arguments: (action, payload, senderId).
9703
9717
  * The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
9704
9718
  * unless it is undefined, in which case the most recently defined payload is used. Middleware can be used for side effects.
9705
9719
  * * {@link ChannelProvider#setDefaultAction setDefaultAction(middleware)}
@@ -11186,7 +11200,7 @@ const base_1$c = base;
11186
11200
  /**
11187
11201
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
11188
11202
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
11189
- * Discovery of connections is provided by <a href="tutorial-System.getAllExternalApplications.html">getAllExternalApplications.</a>
11203
+ * Discovery of connections is provided by {@link System.System.getAllExternalApplications getAllExternalApplications}.</a>
11190
11204
  *
11191
11205
  * Processes that can be wrapped as `ExternalApplication`s include the following:
11192
11206
  * - Processes which have connected to an OpenFin runtime via an adapter
@@ -11300,6 +11314,9 @@ Object.defineProperty(Factory$5, "__esModule", { value: true });
11300
11314
  Factory$5.ExternalApplicationModule = void 0;
11301
11315
  const base_1$b = base;
11302
11316
  const Instance_1$4 = Instance$4;
11317
+ /**
11318
+ * Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
11319
+ */
11303
11320
  class ExternalApplicationModule extends base_1$b.Base {
11304
11321
  /**
11305
11322
  * Asynchronously returns an External Application object that represents an external application.
@@ -11361,12 +11378,12 @@ Factory$5.ExternalApplicationModule = ExternalApplicationModule;
11361
11378
  /**
11362
11379
  * Entry points for the OpenFin `ExternalApplication` API.
11363
11380
  *
11364
- * In the previous version of the API documentation, both static methods involving `ExternalApplication` and instance properties of the
11365
- * `ExternalApplication` type itself were documented on the same page. These are separate code entities, and are now documented separately:
11366
- *
11367
11381
  * * {@link ExternalApplicationModule} contains static methods relating to the `ExternalApplication` type, accessible through `fin.ExternalApplication`.
11368
11382
  * * {@link ExternalApplication} describes an instance of an OpenFin ExternalApplication, e.g. as returned by `fin.ExternalApplication.getCurrent`.
11369
11383
  *
11384
+ * 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),
11385
+ * both of these were documented on the same page.
11386
+ *
11370
11387
  * @packageDocumentation
11371
11388
  */
11372
11389
  __exportStar(Factory$5, exports);
@@ -11527,6 +11544,9 @@ Factory$4._FrameModule = void 0;
11527
11544
  const base_1$9 = base;
11528
11545
  const validate_1$2 = validate;
11529
11546
  const Instance_1$3 = Instance$3;
11547
+ /**
11548
+ * Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
11549
+ */
11530
11550
  class _FrameModule extends base_1$9.Base {
11531
11551
  /**
11532
11552
  * Asynchronously returns a reference to the specified frame. The frame does not have to exist
@@ -11609,12 +11629,12 @@ Factory$4._FrameModule = _FrameModule;
11609
11629
  /**
11610
11630
  * Entry points for the OpenFin `Frame` API.
11611
11631
  *
11612
- * In the previous version of the API documentation, both static methods involving `Frame` and instance properties of the
11613
- * `Frame` type itself were documented on the same page. These are separate code entities, and are now documented separately:
11614
- *
11615
11632
  * * {@link _FrameModule} contains static methods relating to the `Frame` type, accessible through `fin.Frame`.
11616
11633
  * * {@link _Frame} describes an instance of an OpenFin Frame, e.g. as returned by `fin.Frame.getCurrent`.
11617
11634
  *
11635
+ * 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),
11636
+ * both of these were documented on the same page.
11637
+ *
11618
11638
  * Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
11619
11639
  *
11620
11640
  * @packageDocumentation
@@ -12655,6 +12675,138 @@ const base_1$6 = base;
12655
12675
  const common_utils_1 = commonUtils;
12656
12676
  const layout_entities_1 = layoutEntities;
12657
12677
  const layout_constants_1 = layout_constants;
12678
+ /**
12679
+ *
12680
+ * Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
12681
+ * enables the initialization and manipulation of a window's Layout. A Layout will
12682
+ * emit events locally on the DOM element representing the layout-container.
12683
+ *
12684
+ *
12685
+ * ### Layout.DOMEvents
12686
+ *
12687
+ * When a Layout is created, it emits events onto the DOM element representing the Layout container.
12688
+ * This Layout container is the DOM element referenced by containerId in {@link Layout.LayoutModule#init Layout.init}.
12689
+ * 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).
12690
+ * The events are emitted synchronously and only in the process where the Layout exists.
12691
+ * Any values returned by the called listeners are ignored and will be discarded.
12692
+ * If the target DOM element is destroyed, any events that have been set up on that element will be destroyed.
12693
+ *
12694
+ * @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
12695
+ *
12696
+ * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
12697
+ * Adds a listener to the end of the listeners array for the specified event.
12698
+ * @example
12699
+ * ```js
12700
+ * const myLayoutContainer = document.getElementById('layout-container');
12701
+ *
12702
+ * myLayoutContainer.addEventListener('tab-created', function(event) {
12703
+ * const { tabSelector } = event.detail;
12704
+ * const tabElement = document.getElementById(tabSelector);
12705
+ * const existingColor = tabElement.style.backgroundColor;
12706
+ * tabElement.style.backgroundColor = "red";
12707
+ * setTimeout(() => {
12708
+ * tabElement.style.backgroundColor = existingColor;
12709
+ * }, 2000);
12710
+ * });
12711
+ * ```
12712
+ *
12713
+ * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
12714
+ * Adds a listener to the end of the listeners array for the specified event.
12715
+ * @example
12716
+ * ```js
12717
+ * const myLayoutContainer = document.getElementById('layout-container');
12718
+ *
12719
+ * const listener = function(event) {
12720
+ * console.log(event.detail);
12721
+ * console.log('container-created event fired once, removing listener');
12722
+ * myLayoutContainer.removeEventListener('container-created', listener);
12723
+ * };
12724
+ *
12725
+ * myLayoutContainer.addEventListener('container-created', listener);
12726
+ * ```
12727
+ *
12728
+ * ### Supported event types are:
12729
+ *
12730
+ * * tab-created
12731
+ * * container-created
12732
+ * * layout-state-changed
12733
+ * * tab-closed
12734
+ * * tab-dropped
12735
+ *
12736
+ * ### Layout DOM Node Events
12737
+ *
12738
+ * #### tab-created
12739
+ * 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.
12740
+ * ```js
12741
+ * // The response has the following shape in event.detail:
12742
+ * {
12743
+ * containerSelector: "container-component_A",
12744
+ * name: "component_A",
12745
+ * tabSelector: "tab-component_A",
12746
+ * topic: "openfin-DOM-event",
12747
+ * type: "tab-created",
12748
+ * uuid: "OpenFin POC"
12749
+ * }
12750
+ * ```
12751
+ *
12752
+ * #### container-created
12753
+ * 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.
12754
+ * ```js
12755
+ * // The response has the following shape in event.detail:
12756
+ * {
12757
+ * containerSelector: "container-component_A",
12758
+ * name: "component_A",
12759
+ * tabSelector: "tab-component_A",
12760
+ * topic: "openfin-DOM-event",
12761
+ * type: "container-created",
12762
+ * uuid: "OpenFin POC"
12763
+ * }
12764
+ * ```
12765
+ *
12766
+ * ### layout-state-changed
12767
+ * 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.
12768
+ * ```js
12769
+ * // The response has the following shape in event.detail
12770
+ * {
12771
+ * containerSelector: "container-component_A",
12772
+ * name: "component_A",
12773
+ * tabSelector: "tab-component_A",
12774
+ * topic: "openfin-DOM-event",
12775
+ * type: "layout-state-changed",
12776
+ * uuid: "OpenFin POC"
12777
+ * }
12778
+ * ```
12779
+ *
12780
+ * #### tab-closed
12781
+ * Generated when a tab is closed.
12782
+ * ```js
12783
+ * // The response has the following shape in event.detail:
12784
+ * {
12785
+ * containerSelector: "container-component_A",
12786
+ * name: "component_A",
12787
+ * tabSelector: "tab-component_A",
12788
+ * topic: "openfin-DOM-event",
12789
+ * type: "tab-closed",
12790
+ * uuid: "OpenFin POC",
12791
+ * url: "http://openfin.co" // The url of the view that was closed.
12792
+ * }
12793
+ * ```
12794
+ *
12795
+ * #### tab-dropped
12796
+ * Generated when a tab is dropped.
12797
+ * ```js
12798
+ * // The response has the following shape in event.detail:
12799
+ * {
12800
+ * containerSelector: "container-component_A",
12801
+ * name: "component_A",
12802
+ * tabSelector: "tab-component_A",
12803
+ * topic: "openfin-DOM-event",
12804
+ * type: "tab-dropped",
12805
+ * uuid: "OpenFin POC",
12806
+ * url: "http://openfin.co" // The url of the view linked to the dropped tab.
12807
+ * }
12808
+ * ```
12809
+ */
12658
12810
  class Layout extends base_1$6.Base {
12659
12811
  /**
12660
12812
  * @internal
@@ -12882,6 +13034,9 @@ Factory$2.LayoutModule = void 0;
12882
13034
  /* eslint-disable no-undef, import/prefer-default-export */
12883
13035
  const base_1$5 = base;
12884
13036
  const Instance_1$2 = Instance$1;
13037
+ /**
13038
+ * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
13039
+ */
12885
13040
  class LayoutModule extends base_1$5.Base {
12886
13041
  constructor() {
12887
13042
  super(...arguments);
@@ -13037,139 +13192,16 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap();
13037
13192
 
13038
13193
  (function (exports) {
13039
13194
  /**
13040
- * Entry point for the OpenFin Layout namespace.
13041
- *
13042
- * Because TypeDoc does not currently support multiple modules with the same name, the module alias "LayoutModule" is used for
13043
- * the module containing static members of the `Layout` namespace (available under `fin.Platform.Layout`), while `Layout` documents
13044
- * instances of the OpenFin `Layout` class.
13045
- *
13046
- * @packageDocumentation
13047
- *
13048
- *
13049
- * ### Layout.DOMEvents
13050
- *
13051
- * When a Layout is created, it emits events onto the DOM element representing the Layout container.
13052
- * This Layout container is the DOM element referenced by containerId in {@link Layout.LayoutModule#init Layout.init}.
13053
- * 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).
13054
- * The events are emitted synchronously and only in the process where the Layout exists.
13055
- * Any values returned by the called listeners are ignored and will be discarded.
13056
- * If the target DOM element is destroyed, any events that have been set up on that element will be destroyed.
13057
- *
13058
- * @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
13059
- *
13060
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
13061
- * Adds a listener to the end of the listeners array for the specified event.
13062
- * @example
13063
- * ```js
13064
- * const myLayoutContainer = document.getElementById('layout-container');
13065
- *
13066
- * myLayoutContainer.addEventListener('tab-created', function(event) {
13067
- * const { tabSelector } = event.detail;
13068
- * const tabElement = document.getElementById(tabSelector);
13069
- * const existingColor = tabElement.style.backgroundColor;
13070
- * tabElement.style.backgroundColor = "red";
13071
- * setTimeout(() => {
13072
- * tabElement.style.backgroundColor = existingColor;
13073
- * }, 2000);
13074
- * });
13075
- * ```
13076
- *
13077
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
13078
- * Adds a listener to the end of the listeners array for the specified event.
13079
- * @example
13080
- * ```js
13081
- * const myLayoutContainer = document.getElementById('layout-container');
13082
- *
13083
- * const listener = function(event) {
13084
- * console.log(event.detail);
13085
- * console.log('container-created event fired once, removing listener');
13086
- * myLayoutContainer.removeEventListener('container-created', listener);
13087
- * };
13088
- *
13089
- * myLayoutContainer.addEventListener('container-created', listener);
13090
- * ```
13091
- *
13092
- * ### Supported event types are:
13093
- *
13094
- * * tab-created
13095
- * * container-created
13096
- * * layout-state-changed
13097
- * * tab-closed
13098
- * * tab-dropped
13099
- *
13100
- * ### Layout DOM Node Events
13101
- *
13102
- * #### tab-created
13103
- * 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.
13104
- * ```js
13105
- * // The response has the following shape in event.detail:
13106
- * {
13107
- * containerSelector: "container-component_A",
13108
- * name: "component_A",
13109
- * tabSelector: "tab-component_A",
13110
- * topic: "openfin-DOM-event",
13111
- * type: "tab-created",
13112
- * uuid: "OpenFin POC"
13113
- * }
13114
- * ```
13195
+ * Entry point for the OpenFin `Layout` namespace.
13115
13196
  *
13116
- * #### container-created
13117
- * 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.
13118
- * ```js
13119
- * // The response has the following shape in event.detail:
13120
- * {
13121
- * containerSelector: "container-component_A",
13122
- * name: "component_A",
13123
- * tabSelector: "tab-component_A",
13124
- * topic: "openfin-DOM-event",
13125
- * type: "container-created",
13126
- * uuid: "OpenFin POC"
13127
- * }
13128
- * ```
13197
+ * * {@link LayoutModule} contains static methods relating to the `Layout` type, accessible through `fin.Platform.Layout`.
13198
+ * * {@link Layout} describes an instance of an OpenFin Layout, e.g. as returned by `fin.Platform.Layout.getCurrent`.
13129
13199
  *
13130
- * ### layout-state-changed
13131
- * 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.
13132
- * ```js
13133
- * // The response has the following shape in event.detail
13134
- * {
13135
- * containerSelector: "container-component_A",
13136
- * name: "component_A",
13137
- * tabSelector: "tab-component_A",
13138
- * topic: "openfin-DOM-event",
13139
- * type: "layout-state-changed",
13140
- * uuid: "OpenFin POC"
13141
- * }
13142
- * ```
13200
+ * 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),
13201
+ * both of these were documented on the same page.
13143
13202
  *
13144
- * #### tab-closed
13145
- * Generated when a tab is closed.
13146
- * ```js
13147
- * // The response has the following shape in event.detail:
13148
- * {
13149
- * containerSelector: "container-component_A",
13150
- * name: "component_A",
13151
- * tabSelector: "tab-component_A",
13152
- * topic: "openfin-DOM-event",
13153
- * type: "tab-closed",
13154
- * uuid: "OpenFin POC",
13155
- * url: "http://openfin.co" // The url of the view that was closed.
13156
- * }
13157
- * ```
13203
+ * @packageDocumentation
13158
13204
  *
13159
- * #### tab-dropped
13160
- * Generated when a tab is dropped.
13161
- * ```js
13162
- * // The response has the following shape in event.detail:
13163
- * {
13164
- * containerSelector: "container-component_A",
13165
- * name: "component_A",
13166
- * tabSelector: "tab-component_A",
13167
- * topic: "openfin-DOM-event",
13168
- * type: "tab-dropped",
13169
- * uuid: "OpenFin POC",
13170
- * url: "http://openfin.co" // The url of the view linked to the dropped tab.
13171
- * }
13172
- * ```
13173
13205
  */
13174
13206
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
13175
13207
  if (k2 === undefined) k2 = k;
@@ -13195,6 +13227,9 @@ Factory$3.PlatformModule = void 0;
13195
13227
  const base_1$4 = base;
13196
13228
  const Instance_1$1 = Instance$2;
13197
13229
  const index_1$1 = layout;
13230
+ /**
13231
+ * Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
13232
+ */
13198
13233
  class PlatformModule extends base_1$4.Base {
13199
13234
  /**
13200
13235
  * @internal
@@ -13440,12 +13475,12 @@ Factory$3.PlatformModule = PlatformModule;
13440
13475
  /**
13441
13476
  * Entry points for the OpenFin `Platform` API.
13442
13477
  *
13443
- * In the previous version of the API documentation, both static methods involving `Platform` and instance properties of the
13444
- * `Platform` type itself were documented on the same page. These are separate code entities, and are now documented separately:
13445
- *
13446
13478
  * * {@link PlatformModule} contains static methods relating to the `Platform` type, accessible through `fin.Platform`.
13447
13479
  * * {@link Platform} describes an instance of an OpenFin Platform, e.g. as returned by `fin.Platform.getCurrent`.
13448
13480
  *
13481
+ * 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),
13482
+ * both of these were documented on the same page.
13483
+ *
13449
13484
  * @packageDocumentation
13450
13485
  */
13451
13486
  __exportStar(Factory$3, exports);
@@ -14696,7 +14731,8 @@ function requireInteropBroker () {
14696
14731
  * ```
14697
14732
  */
14698
14733
  // eslint-disable-next-line class-methods-use-this
14699
- async handleFiredIntent(intent, clientIdentity) {
14734
+ async handleFiredIntent(intent, clientIdentity // TODO(CORE-811): remove inline intersected type
14735
+ ) {
14700
14736
  const warning = (0, utils_1.generateOverrideWarning)('fdc3.raiseIntent', 'InteropBroker.handleFiredIntent', clientIdentity, 'interopClient.fireIntent');
14701
14737
  console.warn(warning);
14702
14738
  throw new Error(utils_1.BROKER_ERRORS.fireIntent);
@@ -14763,7 +14799,7 @@ function requireInteropBroker () {
14763
14799
  * More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
14764
14800
  *
14765
14801
  * @param options
14766
- * @param clientIdentity Identity of the Client making the request.
14802
+ * @param clientIdentity Identity of the Client making the request.
14767
14803
  *
14768
14804
  * @example
14769
14805
  * ```js
@@ -14780,7 +14816,8 @@ function requireInteropBroker () {
14780
14816
  * ```
14781
14817
  */
14782
14818
  // eslint-disable-next-line class-methods-use-this
14783
- async handleInfoForIntent(options, clientIdentity) {
14819
+ async handleInfoForIntent(options, clientIdentity // TODO(CORE-811): remove inline intersected type
14820
+ ) {
14784
14821
  const warning = (0, utils_1.generateOverrideWarning)('fdc3.findIntent', 'InteropBroker.handleInfoForIntent', clientIdentity, 'interopClient.getInfoForIntent');
14785
14822
  console.warn(warning);
14786
14823
  throw new Error(utils_1.BROKER_ERRORS.getInfoForIntent);
@@ -14826,7 +14863,8 @@ function requireInteropBroker () {
14826
14863
  * ```
14827
14864
  */
14828
14865
  // eslint-disable-next-line class-methods-use-this
14829
- async handleInfoForIntentsByContext(context, clientIdentity) {
14866
+ async handleInfoForIntentsByContext(context, clientIdentity // TODO(CORE-811): remove inline intersected type
14867
+ ) {
14830
14868
  const warning = (0, utils_1.generateOverrideWarning)('fdc3.findIntentsByContext', 'InteropBroker.handleInfoForIntentsByContext', clientIdentity, 'interopClient.getInfoForIntentsByContext');
14831
14869
  console.warn(warning);
14832
14870
  throw new Error(utils_1.BROKER_ERRORS.getInfoForIntentsByContext);
@@ -14852,7 +14890,7 @@ function requireInteropBroker () {
14852
14890
  * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
14853
14891
  *
14854
14892
  * @param contextForIntent Data passed between entities and applications.
14855
- * @param clientIdentity Identity of the Client making the request.
14893
+ * @param clientIdentity Identity of the Client making the request.
14856
14894
  *
14857
14895
  * @example
14858
14896
  * ```js
@@ -14913,7 +14951,7 @@ function requireInteropBroker () {
14913
14951
  /**
14914
14952
  * Responsible for resolving the fdc3.findInstances call.
14915
14953
  * Must be overridden
14916
- * @param app AppIdentifier that was passed to fdc3.findInstances
14954
+ * @param app AppIdentifier that was passed to fdc3.findInstances
14917
14955
  * @param clientIdentity Identity of the Client making the request.
14918
14956
  */
14919
14957
  // eslint-disable-next-line class-methods-use-this
@@ -14948,7 +14986,7 @@ function requireInteropBroker () {
14948
14986
  * fin.Platform.init({
14949
14987
  * interopOverride: async (InteropBroker) => {
14950
14988
  * class Override extends InteropBroker {
14951
- * async invokeContextHandler(options, clientIdentity) {
14989
+ * async invokeContextHandler(clientIdentity, handlerId, context) {
14952
14990
  * return super.invokeContextHandler(clientIdentity, handlerId, {
14953
14991
  * ...context,
14954
14992
  * contextMetadata: {
@@ -14988,7 +15026,7 @@ function requireInteropBroker () {
14988
15026
  * fin.Platform.init({
14989
15027
  * interopOverride: async (InteropBroker) => {
14990
15028
  * class Override extends InteropBroker {
14991
- * async invokeIntentHandler(options, clientIdentity) {
15029
+ * async invokeIntentHandler(clientIdentity, handlerId, context) {
14992
15030
  * const { context } = intent;
14993
15031
  * return super.invokeIntentHandler(clientIdentity, handlerId, {
14994
15032
  * ...intent,
@@ -15327,7 +15365,8 @@ function requireInteropBroker () {
15327
15365
  }
15328
15366
  // Setup Channel Connection Logic
15329
15367
  wireChannel(channel) {
15330
- channel.onConnection(async (clientIdentity, payload) => {
15368
+ channel.onConnection(async (clientIdentity, // TODO(CORE-811): remove inline intersected type
15369
+ payload) => {
15331
15370
  if (!(await this.isConnectionAuthorized(clientIdentity, payload))) {
15332
15371
  throw new Error(`Connection not authorized for ${clientIdentity.uuid}, ${clientIdentity.name}`);
15333
15372
  }
@@ -16207,39 +16246,46 @@ class InteropClient extends base_1$2.Base {
16207
16246
  InteropClient$1.InteropClient = InteropClient;
16208
16247
  _InteropClient_clientPromise = new WeakMap(), _InteropClient_sessionContextGroups = new WeakMap();
16209
16248
 
16210
- var overrideCheck$1 = {};
16249
+ var overrideCheck = {};
16211
16250
 
16212
- Object.defineProperty(overrideCheck$1, "__esModule", { value: true });
16213
- overrideCheck$1.overrideCheck = overrideCheck$1.getDefaultViewFdc3VersionFromAppInfo = void 0;
16214
- const InteropBroker_1 = requireInteropBroker();
16215
- function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
16216
- var _a, _b, _c, _d;
16217
- 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;
16218
- return ['1.2', '2.0'].includes(setVersion !== null && setVersion !== void 0 ? setVersion : '') ? setVersion : undefined;
16219
- }
16220
- overrideCheck$1.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
16221
- // TODO: Unit test this
16222
- function overrideCheck(overriddenBroker, fdc3InteropApi) {
16223
- if (fdc3InteropApi && fdc3InteropApi === '2.0') {
16224
- const mustOverrideAPIs = [
16225
- 'fdc3HandleFindInstances',
16226
- 'handleInfoForIntent',
16227
- 'handleInfoForIntentsByContext',
16228
- 'fdc3HandleGetAppMetadata',
16229
- 'fdc3HandleGetInfo',
16230
- 'fdc3HandleOpen',
16231
- 'handleFiredIntent',
16232
- 'handleFiredIntentForContext'
16233
- ];
16234
- const notOverridden = mustOverrideAPIs.filter((api) => {
16235
- return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
16236
- });
16237
- if (notOverridden.length > 0) {
16238
- 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')}`);
16239
- }
16240
- }
16251
+ var hasRequiredOverrideCheck;
16252
+
16253
+ function requireOverrideCheck () {
16254
+ if (hasRequiredOverrideCheck) return overrideCheck;
16255
+ hasRequiredOverrideCheck = 1;
16256
+ Object.defineProperty(overrideCheck, "__esModule", { value: true });
16257
+ overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
16258
+ const InteropBroker_1 = requireInteropBroker();
16259
+ function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
16260
+ var _a, _b, _c, _d;
16261
+ 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;
16262
+ return ['1.2', '2.0'].includes(setVersion !== null && setVersion !== void 0 ? setVersion : '') ? setVersion : undefined;
16263
+ }
16264
+ overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
16265
+ // TODO: Unit test this
16266
+ function overrideCheck$1(overriddenBroker, fdc3InteropApi) {
16267
+ if (fdc3InteropApi && fdc3InteropApi === '2.0') {
16268
+ const mustOverrideAPIs = [
16269
+ 'fdc3HandleFindInstances',
16270
+ 'handleInfoForIntent',
16271
+ 'handleInfoForIntentsByContext',
16272
+ 'fdc3HandleGetAppMetadata',
16273
+ 'fdc3HandleGetInfo',
16274
+ 'fdc3HandleOpen',
16275
+ 'handleFiredIntent',
16276
+ 'handleFiredIntentForContext'
16277
+ ];
16278
+ const notOverridden = mustOverrideAPIs.filter((api) => {
16279
+ return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
16280
+ });
16281
+ if (notOverridden.length > 0) {
16282
+ 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')}`);
16283
+ }
16284
+ }
16285
+ }
16286
+ overrideCheck.overrideCheck = overrideCheck$1;
16287
+ return overrideCheck;
16241
16288
  }
16242
- overrideCheck$1.overrideCheck = overrideCheck;
16243
16289
 
16244
16290
  var hasRequiredFactory;
16245
16291
 
@@ -16253,7 +16299,7 @@ function requireFactory () {
16253
16299
  const base_1 = base;
16254
16300
  const InteropBroker_1 = requireInteropBroker();
16255
16301
  const InteropClient_1 = InteropClient$1;
16256
- const overrideCheck_1 = overrideCheck$1;
16302
+ const overrideCheck_1 = requireOverrideCheck();
16257
16303
  const common_utils_1 = commonUtils;
16258
16304
  const defaultOverride = (Class) => new Class();
16259
16305
  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.';
@@ -16562,6 +16608,9 @@ Factory.SnapshotSourceModule = void 0;
16562
16608
  const base_1 = base;
16563
16609
  const Instance_1 = Instance;
16564
16610
  const utils_1 = utils;
16611
+ /**
16612
+ * Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
16613
+ */
16565
16614
  class SnapshotSourceModule extends base_1.Base {
16566
16615
  /**
16567
16616
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
@@ -16637,11 +16686,11 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
16637
16686
  /**
16638
16687
  * Entry points for the OpenFin `SnapshotSource` API.
16639
16688
  *
16640
- * In the previous version of the API documentation, both static methods involving `SnapshotSource` and instance properties of the
16641
- * `SnapshotSource` type itself were documented on the same page. These are separate code entities, and are now documented separately:
16642
- *
16643
16689
  * * {@link SnapshotSourceModule} contains static methods relating to the `SnapshotSource` type, accessible through `fin.SnapshotSource`.
16644
- * * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.getCurrent`.
16690
+ * * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.wrap`.
16691
+ *
16692
+ * 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),
16693
+ * both of these were documented on the same page.
16645
16694
  *
16646
16695
  * @packageDocumentation
16647
16696
  */