@openfin/workspace-platform 9.1.22 → 9.2.1

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.
@@ -1,21 +1,2 @@
1
- import type { AttachedPage, Page, PageWithUpdatableRuntimeAttribs } from '../../../../common/src/api/pages/shapes';
2
- import { OpenPageTabContextMenuRequest } from '../../../../client-api-platform/src/index';
3
- import { OpenGlobalContextMenuRequest, OpenSaveButtonContextMenuRequest, OpenSaveMenuRequest, OpenViewTabContextMenuRequest, ToolbarOptions, WindowStateButtonOptions } from '../../../../client-api-platform/src/shapes';
4
- export declare const getBrowserModule: (identity: OpenFin.Identity) => {
5
- identity: OpenFin.Identity;
6
- openfinWindow: import("@openfin/core/src/api/window")._Window;
7
- getPages: () => Promise<AttachedPage[]>;
8
- getPage: (pageId: string) => Promise<AttachedPage>;
9
- addPage: (page: PageWithUpdatableRuntimeAttribs) => Promise<void>;
10
- removePage: (id: Page['pageId']) => Promise<void>;
11
- setActivePage: (id: Page['pageId']) => Promise<void>;
12
- updatePage: (req: any) => Promise<any>;
13
- reorderPages: (req: any) => Promise<any>;
14
- _openGlobalContextMenu: (req: OpenGlobalContextMenuRequest) => Promise<any>;
15
- replaceToolbarOptions: (options: ToolbarOptions) => Promise<void>;
16
- replaceWindowStateButtonOptions: (options: WindowStateButtonOptions) => Promise<void>;
17
- _openViewTabContextMenu: (req: OpenViewTabContextMenuRequest) => Promise<any>;
18
- _openPageTabContextMenu: (req: OpenPageTabContextMenuRequest) => Promise<any>;
19
- _openSaveModal: (req: OpenSaveMenuRequest) => Promise<any>;
20
- _openSaveButtonContextMenu: (req: OpenSaveButtonContextMenuRequest) => Promise<any>;
21
- };
1
+ import { BrowserWindowModule } from '../../../../client-api-platform/src/shapes';
2
+ export declare const getBrowserModule: (identity: OpenFin.Identity) => BrowserWindowModule;
@@ -2,24 +2,7 @@
2
2
  import type { AttachedPage } from '../../../../common/src/api/pages/shapes';
3
3
  import type { BrowserCreateWindowRequest, BrowserWindowModule } from '../../shapes';
4
4
  export declare const getBrowserApi: (identity: OpenFin.ApplicationIdentity) => {
5
- wrapSync: (windowIdentity: OpenFin.Identity) => {
6
- identity: OpenFin.Identity;
7
- openfinWindow: import("@openfin/core/src/api/window")._Window;
8
- getPages: () => Promise<AttachedPage[]>;
9
- getPage: (pageId: string) => Promise<AttachedPage>;
10
- addPage: (page: import("@common/api/pages/shapes").PageWithUpdatableRuntimeAttribs) => Promise<void>;
11
- removePage: (id: string) => Promise<void>;
12
- setActivePage: (id: string) => Promise<void>;
13
- updatePage: (req: any) => Promise<any>;
14
- reorderPages: (req: any) => Promise<any>;
15
- _openGlobalContextMenu: (req: import("../../shapes").OpenGlobalContextMenuRequest) => Promise<any>;
16
- replaceToolbarOptions: (options: import("../../shapes").ToolbarOptions) => Promise<void>;
17
- replaceWindowStateButtonOptions: (options: import("../../shapes").WindowStateButtonOptions) => Promise<void>;
18
- _openViewTabContextMenu: (req: import("../../shapes").OpenViewTabContextMenuRequest) => Promise<any>;
19
- _openPageTabContextMenu: (req: import("../../shapes").OpenPageTabContextMenuRequest) => Promise<any>;
20
- _openSaveModal: (req: import("../../shapes").OpenSaveMenuRequest) => Promise<any>;
21
- _openSaveButtonContextMenu: (req: import("../../shapes").OpenSaveButtonContextMenuRequest) => Promise<any>;
22
- };
5
+ wrapSync: (windowIdentity: OpenFin.Identity) => BrowserWindowModule;
23
6
  createWindow: (options: BrowserCreateWindowRequest) => Promise<BrowserWindowModule>;
24
7
  getAllAttachedPages: () => Promise<AttachedPage[]>;
25
8
  getAllWindows: () => Promise<BrowserWindowModule[]>;
@@ -2,14 +2,14 @@
2
2
  import { OpenGlobalContextMenuPayload, OpenGlobalContextMenuRequest, OpenPageTabContextMenuPayload, OpenPageTabContextMenuRequest, OpenSaveButtonContextMenuPayload, OpenSaveButtonContextMenuRequest, OpenViewTabContextMenuPayload, OpenViewTabContextMenuRequest } from '../../../../client-api-platform/src/shapes';
3
3
  export declare function openGlobalContextMenuInternal(payload: OpenGlobalContextMenuRequest & {
4
4
  identity: OpenFin.Identity;
5
- }, callerIdentity: any): Promise<void>;
6
- export declare const openCommonContextMenu: (payload: OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload, callerIdentity: any) => Promise<void>;
5
+ }, callerIdentity: OpenFin.Identity): Promise<void>;
6
+ export declare const openCommonContextMenu: (payload: OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload, callerIdentity: OpenFin.Identity) => Promise<void>;
7
7
  export declare function openViewTabContextMenuInternal(payload: OpenViewTabContextMenuRequest & {
8
8
  identity: OpenFin.Identity;
9
- }, callerIdentity: any): Promise<void>;
9
+ }, callerIdentity: OpenFin.Identity): Promise<void>;
10
10
  export declare function openPageTabContextMenuInternal(payload: OpenPageTabContextMenuRequest & {
11
11
  identity: OpenFin.Identity;
12
- }, callerIdentity: any): Promise<void>;
12
+ }, callerIdentity: OpenFin.Identity): Promise<void>;
13
13
  export declare function openSaveButtonContextMenuInternal(payload: OpenSaveButtonContextMenuRequest & {
14
14
  identity: OpenFin.Identity;
15
- }, callerIdentity: any): Promise<void>;
15
+ }, callerIdentity: OpenFin.Identity): Promise<void>;
@@ -1,26 +1,26 @@
1
1
  /// <reference types="@openfin/core" />
