@openfin/core 40.100.7 → 40.102.1
Sign up to get free protection for your applications and to get access to all the features.
- package/out/mock-alpha.d.ts +65 -6
- package/out/mock-beta.d.ts +65 -6
- package/out/mock-public.d.ts +65 -6
- package/out/mock.d.ts +65 -6
- package/out/mock.js +13 -31
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
@@ -192,6 +192,10 @@ declare type AppAssetRequest = {
|
|
192
192
|
alias: string;
|
193
193
|
};
|
194
194
|
|
195
|
+
declare type AppAssetServeRequest = ServeRequest & {
|
196
|
+
alias: string;
|
197
|
+
};
|
198
|
+
|
195
199
|
/**
|
196
200
|
* An object representing an application. Allows the developer to create,
|
197
201
|
* execute, show/close an application as well as listen to {@link OpenFin.ApplicationEvents application events}.
|
@@ -5674,6 +5678,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
5674
5678
|
entityType: string;
|
5675
5679
|
};
|
5676
5680
|
|
5681
|
+
/**
|
5682
|
+
* @interface
|
5683
|
+
* Options for the {@link Window._Window.getBounds} method.
|
5684
|
+
*/
|
5685
|
+
declare interface GetBoundsOptions {
|
5686
|
+
/**
|
5687
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
5688
|
+
*
|
5689
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
5690
|
+
* - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
|
5691
|
+
*
|
5692
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
5693
|
+
*
|
5694
|
+
* If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
|
5695
|
+
*
|
5696
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
5697
|
+
*
|
5698
|
+
* **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
|
5699
|
+
*
|
5700
|
+
* @default 'normal'
|
5701
|
+
*/
|
5702
|
+
boundsType?: 'normal' | 'current';
|
5703
|
+
}
|
5704
|
+
|
5677
5705
|
/**
|
5678
5706
|
* @interface
|
5679
5707
|
*/
|
@@ -7581,7 +7609,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
7581
7609
|
*
|
7582
7610
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
7583
7611
|
*
|
7584
|
-
* ####
|
7612
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
7585
7613
|
* Adds a listener to the end of the listeners array for the specified event.
|
7586
7614
|
* @example
|
7587
7615
|
* ```js
|
@@ -7598,7 +7626,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
7598
7626
|
* });
|
7599
7627
|
* ```
|
7600
7628
|
*
|
7601
|
-
* ####
|
7629
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
7602
7630
|
* Adds a listener to the end of the listeners array for the specified event.
|
7603
7631
|
* @example
|
7604
7632
|
* ```js
|
@@ -7862,7 +7890,7 @@ declare class Layout extends Base {
|
|
7862
7890
|
*/
|
7863
7891
|
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
7864
7892
|
/**
|
7865
|
-
* Adds a view to the platform layout. Behaves like @link
|
7893
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
7866
7894
|
*
|
7867
7895
|
* @param viewOptions - The options for creating the view.
|
7868
7896
|
* @param options - Optional parameters for adding the view.
|
@@ -7878,7 +7906,7 @@ declare class Layout extends Base {
|
|
7878
7906
|
}>;
|
7879
7907
|
/**
|
7880
7908
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
7881
|
-
* Behaves like @link
|
7909
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
7882
7910
|
*
|
7883
7911
|
* @param viewIdentity - The identity of the view to close.
|
7884
7912
|
* @returns A promise that resolves when the view is closed.
|
@@ -9292,6 +9320,7 @@ declare namespace OpenFin_2 {
|
|
9292
9320
|
EntityType_4 as EntityType,
|
9293
9321
|
Bounds,
|
9294
9322
|
WindowBounds,
|
9323
|
+
GetBoundsOptions,
|
9295
9324
|
Rectangle,
|
9296
9325
|
ApplicationCreationOptions,
|
9297
9326
|
TimeZones,
|
@@ -9617,6 +9646,11 @@ declare namespace OpenFin_2 {
|
|
9617
9646
|
DownloadShelfOptions,
|
9618
9647
|
ViewShowAtOptions,
|
9619
9648
|
ExtensionInfo,
|
9649
|
+
ServeRequest,
|
9650
|
+
AppAssetServeRequest,
|
9651
|
+
PathServeRequest,
|
9652
|
+
ServeAssetOptions,
|
9653
|
+
ServedAssetInfo,
|
9620
9654
|
ApplicationEvents,
|
9621
9655
|
BaseEvents,
|
9622
9656
|
ExternalApplicationEvents,
|
@@ -9685,6 +9719,10 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
|
|
9685
9719
|
title: string;
|
9686
9720
|
};
|
9687
9721
|
|
9722
|
+
declare type PathServeRequest = ServeRequest & {
|
9723
|
+
path: string;
|
9724
|
+
};
|
9725
|
+
|
9688
9726
|
declare type Payload<Success extends boolean = boolean, Data = any> = {
|
9689
9727
|
success: Success;
|
9690
9728
|
data: Success extends true ? Data : never;
|
@@ -11968,7 +12006,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
11968
12006
|
options: OpenFin_2.TransitionOptions;
|
11969
12007
|
}>;
|
11970
12008
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
11971
|
-
'get-window-bounds': IdentityCall<{
|
12009
|
+
'get-window-bounds': IdentityCall<{
|
12010
|
+
options?: OpenFin_2.GetBoundsOptions;
|
12011
|
+
}, OpenFin_2.WindowBounds>;
|
11972
12012
|
'center-window': IdentityCall;
|
11973
12013
|
'blur-window': IdentityCall;
|
11974
12014
|
'bring-window-to-front': IdentityCall;
|
@@ -12304,6 +12344,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12304
12344
|
options: OpenFin_2.ProcessLoggingOptions;
|
12305
12345
|
}, void>;
|
12306
12346
|
'get-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.DefaultDomainSettings>;
|
12347
|
+
'serve-asset': ApiCall<{
|
12348
|
+
options: OpenFin_2.ServeAssetOptions;
|
12349
|
+
}, OpenFin_2.ServedAssetInfo>;
|
12307
12350
|
'set-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity & {
|
12308
12351
|
domainSettings: OpenFin_2.DefaultDomainSettings;
|
12309
12352
|
}, void>;
|
@@ -13036,6 +13079,16 @@ declare type SentMessage<Value> = Promise<Value> & {
|
|
13036
13079
|
messageId: ReturnType<Environment['getNextMessageId']>;
|
13037
13080
|
};
|
13038
13081
|
|
13082
|
+
declare type ServeAssetOptions = AppAssetServeRequest | PathServeRequest;
|
13083
|
+
|
13084
|
+
declare type ServedAssetInfo = {
|
13085
|
+
baseUrl: string;
|
13086
|
+
};
|
13087
|
+
|
13088
|
+
declare type ServeRequest = {
|
13089
|
+
hostName: string;
|
13090
|
+
};
|
13091
|
+
|
13039
13092
|
/**
|
13040
13093
|
* @interface
|
13041
13094
|
*/
|
@@ -13333,6 +13386,7 @@ declare type Snapshot = {
|
|
13333
13386
|
declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
|
13334
13387
|
topic: 'application';
|
13335
13388
|
type: 'platform-snapshot-applied';
|
13389
|
+
snapshot: Snapshot;
|
13336
13390
|
};
|
13337
13391
|
|
13338
13392
|
/**
|
@@ -14957,6 +15011,11 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
14957
15011
|
* Gets the currently-installed
|
14958
15012
|
*/
|
14959
15013
|
getInstalledExtensions(): Promise<OpenFin_2.ExtensionInfo[]>;
|
15014
|
+
/**
|
15015
|
+
* Used to serve an asset signed by OpenFin within the given runtime.
|
15016
|
+
* Not indended for general use, will be used by the `@openfin/workspace-platform` package.
|
15017
|
+
*/
|
15018
|
+
serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
|
14960
15019
|
}
|
14961
15020
|
|
14962
15021
|
/**
|
@@ -17434,7 +17493,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17434
17493
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
17435
17494
|
* ```
|
17436
17495
|
*/
|
17437
|
-
getBounds(): Promise<OpenFin_2.WindowBounds>;
|
17496
|
+
getBounds(options?: OpenFin_2.GetBoundsOptions): Promise<OpenFin_2.WindowBounds>;
|
17438
17497
|
/**
|
17439
17498
|
* Centers the window on its current screen.
|
17440
17499
|
*
|
package/out/mock-beta.d.ts
CHANGED
@@ -192,6 +192,10 @@ declare type AppAssetRequest = {
|
|
192
192
|
alias: string;
|
193
193
|
};
|
194
194
|
|
195
|
+
declare type AppAssetServeRequest = ServeRequest & {
|
196
|
+
alias: string;
|
197
|
+
};
|
198
|
+
|
195
199
|
/**
|
196
200
|
* An object representing an application. Allows the developer to create,
|
197
201
|
* execute, show/close an application as well as listen to {@link OpenFin.ApplicationEvents application events}.
|
@@ -5674,6 +5678,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
5674
5678
|
entityType: string;
|
5675
5679
|
};
|
5676
5680
|
|
5681
|
+
/**
|
5682
|
+
* @interface
|
5683
|
+
* Options for the {@link Window._Window.getBounds} method.
|
5684
|
+
*/
|
5685
|
+
declare interface GetBoundsOptions {
|
5686
|
+
/**
|
5687
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
5688
|
+
*
|
5689
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
5690
|
+
* - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
|
5691
|
+
*
|
5692
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
5693
|
+
*
|
5694
|
+
* If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
|
5695
|
+
*
|
5696
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
5697
|
+
*
|
5698
|
+
* **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
|
5699
|
+
*
|
5700
|
+
* @default 'normal'
|
5701
|
+
*/
|
5702
|
+
boundsType?: 'normal' | 'current';
|
5703
|
+
}
|
5704
|
+
|
5677
5705
|
/**
|
5678
5706
|
* @interface
|
5679
5707
|
*/
|
@@ -7581,7 +7609,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
7581
7609
|
*
|
7582
7610
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
7583
7611
|
*
|
7584
|
-
* ####
|
7612
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
7585
7613
|
* Adds a listener to the end of the listeners array for the specified event.
|
7586
7614
|
* @example
|
7587
7615
|
* ```js
|
@@ -7598,7 +7626,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
7598
7626
|
* });
|
7599
7627
|
* ```
|
7600
7628
|
*
|
7601
|
-
* ####
|
7629
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
7602
7630
|
* Adds a listener to the end of the listeners array for the specified event.
|
7603
7631
|
* @example
|
7604
7632
|
* ```js
|
@@ -7862,7 +7890,7 @@ declare class Layout extends Base {
|
|
7862
7890
|
*/
|
7863
7891
|
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
7864
7892
|
/**
|
7865
|
-
* Adds a view to the platform layout. Behaves like @link
|
7893
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
7866
7894
|
*
|
7867
7895
|
* @param viewOptions - The options for creating the view.
|
7868
7896
|
* @param options - Optional parameters for adding the view.
|
@@ -7878,7 +7906,7 @@ declare class Layout extends Base {
|
|
7878
7906
|
}>;
|
7879
7907
|
/**
|
7880
7908
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
7881
|
-
* Behaves like @link
|
7909
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
7882
7910
|
*
|
7883
7911
|
* @param viewIdentity - The identity of the view to close.
|
7884
7912
|
* @returns A promise that resolves when the view is closed.
|
@@ -9292,6 +9320,7 @@ declare namespace OpenFin_2 {
|
|
9292
9320
|
EntityType_4 as EntityType,
|
9293
9321
|
Bounds,
|
9294
9322
|
WindowBounds,
|
9323
|
+
GetBoundsOptions,
|
9295
9324
|
Rectangle,
|
9296
9325
|
ApplicationCreationOptions,
|
9297
9326
|
TimeZones,
|
@@ -9617,6 +9646,11 @@ declare namespace OpenFin_2 {
|
|
9617
9646
|
DownloadShelfOptions,
|
9618
9647
|
ViewShowAtOptions,
|
9619
9648
|
ExtensionInfo,
|
9649
|
+
ServeRequest,
|
9650
|
+
AppAssetServeRequest,
|
9651
|
+
PathServeRequest,
|
9652
|
+
ServeAssetOptions,
|
9653
|
+
ServedAssetInfo,
|
9620
9654
|
ApplicationEvents,
|
9621
9655
|
BaseEvents,
|
9622
9656
|
ExternalApplicationEvents,
|
@@ -9685,6 +9719,10 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
|
|
9685
9719
|
title: string;
|
9686
9720
|
};
|
9687
9721
|
|
9722
|
+
declare type PathServeRequest = ServeRequest & {
|
9723
|
+
path: string;
|
9724
|
+
};
|
9725
|
+
|
9688
9726
|
declare type Payload<Success extends boolean = boolean, Data = any> = {
|
9689
9727
|
success: Success;
|
9690
9728
|
data: Success extends true ? Data : never;
|
@@ -11968,7 +12006,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
11968
12006
|
options: OpenFin_2.TransitionOptions;
|
11969
12007
|
}>;
|
11970
12008
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
11971
|
-
'get-window-bounds': IdentityCall<{
|
12009
|
+
'get-window-bounds': IdentityCall<{
|
12010
|
+
options?: OpenFin_2.GetBoundsOptions;
|
12011
|
+
}, OpenFin_2.WindowBounds>;
|
11972
12012
|
'center-window': IdentityCall;
|
11973
12013
|
'blur-window': IdentityCall;
|
11974
12014
|
'bring-window-to-front': IdentityCall;
|
@@ -12304,6 +12344,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12304
12344
|
options: OpenFin_2.ProcessLoggingOptions;
|
12305
12345
|
}, void>;
|
12306
12346
|
'get-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.DefaultDomainSettings>;
|
12347
|
+
'serve-asset': ApiCall<{
|
12348
|
+
options: OpenFin_2.ServeAssetOptions;
|
12349
|
+
}, OpenFin_2.ServedAssetInfo>;
|
12307
12350
|
'set-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity & {
|
12308
12351
|
domainSettings: OpenFin_2.DefaultDomainSettings;
|
12309
12352
|
}, void>;
|
@@ -13036,6 +13079,16 @@ declare type SentMessage<Value> = Promise<Value> & {
|
|
13036
13079
|
messageId: ReturnType<Environment['getNextMessageId']>;
|
13037
13080
|
};
|
13038
13081
|
|
13082
|
+
declare type ServeAssetOptions = AppAssetServeRequest | PathServeRequest;
|
13083
|
+
|
13084
|
+
declare type ServedAssetInfo = {
|
13085
|
+
baseUrl: string;
|
13086
|
+
};
|
13087
|
+
|
13088
|
+
declare type ServeRequest = {
|
13089
|
+
hostName: string;
|
13090
|
+
};
|
13091
|
+
|
13039
13092
|
/**
|
13040
13093
|
* @interface
|
13041
13094
|
*/
|
@@ -13333,6 +13386,7 @@ declare type Snapshot = {
|
|
13333
13386
|
declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
|
13334
13387
|
topic: 'application';
|
13335
13388
|
type: 'platform-snapshot-applied';
|
13389
|
+
snapshot: Snapshot;
|
13336
13390
|
};
|
13337
13391
|
|
13338
13392
|
/**
|
@@ -14957,6 +15011,11 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
14957
15011
|
* Gets the currently-installed
|
14958
15012
|
*/
|
14959
15013
|
getInstalledExtensions(): Promise<OpenFin_2.ExtensionInfo[]>;
|
15014
|
+
/**
|
15015
|
+
* Used to serve an asset signed by OpenFin within the given runtime.
|
15016
|
+
* Not indended for general use, will be used by the `@openfin/workspace-platform` package.
|
15017
|
+
*/
|
15018
|
+
serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
|
14960
15019
|
}
|
14961
15020
|
|
14962
15021
|
/**
|
@@ -17434,7 +17493,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17434
17493
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
17435
17494
|
* ```
|
17436
17495
|
*/
|
17437
|
-
getBounds(): Promise<OpenFin_2.WindowBounds>;
|
17496
|
+
getBounds(options?: OpenFin_2.GetBoundsOptions): Promise<OpenFin_2.WindowBounds>;
|
17438
17497
|
/**
|
17439
17498
|
* Centers the window on its current screen.
|
17440
17499
|
*
|
package/out/mock-public.d.ts
CHANGED
@@ -192,6 +192,10 @@ declare type AppAssetRequest = {
|
|
192
192
|
alias: string;
|
193
193
|
};
|
194
194
|
|
195
|
+
declare type AppAssetServeRequest = ServeRequest & {
|
196
|
+
alias: string;
|
197
|
+
};
|
198
|
+
|
195
199
|
/**
|
196
200
|
* An object representing an application. Allows the developer to create,
|
197
201
|
* execute, show/close an application as well as listen to {@link OpenFin.ApplicationEvents application events}.
|
@@ -5674,6 +5678,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
5674
5678
|
entityType: string;
|
5675
5679
|
};
|
5676
5680
|
|
5681
|
+
/**
|
5682
|
+
* @interface
|
5683
|
+
* Options for the {@link Window._Window.getBounds} method.
|
5684
|
+
*/
|
5685
|
+
declare interface GetBoundsOptions {
|
5686
|
+
/**
|
5687
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
5688
|
+
*
|
5689
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
5690
|
+
* - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
|
5691
|
+
*
|
5692
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
5693
|
+
*
|
5694
|
+
* If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
|
5695
|
+
*
|
5696
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
5697
|
+
*
|
5698
|
+
* **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
|
5699
|
+
*
|
5700
|
+
* @default 'normal'
|
5701
|
+
*/
|
5702
|
+
boundsType?: 'normal' | 'current';
|
5703
|
+
}
|
5704
|
+
|
5677
5705
|
/**
|
5678
5706
|
* @interface
|
5679
5707
|
*/
|
@@ -7581,7 +7609,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
7581
7609
|
*
|
7582
7610
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
7583
7611
|
*
|
7584
|
-
* ####
|
7612
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
7585
7613
|
* Adds a listener to the end of the listeners array for the specified event.
|
7586
7614
|
* @example
|
7587
7615
|
* ```js
|
@@ -7598,7 +7626,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
7598
7626
|
* });
|
7599
7627
|
* ```
|
7600
7628
|
*
|
7601
|
-
* ####
|
7629
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
7602
7630
|
* Adds a listener to the end of the listeners array for the specified event.
|
7603
7631
|
* @example
|
7604
7632
|
* ```js
|
@@ -7862,7 +7890,7 @@ declare class Layout extends Base {
|
|
7862
7890
|
*/
|
7863
7891
|
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
7864
7892
|
/**
|
7865
|
-
* Adds a view to the platform layout. Behaves like @link
|
7893
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
7866
7894
|
*
|
7867
7895
|
* @param viewOptions - The options for creating the view.
|
7868
7896
|
* @param options - Optional parameters for adding the view.
|
@@ -7878,7 +7906,7 @@ declare class Layout extends Base {
|
|
7878
7906
|
}>;
|
7879
7907
|
/**
|
7880
7908
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
7881
|
-
* Behaves like @link
|
7909
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
7882
7910
|
*
|
7883
7911
|
* @param viewIdentity - The identity of the view to close.
|
7884
7912
|
* @returns A promise that resolves when the view is closed.
|
@@ -9292,6 +9320,7 @@ declare namespace OpenFin_2 {
|
|
9292
9320
|
EntityType_4 as EntityType,
|
9293
9321
|
Bounds,
|
9294
9322
|
WindowBounds,
|
9323
|
+
GetBoundsOptions,
|
9295
9324
|
Rectangle,
|
9296
9325
|
ApplicationCreationOptions,
|
9297
9326
|
TimeZones,
|
@@ -9617,6 +9646,11 @@ declare namespace OpenFin_2 {
|
|
9617
9646
|
DownloadShelfOptions,
|
9618
9647
|
ViewShowAtOptions,
|
9619
9648
|
ExtensionInfo,
|
9649
|
+
ServeRequest,
|
9650
|
+
AppAssetServeRequest,
|
9651
|
+
PathServeRequest,
|
9652
|
+
ServeAssetOptions,
|
9653
|
+
ServedAssetInfo,
|
9620
9654
|
ApplicationEvents,
|
9621
9655
|
BaseEvents,
|
9622
9656
|
ExternalApplicationEvents,
|
@@ -9685,6 +9719,10 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
|
|
9685
9719
|
title: string;
|
9686
9720
|
};
|
9687
9721
|
|
9722
|
+
declare type PathServeRequest = ServeRequest & {
|
9723
|
+
path: string;
|
9724
|
+
};
|
9725
|
+
|
9688
9726
|
declare type Payload<Success extends boolean = boolean, Data = any> = {
|
9689
9727
|
success: Success;
|
9690
9728
|
data: Success extends true ? Data : never;
|
@@ -11968,7 +12006,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
11968
12006
|
options: OpenFin_2.TransitionOptions;
|
11969
12007
|
}>;
|
11970
12008
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
11971
|
-
'get-window-bounds': IdentityCall<{
|
12009
|
+
'get-window-bounds': IdentityCall<{
|
12010
|
+
options?: OpenFin_2.GetBoundsOptions;
|
12011
|
+
}, OpenFin_2.WindowBounds>;
|
11972
12012
|
'center-window': IdentityCall;
|
11973
12013
|
'blur-window': IdentityCall;
|
11974
12014
|
'bring-window-to-front': IdentityCall;
|
@@ -12304,6 +12344,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12304
12344
|
options: OpenFin_2.ProcessLoggingOptions;
|
12305
12345
|
}, void>;
|
12306
12346
|
'get-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.DefaultDomainSettings>;
|
12347
|
+
'serve-asset': ApiCall<{
|
12348
|
+
options: OpenFin_2.ServeAssetOptions;
|
12349
|
+
}, OpenFin_2.ServedAssetInfo>;
|
12307
12350
|
'set-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity & {
|
12308
12351
|
domainSettings: OpenFin_2.DefaultDomainSettings;
|
12309
12352
|
}, void>;
|
@@ -13036,6 +13079,16 @@ declare type SentMessage<Value> = Promise<Value> & {
|
|
13036
13079
|
messageId: ReturnType<Environment['getNextMessageId']>;
|
13037
13080
|
};
|
13038
13081
|
|
13082
|
+
declare type ServeAssetOptions = AppAssetServeRequest | PathServeRequest;
|
13083
|
+
|
13084
|
+
declare type ServedAssetInfo = {
|
13085
|
+
baseUrl: string;
|
13086
|
+
};
|
13087
|
+
|
13088
|
+
declare type ServeRequest = {
|
13089
|
+
hostName: string;
|
13090
|
+
};
|
13091
|
+
|
13039
13092
|
/**
|
13040
13093
|
* @interface
|
13041
13094
|
*/
|
@@ -13333,6 +13386,7 @@ declare type Snapshot = {
|
|
13333
13386
|
declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
|
13334
13387
|
topic: 'application';
|
13335
13388
|
type: 'platform-snapshot-applied';
|
13389
|
+
snapshot: Snapshot;
|
13336
13390
|
};
|
13337
13391
|
|
13338
13392
|
/**
|
@@ -14957,6 +15011,11 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
14957
15011
|
* Gets the currently-installed
|
14958
15012
|
*/
|
14959
15013
|
getInstalledExtensions(): Promise<OpenFin_2.ExtensionInfo[]>;
|
15014
|
+
/**
|
15015
|
+
* Used to serve an asset signed by OpenFin within the given runtime.
|
15016
|
+
* Not indended for general use, will be used by the `@openfin/workspace-platform` package.
|
15017
|
+
*/
|
15018
|
+
serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
|
14960
15019
|
}
|
14961
15020
|
|
14962
15021
|
/**
|
@@ -17434,7 +17493,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17434
17493
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
17435
17494
|
* ```
|
17436
17495
|
*/
|
17437
|
-
getBounds(): Promise<OpenFin_2.WindowBounds>;
|
17496
|
+
getBounds(options?: OpenFin_2.GetBoundsOptions): Promise<OpenFin_2.WindowBounds>;
|
17438
17497
|
/**
|
17439
17498
|
* Centers the window on its current screen.
|
17440
17499
|
*
|
package/out/mock.d.ts
CHANGED
@@ -192,6 +192,10 @@ declare type AppAssetRequest = {
|
|
192
192
|
alias: string;
|
193
193
|
};
|
194
194
|
|
195
|
+
declare type AppAssetServeRequest = ServeRequest & {
|
196
|
+
alias: string;
|
197
|
+
};
|
198
|
+
|
195
199
|
/**
|
196
200
|
* An object representing an application. Allows the developer to create,
|
197
201
|
* execute, show/close an application as well as listen to {@link OpenFin.ApplicationEvents application events}.
|
@@ -5762,6 +5766,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
5762
5766
|
entityType: string;
|
5763
5767
|
};
|
5764
5768
|
|
5769
|
+
/**
|
5770
|
+
* @interface
|
5771
|
+
* Options for the {@link Window._Window.getBounds} method.
|
5772
|
+
*/
|
5773
|
+
declare interface GetBoundsOptions {
|
5774
|
+
/**
|
5775
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
5776
|
+
*
|
5777
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
5778
|
+
* - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
|
5779
|
+
*
|
5780
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
5781
|
+
*
|
5782
|
+
* If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
|
5783
|
+
*
|
5784
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
5785
|
+
*
|
5786
|
+
* **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
|
5787
|
+
*
|
5788
|
+
* @default 'normal'
|
5789
|
+
*/
|
5790
|
+
boundsType?: 'normal' | 'current';
|
5791
|
+
}
|
5792
|
+
|
5765
5793
|
/**
|
5766
5794
|
* @interface
|
5767
5795
|
*/
|
@@ -7698,7 +7726,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
7698
7726
|
*
|
7699
7727
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
7700
7728
|
*
|
7701
|
-
* ####
|
7729
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
7702
7730
|
* Adds a listener to the end of the listeners array for the specified event.
|
7703
7731
|
* @example
|
7704
7732
|
* ```js
|
@@ -7715,7 +7743,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
7715
7743
|
* });
|
7716
7744
|
* ```
|
7717
7745
|
*
|
7718
|
-
* ####
|
7746
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
7719
7747
|
* Adds a listener to the end of the listeners array for the specified event.
|
7720
7748
|
* @example
|
7721
7749
|
* ```js
|
@@ -7988,7 +8016,7 @@ declare class Layout extends Base {
|
|
7988
8016
|
*/
|
7989
8017
|
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
7990
8018
|
/**
|
7991
|
-
* Adds a view to the platform layout. Behaves like @link
|
8019
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
7992
8020
|
*
|
7993
8021
|
* @param viewOptions - The options for creating the view.
|
7994
8022
|
* @param options - Optional parameters for adding the view.
|
@@ -8004,7 +8032,7 @@ declare class Layout extends Base {
|
|
8004
8032
|
}>;
|
8005
8033
|
/**
|
8006
8034
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
8007
|
-
* Behaves like @link
|
8035
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
8008
8036
|
*
|
8009
8037
|
* @param viewIdentity - The identity of the view to close.
|
8010
8038
|
* @returns A promise that resolves when the view is closed.
|
@@ -9610,6 +9638,7 @@ declare namespace OpenFin_2 {
|
|
9610
9638
|
EntityType_4 as EntityType,
|
9611
9639
|
Bounds,
|
9612
9640
|
WindowBounds,
|
9641
|
+
GetBoundsOptions,
|
9613
9642
|
Rectangle,
|
9614
9643
|
ApplicationCreationOptions,
|
9615
9644
|
TimeZones,
|
@@ -9935,6 +9964,11 @@ declare namespace OpenFin_2 {
|
|
9935
9964
|
DownloadShelfOptions,
|
9936
9965
|
ViewShowAtOptions,
|
9937
9966
|
ExtensionInfo,
|
9967
|
+
ServeRequest,
|
9968
|
+
AppAssetServeRequest,
|
9969
|
+
PathServeRequest,
|
9970
|
+
ServeAssetOptions,
|
9971
|
+
ServedAssetInfo,
|
9938
9972
|
ApplicationEvents,
|
9939
9973
|
BaseEvents,
|
9940
9974
|
ExternalApplicationEvents,
|
@@ -10003,6 +10037,10 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
|
|
10003
10037
|
title: string;
|
10004
10038
|
};
|
10005
10039
|
|
10040
|
+
declare type PathServeRequest = ServeRequest & {
|
10041
|
+
path: string;
|
10042
|
+
};
|
10043
|
+
|
10006
10044
|
declare type Payload<Success extends boolean = boolean, Data = any> = {
|
10007
10045
|
success: Success;
|
10008
10046
|
data: Success extends true ? Data : never;
|
@@ -12369,7 +12407,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12369
12407
|
options: OpenFin_2.TransitionOptions;
|
12370
12408
|
}>;
|
12371
12409
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12372
|
-
'get-window-bounds': IdentityCall<{
|
12410
|
+
'get-window-bounds': IdentityCall<{
|
12411
|
+
options?: OpenFin_2.GetBoundsOptions;
|
12412
|
+
}, OpenFin_2.WindowBounds>;
|
12373
12413
|
'center-window': IdentityCall;
|
12374
12414
|
'blur-window': IdentityCall;
|
12375
12415
|
'bring-window-to-front': IdentityCall;
|
@@ -12705,6 +12745,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12705
12745
|
options: OpenFin_2.ProcessLoggingOptions;
|
12706
12746
|
}, void>;
|
12707
12747
|
'get-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.DefaultDomainSettings>;
|
12748
|
+
'serve-asset': ApiCall<{
|
12749
|
+
options: OpenFin_2.ServeAssetOptions;
|
12750
|
+
}, OpenFin_2.ServedAssetInfo>;
|
12708
12751
|
'set-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity & {
|
12709
12752
|
domainSettings: OpenFin_2.DefaultDomainSettings;
|
12710
12753
|
}, void>;
|
@@ -13437,6 +13480,16 @@ declare type SentMessage<Value> = Promise<Value> & {
|
|
13437
13480
|
messageId: ReturnType<Environment['getNextMessageId']>;
|
13438
13481
|
};
|
13439
13482
|
|
13483
|
+
declare type ServeAssetOptions = AppAssetServeRequest | PathServeRequest;
|
13484
|
+
|
13485
|
+
declare type ServedAssetInfo = {
|
13486
|
+
baseUrl: string;
|
13487
|
+
};
|
13488
|
+
|
13489
|
+
declare type ServeRequest = {
|
13490
|
+
hostName: string;
|
13491
|
+
};
|
13492
|
+
|
13440
13493
|
/**
|
13441
13494
|
* @interface
|
13442
13495
|
*/
|
@@ -13734,6 +13787,7 @@ declare type Snapshot = {
|
|
13734
13787
|
declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
|
13735
13788
|
topic: 'application';
|
13736
13789
|
type: 'platform-snapshot-applied';
|
13790
|
+
snapshot: Snapshot;
|
13737
13791
|
};
|
13738
13792
|
|
13739
13793
|
/**
|
@@ -15364,6 +15418,11 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
15364
15418
|
* Gets the currently-installed
|
15365
15419
|
*/
|
15366
15420
|
getInstalledExtensions(): Promise<OpenFin_2.ExtensionInfo[]>;
|
15421
|
+
/**
|
15422
|
+
* Used to serve an asset signed by OpenFin within the given runtime.
|
15423
|
+
* Not indended for general use, will be used by the `@openfin/workspace-platform` package.
|
15424
|
+
*/
|
15425
|
+
serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
|
15367
15426
|
}
|
15368
15427
|
|
15369
15428
|
/**
|
@@ -17888,7 +17947,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17888
17947
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
17889
17948
|
* ```
|
17890
17949
|
*/
|
17891
|
-
getBounds(): Promise<OpenFin_2.WindowBounds>;
|
17950
|
+
getBounds(options?: OpenFin_2.GetBoundsOptions): Promise<OpenFin_2.WindowBounds>;
|
17892
17951
|
/**
|
17893
17952
|
* Centers the window on its current screen.
|
17894
17953
|
*
|
package/out/mock.js
CHANGED
@@ -4024,9 +4024,9 @@ function requireInstance () {
|
|
4024
4024
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
4025
4025
|
* ```
|
4026
4026
|
*/
|
4027
|
-
getBounds() {
|
4027
|
+
getBounds(options) {
|
4028
4028
|
return this.wire
|
4029
|
-
.sendAction('get-window-bounds', this.identity)
|
4029
|
+
.sendAction('get-window-bounds', { ...this.identity, options })
|
4030
4030
|
.then(({ payload }) => payload.data);
|
4031
4031
|
}
|
4032
4032
|
/**
|
@@ -7246,6 +7246,13 @@ class System extends base_1$i.EmitterBase {
|
|
7246
7246
|
const { payload } = await this.wire.sendAction('get-installed-extensions');
|
7247
7247
|
return payload.data;
|
7248
7248
|
}
|
7249
|
+
/**
|
7250
|
+
* Used to serve an asset signed by OpenFin within the given runtime.
|
7251
|
+
* Not indended for general use, will be used by the `@openfin/workspace-platform` package.
|
7252
|
+
*/
|
7253
|
+
async serveAsset(options) {
|
7254
|
+
return (await this.wire.sendAction('serve-asset', { options })).payload.data;
|
7255
|
+
}
|
7249
7256
|
}
|
7250
7257
|
system.System = System;
|
7251
7258
|
|
@@ -11969,7 +11976,7 @@ const layout_constants_1$1 = layout_constants;
|
|
11969
11976
|
*
|
11970
11977
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
11971
11978
|
*
|
11972
|
-
* ####
|
11979
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
11973
11980
|
* Adds a listener to the end of the listeners array for the specified event.
|
11974
11981
|
* @example
|
11975
11982
|
* ```js
|
@@ -11986,7 +11993,7 @@ const layout_constants_1$1 = layout_constants;
|
|
11986
11993
|
* });
|
11987
11994
|
* ```
|
11988
11995
|
*
|
11989
|
-
* ####
|
11996
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
11990
11997
|
* Adds a listener to the end of the listeners array for the specified event.
|
11991
11998
|
* @example
|
11992
11999
|
* ```js
|
@@ -12337,7 +12344,7 @@ class Layout extends base_1$5.Base {
|
|
12337
12344
|
return layout_entities_1.LayoutNode.getEntity(stack, client);
|
12338
12345
|
}
|
12339
12346
|
/**
|
12340
|
-
* Adds a view to the platform layout. Behaves like @link
|
12347
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
12341
12348
|
*
|
12342
12349
|
* @param viewOptions - The options for creating the view.
|
12343
12350
|
* @param options - Optional parameters for adding the view.
|
@@ -12358,7 +12365,7 @@ class Layout extends base_1$5.Base {
|
|
12358
12365
|
}
|
12359
12366
|
/**
|
12360
12367
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
12361
|
-
* Behaves like @link
|
12368
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
12362
12369
|
*
|
12363
12370
|
* @param viewIdentity - The identity of the view to close.
|
12364
12371
|
* @returns A promise that resolves when the view is closed.
|
@@ -14730,31 +14737,6 @@ function requireInteropBroker () {
|
|
14730
14737
|
if (!context.type) {
|
14731
14738
|
return { isValid: false, reason: 'Context must have a type property' };
|
14732
14739
|
}
|
14733
|
-
if (context.id && typeof context.id !== 'object') {
|
14734
|
-
return {
|
14735
|
-
isValid: false,
|
14736
|
-
reason: 'Context id must be an Object populated with key-value identifiers (if set)'
|
14737
|
-
};
|
14738
|
-
}
|
14739
|
-
if (context.id) {
|
14740
|
-
const { id } = context;
|
14741
|
-
const keys = Object.keys(id);
|
14742
|
-
let foundBadIdentifier = false;
|
14743
|
-
if (!keys.length) {
|
14744
|
-
return { isValid: false, reason: 'Context id must have at least one key-value identifier' };
|
14745
|
-
}
|
14746
|
-
keys.forEach((key) => {
|
14747
|
-
if (typeof key !== 'string' || typeof id[key] !== 'string') {
|
14748
|
-
foundBadIdentifier = true;
|
14749
|
-
}
|
14750
|
-
});
|
14751
|
-
if (foundBadIdentifier) {
|
14752
|
-
return { isValid: false, reason: 'Context id key-value identifiers must be of type string' };
|
14753
|
-
}
|
14754
|
-
}
|
14755
|
-
if (context.name && typeof context.name !== 'string') {
|
14756
|
-
return { isValid: false, reason: 'Context name must be of string type (if set)' };
|
14757
|
-
}
|
14758
14740
|
return { isValid: true };
|
14759
14741
|
}
|
14760
14742
|
// Util to check a client identity.
|