@openfin/core 40.82.20 → 40.82.21
Sign up to get free protection for your applications and to get access to all the features.
- package/out/mock-alpha.d.ts +86 -9
- package/out/mock-beta.d.ts +86 -9
- package/out/mock-public.d.ts +86 -9
- package/out/mock.d.ts +86 -9
- 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
|
*
|
@@ -7790,10 +7785,7 @@ declare type LayoutIdentity = Identity_4 & {
|
|
7790
7785
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
7791
7786
|
type: 'layout-initialized';
|
7792
7787
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
7793
|
-
ofViews:
|
7794
|
-
identity: OpenFin_2.Identity;
|
7795
|
-
entityType: 'view';
|
7796
|
-
}[];
|
7788
|
+
ofViews: OpenFin_2.ViewCreationResult[];
|
7797
7789
|
};
|
7798
7790
|
|
7799
7791
|
/**
|
@@ -8892,6 +8884,12 @@ declare type MutableWindowOptions = {
|
|
8892
8884
|
* Shows the window's icon in the taskbar.
|
8893
8885
|
*/
|
8894
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;
|
8895
8893
|
interop: InteropConfig;
|
8896
8894
|
/* Excluded from this release type: _internalWorkspaceData */
|
8897
8895
|
/* Excluded from this release type: workspacePlatform */
|
@@ -9148,6 +9146,9 @@ declare namespace OpenFin_2 {
|
|
9148
9146
|
ViewOptions,
|
9149
9147
|
ConstViewOptions,
|
9150
9148
|
ViewState,
|
9149
|
+
ViewCreationSuccess,
|
9150
|
+
ViewCreationFailure,
|
9151
|
+
ViewCreationResult,
|
9151
9152
|
Certificate,
|
9152
9153
|
HostContextChangedPayload,
|
9153
9154
|
ApplySnapshotOptions,
|
@@ -10951,6 +10952,45 @@ declare interface PlatformProvider {
|
|
10951
10952
|
* @returns {Promise<void>}
|
10952
10953
|
*/
|
10953
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>;
|
10954
10994
|
}
|
10955
10995
|
|
10956
10996
|
/**
|
@@ -15607,6 +15647,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
|
|
15607
15647
|
options?: Partial<ViewOptions>;
|
15608
15648
|
};
|
15609
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
|
+
|
15610
15668
|
/**
|
15611
15669
|
* The options object required by {@link View.ViewModule.create View.create}.
|
15612
15670
|
*
|
@@ -15622,6 +15680,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
15622
15680
|
|
15623
15681
|
declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
|
15624
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
|
+
|
15625
15702
|
/**
|
15626
15703
|
* Generated when a window has a view detached from it.
|
15627
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
|
*
|
@@ -7790,10 +7785,7 @@ declare type LayoutIdentity = Identity_4 & {
|
|
7790
7785
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
7791
7786
|
type: 'layout-initialized';
|
7792
7787
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
7793
|
-
ofViews:
|
7794
|
-
identity: OpenFin_2.Identity;
|
7795
|
-
entityType: 'view';
|
7796
|
-
}[];
|
7788
|
+
ofViews: OpenFin_2.ViewCreationResult[];
|
7797
7789
|
};
|
7798
7790
|
|
7799
7791
|
/**
|
@@ -8892,6 +8884,12 @@ declare type MutableWindowOptions = {
|
|
8892
8884
|
* Shows the window's icon in the taskbar.
|
8893
8885
|
*/
|
8894
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;
|
8895
8893
|
interop: InteropConfig;
|
8896
8894
|
/* Excluded from this release type: _internalWorkspaceData */
|
8897
8895
|
/* Excluded from this release type: workspacePlatform */
|
@@ -9148,6 +9146,9 @@ declare namespace OpenFin_2 {
|
|
9148
9146
|
ViewOptions,
|
9149
9147
|
ConstViewOptions,
|
9150
9148
|
ViewState,
|
9149
|
+
ViewCreationSuccess,
|
9150
|
+
ViewCreationFailure,
|
9151
|
+
ViewCreationResult,
|
9151
9152
|
Certificate,
|
9152
9153
|
HostContextChangedPayload,
|
9153
9154
|
ApplySnapshotOptions,
|
@@ -10951,6 +10952,45 @@ declare interface PlatformProvider {
|
|
10951
10952
|
* @returns {Promise<void>}
|
10952
10953
|
*/
|
10953
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>;
|
10954
10994
|
}
|
10955
10995
|
|
10956
10996
|
/**
|
@@ -15607,6 +15647,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
|
|
15607
15647
|
options?: Partial<ViewOptions>;
|
15608
15648
|
};
|
15609
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
|
+
|
15610
15668
|
/**
|
15611
15669
|
* The options object required by {@link View.ViewModule.create View.create}.
|
15612
15670
|
*
|
@@ -15622,6 +15680,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
15622
15680
|
|
15623
15681
|
declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
|
15624
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
|
+
|
15625
15702
|
/**
|
15626
15703
|
* Generated when a window has a view detached from it.
|
15627
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
|
*
|
@@ -7790,10 +7785,7 @@ declare type LayoutIdentity = Identity_4 & {
|
|
7790
7785
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
7791
7786
|
type: 'layout-initialized';
|
7792
7787
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
7793
|
-
ofViews:
|
7794
|
-
identity: OpenFin_2.Identity;
|
7795
|
-
entityType: 'view';
|
7796
|
-
}[];
|
7788
|
+
ofViews: OpenFin_2.ViewCreationResult[];
|
7797
7789
|
};
|
7798
7790
|
|
7799
7791
|
/**
|
@@ -8892,6 +8884,12 @@ declare type MutableWindowOptions = {
|
|
8892
8884
|
* Shows the window's icon in the taskbar.
|
8893
8885
|
*/
|
8894
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;
|
8895
8893
|
interop: InteropConfig;
|
8896
8894
|
/* Excluded from this release type: _internalWorkspaceData */
|
8897
8895
|
/* Excluded from this release type: workspacePlatform */
|
@@ -9148,6 +9146,9 @@ declare namespace OpenFin_2 {
|
|
9148
9146
|
ViewOptions,
|
9149
9147
|
ConstViewOptions,
|
9150
9148
|
ViewState,
|
9149
|
+
ViewCreationSuccess,
|
9150
|
+
ViewCreationFailure,
|
9151
|
+
ViewCreationResult,
|
9151
9152
|
Certificate,
|
9152
9153
|
HostContextChangedPayload,
|
9153
9154
|
ApplySnapshotOptions,
|
@@ -10951,6 +10952,45 @@ declare interface PlatformProvider {
|
|
10951
10952
|
* @returns {Promise<void>}
|
10952
10953
|
*/
|
10953
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>;
|
10954
10994
|
}
|
10955
10995
|
|
10956
10996
|
/**
|
@@ -15607,6 +15647,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
|
|
15607
15647
|
options?: Partial<ViewOptions>;
|
15608
15648
|
};
|
15609
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
|
+
|
15610
15668
|
/**
|
15611
15669
|
* The options object required by {@link View.ViewModule.create View.create}.
|
15612
15670
|
*
|
@@ -15622,6 +15680,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
15622
15680
|
|
15623
15681
|
declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
|
15624
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
|
+
|
15625
15702
|
/**
|
15626
15703
|
* Generated when a window has a view detached from it.
|
15627
15704
|
* @remarks Will fire when a view is destroyed in which case `target` will be null.
|
package/out/mock.d.ts
CHANGED
@@ -3716,11 +3716,6 @@ declare type ConstWindowOptions = {
|
|
3716
3716
|
* @deprecated - use `icon` instead.
|
3717
3717
|
*/
|
3718
3718
|
taskbarIcon: string;
|
3719
|
-
/**
|
3720
|
-
* Specify a taskbar group for the window.
|
3721
|
-
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
3722
|
-
*/
|
3723
|
-
taskbarIconGroup: string;
|
3724
3719
|
/**
|
3725
3720
|
* @defaultValue "about:blank"
|
3726
3721
|
*
|
@@ -7916,10 +7911,7 @@ declare type LayoutIdentity = Identity_4 & {
|
|
7916
7911
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
7917
7912
|
type: 'layout-initialized';
|
7918
7913
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
7919
|
-
ofViews:
|
7920
|
-
identity: OpenFin_2.Identity;
|
7921
|
-
entityType: 'view';
|
7922
|
-
}[];
|
7914
|
+
ofViews: OpenFin_2.ViewCreationResult[];
|
7923
7915
|
};
|
7924
7916
|
|
7925
7917
|
/**
|
@@ -9192,6 +9184,12 @@ declare type MutableWindowOptions = {
|
|
9192
9184
|
* Shows the window's icon in the taskbar.
|
9193
9185
|
*/
|
9194
9186
|
showTaskbarIcon: boolean;
|
9187
|
+
/**
|
9188
|
+
* Specify a taskbar group for the window.
|
9189
|
+
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
9190
|
+
* @remarks It's only updatable when `enableJumpList` is set to false.
|
9191
|
+
*/
|
9192
|
+
taskbarIconGroup: string;
|
9195
9193
|
interop: InteropConfig;
|
9196
9194
|
/**
|
9197
9195
|
* @internal
|
@@ -9466,6 +9464,9 @@ declare namespace OpenFin_2 {
|
|
9466
9464
|
ViewOptions,
|
9467
9465
|
ConstViewOptions,
|
9468
9466
|
ViewState,
|
9467
|
+
ViewCreationSuccess,
|
9468
|
+
ViewCreationFailure,
|
9469
|
+
ViewCreationResult,
|
9469
9470
|
Certificate,
|
9470
9471
|
HostContextChangedPayload,
|
9471
9472
|
ApplySnapshotOptions,
|
@@ -11352,6 +11353,45 @@ declare interface PlatformProvider {
|
|
11352
11353
|
* @returns {Promise<void>}
|
11353
11354
|
*/
|
11354
11355
|
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
11356
|
+
/**
|
11357
|
+
* @experimental
|
11358
|
+
*
|
11359
|
+
* This method is called to handle errors with view creation and initial navigation during layout creation.
|
11360
|
+
* Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
|
11361
|
+
* * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
|
11362
|
+
* * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
|
11363
|
+
* * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
|
11364
|
+
*
|
11365
|
+
* @param viewIdentity Identity of the view
|
11366
|
+
* @param error error thrown during a view creation
|
11367
|
+
* @returns {Promise<OpenFin.ViewCreationSuccess | void>}
|
11368
|
+
*
|
11369
|
+
* @example
|
11370
|
+
*
|
11371
|
+
* ```js
|
11372
|
+
* const overrideCallback = (PlatformProvider) => {
|
11373
|
+
* class Override extends PlatformProvider {
|
11374
|
+
* async handleFailedViewCreation(viewIdentity, error) {
|
11375
|
+
* const view = fin.View.wrapSync(viewId);
|
11376
|
+
* try {
|
11377
|
+
* // navigate to an error page
|
11378
|
+
* await view.navigate('http://localhost:3000/errorPage.html');
|
11379
|
+
* // resolve a success result after redirecting to a error page
|
11380
|
+
* return {identity: viewIdentity, success: true};
|
11381
|
+
* } catch(e) {
|
11382
|
+
* // layout-initialized event will include this view with the error
|
11383
|
+
* throw error;
|
11384
|
+
* }
|
11385
|
+
* }
|
11386
|
+
* }
|
11387
|
+
* return new Override();
|
11388
|
+
* }
|
11389
|
+
*
|
11390
|
+
* fin.Platform.init({ overrideCallback });
|
11391
|
+
*
|
11392
|
+
* ```
|
11393
|
+
*/
|
11394
|
+
handleFailedViewCreation(viewIdentity: OpenFin_2.Identity, error: Error): Promise<OpenFin_2.ViewCreationSuccess | void>;
|
11355
11395
|
}
|
11356
11396
|
|
11357
11397
|
/**
|
@@ -16058,6 +16098,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
|
|
16058
16098
|
options?: Partial<ViewOptions>;
|
16059
16099
|
};
|
16060
16100
|
|
16101
|
+
/**
|
16102
|
+
* @interface
|
16103
|
+
*/
|
16104
|
+
declare type ViewCreationFailure = {
|
16105
|
+
/**
|
16106
|
+
* The identity of the created view
|
16107
|
+
*/
|
16108
|
+
identity: Identity_4;
|
16109
|
+
/**
|
16110
|
+
* Whether the view was created with errors
|
16111
|
+
*/
|
16112
|
+
success: false;
|
16113
|
+
/**
|
16114
|
+
* Error thrown during view creation
|
16115
|
+
*/
|
16116
|
+
error: Error;
|
16117
|
+
};
|
16118
|
+
|
16061
16119
|
/**
|
16062
16120
|
* The options object required by {@link View.ViewModule.create View.create}.
|
16063
16121
|
*
|
@@ -16073,6 +16131,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
16073
16131
|
|
16074
16132
|
declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
|
16075
16133
|
|
16134
|
+
/**
|
16135
|
+
* A view creation state
|
16136
|
+
*/
|
16137
|
+
declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
|
16138
|
+
|
16139
|
+
/**
|
16140
|
+
* @interface
|
16141
|
+
*/
|
16142
|
+
declare type ViewCreationSuccess = {
|
16143
|
+
/**
|
16144
|
+
* The identity of the created view
|
16145
|
+
*/
|
16146
|
+
identity: Identity_4;
|
16147
|
+
/**
|
16148
|
+
* Whether the view was created without errors
|
16149
|
+
*/
|
16150
|
+
success: true;
|
16151
|
+
};
|
16152
|
+
|
16076
16153
|
/**
|
16077
16154
|
* Generated when a window has a view detached from it.
|
16078
16155
|
* @remarks Will fire when a view is destroyed in which case `target` will be null.
|