2
- import type { AttachPagesToWindowPayload } from '../../../../common/src/api/pages/shapes';
2
+ import type { AttachedPage, AttachPagesToWindowPayload, DetachPagesFromWindowPayload, ReorderPagesForWindowPayload, SetActivePageForWindowPayload, UpdatePageForWindowPayload } from '../../../../common/src/api/pages/shapes';
3
3
  import type { CreateSavedPageRequest, Page, UpdateSavedPageRequest } from '../../../../client-api-platform/src/shapes';
4
4
  /**
5
5
  * Get all open pages in which are attached to a window.
6
6
  * @returns the list of attached pages.
7
7
  */
8
- export declare const getAllAttachedPages: () => Promise<any>;
8
+ export declare const getAllAttachedPages: () => Promise<AttachedPage[]>;
9
9
  export declare const createSavedPageInternal: ({ page }: CreateSavedPageRequest) => Promise<void>;
10
10
  export declare const deleteSavedPageInternal: (id: string) => Promise<void>;
11
11
  export declare const updateSavedPageInternal: ({ pageId, page }: UpdateSavedPageRequest) => Promise<any>;
12
12
  export declare const savePage: (page: Page) => Promise<any>;
13
13
  export declare const attachPagesToWindow: (payload: AttachPagesToWindowPayload) => Promise<void>;
