@openfin/core 40.82.21 → 40.82.23

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.
@@ -2938,6 +2938,18 @@ declare type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
2938
2938
  childOptions: OpenFin_2.WindowOptions;
2939
2939
  };
2940
2940
 
2941
+ /**
2942
+ * Control behavior for Chromium policies
2943
+ *
2944
+ * @interface
2945
+ */
2946
+ declare type ChromiumPolicies = {
2947
+ /**
2948
+ * Disable AutofillAddressEnabled policy for a Window or View.
2949
+ */
2950
+ AutofillAddressEnabled?: PolicyOptions;
2951
+ };
2952
+
2941
2953
  declare interface ClassicProtocolOffer extends ProtocolPacketBase {
2942
2954
  type: 'classic';
2943
2955
  }
@@ -7681,6 +7693,29 @@ declare class Layout extends Base {
7681
7693
  * ```
7682
7694
  */
7683
7695
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
7696
+ /**
7697
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
7698
+ *
7699
+ * @param viewOptions - The options for creating the view.
7700
+ * @param options - Optional parameters for adding the view.
7701
+ * @param options.location - The location where the view should be added.
7702
+ * @param options.targetView - The target view to which the new view should be added.
7703
+ * @returns A promise that resolves to an object containing the identity of the added view.
7704
+ */
7705
+ addView(viewOptions: OpenFin_2.PlatformViewCreationOptions, { location, targetView }?: {
7706
+ location?: OpenFin_2.CreateViewTarget['location'];
7707
+ targetView?: OpenFin_2.Identity;
7708
+ }): Promise<{
7709
+ identity: OpenFin_2.Identity;
7710
+ }>;
7711
+ /**
7712
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
7713
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
7714
+ *
7715
+ * @param viewIdentity - The identity of the view to close.
7716
+ * @returns A promise that resolves when the view is closed.
7717
+ */
7718
+ closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
7684
7719
  }
7685
7720
 
7686
7721
  /**
@@ -7693,7 +7728,7 @@ declare type LayoutColumn = LayoutItemConfig & {
7693
7728
  /**
7694
7729
  * @interface
7695
7730
  */
7696
- declare type LayoutComponent = LayoutItemConfig & {
7731
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
7697
7732
  /**
7698
7733
  * Only a component type will have this property and it should be set to view.
7699
7734
  */
@@ -7702,6 +7737,7 @@ declare type LayoutComponent = LayoutItemConfig & {
7702
7737
  * Only a component type will have this property and it represents the view options of a given component.
7703
7738
  */
7704
7739
  componentState?: Partial<ViewCreationOptions>;
7740
+ type: 'component';
7705
7741
  };
7706
7742
 
7707
7743
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -7893,7 +7929,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
7893
7929
  /**
7894
7930
  * @experimental
7895
7931
  */
7896
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
7932
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
7897
7933
  /**
7898
7934
  * @experimental
7899
7935
  */
@@ -8644,6 +8680,10 @@ declare type MutableViewOptions = {
8644
8680
  * @defaultValue 'enabled'
8645
8681
  */
8646
8682
  throttling: ViewThrottling;
8683
+ /**
8684
+ * {@inheritDoc ChromiumPolicies}
8685
+ */
8686
+ chromiumPolicies: ChromiumPolicies;
8647
8687
  };
8648
8688
 
8649
8689
  /**
@@ -8901,6 +8941,10 @@ declare type MutableWindowOptions = {
8901
8941
  * @remarks If `throttling` option is present, the `backgroundThrottling` option is completely ignored for windows.
8902
8942
  */
8903
8943
  throttling: WindowThrottling;
8944
+ /**
8945
+ * {@inheritDoc ChromiumPolicies}
8946
+ */
8947
+ chromiumPolicies: ChromiumPolicies;
8904
8948
  };
8905
8949
 
8906
8950
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9113,6 +9157,8 @@ declare namespace OpenFin_2 {
9113
9157
  AutoplayPolicyOptions,
9114
9158
  ConstWindowOptions,
9115
9159
  InheritableOptions,
9160
+ PolicyOptions,
9161
+ ChromiumPolicies,
9116
9162
  MutableWindowOptions,
9117
9163
  WorkspacePlatformOptions,
9118
9164
  WebRequestHeader,
@@ -9597,6 +9643,10 @@ declare type PerDomainSettings = {
9597
9643
  * {@link ContentRedirect} in {@link WindowOptions} and {@link ViewOptions} will be **ignored**.
9598
9644
  */
9599
9645
  content?: ContentPermission;
9646
+ /**
9647
+ * {@inheritdoc ChromiumPolicies}
9648
+ */
9649
+ chromiumPolicies?: ChromiumPolicies;
9600
9650
  };
9601
9651
 
9602
9652
  /**
@@ -11055,6 +11105,12 @@ declare type PointTopLeft = {
11055
11105
  left: number;
11056
11106
  };
11057
11107
 
11108
+ /**
11109
+ * When set to `disable`, disables the policy
11110
+ * When set to `defer-to-group-policy`, respects Group Policy settings
11111
+ */
11112
+ declare type PolicyOptions = 'disable' | 'defer-to-group-policy';
11113
+
11058
11114
  declare type PopupBaseBehavior = 'close' | 'hide';
11059
11115
 
11060
11116
  declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
@@ -2938,6 +2938,18 @@ declare type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
2938
2938
  childOptions: OpenFin_2.WindowOptions;
2939
2939
  };
2940
2940
 
2941
+ /**
2942
+ * Control behavior for Chromium policies
2943
+ *
2944
+ * @interface
2945
+ */
2946
+ declare type ChromiumPolicies = {
2947
+ /**
2948
+ * Disable AutofillAddressEnabled policy for a Window or View.
2949
+ */
2950
+ AutofillAddressEnabled?: PolicyOptions;
2951
+ };
2952
+
2941
2953
  declare interface ClassicProtocolOffer extends ProtocolPacketBase {
2942
2954
  type: 'classic';
2943
2955
  }
@@ -7681,6 +7693,29 @@ declare class Layout extends Base {
7681
7693
  * ```
7682
7694
  */
7683
7695
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
7696
+ /**
7697
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
7698
+ *
7699
+ * @param viewOptions - The options for creating the view.
7700
+ * @param options - Optional parameters for adding the view.
7701
+ * @param options.location - The location where the view should be added.
7702
+ * @param options.targetView - The target view to which the new view should be added.
7703
+ * @returns A promise that resolves to an object containing the identity of the added view.
7704
+ */
7705
+ addView(viewOptions: OpenFin_2.PlatformViewCreationOptions, { location, targetView }?: {
7706
+ location?: OpenFin_2.CreateViewTarget['location'];
7707
+ targetView?: OpenFin_2.Identity;
7708
+ }): Promise<{
7709
+ identity: OpenFin_2.Identity;
7710
+ }>;
7711
+ /**
7712
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
7713
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
7714
+ *
7715
+ * @param viewIdentity - The identity of the view to close.
7716
+ * @returns A promise that resolves when the view is closed.
7717
+ */
7718
+ closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
7684
7719
  }
