@openfin/core 34.78.4 → 34.78.6

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.
@@ -3447,6 +3447,15 @@ declare type ConstViewOptions = {
3447
3447
  * 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
3448
3448
  */
3449
3449
  closeBehavior: 'hide' | 'detach' | 'destroy';
3450
+ /**
3451
+ * Controls interaction of the view with its parent window's download shelf.
3452
+ */
3453
+ downloadShelf: {
3454
+ /**
3455
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3456
+ */
3457
+ enabled: boolean;
3458
+ };
3450
3459
  };
3451
3460
 
3452
3461
  /**
@@ -3558,8 +3567,16 @@ declare type ConstWindowOptions = {
3558
3567
  * launches in favor of the cached value.
3559
3568
  */
3560
3569
  defaultWidth: number;
3570
+ downloadShelf: DownloadShelfOptions;
3561
3571
  height: number;
3562
3572
  layout: any;
3573
+ /**
3574
+ * @experimental
3575
+ *
3576
+ * The collection of layouts to load when the window is created. When launching multiple layouts, manage
3577
+ * the lifecycle via fin.Platform.Layout.create()/destroy() methods.
3578
+ */
3579
+ layoutSnapshot: LayoutSnapshot;
3563
3580
  /**
3564
3581
  * Parent identity of a modal window. It will create a modal child window when this option is set.
3565
3582
  */