14
- export declare const updatePageForWindow: (payload: any) => Promise<void>;
15
- export declare const detachPagesFromWindow: (payload: any) => Promise<void>;
16
- export declare const setActivePage: (payload: any) => Promise<void>;
17
- export declare const getPagesForWindow: (identity: OpenFin.Identity) => Promise<import("@client-platform/shapes").AttachedPage[]>;
14
+ export declare const updatePageForWindow: (payload: UpdatePageForWindowPayload) => Promise<void>;
15
+ export declare const detachPagesFromWindow: (payload: DetachPagesFromWindowPayload) => Promise<void>;
16
+ export declare const setActivePage: (payload: SetActivePageForWindowPayload) => Promise<void>;
17
+ export declare const getPagesForWindow: (identity: OpenFin.Identity) => Promise<AttachedPage[]>;
18
18
  export declare const getPageForWindow: ({ identity, pageId }: {
19
- identity: any;
20
- pageId: any;
21
- }) => Promise<import("@client-platform/shapes").AttachedPage>;
22
- export declare const reorderPagesForWindow: (payload: any) => Promise<void>;
23
- export declare const getActivePageIdForWindow: (identity: any) => Promise<string>;
19
+ identity: OpenFin.Identity;
20
+ pageId: string;
21
+ }) => Promise<AttachedPage>;
22
+ export declare const reorderPagesForWindow: (payload: ReorderPagesForWindowPayload) => Promise<void>;
23
+ export declare const getActivePageIdForWindow: (identity: OpenFin.Identity) => Promise<string>;
24
24
  /**
25
25
  * Checks if a given page name is unique
26
26
  * If not, add a progressive number to it
@@ -1,6 +1,7 @@
1
+ /// <reference types="@openfin/core" />
1
2
  import { Page } from '../../../common/src/api/pages/shapes';
2
3
  import type { CreateSavedPageRequest, CreateSavedWorkspaceRequest, UpdateSavedPageRequest, UpdateSavedWorkspaceRequest, Workspace } from '../shapes';
3
- export declare const getStorageApi: (identity: any) => {
4
+ export declare const getStorageApi: (identity: OpenFin.ApplicationIdentity) => {
4
5
  createPage: (req: CreateSavedPageRequest) => Promise<any>;
5
6
  deletePage: (id: string) => Promise<any>;
6
7
  updatePage: (req: UpdateSavedPageRequest) => Promise<any>;
@@ -3,10 +3,10 @@ export declare const store: import("idb-keyval").UseStore;
3
3
  export declare function getWorkspace(id: string): Promise<Workspace>;
4
4
  export declare function getWorkspaceList(filter?: string): Promise<Workspace[]>;
5
5
  export declare function createWorkspace({ workspace }: {
6
- workspace: any;
6
+ workspace: Workspace;
7
7
  }): Promise<void>;
8
8
  export declare function deleteWorkspace(id: string): Promise<void>;
9
9
  export declare function updateWorkspace({ workspaceId, workspace }: {
10
- workspaceId: any;
11
- workspace: any;
10
+ workspaceId: string;
11
+ workspace: Workspace;
12
12
  }): Promise<void>;
@@ -22,7 +22,6 @@ export declare const createWorkspaceInStorage: (req: CreateSavedWorkspaceRequest
22
22
  export declare const getWorkspacesInStorage: () => Promise<Workspace[]>;
23
23
  export declare const getWorkspaceInStorage: (id: string) => Promise<Workspace>;
24
24
  export declare const deleteWorkspaceInStorage: (id: string) => Promise<any>;
25
- export declare const updateWorkspaceInStorage: (req: any) => Promise<any>;
26
25
  export declare const saveWorkspace: (workspace: Workspace) => Promise<any>;
27
26
  /**
28
27
  * Checks if a given workspace name is unique
@@ -3,8 +3,8 @@ import type { Page } from '../../../common/src/api/pages/shapes';
3
3
  import type { CustomThemeOptions } from '../../../common/src/api/theming';
4
4
  import type { BrowserInitConfig, BrowserSnapshot } from '..';
5
5
  export declare function overrideViewOptions(options: Partial<OpenFin.ViewOptions>, initOptions: OpenFin.ViewOptions): any;
6
- export declare function preserveInteropIfManifestConflict(opts: Partial<OpenFin.ViewOptions>, fetchManifest: ({ manifestUrl: string }: {
7
- manifestUrl: any;
6
+ export declare function preserveInteropIfManifestConflict(opts: Partial<OpenFin.ViewOptions>, fetchManifest: ({ manifestUrl }: {
7
+ manifestUrl: string;
8
8
  }, callerIdentity: OpenFin.Identity) => any, callerIdentity: OpenFin.Identity): Promise<any>;
9
9
  export declare const filterSnapshotWindows: (win: OpenFin.WindowOptions) => boolean;
10
10
  /**
@@ -22,7 +22,7 @@ export declare const filterSnapshotWindows: (win: OpenFin.WindowOptions) => bool
22
22
  * @param options - Object passed into createWindow -> contains height and width
23
23
  * @returns unprocessed or processed options object
24
24
  */
25
- export declare const fitToMonitor: (options: any) => Promise<any>;
25
+ export declare const fitToMonitor: (options: OpenFin.PlatformWindowCreationOptions) => Promise<OpenFin.PlatformWindowCreationOptions>;
26
26
  declare type LegacyWindowOptions = Omit<OpenFin.PlatformWindowCreationOptions, 'workspacePlatform'> & {
27
27
  pages?: Page[];
28
28
  workstacks?: Page[];
@@ -84,7 +84,7 @@ export interface WorkspaceContextMenuItemData extends GlobalContextMenuItemData
84
84
  workspaceId: string;
85
85
  }