7685
7720
 
7686
7721
  /**
@@ -7693,7 +7728,7 @@ declare type LayoutColumn = LayoutItemConfig & {
7693
7728
  /**
7694
7729
  * @interface
7695
7730
  */
7696
- declare type LayoutComponent = LayoutItemConfig & {
7731
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
7697
7732
  /**
7698
7733
  * Only a component type will have this property and it should be set to view.
7699
7734
  */
@@ -7702,6 +7737,7 @@ declare type LayoutComponent = LayoutItemConfig & {
7702
7737
  * Only a component type will have this property and it represents the view options of a given component.
7703
7738
  */
7704
7739
  componentState?: Partial<ViewCreationOptions>;
7740
+ type: 'component';
7705
7741
  };
7706
7742
 
7707
7743
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -7893,7 +7929,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
7893
7929
  /**
7894
7930
  * @experimental
7895
7931
  */
7896
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
7932
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
7897
7933
  /**
7898
7934
  * @experimental
7899
7935
  */
@@ -8644,6 +8680,10 @@ declare type MutableViewOptions = {
8644
8680
  * @defaultValue 'enabled'
8645
8681
  */
8646
8682
  throttling: ViewThrottling;
8683
+ /**
8684
+ * {@inheritDoc ChromiumPolicies}
8685
+ */
8686
+ chromiumPolicies: ChromiumPolicies;
8647
8687
  };
8648
8688
 
8649
8689
  /**
@@ -8901,6 +8941,10 @@ declare type MutableWindowOptions = {
8901
8941
  * @remarks If `throttling` option is present, the `backgroundThrottling` option is completely ignored for windows.
8902
8942
  */
8903
8943
  throttling: WindowThrottling;
8944
+ /**
8945
+ * {@inheritDoc ChromiumPolicies}
8946
+ */
8947
+ chromiumPolicies: ChromiumPolicies;
8904
8948
  };