@@ -4327,7 +4344,7 @@ declare type CreateViewPayload = {
4327
4344
  /**
4328
4345
  * @interface
4329
4346
  */
4330
- declare type CreateViewTarget = Identity_5 & {
4347
+ declare type CreateViewTarget = LayoutIdentity & {
4331
4348
  /**
4332
4349
  * If specified, view creation will not attach to a window and caller must
4333
4350
  * insert the view into the layout explicitly
@@ -4623,6 +4640,34 @@ declare type DownloadRule = {
4623
4640
  match: string[];
4624
4641
  };
4625
4642
 
4643
+ /**
4644
+ * @interface
4645
+ *
4646
+ * Controls the styling and behavior of the window download shelf.
4647
+ */
4648
+ declare type DownloadShelfOptions = {
4649
+ /**
4650
+ * Whether downloads in this window trigger opening the download shelf.
4651
+ */
4652
+ enabled: boolean;
4653
+ /**
4654
+ * Styling options for the download shelf border.
4655
+ */
4656
+ border: {
4657
+ /**
4658
+ * Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
4659
+ *
4660
+ * @remarks The top border is fixed to 1 pixel regardless of this setting.
4661
+ */
4662
+ size?: number;
4663
+ /**
4664
+ * Color of the border, either a string name or a hex code. Defaults to chromium theme
4665
+ * if absent.
4666
+ */
4667
+ color?: string;
4668
+ };
4669
+ };
4670
+
4626
4671
  /**
4627
4672
  * DPI (dots per inch) configuration for printing.
4628
4673
  *
@@ -4822,9 +4867,9 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4822
4867
  } : never;
4823
4868
 
4824
4869
  declare interface Environment {
4825
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, ...args: Parameters<OpenFin_2.Fin['Platform']['Layout']['init']>): ReturnType<OpenFin_2.Fin['Platform']['Layout']['init']>;
4870
+ initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
4826
4871
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
4827
- observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (() => void);
4872
+ observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
4828
4873
  writeToken(path: string, token: string): Promise<string>;
4829
4874
  retrievePort(config: NewConnectConfig): Promise<number>;
4830
4875
  getNextMessageId(): any;
@@ -5724,6 +5769,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5724
5769
  * Registers a global hotkey with the operating system.
5725
5770
  * @param hotkey a hotkey string
5726
5771
  * @param listener called when the registered hotkey is pressed by the user.
5772
+ * @throws If the `hotkey` is reserved, see list below.
5773
+ * @throws if the `hotkey` is already registered by another application.
5727
5774
  *
5728
5775
  * @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
5729
5776
  * If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
@@ -5796,7 +5843,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5796
5843
  */
5797
5844
  unregisterAll(): Promise<void>;
5798
5845
  /**
5799
- * Checks if a given hotkey has been registered
5846
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5800
5847
  * @param hotkey a hotkey string
5801
5848
  *
5802
5849
  * @example
@@ -6381,19 +6428,21 @@ declare type InitializedEvent = IdentityEvent & {
6381
6428
  type: 'initialized';
6382
6429
  };
6383
6430
 
6384
- declare type InitLayoutOptions = OpenFin_2.InitLayoutOptions;
6385
-
6386
- declare type InitLayoutOptions_2 = OpenFin_2.InitLayoutOptions;
6387
-
6388
6431
  /**
6389
6432
  * @interface
6390
6433
  */
6391
- declare type InitLayoutOptions_3 = {
6434
+ declare type InitLayoutOptions = {
6392
6435
  /**
6436
+ * @deprecated use container HTMLElement instead
6437
+ *
6393
6438
  * The id attribute of the container where the window's Layout should be initialized. If not provided
6394
6439
  * then an element with id `layout-container` is used. We recommend using a div element.
6395
6440
  */
6396
6441
  containerId?: string;
6442
+ /**
6443
+ * The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
6444
+ */
6445
+ container?: HTMLElement;
6397
6446
  };
6398
6447
 
6399
6448
  /**
@@ -8527,7 +8576,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8527
8576
  * @param layoutIdentity
8528
8577
  * @returns
8529
8578
  */
8530
- resolveLayout: ({ layoutName }: LayoutIdentity) => Promise<LayoutInstance>;
8579
+ resolveLayout: ({ layoutName }?: LayoutIdentity) => Promise<LayoutInstance>;
8531
8580
  /**
8532
8581
  * @experimental
8533
8582
  *
@@ -8662,7 +8711,8 @@ declare class LayoutModule extends Base {
8662
8711
  * const layout = await fin.Platform.Layout.init({ containerId });
8663
8712
  * ```
8664
8713
  */
8665
- init: (options?: InitLayoutOptions) => Promise<OpenFin_2.Layout>;
8714
+ init: (options?: OpenFin_2.InitLayoutOptions) => Promise<OpenFin_2.Layout>;
8715
+ getCurrentLayoutManagerSync: <T extends OpenFin_2.LayoutSnapshot>() => OpenFin_2.LayoutManager<T>;
8666
8716
  }
8667
8717
 
8668
8718
  declare type LayoutModule_2 = OpenFin_2.Fin['Platform']['Layout'];
@@ -9836,7 +9886,7 @@ declare namespace OpenFin_2 {
9836
9886
  LayoutPresetType,
9837
9887
  LayoutIdentity,
9838
9888
  LayoutSnapshot,
9839
- InitLayoutOptions_3 as InitLayoutOptions,
9889
+ InitLayoutOptions,
9840
9890
  LayoutInstance,
9841
9891
  LayoutManager,
9842
9892
  AddLayoutInstanceOptions,
@@ -9881,6 +9931,7 @@ declare namespace OpenFin_2 {
9881
9931
  ChannelClientDisconnectionListener,
9882
9932
  ChannelProviderDisconnectionListener,
9883
9933
  RoutingInfo,
9934
+ DownloadShelfOptions,
9884
9935
  ApplicationEvents,
9885
9936
  BaseEvents,
9886
9937
  ExternalApplicationEvents,
@@ -10922,6 +10973,7 @@ declare interface PlatformProvider {
10922
10973
  * ```
10923
10974
  */
10924
10975
  getSnapshot(payload: undefined, identity: OpenFin_2.Identity): Promise<OpenFin_2.Snapshot>;
10976
+ /* Excluded from this release type: createViewsForLayout */
10925
10977
  /* Excluded from this release type: getViewSnapshot */
10926
10978
  /**
10927
10979
  * Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
@@ -12292,19 +12344,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12292
12344
  /**
12293
12345
  * @interface
12294
12346
  */
12295
- declare type ReplaceLayoutOptions = ReplaceLayoutOpts;
12347
+ declare type ReplaceLayoutOptions = {
12348
+ /**
12349
+ * Layout config to be applied.
12350
+ */
12351
+ layout: LayoutOptions;
12352
+ };
12296
12353
 
12297
12354
  /**
12298
12355
  * @interface
12299
12356
  *
12300
12357
  * @deprecated use ReplaceLayoutOptions instead
12301
12358
  */
12302
- declare type ReplaceLayoutOpts = {
12303
- /**
12304
- * Layout config to be applied.
12305
- */
12306
- layout: LayoutOptions;
12307
- };
12359
+ declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
12308
12360
 
12309
12361
  /**
12310
12362
  * @interface
@@ -12315,9 +12367,9 @@ declare type ReplaceLayoutPayload = {
12315
12367
  */
12316
12368
  opts: ReplaceLayoutOptions;
12317
12369
  /**
12318
- * Identity of the window whose layout will be replace.
12370
+ * Identity of the window whose layout will be replaced.
12319
12371
  */
12320
- target: Identity_5;
12372
+ target: LayoutIdentity;
12321
12373
  };
12322
12374
 
12323
12375
  /**
@@ -12336,7 +12388,7 @@ declare type ReplaceViewPayload = {
12336
12388
  viewToReplace: Identity_5;
12337
12389
  newView: Partial<ViewOptions>;
12338
12390
  };
12339
- target: Identity_5;
12391
+ target: LayoutIdentity;
12340
12392
  };
12341
12393
 
12342
12394
  /**
@@ -12848,6 +12900,14 @@ declare type ShortcutOverride = Hotkey & {
12848
12900
  command: string;
12849
12901
  };
12850
12902
 
12903
+ /**
12904
+ * Generated when the Download Shelf 'Show All' button is clicked.
12905
+ * @interface
12906
+ */
12907
+ declare type ShowAllDownloadsEvent = BaseWindowEvent & {
12908
+ type: 'show-all-downloads';
12909
+ };
12910
+
12851
12911
  /**
12852
12912
  * Generated when a View is shown. This event will fire during creation of a View.
12853
12913
  * @interface
@@ -18729,6 +18789,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18729
18789
  WillMoveEvent,
18730
18790
  WillResizeEvent,
18731
18791
  NonPropagatedWindowEvent,
18792
+ ShowAllDownloadsEvent,
18732
18793
  WindowSourcedEvent,
18733
18794
  WillPropagateWindowEvent,
18734
18795
  WindowEvent,
@@ -18948,7 +19009,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18948
19009
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18949
19010
  * from {@link OpenFin.ViewEvents}.
18950
19011
  */
18951
- declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
19012
+ declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent;
18952
19013
 
18953
19014
  /**
18954
19015
  * Generated when a child window starts loading.
@@ -3447,6 +3447,15 @@ declare type ConstViewOptions = {
3447
3447
  * 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
3448
3448
  */
3449
3449
  closeBehavior: 'hide' | 'detach' | 'destroy';
3450
+ /**
3451
+ * Controls interaction of the view with its parent window's download shelf.
3452
+ */
3453
+ downloadShelf: {
3454
+ /**
3455
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3456
+ */
3457
+ enabled: boolean;
3458
+ };
3450
3459
  };
3451
3460
 
3452
3461
  /**
@@ -3558,8 +3567,16 @@ declare type ConstWindowOptions = {
3558
3567
  * launches in favor of the cached value.
3559
3568
  */
3560
3569
  defaultWidth: number;
3570
+ downloadShelf: DownloadShelfOptions;
3561
3571
  height: number;
3562
3572
  layout: any;
3573
+ /**
3574
+ * @experimental
3575
+ *
3576
+ * The collection of layouts to load when the window is created. When launching multiple layouts, manage
3577
+ * the lifecycle via fin.Platform.Layout.create()/destroy() methods.
3578
+ */
3579
+ layoutSnapshot: LayoutSnapshot;
3563
3580
  /**
3564
3581
  * Parent identity of a modal window. It will create a modal child window when this option is set.
3565
3582
  */
@@ -4327,7 +4344,7 @@ declare type CreateViewPayload = {
4327
4344
  /**
4328
4345
  * @interface
4329
4346
  */
4330
- declare type CreateViewTarget = Identity_5 & {
4347
+ declare type CreateViewTarget = LayoutIdentity & {
4331
4348
  /**
4332
4349
  * If specified, view creation will not attach to a window and caller must
4333
4350
  * insert the view into the layout explicitly
@@ -4623,6 +4640,34 @@ declare type DownloadRule = {
4623
4640
  match: string[];
4624
4641
  };
4625
4642
 
4643
+ /**
4644
+ * @interface
4645
+ *
4646
+ * Controls the styling and behavior of the window download shelf.
4647
+ */
4648
+ declare type DownloadShelfOptions = {
4649
+ /**
4650
+ * Whether downloads in this window trigger opening the download shelf.
4651
+ */
4652
+ enabled: boolean;
4653
+ /**
4654
+ * Styling options for the download shelf border.
4655
+ */
4656
+ border: {
4657
+ /**
4658
+ * Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
4659
+ *
4660
+ * @remarks The top border is fixed to 1 pixel regardless of this setting.
4661
+ */
4662
+ size?: number;
4663
+ /**
4664
+ * Color of the border, either a string name or a hex code. Defaults to chromium theme
4665
+ * if absent.
4666
+ */
4667
+ color?: string;
4668
+ };
4669
+ };
4670
+
4626
4671
  /**
4627
4672
  * DPI (dots per inch) configuration for printing.
4628
4673
  *
@@ -4822,9 +4867,9 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4822
4867
  } : never;
4823
4868
 
4824
4869
  declare interface Environment {
4825
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, ...args: Parameters<OpenFin_2.Fin['Platform']['Layout']['init']>): ReturnType<OpenFin_2.Fin['Platform']['Layout']['init']>;
4870
+ initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
4826
4871
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
4827
- observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (() => void);
4872
+ observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
4828
4873
  writeToken(path: string, token: string): Promise<string>;
4829
4874
  retrievePort(config: NewConnectConfig): Promise<number>;
4830
4875
  getNextMessageId(): any;
@@ -5724,6 +5769,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5724
5769
  * Registers a global hotkey with the operating system.
5725
5770
  * @param hotkey a hotkey string
5726
5771
  * @param listener called when the registered hotkey is pressed by the user.
5772
+ * @throws If the `hotkey` is reserved, see list below.
5773
+ * @throws if the `hotkey` is already registered by another application.
5727
5774
  *
5728
5775
  * @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
5729
5776
  * If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
@@ -5796,7 +5843,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5796
5843
  */
5797
5844
  unregisterAll(): Promise<void>;
5798
5845
  /**
5799
- * Checks if a given hotkey has been registered
5846
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5800
5847
  * @param hotkey a hotkey string
5801
5848
  *
5802
5849
  * @example
@@ -6381,19 +6428,21 @@ declare type InitializedEvent = IdentityEvent & {
6381
6428
  type: 'initialized';
6382
6429
  };
6383
6430
 
6384
- declare type InitLayoutOptions = OpenFin_2.InitLayoutOptions;
6385
-
6386
- declare type InitLayoutOptions_2 = OpenFin_2.InitLayoutOptions;
6387
-
6388
6431
  /**
6389
6432
  * @interface
6390
6433
  */
6391
- declare type InitLayoutOptions_3 = {
6434
+ declare type InitLayoutOptions = {
6392
6435
  /**
6436
+ * @deprecated use container HTMLElement instead
6437
+ *
6393
6438
  * The id attribute of the container where the window's Layout should be initialized. If not provided
6394
6439
  * then an element with id `layout-container` is used. We recommend using a div element.
6395
6440
  */
6396
6441
  containerId?: string;
6442
+ /**
6443
+ * The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
6444
+ */
6445
+ container?: HTMLElement;
6397
6446
  };
6398
6447
 
6399
6448
  /**
@@ -8527,7 +8576,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8527
8576
  * @param layoutIdentity
8528
8577
  * @returns
8529
8578
  */
8530
- resolveLayout: ({ layoutName }: LayoutIdentity) => Promise<LayoutInstance>;
8579
+ resolveLayout: ({ layoutName }?: LayoutIdentity) => Promise<LayoutInstance>;
8531
8580
  /**
8532
8581
  * @experimental
8533
8582
  *
@@ -8662,7 +8711,8 @@ declare class LayoutModule extends Base {
8662
8711
  * const layout = await fin.Platform.Layout.init({ containerId });
8663
8712
  * ```
8664
8713
  */
8665
- init: (options?: InitLayoutOptions) => Promise<OpenFin_2.Layout>;
8714
+ init: (options?: OpenFin_2.InitLayoutOptions) => Promise<OpenFin_2.Layout>;
8715
+ getCurrentLayoutManagerSync: <T extends OpenFin_2.LayoutSnapshot>() => OpenFin_2.LayoutManager<T>;
8666
8716
  }
8667
8717
 
8668
8718
  declare type LayoutModule_2 = OpenFin_2.Fin['Platform']['Layout'];
@@ -9836,7 +9886,7 @@ declare namespace OpenFin_2 {
9836
9886
  LayoutPresetType,
9837
9887
  LayoutIdentity,
9838
9888
  LayoutSnapshot,
9839
- InitLayoutOptions_3 as InitLayoutOptions,
9889
+ InitLayoutOptions,
9840
9890
  LayoutInstance,
9841
9891
  LayoutManager,
9842
9892
  AddLayoutInstanceOptions,
@@ -9881,6 +9931,7 @@ declare namespace OpenFin_2 {
9881
9931
  ChannelClientDisconnectionListener,
9882
9932
  ChannelProviderDisconnectionListener,
9883
9933
  RoutingInfo,
9934
+ DownloadShelfOptions,
9884
9935
  ApplicationEvents,
9885
9936
  BaseEvents,
9886
9937
  ExternalApplicationEvents,
@@ -10922,6 +10973,7 @@ declare interface PlatformProvider {
10922
10973
  * ```
10923
10974
  */
10924
10975
  getSnapshot(payload: undefined, identity: OpenFin_2.Identity): Promise<OpenFin_2.Snapshot>;
10976
+ /* Excluded from this release type: createViewsForLayout */
10925
10977
  /* Excluded from this release type: getViewSnapshot */
10926
10978
  /**
10927
10979
  * Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
@@ -12292,19 +12344,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12292
12344
  /**
12293
12345
  * @interface
12294
12346
  */
12295
- declare type ReplaceLayoutOptions = ReplaceLayoutOpts;
12347
+ declare type ReplaceLayoutOptions = {
12348
+ /**
12349
+ * Layout config to be applied.
12350
+ */
12351
+ layout: LayoutOptions;
12352
+ };
12296
12353
 
12297
12354
  /**
12298
12355
  * @interface
12299
12356
  *
12300
12357
  * @deprecated use ReplaceLayoutOptions instead
12301
12358
  */
12302
- declare type ReplaceLayoutOpts = {
12303
- /**
12304
- * Layout config to be applied.
12305
- */
12306
- layout: LayoutOptions;
12307
- };
12359
+ declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
12308
12360
 
12309
12361
  /**
12310
12362
  * @interface
@@ -12315,9 +12367,9 @@ declare type ReplaceLayoutPayload = {
12315
12367
  */
12316
12368
  opts: ReplaceLayoutOptions;
12317
12369
  /**
12318
- * Identity of the window whose layout will be replace.
12370
+ * Identity of the window whose layout will be replaced.
12319
12371
  */
12320
- target: Identity_5;
12372
+ target: LayoutIdentity;
12321
12373
  };
12322
12374
 
12323
12375
  /**
@@ -12336,7 +12388,7 @@ declare type ReplaceViewPayload = {
12336
12388
  viewToReplace: Identity_5;
12337
12389
  newView: Partial<ViewOptions>;
12338
12390
  };
12339
- target: Identity_5;
12391
+ target: LayoutIdentity;
12340
12392
  };
12341
12393
 
12342
12394
  /**
@@ -12848,6 +12900,14 @@ declare type ShortcutOverride = Hotkey & {
12848
12900
  command: string;
12849
12901
  };
12850
12902
 
12903
+ /**
12904
+ * Generated when the Download Shelf 'Show All' button is clicked.
12905
+ * @interface
12906
+ */
12907
+ declare type ShowAllDownloadsEvent = BaseWindowEvent & {
12908
+ type: 'show-all-downloads';
12909
+ };
12910
+
12851
12911
  /**
12852
12912
  * Generated when a View is shown. This event will fire during creation of a View.
12853
12913
  * @interface
@@ -18729,6 +18789,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18729
18789
  WillMoveEvent,
18730
18790
  WillResizeEvent,
18731
18791
  NonPropagatedWindowEvent,
18792
+ ShowAllDownloadsEvent,
18732
18793
  WindowSourcedEvent,
18733
18794
  WillPropagateWindowEvent,
18734
18795
  WindowEvent,
@@ -18948,7 +19009,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18948
19009
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18949
19010
  * from {@link OpenFin.ViewEvents}.
18950
19011
  */
18951
- declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
19012
+ declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent;
18952
19013
 
18953
19014
  /**
18954
19015
  * Generated when a child window starts loading.
@@ -3447,6 +3447,15 @@ declare type ConstViewOptions = {
3447
3447
  * 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
3448
3448
  */
3449
3449
  closeBehavior: 'hide' | 'detach' | 'destroy';
3450
+ /**
3451
+ * Controls interaction of the view with its parent window's download shelf.
3452
+ */
3453
+ downloadShelf: {
3454
+ /**
3455
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3456
+ */
3457
+ enabled: boolean;
3458
+ };
3450
3459
  };
3451
3460
 
3452
3461
  /**
@@ -3558,8 +3567,16 @@ declare type ConstWindowOptions = {
3558
3567
  * launches in favor of the cached value.
3559
3568
  */
3560
3569
  defaultWidth: number;
3570
+ downloadShelf: DownloadShelfOptions;
3561
3571
  height: number;
3562
3572
  layout: any;
3573
+ /**
3574
+ * @experimental
3575
+ *
3576
+ * The collection of layouts to load when the window is created. When launching multiple layouts, manage
3577
+ * the lifecycle via fin.Platform.Layout.create()/destroy() methods.
3578
+ */
3579
+ layoutSnapshot: LayoutSnapshot;
3563
3580
  /**
3564
3581
  * Parent identity of a modal window. It will create a modal child window when this option is set.
3565
3582
  */
@@ -4327,7 +4344,7 @@ declare type CreateViewPayload = {
4327
4344
  /**
4328
4345
  * @interface
4329
4346
  */
4330
- declare type CreateViewTarget = Identity_5 & {
4347
+ declare type CreateViewTarget = LayoutIdentity & {
4331
4348
  /**
4332
4349
  * If specified, view creation will not attach to a window and caller must
4333
4350
  * insert the view into the layout explicitly
@@ -4623,6 +4640,34 @@ declare type DownloadRule = {
4623
4640
  match: string[];
4624
4641
  };
4625
4642
 
4643
+ /**
4644
+ * @interface
4645
+ *
4646
+ * Controls the styling and behavior of the window download shelf.
4647
+ */
4648
+ declare type DownloadShelfOptions = {
4649
+ /**
4650
+ * Whether downloads in this window trigger opening the download shelf.
4651
+ */
4652
+ enabled: boolean;
4653
+ /**
4654
+ * Styling options for the download shelf border.
4655
+ */
4656
+ border: {
4657
+ /**
4658
+ * Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
4659
+ *
4660
+ * @remarks The top border is fixed to 1 pixel regardless of this setting.
4661
+ */
4662
+ size?: number;
4663
+ /**
4664
+ * Color of the border, either a string name or a hex code. Defaults to chromium theme
4665
+ * if absent.
4666
+ */
4667
+ color?: string;
4668
+ };
4669
+ };
4670
+
4626
4671
  /**
4627
4672
  * DPI (dots per inch) configuration for printing.
4628
4673
  *
@@ -4822,9 +4867,9 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4822
4867
  } : never;
4823
4868
 
4824
4869
  declare interface Environment {
4825
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, ...args: Parameters<OpenFin_2.Fin['Platform']['Layout']['init']>): ReturnType<OpenFin_2.Fin['Platform']['Layout']['init']>;
4870
+ initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
4826
4871
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
4827
- observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (() => void);
4872
+ observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
4828
4873
  writeToken(path: string, token: string): Promise<string>;
4829
4874
  retrievePort(config: NewConnectConfig): Promise<number>;
4830
4875
  getNextMessageId(): any;
@@ -5724,6 +5769,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5724
5769
  * Registers a global hotkey with the operating system.
5725
5770
  * @param hotkey a hotkey string
5726
5771
  * @param listener called when the registered hotkey is pressed by the user.
5772
+ * @throws If the `hotkey` is reserved, see list below.
5773
+ * @throws if the `hotkey` is already registered by another application.
5727
5774
  *
5728
5775
  * @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
5729
5776
  * If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
@@ -5796,7 +5843,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5796
5843
  */
5797
5844
  unregisterAll(): Promise<void>;
5798
5845
  /**
5799
- * Checks if a given hotkey has been registered
5846
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5800
5847
  * @param hotkey a hotkey string
5801
5848
  *
5802
5849
  * @example
@@ -6381,19 +6428,21 @@ declare type InitializedEvent = IdentityEvent & {
6381
6428
  type: 'initialized';
6382
6429
  };
6383
6430
 
6384
- declare type InitLayoutOptions = OpenFin_2.InitLayoutOptions;
6385
-
6386
- declare type InitLayoutOptions_2 = OpenFin_2.InitLayoutOptions;
6387
-
6388
6431
  /**
6389
6432
  * @interface
6390
6433
  */
6391
- declare type InitLayoutOptions_3 = {
6434
+ declare type InitLayoutOptions = {
6392
6435
  /**
6436
+ * @deprecated use container HTMLElement instead
6437
+ *
6393
6438
  * The id attribute of the container where the window's Layout should be initialized. If not provided
6394
6439
  * then an element with id `layout-container` is used. We recommend using a div element.
6395
6440
  */
6396
6441
  containerId?: string;
6442
+ /**
6443
+ * The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
6444
+ */
6445
+ container?: HTMLElement;
6397
6446
  };
6398
6447
 
6399
6448
  /**
@@ -8527,7 +8576,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8527
8576
  * @param layoutIdentity
8528
8577
  * @returns
8529
8578
  */
8530
- resolveLayout: ({ layoutName }: LayoutIdentity) => Promise<LayoutInstance>;
8579
+ resolveLayout: ({ layoutName }?: LayoutIdentity) => Promise<LayoutInstance>;
8531
8580
  /**
8532
8581
  * @experimental
8533
8582
  *
@@ -8662,7 +8711,8 @@ declare class LayoutModule extends Base {
8662
8711
  * const layout = await fin.Platform.Layout.init({ containerId });
8663
8712
  * ```
8664
8713
  */
8665
- init: (options?: InitLayoutOptions) => Promise<OpenFin_2.Layout>;
8714
+ init: (options?: OpenFin_2.InitLayoutOptions) => Promise<OpenFin_2.Layout>;
8715
+ getCurrentLayoutManagerSync: <T extends OpenFin_2.LayoutSnapshot>() => OpenFin_2.LayoutManager<T>;
8666
8716
  }
8667
8717
 
8668
8718
  declare type LayoutModule_2 = OpenFin_2.Fin['Platform']['Layout'];
@@ -9836,7 +9886,7 @@ declare namespace OpenFin_2 {
9836
9886
  LayoutPresetType,
9837
9887
  LayoutIdentity,
9838
9888
  LayoutSnapshot,
9839
- InitLayoutOptions_3 as InitLayoutOptions,
9889
+ InitLayoutOptions,
9840
9890
  LayoutInstance,
9841
9891
  LayoutManager,
9842
9892
  AddLayoutInstanceOptions,
@@ -9881,6 +9931,7 @@ declare namespace OpenFin_2 {
9881
9931
  ChannelClientDisconnectionListener,
9882
9932
  ChannelProviderDisconnectionListener,
9883
9933
  RoutingInfo,
9934
+ DownloadShelfOptions,
9884
9935
  ApplicationEvents,
9885
9936
  BaseEvents,
9886
9937
  ExternalApplicationEvents,
@@ -10922,6 +10973,7 @@ declare interface PlatformProvider {
10922
10973
  * ```
10923
10974
  */
10924
10975
  getSnapshot(payload: undefined, identity: OpenFin_2.Identity): Promise<OpenFin_2.Snapshot>;
10976
+ /* Excluded from this release type: createViewsForLayout */
10925
10977
  /* Excluded from this release type: getViewSnapshot */
10926
10978
  /**
10927
10979
  * Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
@@ -12292,19 +12344,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12292
12344
  /**
12293
12345
  * @interface
12294
12346
  */
12295
- declare type ReplaceLayoutOptions = ReplaceLayoutOpts;
12347
+ declare type ReplaceLayoutOptions = {
12348
+ /**
12349
+ * Layout config to be applied.
12350
+ */
12351
+ layout: LayoutOptions;
12352
+ };
12296
12353
 
12297
12354
  /**
12298
12355
  * @interface
12299
12356
  *
12300
12357
  * @deprecated use ReplaceLayoutOptions instead
12301
12358
  */
12302
- declare type ReplaceLayoutOpts = {
12303
- /**
12304
- * Layout config to be applied.
12305
- */
12306
- layout: LayoutOptions;
12307
- };
12359
+ declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
12308
12360
 
12309
12361
  /**
12310
12362
  * @interface
@@ -12315,9 +12367,9 @@ declare type ReplaceLayoutPayload = {
12315
12367
  */
12316
12368
  opts: ReplaceLayoutOptions;
12317
12369
  /**
12318
- * Identity of the window whose layout will be replace.
12370
+ * Identity of the window whose layout will be replaced.
12319
12371
  */
12320
- target: Identity_5;
12372
+ target: LayoutIdentity;
12321
12373
  };
12322
12374
 
12323
12375
  /**
@@ -12336,7 +12388,7 @@ declare type ReplaceViewPayload = {
12336
12388
  viewToReplace: Identity_5;
12337
12389
  newView: Partial<ViewOptions>;
12338
12390
  };
12339
- target: Identity_5;
12391
+ target: LayoutIdentity;
12340
12392
  };
12341
12393
 
12342
12394
  /**
@@ -12848,6 +12900,14 @@ declare type ShortcutOverride = Hotkey & {
12848
12900
  command: string;
12849
12901
  };
12850
12902
 
12903
+ /**
12904
+ * Generated when the Download Shelf 'Show All' button is clicked.
12905
+ * @interface
12906
+ */
12907
+ declare type ShowAllDownloadsEvent = BaseWindowEvent & {
12908
+ type: 'show-all-downloads';
12909
+ };
12910
+
12851
12911
  /**
12852
12912
  * Generated when a View is shown. This event will fire during creation of a View.
12853
12913
  * @interface
@@ -18729,6 +18789,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18729
18789
  WillMoveEvent,
18730
18790
  WillResizeEvent,
18731
18791
  NonPropagatedWindowEvent,
18792
+ ShowAllDownloadsEvent,
18732
18793
  WindowSourcedEvent,
18733
18794
  WillPropagateWindowEvent,
18734
18795
  WindowEvent,
@@ -18948,7 +19009,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18948
19009
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18949
19010
  * from {@link OpenFin.ViewEvents}.
18950
19011
  */
18951
- declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
19012
+ declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent;
18952
19013
 
18953
19014
  /**
18954
19015
  * Generated when a child window starts loading.
package/out/mock.d.ts CHANGED
@@ -3541,6 +3541,15 @@ declare type ConstViewOptions = {
3541
3541
  * 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
3542
3542
  */
3543
3543
  closeBehavior: 'hide' | 'detach' | 'destroy';
3544
+ /**
3545
+ * Controls interaction of the view with its parent window's download shelf.
3546
+ */
3547
+ downloadShelf: {
3548
+ /**
3549
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3550
+ */
3551
+ enabled: boolean;
3552
+ };
3544
3553
  };
3545
3554
 
3546
3555
  /**
@@ -3652,8 +3661,16 @@ declare type ConstWindowOptions = {
3652
3661
  * launches in favor of the cached value.
3653
3662
  */
3654
3663
  defaultWidth: number;
3664
+ downloadShelf: DownloadShelfOptions;
3655
3665
  height: number;
3656
3666
  layout: any;
3667
+ /**
3668
+ * @experimental
3669
+ *
3670
+ * The collection of layouts to load when the window is created. When launching multiple layouts, manage
3671
+ * the lifecycle via fin.Platform.Layout.create()/destroy() methods.
3672
+ */
3673
+ layoutSnapshot: LayoutSnapshot;
3657
3674
  /**
3658
3675
  * Parent identity of a modal window. It will create a modal child window when this option is set.
3659
3676
  */
@@ -4421,7 +4438,7 @@ declare type CreateViewPayload = {
4421
4438
  /**
4422
4439
  * @interface
4423
4440
  */
4424
- declare type CreateViewTarget = Identity_5 & {
4441
+ declare type CreateViewTarget = LayoutIdentity & {
4425
4442
  /**
4426
4443
  * If specified, view creation will not attach to a window and caller must
4427
4444
  * insert the view into the layout explicitly
@@ -4717,6 +4734,34 @@ declare type DownloadRule = {
4717
4734
  match: string[];
4718
4735
  };
4719
4736
 
4737
+ /**
4738
+ * @interface
4739
+ *
4740
+ * Controls the styling and behavior of the window download shelf.
4741
+ */
4742
+ declare type DownloadShelfOptions = {
4743
+ /**
4744
+ * Whether downloads in this window trigger opening the download shelf.
4745
+ */
4746
+ enabled: boolean;
4747
+ /**
4748
+ * Styling options for the download shelf border.
4749
+ */
4750
+ border: {
4751
+ /**
4752
+ * Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
4753
+ *
4754
+ * @remarks The top border is fixed to 1 pixel regardless of this setting.
4755
+ */
4756
+ size?: number;
4757
+ /**
4758
+ * Color of the border, either a string name or a hex code. Defaults to chromium theme
4759
+ * if absent.
4760
+ */
4761
+ color?: string;
4762
+ };
4763
+ };
4764
+
4720
4765
  /**
4721
4766
  * DPI (dots per inch) configuration for printing.
4722
4767
  *
@@ -4921,9 +4966,9 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4921
4966
  } : never;
4922
4967
 
4923
4968
  declare interface Environment {
4924
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, ...args: Parameters<OpenFin_2.Fin['Platform']['Layout']['init']>): ReturnType<OpenFin_2.Fin['Platform']['Layout']['init']>;
4969
+ initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
4925
4970
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
4926
- observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (() => void);
4971
+ observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
4927
4972
  writeToken(path: string, token: string): Promise<string>;
4928
4973
  retrievePort(config: NewConnectConfig): Promise<number>;
4929
4974
  getNextMessageId(): any;
@@ -5848,6 +5893,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5848
5893
  * Registers a global hotkey with the operating system.
5849
5894
  * @param hotkey a hotkey string
5850
5895
  * @param listener called when the registered hotkey is pressed by the user.
5896
+ * @throws If the `hotkey` is reserved, see list below.
5897
+ * @throws if the `hotkey` is already registered by another application.
5851
5898
  *
5852
5899
  * @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
5853
5900
  * If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
@@ -5920,7 +5967,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5920
5967
  */
5921
5968
  unregisterAll(): Promise<void>;
5922
5969
  /**
5923
- * Checks if a given hotkey has been registered
5970
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5924
5971
  * @param hotkey a hotkey string
5925
5972
  *
5926
5973
  * @example
@@ -6508,19 +6555,21 @@ declare type InitializedEvent = IdentityEvent & {
6508
6555
  type: 'initialized';
6509
6556
  };
6510
6557
 
6511
- declare type InitLayoutOptions = OpenFin_2.InitLayoutOptions;
6512
-
6513
- declare type InitLayoutOptions_2 = OpenFin_2.InitLayoutOptions;
6514
-
6515
6558
  /**
6516
6559
  * @interface
6517
6560
  */
6518
- declare type InitLayoutOptions_3 = {
6561
+ declare type InitLayoutOptions = {
6519
6562
  /**
6563
+ * @deprecated use container HTMLElement instead
6564
+ *
6520
6565
  * The id attribute of the container where the window's Layout should be initialized. If not provided
6521
6566
  * then an element with id `layout-container` is used. We recommend using a div element.
6522
6567
  */
6523
6568
  containerId?: string;
6569
+ /**
6570
+ * The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
6571
+ */
6572
+ container?: HTMLElement;
6524
6573
  };
6525
6574
 
6526
6575
  /**
@@ -8368,7 +8417,7 @@ declare class Layout extends Base {
8368
8417
  /**
8369
8418
  * @internal
8370
8419
  */
8371
- init: (options?: InitLayoutOptions_2) => Promise<Layout>;
8420
+ init: (options?: OpenFin_2.InitLayoutOptions) => Promise<Layout>;
8372
8421
  identity: OpenFin_2.LayoutIdentity;
8373
8422
  private platform;
8374
8423
  wire: Transport;
@@ -8698,7 +8747,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8698
8747
  * @param layoutIdentity
8699
8748
  * @returns
8700
8749
  */
8701
- resolveLayout: ({ layoutName }: LayoutIdentity) => Promise<LayoutInstance>;
8750
+ resolveLayout: ({ layoutName }?: LayoutIdentity) => Promise<LayoutInstance>;
8702
8751
  /**
8703
8752
  * @experimental
8704
8753
  *
@@ -8833,7 +8882,8 @@ declare class LayoutModule extends Base {
8833
8882
  * const layout = await fin.Platform.Layout.init({ containerId });
8834
8883
  * ```
8835
8884
  */
8836
- init: (options?: InitLayoutOptions) => Promise<OpenFin_2.Layout>;
8885
+ init: (options?: OpenFin_2.InitLayoutOptions) => Promise<OpenFin_2.Layout>;
8886
+ getCurrentLayoutManagerSync: <T extends OpenFin_2.LayoutSnapshot>() => OpenFin_2.LayoutManager<T>;
8837
8887
  }
8838
8888
 
8839
8889
  declare type LayoutModule_2 = OpenFin_2.Fin['Platform']['Layout'];
@@ -10175,7 +10225,7 @@ declare namespace OpenFin_2 {
10175
10225
  LayoutPresetType,
10176
10226
  LayoutIdentity,
10177
10227
  LayoutSnapshot,
10178
- InitLayoutOptions_3 as InitLayoutOptions,
10228
+ InitLayoutOptions,
10179
10229
  LayoutInstance,
10180
10230
  LayoutManager,
10181
10231
  AddLayoutInstanceOptions,
@@ -10220,6 +10270,7 @@ declare namespace OpenFin_2 {
10220
10270
  ChannelClientDisconnectionListener,
10221
10271
  ChannelProviderDisconnectionListener,
10222
10272
  RoutingInfo,
10273
+ DownloadShelfOptions,
10223
10274
  ApplicationEvents,
10224
10275
  BaseEvents,
10225
10276
  ExternalApplicationEvents,
@@ -11294,6 +11345,19 @@ declare interface PlatformProvider {
11294
11345
  * ```
11295
11346
  */
11296
11347
  getSnapshot(payload: undefined, identity: OpenFin_2.Identity): Promise<OpenFin_2.Snapshot>;
11348
+ /**
11349
+ * @experimental @internal
11350
+ *
11351
+ * **NOTE**: Internal use only. This method is reserved for Workspace Browser implementation.
11352
+ *
11353
+ * Calls platform.createView for every view in the given layout. Returns an array of promises
11354
+ * one promise for each view create call
11355
+ *
11356
+ * @param layout
11357
+ * @param target
11358
+ * @returns an array of promises
11359
+ */
11360
+ createViewsForLayout(layout: GoldenLayout.Config, target: OpenFin_2.Identity): Promise<OpenFin_2.View>[];
11297
11361
  /**
11298
11362
  * **NOTE**: Internal use only. It is not recommended to manage the state of individual views.
11299
11363
  * Gets the current state of a single view and returns an object with the options needed to restore that view as part of a snapshot.
@@ -12700,19 +12764,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12700
12764
  /**
12701
12765
  * @interface
12702
12766
  */
12703
- declare type ReplaceLayoutOptions = ReplaceLayoutOpts;
12767
+ declare type ReplaceLayoutOptions = {
12768
+ /**
12769
+ * Layout config to be applied.
12770
+ */
12771
+ layout: LayoutOptions;
12772
+ };
12704
12773
 
12705
12774
  /**
12706
12775
  * @interface
12707
12776
  *
12708
12777
  * @deprecated use ReplaceLayoutOptions instead
12709
12778
  */
12710
- declare type ReplaceLayoutOpts = {
12711
- /**
12712
- * Layout config to be applied.
12713
- */
12714
- layout: LayoutOptions;
12715
- };
12779
+ declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
12716
12780
 
12717
12781
  /**
12718
12782
  * @interface
@@ -12723,9 +12787,9 @@ declare type ReplaceLayoutPayload = {
12723
12787
  */
12724
12788
  opts: ReplaceLayoutOptions;
12725
12789
  /**
12726
- * Identity of the window whose layout will be replace.
12790
+ * Identity of the window whose layout will be replaced.
12727
12791
  */
12728
- target: Identity_5;
12792
+ target: LayoutIdentity;
12729
12793
  };
12730
12794
 
12731
12795
  /**
@@ -12744,7 +12808,7 @@ declare type ReplaceViewPayload = {
12744
12808
  viewToReplace: Identity_5;
12745
12809
  newView: Partial<ViewOptions>;
12746
12810
  };
12747
- target: Identity_5;
12811
+ target: LayoutIdentity;
12748
12812
  };
12749
12813
 
12750
12814
  /**
@@ -13256,6 +13320,14 @@ declare type ShortcutOverride = Hotkey & {
13256
13320
  command: string;
13257
13321
  };
13258
13322
 
13323
+ /**
13324
+ * Generated when the Download Shelf 'Show All' button is clicked.
13325
+ * @interface
13326
+ */
13327
+ declare type ShowAllDownloadsEvent = BaseWindowEvent & {
13328
+ type: 'show-all-downloads';
13329
+ };
13330
+
13259
13331
  /**
13260
13332
  * Generated when a View is shown. This event will fire during creation of a View.
13261
13333
  * @interface
@@ -19321,6 +19393,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19321
19393
  WillMoveEvent,
19322
19394
  WillResizeEvent,
19323
19395
  NonPropagatedWindowEvent,
19396
+ ShowAllDownloadsEvent,
19324
19397
  WindowSourcedEvent,
19325
19398
  WillPropagateWindowEvent,
19326
19399
  WindowEvent,
@@ -19540,7 +19613,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19540
19613
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
19541
19614
  * from {@link OpenFin.ViewEvents}.
19542
19615
  */
19543
- declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
19616
+ declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent;
19544
19617
 
19545
19618
  /**
19546
19619
  * Generated when a child window starts loading.
package/out/mock.js CHANGED
@@ -3208,10 +3208,23 @@ function requireInstance$2 () {
3208
3208
  // don't expose
3209
3209
  });
3210
3210
  const layoutWindow = await this.getCurrentWindow();
3211
- const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
3212
- const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
3213
- const layoutIdentity = await client.getLayoutIdentityForViewOrThrow(this.identity);
3214
- return this.fin.Platform.Layout.wrap(layoutIdentity);
3211
+ try {
3212
+ const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
3213
+ const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
3214
+ const layoutIdentity = await client.getLayoutIdentityForViewOrThrow(this.identity);
3215
+ return this.fin.Platform.Layout.wrap(layoutIdentity);
3216
+ }
3217
+ catch (e) {
3218
+ const allowedErrors = [
3219
+ 'No action registered at target for',
3220
+ 'getLayoutIdentityForViewOrThrow is not a function'
3221
+ ];
3222
+ if (!allowedErrors.some((m) => e.message.includes(m))) {
3223
+ throw e;
3224
+ }
3225
+ // fallback logic for missing endpoint
3226
+ return this.fin.Platform.Layout.wrap(layoutWindow.identity);
3227
+ }
3215
3228
  };
3216
3229
  /**
3217
3230
  * Gets the View's options.
@@ -5648,7 +5661,7 @@ function requireInstance () {
5648
5661
  // don't expose
5649
5662
  });
5650
5663
  const opts = await this.getOptions();
5651
- if (!opts.layout /* TODO || !opts.layoutSnapshot */) {
5664
+ if (!opts.layout || !opts.layoutSnapshot) {
5652
5665
  throw new Error('Window does not have a Layout');
5653
5666
  }
5654
5667
  return this.fin.Platform.Layout.wrap(layoutIdentity ?? this.identity);
@@ -11626,6 +11639,8 @@ class GlobalHotkey extends base_1$8.EmitterBase {
11626
11639
  * Registers a global hotkey with the operating system.
11627
11640
  * @param hotkey a hotkey string
11628
11641
  * @param listener called when the registered hotkey is pressed by the user.
11642
+ * @throws If the `hotkey` is reserved, see list below.
11643
+ * @throws if the `hotkey` is already registered by another application.
11629
11644
  *
11630
11645
  * @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
11631
11646
  * If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
@@ -11718,7 +11733,7 @@ class GlobalHotkey extends base_1$8.EmitterBase {
11718
11733
  return undefined;
11719
11734
  }
11720
11735
  /**
11721
- * Checks if a given hotkey has been registered
11736
+ * Checks if a given hotkey has been registered by an application within the current runtime.
11722
11737
  * @param hotkey a hotkey string
11723
11738
  *
11724
11739
  * @example
@@ -12924,6 +12939,7 @@ class Layout extends base_1$6.Base {
12924
12939
  // don't expose
12925
12940
  });
12926
12941
  const client = await this.platform.getClient();
12942
+ console.log(`Layout::toConfig() called!`);
12927
12943
  return client.dispatch('get-frame-snapshot', {
12928
12944
  target: this.identity
12929
12945
  });
@@ -12991,7 +13007,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12991
13007
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
12992
13008
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12993
13009
  };
12994
- var _LayoutModule_layoutInitializationAttempted;
13010
+ var _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager;
12995
13011
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12996
13012
  Factory$2.LayoutModule = void 0;
12997
13013
  /* eslint-disable no-undef, import/prefer-default-export */
@@ -13004,6 +13020,7 @@ class LayoutModule extends base_1$5.Base {
13004
13020
  constructor() {
13005
13021
  super(...arguments);
13006
13022
  _LayoutModule_layoutInitializationAttempted.set(this, false);
13023
+ _LayoutModule_layoutManager.set(this, null);
13007
13024
  /**
13008
13025
  * Initialize the window's Layout.
13009
13026
  *
@@ -13054,7 +13071,16 @@ class LayoutModule extends base_1$5.Base {
13054
13071
  }
13055
13072
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
13056
13073
  // TODO: remove this.wire and always use this.fin
13057
- return this.wire.environment.initLayout(this.fin, this.wire, options);
13074
+ __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayout(this.fin, this.wire, options), "f");
13075
+ // TODO: if create() wasn't called, warn!! aka, if lm.getLayouts().length === 0
13076
+ const layoutInstance = await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").resolveLayout();
13077
+ const layout = this.wrapSync(layoutInstance.identity);
13078
+ // Adding this to the returned instance undocumented/typed for Browser
13079
+ // TODO: if not overridden, then return layoutManager: layoutInstance
13080
+ return Object.assign(layout, { layoutManager: layoutInstance });
13081
+ };
13082
+ this.getCurrentLayoutManagerSync = () => {
13083
+ return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
13058
13084
  };
13059
13085
  }
13060
13086
  /**
@@ -13152,7 +13178,7 @@ class LayoutModule extends base_1$5.Base {
13152
13178
  }
13153
13179
  }
13154
13180
  Factory$2.LayoutModule = LayoutModule;
13155
- _LayoutModule_layoutInitializationAttempted = new WeakMap();
13181
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap();
13156
13182
 
13157
13183
  (function (exports) {
13158
13184
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "34.78.4",
3
+ "version": "34.78.6",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.MD",
6
6
  "main": "out/mock.js",