@openfin/core 40.82.19 → 40.82.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/mock-alpha.d.ts +110 -10
- package/out/mock-beta.d.ts +110 -10
- package/out/mock-public.d.ts +110 -10
- package/out/mock.d.ts +113 -10
- package/out/mock.js +999 -971
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
|
@@ -3657,11 +3657,6 @@ declare type ConstWindowOptions = {
|
|
|
3657
3657
|
* @deprecated - use `icon` instead.
|
|
3658
3658
|
*/
|
|
3659
3659
|
taskbarIcon: string;
|
|
3660
|
-
/**
|
|
3661
|
-
* Specify a taskbar group for the window.
|
|
3662
|
-
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
|
3663
|
-
*/
|
|
3664
|
-
taskbarIconGroup: string;
|
|
3665
3660
|
/**
|
|
3666
3661
|
* @defaultValue "about:blank"
|
|
3667
3662
|
*
|
|
@@ -4699,6 +4694,7 @@ declare interface Environment {
|
|
|
4699
4694
|
getInteropInfo(fin: OpenFin_2.Fin<OpenFin_2.EntityType>): Promise<InternalInteropBrokerOptions & {
|
|
4700
4695
|
fdc3Version?: Version;
|
|
4701
4696
|
}>;
|
|
4697
|
+
getViewWindowIdentity(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, identity: OpenFin_2.Identity): Promise<OpenFin_2.Identity>;
|
|
4702
4698
|
readonly type: EnvironmentType;
|
|
4703
4699
|
}
|
|
4704
4700
|
|
|
@@ -7521,6 +7517,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
7521
7517
|
*/
|
|
7522
7518
|
declare class Layout extends Base {
|
|
7523
7519
|
#private;
|
|
7520
|
+
/* Excluded from this release type: getClient */
|
|
7524
7521
|
/* Excluded from this release type: init */
|
|
7525
7522
|
identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
|
|
7526
7523
|
private platform;
|
|
@@ -7620,6 +7617,16 @@ declare class Layout extends Base {
|
|
|
7620
7617
|
* ```
|
|
7621
7618
|
*/
|
|
7622
7619
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
|
7620
|
+
/**
|
|
7621
|
+
* Retrieves the OpenFin.TabStack instance which the View belongs to.
|
|
7622
|
+
*
|
|
7623
|
+
* @example
|
|
7624
|
+
* ```js
|
|
7625
|
+
* const viewIdentity = { uuid: 'uuid', name: 'view-name' };
|
|
7626
|
+
* const stack = await fin.View.wrapSync(viewIdentity).getStackByViewIdentity(viewIdentity);
|
|
7627
|
+
* console.log(await stack.getViews());
|
|
7628
|
+
* ```
|
|
7629
|
+
*/
|
|
7623
7630
|
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
|
7624
7631
|
/**
|
|
7625
7632
|
* Replaces the specified view with a view with the provided configuration.
|
|
@@ -7778,10 +7785,7 @@ declare type LayoutIdentity = Identity_4 & {
|
|
|
7778
7785
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
|
7779
7786
|
type: 'layout-initialized';
|
|
7780
7787
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
7781
|
-
ofViews:
|
|
7782
|
-
identity: OpenFin_2.Identity;
|
|
7783
|
-
entityType: 'view';
|
|
7784
|
-
}[];
|
|
7788
|
+
ofViews: OpenFin_2.ViewCreationResult[];
|
|
7785
7789
|
};
|
|
7786
7790
|
|
|
7787
7791
|
/**
|
|
@@ -7990,6 +7994,17 @@ declare class LayoutModule extends Base {
|
|
|
7990
7994
|
* ```
|
|
7991
7995
|
*/
|
|
7992
7996
|
getCurrentSync(): OpenFin_2.Layout;
|
|
7997
|
+
/**
|
|
7998
|
+
* Retrieves the OpenFin.Layout instance for the Window the View is attached to.
|
|
7999
|
+
*
|
|
8000
|
+
* @example
|
|
8001
|
+
* ```js
|
|
8002
|
+
* const viewIdentity = { uuid: 'uuid', name: 'view-name' };
|
|
8003
|
+
* const layout = await fin.Platform.Layout.getLayoutByViewIdentity(viewIdentity);
|
|
8004
|
+
* console.log(await layout.getCurrentViews());
|
|
8005
|
+
* ```
|
|
8006
|
+
*/
|
|
8007
|
+
getLayoutByViewIdentity(viewIdentity: OpenFin_2.Identity): Promise<OpenFin_2.Layout>;
|
|
7993
8008
|
/**
|
|
7994
8009
|
* Initialize the window's Layout.
|
|
7995
8010
|
*
|
|
@@ -8869,6 +8884,12 @@ declare type MutableWindowOptions = {
|
|
|
8869
8884
|
* Shows the window's icon in the taskbar.
|
|
8870
8885
|
*/
|
|
8871
8886
|
showTaskbarIcon: boolean;
|
|
8887
|
+
/**
|
|
8888
|
+
* Specify a taskbar group for the window.
|
|
8889
|
+
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
|
8890
|
+
* @remarks It's only updatable when `enableJumpList` is set to false.
|
|
8891
|
+
*/
|
|
8892
|
+
taskbarIconGroup: string;
|
|
8872
8893
|
interop: InteropConfig;
|
|
8873
8894
|
/* Excluded from this release type: _internalWorkspaceData */
|
|
8874
8895
|
/* Excluded from this release type: workspacePlatform */
|
|
@@ -9125,6 +9146,9 @@ declare namespace OpenFin_2 {
|
|
|
9125
9146
|
ViewOptions,
|
|
9126
9147
|
ConstViewOptions,
|
|
9127
9148
|
ViewState,
|
|
9149
|
+
ViewCreationSuccess,
|
|
9150
|
+
ViewCreationFailure,
|
|
9151
|
+
ViewCreationResult,
|
|
9128
9152
|
Certificate,
|
|
9129
9153
|
HostContextChangedPayload,
|
|
9130
9154
|
ApplySnapshotOptions,
|
|
@@ -10928,6 +10952,45 @@ declare interface PlatformProvider {
|
|
|
10928
10952
|
* @returns {Promise<void>}
|
|
10929
10953
|
*/
|
|
10930
10954
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
10955
|
+
/**
|
|
10956
|
+
* @experimental
|
|
10957
|
+
*
|
|
10958
|
+
* This method is called to handle errors with view creation and initial navigation during layout creation.
|
|
10959
|
+
* Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
|
|
10960
|
+
* * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
|
|
10961
|
+
* * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
|
|
10962
|
+
* * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
|
|
10963
|
+
*
|
|
10964
|
+
* @param viewIdentity Identity of the view
|
|
10965
|
+
* @param error error thrown during a view creation
|
|
10966
|
+
* @returns {Promise<OpenFin.ViewCreationSuccess | void>}
|
|
10967
|
+
*
|
|
10968
|
+
* @example
|
|
10969
|
+
*
|
|
10970
|
+
* ```js
|
|
10971
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
10972
|
+
* class Override extends PlatformProvider {
|
|
10973
|
+
* async handleFailedViewCreation(viewIdentity, error) {
|
|
10974
|
+
* const view = fin.View.wrapSync(viewId);
|
|
10975
|
+
* try {
|
|
10976
|
+
* // navigate to an error page
|
|
10977
|
+
* await view.navigate('http://localhost:3000/errorPage.html');
|
|
10978
|
+
* // resolve a success result after redirecting to a error page
|
|
10979
|
+
* return {identity: viewIdentity, success: true};
|
|
10980
|
+
* } catch(e) {
|
|
10981
|
+
* // layout-initialized event will include this view with the error
|
|
10982
|
+
* throw error;
|
|
10983
|
+
* }
|
|
10984
|
+
* }
|
|
10985
|
+
* }
|
|
10986
|
+
* return new Override();
|
|
10987
|
+
* }
|
|
10988
|
+
*
|
|
10989
|
+
* fin.Platform.init({ overrideCallback });
|
|
10990
|
+
*
|
|
10991
|
+
* ```
|
|
10992
|
+
*/
|
|
10993
|
+
handleFailedViewCreation(viewIdentity: OpenFin_2.Identity, error: Error): Promise<OpenFin_2.ViewCreationSuccess | void>;
|
|
10931
10994
|
}
|
|
10932
10995
|
|
|
10933
10996
|
/**
|
|
@@ -15420,7 +15483,7 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
|
|
|
15420
15483
|
*/
|
|
15421
15484
|
getInfo: () => Promise<OpenFin_2.ViewInfo>;
|
|
15422
15485
|
/**
|
|
15423
|
-
* Retrieves the
|
|
15486
|
+
* Retrieves the OpenFin.Layout instance for the Window the View is attached to.
|
|
15424
15487
|
*
|
|
15425
15488
|
* @example
|
|
15426
15489
|
* ```js
|
|
@@ -15584,6 +15647,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
|
|
|
15584
15647
|
options?: Partial<ViewOptions>;
|
|
15585
15648
|
};
|
|
15586
15649
|
|
|
15650
|
+
/**
|
|
15651
|
+
* @interface
|
|
15652
|
+
*/
|
|
15653
|
+
declare type ViewCreationFailure = {
|
|
15654
|
+
/**
|
|
15655
|
+
* The identity of the created view
|
|
15656
|
+
*/
|
|
15657
|
+
identity: Identity_4;
|
|
15658
|
+
/**
|
|
15659
|
+
* Whether the view was created with errors
|
|
15660
|
+
*/
|
|
15661
|
+
success: false;
|
|
15662
|
+
/**
|
|
15663
|
+
* Error thrown during view creation
|
|
15664
|
+
*/
|
|
15665
|
+
error: Error;
|
|
15666
|
+
};
|
|
15667
|
+
|
|
15587
15668
|
/**
|
|
15588
15669
|
* The options object required by {@link View.ViewModule.create View.create}.
|
|
15589
15670
|
*
|
|
@@ -15599,6 +15680,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
|
15599
15680
|
|
|
15600
15681
|
declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
|
|
15601
15682
|
|
|
15683
|
+
/**
|
|
15684
|
+
* A view creation state
|
|
15685
|
+
*/
|
|
15686
|
+
declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
|
|
15687
|
+
|
|
15688
|
+
/**
|
|
15689
|
+
* @interface
|
|
15690
|
+
*/
|
|
15691
|
+
declare type ViewCreationSuccess = {
|
|
15692
|
+
/**
|
|
15693
|
+
* The identity of the created view
|
|
15694
|
+
*/
|
|
15695
|
+
identity: Identity_4;
|
|
15696
|
+
/**
|
|
15697
|
+
* Whether the view was created without errors
|
|
15698
|
+
*/
|
|
15699
|
+
success: true;
|
|
15700
|
+
};
|
|
15701
|
+
|
|
15602
15702
|
/**
|
|
15603
15703
|
* Generated when a window has a view detached from it.
|
|
15604
15704
|
* @remarks Will fire when a view is destroyed in which case `target` will be null.
|
package/out/mock-beta.d.ts
CHANGED
|
@@ -3657,11 +3657,6 @@ declare type ConstWindowOptions = {
|
|
|
3657
3657
|
* @deprecated - use `icon` instead.
|
|
3658
3658
|
*/
|
|
3659
3659
|
taskbarIcon: string;
|
|
3660
|
-
/**
|
|
3661
|
-
* Specify a taskbar group for the window.
|
|
3662
|
-
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
|
3663
|
-
*/
|
|
3664
|
-
taskbarIconGroup: string;
|
|
3665
3660
|
/**
|
|
3666
3661
|
* @defaultValue "about:blank"
|
|
3667
3662
|
*
|
|
@@ -4699,6 +4694,7 @@ declare interface Environment {
|
|
|
4699
4694
|
getInteropInfo(fin: OpenFin_2.Fin<OpenFin_2.EntityType>): Promise<InternalInteropBrokerOptions & {
|
|
4700
4695
|
fdc3Version?: Version;
|
|
4701
4696
|
}>;
|
|
4697
|
+
getViewWindowIdentity(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, identity: OpenFin_2.Identity): Promise<OpenFin_2.Identity>;
|
|
4702
4698
|
readonly type: EnvironmentType;
|
|
4703
4699
|
}
|
|
4704
4700
|
|
|
@@ -7521,6 +7517,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
7521
7517
|
*/
|
|
7522
7518
|
declare class Layout extends Base {
|
|
7523
7519
|
#private;
|
|
7520
|
+
/* Excluded from this release type: getClient */
|
|
7524
7521
|
/* Excluded from this release type: init */
|
|
7525
7522
|
identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
|
|
7526
7523
|
private platform;
|
|
@@ -7620,6 +7617,16 @@ declare class Layout extends Base {
|
|
|
7620
7617
|
* ```
|
|
7621
7618
|
*/
|
|
7622
7619
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
|
7620
|
+
/**
|
|
7621
|
+
* Retrieves the OpenFin.TabStack instance which the View belongs to.
|
|
7622
|
+
*
|
|
7623
|
+
* @example
|
|
7624
|
+
* ```js
|
|
7625
|
+
* const viewIdentity = { uuid: 'uuid', name: 'view-name' };
|
|
7626
|
+
* const stack = await fin.View.wrapSync(viewIdentity).getStackByViewIdentity(viewIdentity);
|
|
7627
|
+
* console.log(await stack.getViews());
|
|
7628
|
+
* ```
|
|
7629
|
+
*/
|
|
7623
7630
|
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
|
7624
7631
|
/**
|
|
7625
7632
|
* Replaces the specified view with a view with the provided configuration.
|
|
@@ -7778,10 +7785,7 @@ declare type LayoutIdentity = Identity_4 & {
|
|
|
7778
7785
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
|
7779
7786
|
type: 'layout-initialized';
|
|
7780
7787
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
7781
|
-
ofViews:
|
|
7782
|
-
identity: OpenFin_2.Identity;
|
|
7783
|
-
entityType: 'view';
|
|
7784
|
-
}[];
|
|
7788
|
+
ofViews: OpenFin_2.ViewCreationResult[];
|
|
7785
7789
|
};
|
|
7786
7790
|
|
|
7787
7791
|
/**
|
|
@@ -7990,6 +7994,17 @@ declare class LayoutModule extends Base {
|
|
|
7990
7994
|
* ```
|
|
7991
7995
|
*/
|
|
7992
7996
|
getCurrentSync(): OpenFin_2.Layout;
|
|
7997
|
+
/**
|
|
7998
|
+
* Retrieves the OpenFin.Layout instance for the Window the View is attached to.
|
|
7999
|
+
*
|
|
8000
|
+
* @example
|
|
8001
|
+
* ```js
|
|
8002
|
+
* const viewIdentity = { uuid: 'uuid', name: 'view-name' };
|
|
8003
|
+
* const layout = await fin.Platform.Layout.getLayoutByViewIdentity(viewIdentity);
|
|
8004
|
+
* console.log(await layout.getCurrentViews());
|
|
8005
|
+
* ```
|
|
8006
|
+
*/
|
|
8007
|
+
getLayoutByViewIdentity(viewIdentity: OpenFin_2.Identity): Promise<OpenFin_2.Layout>;
|
|
7993
8008
|
/**
|
|
7994
8009
|
* Initialize the window's Layout.
|
|
7995
8010
|
*
|
|
@@ -8869,6 +8884,12 @@ declare type MutableWindowOptions = {
|
|
|
8869
8884
|
* Shows the window's icon in the taskbar.
|
|
8870
8885
|
*/
|
|
8871
8886
|
showTaskbarIcon: boolean;
|
|
8887
|
+
/**
|
|
8888
|
+
* Specify a taskbar group for the window.
|
|
8889
|
+
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
|
8890
|
+
* @remarks It's only updatable when `enableJumpList` is set to false.
|
|
8891
|
+
*/
|
|
8892
|
+
taskbarIconGroup: string;
|
|
8872
8893
|
interop: InteropConfig;
|
|
8873
8894
|
/* Excluded from this release type: _internalWorkspaceData */
|
|
8874
8895
|
/* Excluded from this release type: workspacePlatform */
|
|
@@ -9125,6 +9146,9 @@ declare namespace OpenFin_2 {
|
|
|
9125
9146
|
ViewOptions,
|
|
9126
9147
|
ConstViewOptions,
|
|
9127
9148
|
ViewState,
|
|
9149
|
+
ViewCreationSuccess,
|
|
9150
|
+
ViewCreationFailure,
|
|
9151
|
+
ViewCreationResult,
|
|
9128
9152
|
Certificate,
|
|
9129
9153
|
HostContextChangedPayload,
|
|
9130
9154
|
ApplySnapshotOptions,
|
|
@@ -10928,6 +10952,45 @@ declare interface PlatformProvider {
|
|
|
10928
10952
|
* @returns {Promise<void>}
|
|
10929
10953
|
*/
|
|
10930
10954
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
10955
|
+
/**
|
|
10956
|
+
* @experimental
|
|
10957
|
+
*
|
|
10958
|
+
* This method is called to handle errors with view creation and initial navigation during layout creation.
|
|
10959
|
+
* Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
|
|
10960
|
+
* * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
|
|
10961
|
+
* * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
|
|
10962
|
+
* * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
|
|
10963
|
+
*
|
|
10964
|
+
* @param viewIdentity Identity of the view
|
|
10965
|
+
* @param error error thrown during a view creation
|
|
10966
|
+
* @returns {Promise<OpenFin.ViewCreationSuccess | void>}
|
|
10967
|
+
*
|
|
10968
|
+
* @example
|
|
10969
|
+
*
|
|
10970
|
+
* ```js
|
|
10971
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
10972
|
+
* class Override extends PlatformProvider {
|
|
10973
|
+
* async handleFailedViewCreation(viewIdentity, error) {
|
|
10974
|
+
* const view = fin.View.wrapSync(viewId);
|
|
10975
|
+
* try {
|
|
10976
|
+
* // navigate to an error page
|
|
10977
|
+
* await view.navigate('http://localhost:3000/errorPage.html');
|
|
10978
|
+
* // resolve a success result after redirecting to a error page
|
|
10979
|
+
* return {identity: viewIdentity, success: true};
|
|
10980
|
+
* } catch(e) {
|
|
10981
|
+
* // layout-initialized event will include this view with the error
|
|
10982
|
+
* throw error;
|
|
10983
|
+
* }
|
|
10984
|
+
* }
|
|
10985
|
+
* }
|
|
10986
|
+
* return new Override();
|
|
10987
|
+
* }
|
|
10988
|
+
*
|
|
10989
|
+
* fin.Platform.init({ overrideCallback });
|
|
10990
|
+
*
|
|
10991
|
+
* ```
|
|
10992
|
+
*/
|
|
10993
|
+
handleFailedViewCreation(viewIdentity: OpenFin_2.Identity, error: Error): Promise<OpenFin_2.ViewCreationSuccess | void>;
|
|
10931
10994
|
}
|
|
10932
10995
|
|
|
10933
10996
|
/**
|
|
@@ -15420,7 +15483,7 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
|
|
|
15420
15483
|
*/
|
|
15421
15484
|
getInfo: () => Promise<OpenFin_2.ViewInfo>;
|
|
15422
15485
|
/**
|
|
15423
|
-
* Retrieves the
|
|
15486
|
+
* Retrieves the OpenFin.Layout instance for the Window the View is attached to.
|
|
15424
15487
|
*
|
|
15425
15488
|
* @example
|
|
15426
15489
|
* ```js
|
|
@@ -15584,6 +15647,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
|
|
|
15584
15647
|
options?: Partial<ViewOptions>;
|
|
15585
15648
|
};
|
|
15586
15649
|
|
|
15650
|
+
/**
|
|
15651
|
+
* @interface
|
|
15652
|
+
*/
|
|
15653
|
+
declare type ViewCreationFailure = {
|
|
15654
|
+
/**
|
|
15655
|
+
* The identity of the created view
|
|
15656
|
+
*/
|
|
15657
|
+
identity: Identity_4;
|
|
15658
|
+
/**
|
|
15659
|
+
* Whether the view was created with errors
|
|
15660
|
+
*/
|
|
15661
|
+
success: false;
|
|
15662
|
+
/**
|
|
15663
|
+
* Error thrown during view creation
|
|
15664
|
+
*/
|
|
15665
|
+
error: Error;
|
|
15666
|
+
};
|
|
15667
|
+
|
|
15587
15668
|
/**
|
|
15588
15669
|
* The options object required by {@link View.ViewModule.create View.create}.
|
|
15589
15670
|
*
|
|
@@ -15599,6 +15680,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
|
15599
15680
|
|
|
15600
15681
|
declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
|
|
15601
15682
|
|
|
15683
|
+
/**
|
|
15684
|
+
* A view creation state
|
|
15685
|
+
*/
|
|
15686
|
+
declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
|
|
15687
|
+
|
|
15688
|
+
/**
|
|
15689
|
+
* @interface
|
|
15690
|
+
*/
|
|
15691
|
+
declare type ViewCreationSuccess = {
|
|
15692
|
+
/**
|
|
15693
|
+
* The identity of the created view
|
|
15694
|
+
*/
|
|
15695
|
+
identity: Identity_4;
|
|
15696
|
+
/**
|
|
15697
|
+
* Whether the view was created without errors
|
|
15698
|
+
*/
|
|
15699
|
+
success: true;
|
|
15700
|
+
};
|
|
15701
|
+
|
|
15602
15702
|
/**
|
|
15603
15703
|
* Generated when a window has a view detached from it.
|
|
15604
15704
|
* @remarks Will fire when a view is destroyed in which case `target` will be null.
|
package/out/mock-public.d.ts
CHANGED
|
@@ -3657,11 +3657,6 @@ declare type ConstWindowOptions = {
|
|
|
3657
3657
|
* @deprecated - use `icon` instead.
|
|
3658
3658
|
*/
|
|
3659
3659
|
taskbarIcon: string;
|
|
3660
|
-
/**
|
|
3661
|
-
* Specify a taskbar group for the window.
|
|
3662
|
-
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
|
3663
|
-
*/
|
|
3664
|
-
taskbarIconGroup: string;
|
|
3665
3660
|
/**
|
|
3666
3661
|
* @defaultValue "about:blank"
|
|
3667
3662
|
*
|
|
@@ -4699,6 +4694,7 @@ declare interface Environment {
|
|
|
4699
4694
|
getInteropInfo(fin: OpenFin_2.Fin<OpenFin_2.EntityType>): Promise<InternalInteropBrokerOptions & {
|
|
4700
4695
|
fdc3Version?: Version;
|
|
4701
4696
|
}>;
|
|
4697
|
+
getViewWindowIdentity(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, identity: OpenFin_2.Identity): Promise<OpenFin_2.Identity>;
|
|
4702
4698
|
readonly type: EnvironmentType;
|
|
4703
4699
|
}
|
|
4704
4700
|
|
|
@@ -7521,6 +7517,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
7521
7517
|
*/
|
|
7522
7518
|
declare class Layout extends Base {
|
|
7523
7519
|
#private;
|
|
7520
|
+
/* Excluded from this release type: getClient */
|
|
7524
7521
|
/* Excluded from this release type: init */
|
|
7525
7522
|
identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
|
|
7526
7523
|
private platform;
|
|
@@ -7620,6 +7617,16 @@ declare class Layout extends Base {
|
|
|
7620
7617
|
* ```
|
|
7621
7618
|
*/
|
|
7622
7619
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
|
7620
|
+
/**
|
|
7621
|
+
* Retrieves the OpenFin.TabStack instance which the View belongs to.
|
|
7622
|
+
*
|
|
7623
|
+
* @example
|
|
7624
|
+
* ```js
|
|
7625
|
+
* const viewIdentity = { uuid: 'uuid', name: 'view-name' };
|
|
7626
|
+
* const stack = await fin.View.wrapSync(viewIdentity).getStackByViewIdentity(viewIdentity);
|
|
7627
|
+
* console.log(await stack.getViews());
|
|
7628
|
+
* ```
|
|
7629
|
+
*/
|
|
7623
7630
|
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
|
7624
7631
|
/**
|
|
7625
7632
|
* Replaces the specified view with a view with the provided configuration.
|
|
@@ -7778,10 +7785,7 @@ declare type LayoutIdentity = Identity_4 & {
|
|
|
7778
7785
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
|
7779
7786
|
type: 'layout-initialized';
|
|
7780
7787
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
7781
|
-
ofViews:
|
|
7782
|
-
identity: OpenFin_2.Identity;
|
|
7783
|
-
entityType: 'view';
|
|
7784
|
-
}[];
|
|
7788
|
+
ofViews: OpenFin_2.ViewCreationResult[];
|
|
7785
7789
|
};
|
|
7786
7790
|
|
|
7787
7791
|
/**
|
|
@@ -7990,6 +7994,17 @@ declare class LayoutModule extends Base {
|
|
|
7990
7994
|
* ```
|
|
7991
7995
|
*/
|
|
7992
7996
|
getCurrentSync(): OpenFin_2.Layout;
|
|
7997
|
+
/**
|
|
7998
|
+
* Retrieves the OpenFin.Layout instance for the Window the View is attached to.
|
|
7999
|
+
*
|
|
8000
|
+
* @example
|
|
8001
|
+
* ```js
|
|
8002
|
+
* const viewIdentity = { uuid: 'uuid', name: 'view-name' };
|
|
8003
|
+
* const layout = await fin.Platform.Layout.getLayoutByViewIdentity(viewIdentity);
|
|
8004
|
+
* console.log(await layout.getCurrentViews());
|
|
8005
|
+
* ```
|
|
8006
|
+
*/
|
|
8007
|
+
getLayoutByViewIdentity(viewIdentity: OpenFin_2.Identity): Promise<OpenFin_2.Layout>;
|
|
7993
8008
|
/**
|
|
7994
8009
|
* Initialize the window's Layout.
|
|
7995
8010
|
*
|
|
@@ -8869,6 +8884,12 @@ declare type MutableWindowOptions = {
|
|
|
8869
8884
|
* Shows the window's icon in the taskbar.
|
|
8870
8885
|
*/
|
|
8871
8886
|
showTaskbarIcon: boolean;
|
|
8887
|
+
/**
|
|
8888
|
+
* Specify a taskbar group for the window.
|
|
8889
|
+
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
|
8890
|
+
* @remarks It's only updatable when `enableJumpList` is set to false.
|
|
8891
|
+
*/
|
|
8892
|
+
taskbarIconGroup: string;
|
|
8872
8893
|
interop: InteropConfig;
|
|
8873
8894
|
/* Excluded from this release type: _internalWorkspaceData */
|
|
8874
8895
|
/* Excluded from this release type: workspacePlatform */
|
|
@@ -9125,6 +9146,9 @@ declare namespace OpenFin_2 {
|
|
|
9125
9146
|
ViewOptions,
|
|
9126
9147
|
ConstViewOptions,
|
|
9127
9148
|
ViewState,
|
|
9149
|
+
ViewCreationSuccess,
|
|
9150
|
+
ViewCreationFailure,
|
|
9151
|
+
ViewCreationResult,
|
|
9128
9152
|
Certificate,
|
|
9129
9153
|
HostContextChangedPayload,
|
|
9130
9154
|
ApplySnapshotOptions,
|
|
@@ -10928,6 +10952,45 @@ declare interface PlatformProvider {
|
|
|
10928
10952
|
* @returns {Promise<void>}
|
|
10929
10953
|
*/
|
|
10930
10954
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
10955
|
+
/**
|
|
10956
|
+
* @experimental
|
|
10957
|
+
*
|
|
10958
|
+
* This method is called to handle errors with view creation and initial navigation during layout creation.
|
|
10959
|
+
* Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
|
|
10960
|
+
* * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
|
|
10961
|
+
* * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
|
|
10962
|
+
* * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
|
|
10963
|
+
*
|
|
10964
|
+
* @param viewIdentity Identity of the view
|
|
10965
|
+
* @param error error thrown during a view creation
|
|
10966
|
+
* @returns {Promise<OpenFin.ViewCreationSuccess | void>}
|
|
10967
|
+
*
|
|
10968
|
+
* @example
|
|
10969
|
+
*
|
|
10970
|
+
* ```js
|
|
10971
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
10972
|
+
* class Override extends PlatformProvider {
|
|
10973
|
+
* async handleFailedViewCreation(viewIdentity, error) {
|
|
10974
|
+
* const view = fin.View.wrapSync(viewId);
|
|
10975
|
+
* try {
|
|
10976
|
+
* // navigate to an error page
|
|
10977
|
+
* await view.navigate('http://localhost:3000/errorPage.html');
|
|
10978
|
+
* // resolve a success result after redirecting to a error page
|
|
10979
|
+
* return {identity: viewIdentity, success: true};
|
|
10980
|
+
* } catch(e) {
|
|
10981
|
+
* // layout-initialized event will include this view with the error
|
|
10982
|
+
* throw error;
|
|
10983
|
+
* }
|
|
10984
|
+
* }
|
|
10985
|
+
* }
|
|
10986
|
+
* return new Override();
|
|
10987
|
+
* }
|
|
10988
|
+
*
|
|
10989
|
+
* fin.Platform.init({ overrideCallback });
|
|
10990
|
+
*
|
|
10991
|
+
* ```
|
|
10992
|
+
*/
|
|
10993
|
+
handleFailedViewCreation(viewIdentity: OpenFin_2.Identity, error: Error): Promise<OpenFin_2.ViewCreationSuccess | void>;
|
|
10931
10994
|
}
|
|
10932
10995
|
|
|
10933
10996
|
/**
|
|
@@ -15420,7 +15483,7 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
|
|
|
15420
15483
|
*/
|
|
15421
15484
|
getInfo: () => Promise<OpenFin_2.ViewInfo>;
|
|
15422
15485
|
/**
|
|
15423
|
-
* Retrieves the
|
|
15486
|
+
* Retrieves the OpenFin.Layout instance for the Window the View is attached to.
|
|
15424
15487
|
*
|
|
15425
15488
|
* @example
|
|
15426
15489
|
* ```js
|
|
@@ -15584,6 +15647,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
|
|
|
15584
15647
|
options?: Partial<ViewOptions>;
|
|
15585
15648
|
};
|
|
15586
15649
|
|
|
15650
|
+
/**
|
|
15651
|
+
* @interface
|
|
15652
|
+
*/
|
|
15653
|
+
declare type ViewCreationFailure = {
|
|
15654
|
+
/**
|
|
15655
|
+
* The identity of the created view
|
|
15656
|
+
*/
|
|
15657
|
+
identity: Identity_4;
|
|
15658
|
+
/**
|
|
15659
|
+
* Whether the view was created with errors
|
|
15660
|
+
*/
|
|
15661
|
+
success: false;
|
|
15662
|
+
/**
|
|
15663
|
+
* Error thrown during view creation
|
|
15664
|
+
*/
|
|
15665
|
+
error: Error;
|
|
15666
|
+
};
|
|
15667
|
+
|
|
15587
15668
|
/**
|
|
15588
15669
|
* The options object required by {@link View.ViewModule.create View.create}.
|
|
15589
15670
|
*
|
|
@@ -15599,6 +15680,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
|
15599
15680
|
|
|
15600
15681
|
declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
|
|
15601
15682
|
|
|
15683
|
+
/**
|
|
15684
|
+
* A view creation state
|
|
15685
|
+
*/
|
|
15686
|
+
declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
|
|
15687
|
+
|
|
15688
|
+
/**
|
|
15689
|
+
* @interface
|
|
15690
|
+
*/
|
|
15691
|
+
declare type ViewCreationSuccess = {
|
|
15692
|
+
/**
|
|
15693
|
+
* The identity of the created view
|
|
15694
|
+
*/
|
|
15695
|
+
identity: Identity_4;
|
|
15696
|
+
/**
|
|
15697
|
+
* Whether the view was created without errors
|
|
15698
|
+
*/
|
|
15699
|
+
success: true;
|
|
15700
|
+
};
|
|
15701
|
+
|
|
15602
15702
|
/**
|
|
15603
15703
|
* Generated when a window has a view detached from it.
|
|
15604
15704
|
* @remarks Will fire when a view is destroyed in which case `target` will be null.
|