86
86
  /**Configuration of an option in the global context menu */
87
- export interface GlobalContextMenuItemTemplate extends OpenFin.MenuItemTemplate {
87
+ export interface GlobalContextMenuItemTemplate extends Exclude<OpenFin.MenuItemTemplate, 'data'> {
88
88
  data: GlobalContextMenuItemData;
89
89
  }
90
90
  /**Shape of the data property of a page tab context menu template item */
@@ -1133,28 +1133,28 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1133
1133
  * @param req the payload received by the provider call
1134
1134
  * @param callerIdentity OF identity of the entity from which the request originated
1135
1135
  */
1136
- openGlobalContextMenu(req: OpenGlobalContextMenuPayload, callerIdentity: OpenFin.Identity): any;
1136
+ openGlobalContextMenu(req: OpenGlobalContextMenuPayload, callerIdentity: OpenFin.Identity): Promise<void>;
1137
1137
  /**
1138
1138
  * Implementation for showing a view tab context menu given a menu template,
1139
1139
  * handler callback, and screen coordinates. For an example of overriding, see {@link WorkspacePlatformOverrideCallback}.
1140
1140
  * @param req the payload received by the provider call
1141
1141
  * @param callerIdentity OF identity of the entity from which the request originated
1142
1142
  */
1143
- openViewTabContextMenu(req: OpenViewTabContextMenuPayload, callerIdentity: OpenFin.Identity): any;
1143
+ openViewTabContextMenu(req: OpenViewTabContextMenuPayload, callerIdentity: OpenFin.Identity): Promise<void>;
1144
1144
  /**
1145
1145
  * Implementation for showing a page tab context menu given a menu template,
1146
1146
  * handler callback, and screen coordinates. For an example of overriding, see {@link WorkspacePlatformOverrideCallback}.
1147
1147
  * @param req the payload received by the provider call
1148
1148
  * @param callerIdentity OF identity of the entity from which the request originated
1149
1149
  */
1150
- openPageTabContextMenu(req: OpenPageTabContextMenuPayload, callerIdentity: OpenFin.Identity): any;
1150
+ openPageTabContextMenu(req: OpenPageTabContextMenuPayload, callerIdentity: OpenFin.Identity): Promise<void>;
1151
1151
  /**
1152
1152
  * Implementation for showing a context menu for save button given a menu template,
1153
1153
  * handler callback, and screen coordinates. For an example of overriding, see {@link WorkspacePlatformOverrideCallback}.
1154
1154
  * @param req the payload received by the provider call
1155
1155
  * @param callerIdentity OF identity of the entity from which the request originated
1156
1156
  */
1157
- openSaveButtonContextMenu(req: OpenSaveButtonContextMenuPayload, callerIdentity: OpenFin.Identity): any;
1157
+ openSaveButtonContextMenu(req: OpenSaveButtonContextMenuPayload, callerIdentity: OpenFin.Identity): Promise<void>;
1158
1158
  }
1159
1159
  /**
1160
1160
  * The origins from which a custom action can be invoked
@@ -3,10 +3,10 @@ export declare const store: import("idb-keyval").UseStore;
3
3
  export declare function getPage(id: string): Promise<Page>;
4
4
  export declare function getPageList(filter?: string): Promise<Page[]>;
5
5
  export declare function createPage({ page }: {
6
- page: any;
6
+ page: Page;
7
7
  }): Promise<void>;
8
8
  export declare function deletePage(id: string): Promise<void>;
9
9
  export declare function updatePage({ pageId, page }: {
10
- pageId: any;
11
- page: any;
10
+ page: Page;
11
+ pageId: string;
12
12
  }): Promise<void>;
@@ -7,7 +7,7 @@ export declare function cleanPage(page: AttachedPage): Page;
7
7
  * @param layout the layout to add details to.
8
8
  * @returns the layout with extra details.
9
9
  */
10
- export declare const getPageLayout: (layout: any) => Promise<PageLayout>;
10
+ export declare const getPageLayout: (layout: PageLayout) => Promise<PageLayout>;
11
11
  /**
12
12
  * Generates a Page object which represents a page.
13
13
  * @param title the title for the page.
@@ -48,13 +48,13 @@ export declare const getFirstViewFromLayout: (identity?: WindowIdentity) => Prom
48
48
  * @param layout The Layout to be cloned
49
49
  * @returns A copy of the layout with names added where necessary
50
50
  */