8905
8949
 
8906
8950
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9113,6 +9157,8 @@ declare namespace OpenFin_2 {
9113
9157
  AutoplayPolicyOptions,
9114
9158
  ConstWindowOptions,
9115
9159
  InheritableOptions,
9160
+ PolicyOptions,
9161
+ ChromiumPolicies,
9116
9162
  MutableWindowOptions,
9117
9163
  WorkspacePlatformOptions,
9118
9164
  WebRequestHeader,
@@ -9597,6 +9643,10 @@ declare type PerDomainSettings = {
9597
9643
  * {@link ContentRedirect} in {@link WindowOptions} and {@link ViewOptions} will be **ignored**.
9598
9644
  */
9599
9645
  content?: ContentPermission;
9646
+ /**
9647
+ * {@inheritdoc ChromiumPolicies}
9648
+ */
9649
+ chromiumPolicies?: ChromiumPolicies;
9600
9650
  };
9601
9651
 
9602
9652
  /**
@@ -11055,6 +11105,12 @@ declare type PointTopLeft = {
11055
11105
  left: number;
11056
11106
  };
11057
11107
 
11108
+ /**
11109
+ * When set to `disable`, disables the policy
11110
+ * When set to `defer-to-group-policy`, respects Group Policy settings
11111
+ */
11112
+ declare type PolicyOptions = 'disable' | 'defer-to-group-policy';
11113
+
11058
11114
  declare type PopupBaseBehavior = 'close' | 'hide';
11059
11115
 
11060
11116
  declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
@@ -2938,6 +2938,18 @@ declare type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
2938
2938
  childOptions: OpenFin_2.WindowOptions;
2939
2939
  };
2940
2940
 
2941
+ /**
2942
+ * Control behavior for Chromium policies
2943
+ *
2944
+ * @interface
2945
+ */
2946
+ declare type ChromiumPolicies = {
2947
+ /**
2948
+ * Disable AutofillAddressEnabled policy for a Window or View.
2949
+ */
2950
+ AutofillAddressEnabled?: PolicyOptions;
2951
+ };
2952
+
2941
2953
  declare interface ClassicProtocolOffer extends ProtocolPacketBase {
2942
2954
  type: 'classic';
2943
2955
  }
