@openfin/workspace-platform 21.0.10 → 21.0.12
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/client-api-platform/src/api/dock.d.ts +1 -1
- package/client-api-platform/src/api/workspaces/index.d.ts +3 -2
- package/client-api-platform/src/init/panels.d.ts +4 -1
- package/client-api-platform/src/shapes.d.ts +14 -0
- package/common/src/api/action.d.ts +2 -2
- package/common/src/api/protocol/workspace-platform.d.ts +1 -0
- package/common/src/utils/layout.d.ts +1 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/workspace_platform.zip +0 -0
|
@@ -8,7 +8,7 @@ export declare const navigateContentMenu: (id: string) => Promise<void>;
|
|
|
8
8
|
export declare const launchDockEntry: (entry: DockEntry) => Promise<void>;
|
|
9
9
|
export declare const setDockFavoritesOrder: (favorites: DockEntry[]) => Promise<void>;
|
|
10
10
|
export declare const setDefaultDockButtonsOrder: (defaultDockButtons: DockCompanionButton[]) => Promise<void>;
|
|
11
|
-
export declare const getDockWorkspacesContextMenu: () => Promise<import("@client/index").BaseCustomDropdownItem[]>;
|
|
11
|
+
export declare const getDockWorkspacesContextMenu: () => Promise<import("@client/index").BaseCustomDropdownItem<any>[]>;
|
|
12
12
|
export declare const handleDockWorkspacesMenuResponse: (payload: any) => Promise<void>;
|
|
13
13
|
export declare const removeFavoriteEntry: (entry: DockEntry) => Promise<void>;
|
|
14
14
|
export declare const addFavoriteEntry: (entry: DockEntry) => Promise<void>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { ApplyWorkspacePayload, CreateSavedWorkspaceRequest, Workspace } from '../../../../client-api-platform/src/shapes';
|
|
1
|
+
import type { ApplyWorkspacePayload, CreateSavedWorkspaceRequest, RestoreLastSavedWorkspacePayload, RestoreLastSavedWorkspaceResult, Workspace } from '../../../../client-api-platform/src/shapes';
|
|
2
2
|
/**
|
|
3
3
|
* Apply the given workspace and set it as active.
|
|
4
4
|
* @param payload, the workspace to apply and the options to apply it with.
|
|
5
5
|
*
|
|
6
6
|
* @returns true if the workspace was applied, false if the user cancelled the switch or an error occurred.
|
|
7
7
|
*/
|
|
8
|
-
export declare function applyWorkspace(
|
|
8
|
+
export declare function applyWorkspace(payload: ApplyWorkspacePayload): Promise<boolean>;
|
|
9
|
+
export declare function restoreLastSavedWorkspaceInternal(options?: RestoreLastSavedWorkspacePayload): Promise<RestoreLastSavedWorkspaceResult>;
|
|
9
10
|
/**
|
|
10
11
|
* Set the current active workspace.
|
|
11
12
|
*/
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { AttachedPage, ExtendedPanelConfig, PanelConfig } from '../../../common/src/api/pages/shapes';
|
|
3
|
-
export declare function convertPanelViewOpts(panels: PanelConfig[]
|
|
3
|
+
export declare function convertPanelViewOpts(panels: PanelConfig[], updatePageRequest?: {
|
|
4
|
+
identity: OpenFin.Identity;
|
|
5
|
+
pageId: string;
|
|
6
|
+
}): Promise<ExtendedPanelConfig[]>;
|
|
4
7
|
export declare function createPanelViewsForPages(pages: AttachedPage[]): Promise<void>;
|
|
5
8
|
export declare function createPanelViews(panels: PanelConfig[]): Promise<(void | OpenFin.View)[]>;
|
|
@@ -1510,6 +1510,13 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
|
|
|
1510
1510
|
* ```
|
|
1511
1511
|
*/
|
|
1512
1512
|
applyWorkspace(workspace: Workspace, options?: ApplyWorkspaceOptions): Promise<boolean>;
|
|
1513
|
+
/**
|
|
1514
|
+
* Applies last saved version of current workspace.
|
|
1515
|
+
* @param options see {@link ApplyWorkspaceOptions}.
|
|
1516
|
+
* @returns String indicating the outcome of the API call, one of: 'success', 'not-saved-workspace', 'user-declined'.
|
|
1517
|
+
* See {@link RestoreLastSavedWorkspaceResult} for detailed description.
|
|
1518
|
+
*/
|
|
1519
|
+
restoreLastSavedWorkspace(options?: ApplyWorkspaceOptions): Promise<RestoreLastSavedWorkspaceResult>;
|
|
1513
1520
|
/**
|
|
1514
1521
|
* Returns ISO language code of current set language
|
|
1515
1522
|
*
|
|
@@ -1883,6 +1890,13 @@ export interface ApplySnapshotOptions extends OpenFin.ApplySnapshotOptions {
|
|
|
1883
1890
|
export type ApplyWorkspacePayload = Workspace & {
|
|
1884
1891
|
options?: ApplyWorkspaceOptions;
|
|
1885
1892
|
};
|
|
1893
|
+
/**
|
|
1894
|
+
* Variants of results returned by restoreLastSavedWorkspace method.
|
|
1895
|
+
* * 'success' - workspace was successfully applied
|
|
1896
|
+
* * 'not-saved-workspace' - currently active workspace has never been saved, hence no changes were applied
|
|
1897
|
+
* * 'user-declined' - confirmation modal was shown and user declined to apply last saved workspace (only relevant when skipPrompt==false)
|
|
1898
|
+
*/
|
|
1899
|
+
export type RestoreLastSavedWorkspaceResult = 'success' | 'not-saved-workspace' | 'user-declined';
|
|
1886
1900
|
/**
|
|
1887
1901
|
* Defines custom action map where the key is the custom action ID and value is the action handler
|
|
1888
1902
|
*/
|
|
@@ -19,12 +19,12 @@ export interface BaseCustomButtonConfig {
|
|
|
19
19
|
iconUrl?: string;
|
|
20
20
|
parentHover?: boolean;
|
|
21
21
|
}
|
|
22
|
-
export interface BaseCustomDropdownItem extends Omit<BaseCustomButtonConfig, 'tooltip'> {
|
|
22
|
+
export interface BaseCustomDropdownItem<Action = any> extends Omit<BaseCustomButtonConfig, 'tooltip'> {
|
|
23
23
|
tooltip?: string;
|
|
24
24
|
/** Is this dropdown item checked? Any value other than undefined will decorate the dropdown option as a checkbox option. */
|
|
25
25
|
checked?: boolean;
|
|
26
26
|
/** icon URL for icon image */
|
|
27
|
-
action?:
|
|
27
|
+
action?: Action;
|
|
28
28
|
options?: (BaseCustomDropdownItem | BaseCustomDropdownConfig)[];
|
|
29
29
|
separator?: boolean;
|
|
30
30
|
}
|
|
@@ -51,6 +51,7 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
51
51
|
SaveWorkspace = "saveWorkspace",
|
|
52
52
|
GetCurrentWorkspace = "getCurrentWorkspace",
|
|
53
53
|
ApplyWorkspace = "applyWorkspace",
|
|
54
|
+
RestoreLastSavedWorkspaceInternal = "restoreLastSavedWorkspaceInternal",
|
|
54
55
|
SetActiveWorkspace = "setActiveWorkspace",
|
|
55
56
|
IsBrowserInitialized = "isBrowserInitialized",
|
|
56
57
|
Analytics = "analyticsInternal",
|
|
@@ -35,6 +35,7 @@ export type LayoutDOMEvent = {
|
|
|
35
35
|
type: Extract<LayoutDOMEventType, 'tabs-list-resized'>;
|
|
36
36
|
};
|
|
37
37
|
export type LayoutDOMEventListener = (ev: LayoutDOMEvent) => void;
|
|
38
|
+
export declare const VIEW_NAME_PREFIX: "internal-generated-view-";
|
|
38
39
|
export declare const getFirstActiveViewFromLayout: (identity: OpenFin.LayoutIdentity) => Promise<OpenFin.Identity>;
|
|
39
40
|
/**
|
|
40
41
|
* Recursively clones a layout object, calling a passed callback on each `componentState` in the tree.
|