51
- export declare const cloneLayoutAndFillInViewNames: (layout: any) => any;
51
+ export declare const cloneLayoutAndFillInViewNames: (layout: PageLayout) => any;
52
52
  /**
53
53
  * Deep clones a layout and removes view names.
54
54
  * @param layout The Layout to be cloned
55
55
  * @returns A copy of the layout with names removed
56
56
  */
57
- export declare const cloneLayoutAndRemoveNames: (layout: any) => any;
57
+ export declare const cloneLayoutAndRemoveNames: (layout: PageLayout) => any;
58
58
  export declare const mapContentComponentState: (content: OpenFin.LayoutContent | LayoutContentExtended) => LayoutComponentStateExtended[];
59
59
  export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: OpenFin.Identity) => Promise<any>;
60
60
  export declare const isLayoutTabActive: (tabSelector: string) => boolean;
@@ -71,7 +71,7 @@ export declare const initLayout: () => Promise<void>;
71
71
  * @param layout The Layout to be locked
72
72
  * @returns A restricted copy of the layout
73
73
  */
74
- export declare const getLockedPageLayout: (layout: any) => any;
74
+ export declare const getLockedPageLayout: (layout: PageLayout) => any;
75
75
  /**
76
76
  * Accepts a locked layout and an unlocked layout as a reference.
77
77
  * Takes the layout settings of the reference layout and merges them into the locked layout, thereby unlocking it.
@@ -79,7 +79,7 @@ export declare const getLockedPageLayout: (layout: any) => any;
79
79
  * @param referenceUnlockedLayout The Layout to serve as a reference of an unlocked layout
80
80
  * @returns An unlocked version of the target layout
81
81
  */
82
- export declare const getUnlockedLayout: (lockedLayout: any, referenceUnlockedLayout: any) => any;
82
+ export declare const getUnlockedLayout: (lockedLayout: PageLayout, referenceUnlockedLayout: PageLayout) => any;
83
83
  /**
84
84
  * Replaces the layout of the window with the provided layout and adjusts it based on provided page's options
85
85
  * @param layout Layout with which to replace current window's layout
@@ -1 +1,2 @@
1
- export declare const checkUniqueToolbarOptions: (toolbarOptions: any) => void;
1
+ import { ToolbarButton } from '../../../client-api-platform/src/shapes';
2
+ export declare const checkUniqueToolbarOptions: (toolbarOptions: ToolbarButton[]) => void;
@@ -105,7 +105,7 @@ export declare function showAndFocus(identity: WindowIdentity): Promise<void>;
105
105
  * This method ensures the window is hidden and blurred.
106
106
  * @param identity the identity of the window to hide.
107
107
  */
108
- export declare function hideAndBlur(identity: WindowIdentity): Promise<void>;
108
+ export declare function hide(identity: WindowIdentity): Promise<void>;
109
109
  /**
110
110
  * Helper for showing / hiding a window.
111
111
  * This method calls showAndFocus / hideAndBlur
@@ -1,5 +1,5 @@
1
1
  import { ResponseModalConfig } from '../../../common/src/utils/menu-config';
2
- export declare const restoreChangesMenu: (windowIdentity: any) => Promise<ResponseModalConfig>;
2
+ export declare const restoreChangesMenu: (windowIdentity: OpenFin.Identity) => Promise<ResponseModalConfig>;
3
3
  export declare const showSwitchWorkspaceModal: (windowIdentity: OpenFin.Identity, workspaceTitle: string) => Promise<boolean>;
4
4
  export declare const showDeleteWorkspaceModal: (windowIdentity: OpenFin.Identity, workspaceTitle: string) => Promise<boolean>;
5
5
  /**
@@ -9,5 +9,5 @@ export declare const showDeleteWorkspaceModal: (windowIdentity: OpenFin.Identity
9
9
  * @returns Boolean - Affirmative or Negative response from user
10
10
  */
11
11
  export declare const showPlatformQuitModal: (windowIdentity: OpenFin.Identity, workspaceTitle: string, shouldCenterOnMonitor?: boolean) => Promise<boolean>;
12
- export declare const showRestoreChangesModal: (windowIdentity: any) => Promise<boolean>;
12
+ export declare const showRestoreChangesModal: (windowIdentity: OpenFin.Identity) => Promise<boolean>;
13
13
  export declare const getOverwriteWorkspaceMenu: (workspaceTitle: string) => Promise<ResponseModalConfig>;