@@ -7681,6 +7693,29 @@ declare class Layout extends Base {
7681
7693
  * ```
7682
7694
  */
7683
7695
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
7696
+ /**
7697
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
7698
+ *
7699
+ * @param viewOptions - The options for creating the view.
7700
+ * @param options - Optional parameters for adding the view.
7701
+ * @param options.location - The location where the view should be added.
7702
+ * @param options.targetView - The target view to which the new view should be added.
7703
+ * @returns A promise that resolves to an object containing the identity of the added view.
7704
+ */
7705
+ addView(viewOptions: OpenFin_2.PlatformViewCreationOptions, { location, targetView }?: {
7706
+ location?: OpenFin_2.CreateViewTarget['location'];
7707
+ targetView?: OpenFin_2.Identity;
7708
+ }): Promise<{
7709
+ identity: OpenFin_2.Identity;
7710
+ }>;
7711
+ /**
7712
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
7713
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
7714
+ *
7715
+ * @param viewIdentity - The identity of the view to close.
7716
+ * @returns A promise that resolves when the view is closed.
7717
+ */
7718
+ closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
7684
7719
  }
7685
7720
 
7686
7721
  /**
@@ -7693,7 +7728,7 @@ declare type LayoutColumn = LayoutItemConfig & {
7693
7728
  /**
7694
7729
  * @interface
7695
7730
  */
7696
- declare type LayoutComponent = LayoutItemConfig & {
7731
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
7697
7732
  /**
7698
7733
  * Only a component type will have this property and it should be set to view.
7699
7734
  */
@@ -7702,6 +7737,7 @@ declare type LayoutComponent = LayoutItemConfig & {
7702
7737
  * Only a component type will have this property and it represents the view options of a given component.
7703
7738
  */
7704
7739
  componentState?: Partial<ViewCreationOptions>;
7740
+ type: 'component';
7705
7741
  };
7706
7742
 
7707
7743
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -7893,7 +7929,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
7893
7929
  /**
7894
7930
  * @experimental
7895
7931
  */
7896
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
7932
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
7897
7933
  /**
7898
7934
  * @experimental
7899
7935
  */
@@ -8644,6 +8680,10 @@ declare type MutableViewOptions = {
8644
8680
  * @defaultValue 'enabled'
8645
8681
  */
8646
8682
  throttling: ViewThrottling;
8683
+ /**
8684
+ * {@inheritDoc ChromiumPolicies}
8685
+ */
8686
+ chromiumPolicies: ChromiumPolicies;
8647
8687
  };
8648
8688
 
8649
8689
  /**
@@ -8901,6 +8941,10 @@ declare type MutableWindowOptions = {
8901
8941
  * @remarks If `throttling` option is present, the `backgroundThrottling` option is completely ignored for windows.
8902
8942
  */
8903
8943
  throttling: WindowThrottling;
8944
+ /**
8945
+ * {@inheritDoc ChromiumPolicies}
8946
+ */
8947
+ chromiumPolicies: ChromiumPolicies;
8904
8948
  };
8905
8949
 
8906
8950
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9113,6 +9157,8 @@ declare namespace OpenFin_2 {
9113
9157
  AutoplayPolicyOptions,
9114
9158
  ConstWindowOptions,
9115
9159
  InheritableOptions,
9160
+ PolicyOptions,
9161
+ ChromiumPolicies,
9116
9162
  MutableWindowOptions,
9117
9163
  WorkspacePlatformOptions,
9118
9164
  WebRequestHeader,
@@ -9597,6 +9643,10 @@ declare type PerDomainSettings = {
9597
9643
  * {@link ContentRedirect} in {@link WindowOptions} and {@link ViewOptions} will be **ignored**.
9598
9644
  */
9599
9645
  content?: ContentPermission;
9646
+ /**
9647
+ * {@inheritdoc ChromiumPolicies}
9648
+ */
9649
+ chromiumPolicies?: ChromiumPolicies;
9600
9650
  };
9601
9651
 
9602
9652
  /**
@@ -11055,6 +11105,12 @@ declare type PointTopLeft = {
11055
11105
  left: number;
11056
11106
  };
11057
11107
 
11108
+ /**
11109
+ * When set to `disable`, disables the policy
11110
+ * When set to `defer-to-group-policy`, respects Group Policy settings
11111
+ */
11112
+ declare type PolicyOptions = 'disable' | 'defer-to-group-policy';
11113
+
11058
11114
  declare type PopupBaseBehavior = 'close' | 'hide';
11059
11115
 
11060
11116
  declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
package/out/mock.d.ts CHANGED
@@ -2994,6 +2994,18 @@ declare type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
2994
2994
  childOptions: OpenFin_2.WindowOptions;
2995
2995
  };
2996
2996
 
2997
+ /**
2998
+ * Control behavior for Chromium policies
2999
+ *
3000
+ * @interface
3001
+ */
3002
+ declare type ChromiumPolicies = {
3003
+ /**
3004
+ * Disable AutofillAddressEnabled policy for a Window or View.
3005
+ */
3006
+ AutofillAddressEnabled?: PolicyOptions;
3007
+ };
3008
+
2997
3009
  declare interface ClassicProtocolOffer extends ProtocolPacketBase {
2998
3010
  type: 'classic';
2999
3011
  }
@@ -7807,6 +7819,29 @@ declare class Layout extends Base {
7807
7819
  * ```
7808
7820
  */
7809
7821
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
7822
+ /**
7823
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
7824
+ *
7825
+ * @param viewOptions - The options for creating the view.
7826
+ * @param options - Optional parameters for adding the view.
7827
+ * @param options.location - The location where the view should be added.
7828
+ * @param options.targetView - The target view to which the new view should be added.
7829
+ * @returns A promise that resolves to an object containing the identity of the added view.
7830
+ */
7831
+ addView(viewOptions: OpenFin_2.PlatformViewCreationOptions, { location, targetView }?: {
7832
+ location?: OpenFin_2.CreateViewTarget['location'];
7833
+ targetView?: OpenFin_2.Identity;
7834
+ }): Promise<{
7835
+ identity: OpenFin_2.Identity;
7836
+ }>;
7837
+ /**
7838
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
7839
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
7840
+ *
7841
+ * @param viewIdentity - The identity of the view to close.
7842
+ * @returns A promise that resolves when the view is closed.
7843
+ */
7844
+ closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
7810
7845
  }
7811
7846
 
7812
7847
  /**
@@ -7819,7 +7854,7 @@ declare type LayoutColumn = LayoutItemConfig & {
7819
7854
  /**
7820
7855
  * @interface
7821
7856
  */
7822
- declare type LayoutComponent = LayoutItemConfig & {
7857
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
7823
7858
  /**
7824
7859
  * Only a component type will have this property and it should be set to view.
7825
7860
  */
@@ -7828,6 +7863,7 @@ declare type LayoutComponent = LayoutItemConfig & {
7828
7863
  * Only a component type will have this property and it represents the view options of a given component.
7829
7864
  */
7830
7865
  componentState?: Partial<ViewCreationOptions>;
7866
+ type: 'component';
7831
7867
  };
7832
7868
 
7833
7869
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -8019,7 +8055,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8019
8055
  /**
8020
8056
  * @experimental
8021
8057
  */
8022
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8058
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
8023
8059
  /**
8024
8060
  * @experimental
8025
8061
  */
@@ -8944,6 +8980,10 @@ declare type MutableViewOptions = {
8944
8980
  * @defaultValue 'enabled'
8945
8981
  */
8946
8982
  throttling: ViewThrottling;
8983
+ /**
8984
+ * {@inheritDoc ChromiumPolicies}
8985
+ */
8986
+ chromiumPolicies: ChromiumPolicies;
8947
8987
  };
8948
8988
 
8949
8989
  /**
@@ -9209,6 +9249,10 @@ declare type MutableWindowOptions = {
9209
9249
  * @remarks If `throttling` option is present, the `backgroundThrottling` option is completely ignored for windows.
9210
9250
  */
9211
9251
  throttling: WindowThrottling;
9252
+ /**
9253
+ * {@inheritDoc ChromiumPolicies}
9254
+ */
9255
+ chromiumPolicies: ChromiumPolicies;
9212
9256
  };
9213
9257
 
9214
9258
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9431,6 +9475,8 @@ declare namespace OpenFin_2 {
9431
9475
  AutoplayPolicyOptions,
9432
9476
  ConstWindowOptions,
9433
9477
  InheritableOptions,
9478
+ PolicyOptions,
9479
+ ChromiumPolicies,
9434
9480
  MutableWindowOptions,
9435
9481
  WorkspacePlatformOptions,
9436
9482
  WebRequestHeader,
@@ -9915,6 +9961,10 @@ declare type PerDomainSettings = {
9915
9961
  * {@link ContentRedirect} in {@link WindowOptions} and {@link ViewOptions} will be **ignored**.
9916
9962
  */
9917
9963
  content?: ContentPermission;
9964
+ /**
9965
+ * {@inheritdoc ChromiumPolicies}
9966
+ */
9967
+ chromiumPolicies?: ChromiumPolicies;
9918
9968
  };
9919
9969
 
9920
9970
  /**
@@ -11456,6 +11506,12 @@ declare type PointTopLeft = {
11456
11506
  left: number;
11457
11507
  };
11458
11508
 
11509
+ /**
11510
+ * When set to `disable`, disables the policy
11511
+ * When set to `defer-to-group-policy`, respects Group Policy settings
11512
+ */
11513
+ declare type PolicyOptions = 'disable' | 'defer-to-group-policy';
11514
+
11459
11515
  declare type PopupBaseBehavior = 'close' | 'hide';
11460
11516
 
11461
11517
  declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
package/out/mock.js CHANGED
@@ -11893,7 +11893,7 @@ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
11893
11893
  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");
11894
11894
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11895
11895
  };
11896
- var _Layout_layoutClient;
11896
+ var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
11897
11897
  Object.defineProperty(Instance$1, "__esModule", { value: true });
11898
11898
  Instance$1.Layout = void 0;
11899
11899
  const lazy_1 = lazy;
@@ -12047,6 +12047,7 @@ class Layout extends base_1$5.Base {
12047
12047
  // eslint-disable-next-line no-shadow
12048
12048
  constructor(identity, wire) {
12049
12049
  super(wire);
12050
+ _Layout_instances.add(this);
12050
12051
  /**
12051
12052
  * @internal
12052
12053
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
@@ -12286,9 +12287,50 @@ class Layout extends base_1$5.Base {
12286
12287
  }
12287
12288
  return layout_entities_1.LayoutNode.getEntity(stack, client);
12288
12289
  }
12290
+ /**
12291
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
12292
+ *
12293
+ * @param viewOptions - The options for creating the view.
12294
+ * @param options - Optional parameters for adding the view.
12295
+ * @param options.location - The location where the view should be added.
12296
+ * @param options.targetView - The target view to which the new view should be added.
12297
+ * @returns A promise that resolves to an object containing the identity of the added view.
12298
+ */
12299
+ async addView(viewOptions, { location, targetView } = {}) {
12300
+ this.wire.sendAction('layout-add-view').catch((e) => {
12301
+ // don't expose
12302
+ });
12303
+ const { identity } = await __classPrivateFieldGet$4(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
12304
+ viewOptions,
12305
+ location,
12306
+ targetView
12307
+ });
12308
+ return { identity };
12309
+ }
12310
+ /**
12311
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
12312
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
12313
+ *
12314
+ * @param viewIdentity - The identity of the view to close.
12315
+ * @returns A promise that resolves when the view is closed.
12316
+ */
12317
+ async closeView(viewIdentity) {
12318
+ this.wire.sendAction('layout-close-view').catch((e) => {
12319
+ // don't expose
12320
+ });
12321
+ await __classPrivateFieldGet$4(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
12322
+ }
12289
12323
  }
12290
12324
  Instance$1.Layout = Layout;
12291
- _Layout_layoutClient = new WeakMap();
12325
+ _Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
12326
+ /**
12327
+ * @internal
12328
+ * Use to type-guard actions sent to the layout via the provider.
12329
+ */
12330
+ async function _Layout_forwardLayoutAction(action, payload) {
12331
+ const client = await this.platform.getClient();
12332
+ return client.dispatch(action, { target: this.identity, opts: payload });
12333
+ };
12292
12334
 
12293
12335
  var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12294
12336
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "40.82.21",
3
+ "version": "40.82.23",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/mock.js",