@openfin/workspace-platform 8.1.5 → 8.1.8
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/src/shapes/common.d.ts +8 -0
- package/client-api/src/shapes/dock.d.ts +63 -0
- package/client-api/src/shapes/index.d.ts +2 -0
- package/client-api/src/shapes/provider.d.ts +18 -0
- package/client-api/src/shapes/store.d.ts +2 -15
- package/client-api-platform/src/api/app-directory.d.ts +2 -1
- package/client-api-platform/src/api/browser/browser-module.d.ts +1 -1
- package/client-api-platform/src/api/browser/index.d.ts +2 -2
- package/client-api-platform/src/api/context-menu/index.d.ts +5 -5
- package/client-api-platform/src/api/context-menu/utils.d.ts +6 -7
- package/client-api-platform/src/api/index.d.ts +1 -1
- package/client-api-platform/src/api/pages/helper.d.ts +1 -1
- package/client-api-platform/src/api/pages/index.d.ts +1 -1
- package/client-api-platform/src/api/storage.d.ts +1 -2
- package/client-api-platform/src/api/theming.d.ts +1 -1
- package/client-api-platform/src/init/browser-window-focus.d.ts +1 -1
- package/client-api-platform/src/init/override-callback.d.ts +1 -1
- package/client-api-platform/src/init/utils.d.ts +7 -6
- package/client-api-platform/src/shapes.d.ts +25 -30
- package/common/src/api/action.d.ts +48 -0
- package/common/src/api/overrides.d.ts +20 -0
- package/common/src/api/pages/attached.d.ts +1 -18
- package/common/src/api/pages/index.d.ts +1 -1
- package/common/src/api/pages/shapes.d.ts +1 -1
- package/common/src/api/protocol/browser.d.ts +67 -0
- package/{client-api-platform/src/api/protocol.d.ts → common/src/api/protocol/workspace-platform.d.ts} +4 -4
- package/common/src/api/{protocol.d.ts → protocol/workspace.d.ts} +10 -10
- package/common/src/api/theming.d.ts +1 -1
- package/common/src/api/workspaces/index.d.ts +1 -1
- package/common/src/utils/application.d.ts +3 -3
- package/common/src/utils/channels.d.ts +1 -1
- package/common/src/utils/context-menu.d.ts +2 -3
- package/common/src/utils/defer-show.d.ts +2 -2
- package/common/src/utils/env.d.ts +1 -1
- package/common/src/utils/global-context-menu.d.ts +1 -2
- package/common/src/utils/indicators/helper.d.ts +1 -1
- package/common/src/utils/landing-page.d.ts +2 -3
- package/common/src/utils/layout.d.ts +2 -3
- package/common/src/utils/local-storage-key.d.ts +2 -1
- package/common/src/utils/menu-config.d.ts +1 -1
- package/common/src/utils/menu-window-provider.d.ts +4 -5
- package/common/src/utils/page-tab-context-menu.d.ts +1 -2
- package/common/src/utils/route.d.ts +1 -1
- package/common/src/utils/router/base.d.ts +2 -1
- package/common/src/utils/snapshot.d.ts +1 -1
- package/common/src/utils/usage-register.d.ts +2 -0
- package/common/src/utils/window.d.ts +17 -10
- package/common/src/utils/workspace-modals.d.ts +1 -1
- package/index.js +2 -1
- package/index.js.LICENSE.txt +14 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/search-api/src/provider/remote/registration.d.ts +4 -1
- package/search-api/src/shapes.d.ts +10 -14
- package/common/src/api/browser-protocol.d.ts +0 -28
|
@@ -3,3 +3,11 @@ export type { Workspace } from '../../../common/src/api/workspaces';
|
|
|
3
3
|
export type { LayoutExtended, LayoutContentExtended, LayoutSettingsExtended, LayoutContentItemExtended, LayoutComponentExtended, LayoutComponentStateExtended, LayoutStack } from '../../../common/src/utils/layout';
|
|
4
4
|
export type { Page, PageLayout, PageLayoutDetails } from '../../../common/src/api/pages/shapes';
|
|
5
5
|
export { SearchTagBackground } from '../../../search-api/src/shapes';
|
|
6
|
+
export type { ProviderInfo } from './provider';
|
|
7
|
+
export type { BaseCustomButtonConfig, BaseCustomDropdownConfig, BaseCustomDropdownItem, BaseCustomDropdownItems, CustomActionSpecifier, CustomButtonConfig, CustomDropdownConfig } from '../../../common/src/api/action';
|
|
8
|
+
/**
|
|
9
|
+
* return by component.register function
|
|
10
|
+
*/
|
|
11
|
+
export interface RegisterMetaInfo {
|
|
12
|
+
workspaceVersion: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
|
+
import { CustomActionSpecifier, CustomButtonConfig, CustomDropdownConfig } from '../../../common/src/api/action';
|
|
3
|
+
import { ProviderInfo } from './provider';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration of the workspace component buttons.
|
|
6
|
+
*/
|
|
7
|
+
export interface WorkspaceComponentButtonOptions {
|
|
8
|
+
/**
|
|
9
|
+
* If set, Workspaces button will be hidden from the dock.
|
|
10
|
+
*/
|
|
11
|
+
hideWorkspacesButton?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* If set, Home button will be hidden from the dock.
|
|
14
|
+
*/
|
|
15
|
+
hideHomeButton?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* If set, Notifications button will be hidden from the dock.
|
|
18
|
+
*/
|
|
19
|
+
hideNotificationsButton?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If set, Storefront button will be hidden from the dock.
|
|
22
|
+
*/
|
|
23
|
+
hideStorefrontButton?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Configuration of an option in the dock menu button context menu
|
|
27
|
+
*/
|
|
28
|
+
export interface DockMenuItemTemplate extends OpenFin.MenuItemTemplate {
|
|
29
|
+
data: CustomActionSpecifier;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Names of the dock buttons
|
|
33
|
+
*/
|
|
34
|
+
export declare enum DockButtonNames {
|
|
35
|
+
ActionButton = "ActionButton",
|
|
36
|
+
DropdownButton = "DropdownButton"
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Configuration of a dock action button
|
|
40
|
+
*/
|
|
41
|
+
export interface DockButtonConfig extends CustomButtonConfig {
|
|
42
|
+
type?: DockButtonNames.ActionButton;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Configuration of a dock menu button
|
|
46
|
+
*/
|
|
47
|
+
export interface DockDropdownConfig extends CustomDropdownConfig {
|
|
48
|
+
type: DockButtonNames.DropdownButton;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Dock button types
|
|
52
|
+
*/
|
|
53
|
+
export declare type DockButton = DockButtonConfig | DockDropdownConfig;
|
|
54
|
+
export interface DockProvider extends ProviderInfo {
|
|
55
|
+
/**
|
|
56
|
+
* Controls the visiblity of workspace component buttons on the Dock.
|
|
57
|
+
*/
|
|
58
|
+
workspaceComponents?: WorkspaceComponentButtonOptions;
|
|
59
|
+
/**
|
|
60
|
+
* Platform specific custom buttons to display on the Dock.
|
|
61
|
+
*/
|
|
62
|
+
buttons?: DockButton[];
|
|
63
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ProviderInfo {
|
|
2
|
+
/**
|
|
3
|
+
* Unique identifier for the provider.
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* A UI friendly title for the provider platform.
|
|
8
|
+
*/
|
|
9
|
+
title: string;
|
|
10
|
+
/**
|
|
11
|
+
* Icon for the provider.
|
|
12
|
+
*/
|
|
13
|
+
icon: string;
|
|
14
|
+
/**
|
|
15
|
+
* version of client SDK, set by the API
|
|
16
|
+
*/
|
|
17
|
+
clientAPIVersion?: string;
|
|
18
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* up the packaged typing files. When writing code examples,
|
|
4
4
|
* for documentation, please use async/await syntax over .then()!
|
|
5
5
|
*/
|
|
6
|
+
import { ProviderInfo } from './provider';
|
|
6
7
|
/**
|
|
7
8
|
* Describes the type of the app directory entry `manifest` attributes.
|
|
8
9
|
* Launch mechanics are determined by the manifest type.
|
|
@@ -212,21 +213,7 @@ export declare type StorefrontNavigationItem = StorefrontNavigationItemAppGrid |
|
|
|
212
213
|
* Render an item in the navigation bar of Storefront with a description and image.
|
|
213
214
|
*/
|
|
214
215
|
export declare type StorefrontDetailedNavigationItem = StorefrontNavigationItem & StorefrontNavigationItemDetails;
|
|
215
|
-
export interface StorefrontProviderInfo {
|
|
216
|
-
/**
|
|
217
|
-
* Unique identifier for the Storefront provider.
|
|
218
|
-
*/
|
|
219
|
-
id: string;
|
|
220
|
-
/**
|
|
221
|
-
* A UI friendly title for the platform Storefront.
|
|
222
|
-
* This will be used in the Storefront selection dropdown.
|
|
223
|
-
*/
|
|
224
|
-
title: string;
|
|
225
|
-
/**
|
|
226
|
-
* Icon for storefront provider.
|
|
227
|
-
* Visible next to title in storefront provider selector UI
|
|
228
|
-
*/
|
|
229
|
-
icon: string;
|
|
216
|
+
export interface StorefrontProviderInfo extends ProviderInfo {
|
|
230
217
|
}
|
|
231
218
|
/**
|
|
232
219
|
* Describes a Storefront provided by a platform.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
1
2
|
import type { LaunchAppRequest } from '../shapes';
|
|
2
3
|
/**
|
|
3
4
|
* Launch the app described by an App Directory entry.
|
|
4
5
|
* @param app the app directory entry.
|
|
5
6
|
* @param opts launch options.
|
|
6
7
|
*/
|
|
7
|
-
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | import("openfin
|
|
8
|
+
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | import("@openfin/core/src/api/view").View | OpenFin.Identity | import("@openfin/core/src/api/application").Application | import("@openfin/core/src/api/platform").Platform>;
|
|
@@ -3,7 +3,7 @@ import { OpenPageTabContextMenuRequest } from '../../../../client-api-platform/s
|
|
|
3
3
|
import { OpenGlobalContextMenuRequest, OpenSaveButtonContextMenuRequest, OpenSaveMenuRequest, OpenViewTabContextMenuRequest, ToolbarOptions, WindowStateButtonOptions } from '../../../../client-api-platform/src/shapes';
|
|
4
4
|
export declare const getBrowserModule: (identity: OpenFin.Identity) => {
|
|
5
5
|
identity: OpenFin.Identity;
|
|
6
|
-
openfinWindow: import("openfin
|
|
6
|
+
openfinWindow: import("@openfin/core/src/api/window")._Window;
|
|
7
7
|
getPages: () => Promise<AttachedPage[]>;
|
|
8
8
|
getPage: (pageId: string) => Promise<AttachedPage>;
|
|
9
9
|
addPage: (page: PageWithUpdatableRuntimeAttribs) => Promise<void>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="openfin
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
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
5
|
wrapSync: (windowIdentity: OpenFin.Identity) => {
|
|
6
6
|
identity: OpenFin.Identity;
|
|
7
|
-
openfinWindow: import("openfin
|
|
7
|
+
openfinWindow: import("@openfin/core/src/api/window")._Window;
|
|
8
8
|
getPages: () => Promise<AttachedPage[]>;
|
|
9
9
|
getPage: (pageId: string) => Promise<AttachedPage>;
|
|
10
10
|
addPage: (page: import("@common/api/pages/shapes").PageWithUpdatableRuntimeAttribs) => Promise<void>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
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
|
-
identity:
|
|
4
|
+
identity: OpenFin.Identity;
|
|
5
5
|
}, callerIdentity: any): Promise<void>;
|
|
6
6
|
export declare const openCommonContextMenu: (payload: OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload, callerIdentity: any) => Promise<void>;
|
|
7
7
|
export declare function openViewTabContextMenuInternal(payload: OpenViewTabContextMenuRequest & {
|
|
8
|
-
identity:
|
|
8
|
+
identity: OpenFin.Identity;
|
|
9
9
|
}, callerIdentity: any): Promise<void>;
|
|
10
10
|
export declare function openPageTabContextMenuInternal(payload: OpenPageTabContextMenuRequest & {
|
|
11
|
-
identity:
|
|
11
|
+
identity: OpenFin.Identity;
|
|
12
12
|
}, callerIdentity: any): Promise<void>;
|
|
13
13
|
export declare function openSaveButtonContextMenuInternal(payload: OpenSaveButtonContextMenuRequest & {
|
|
14
|
-
identity:
|
|
14
|
+
identity: OpenFin.Identity;
|
|
15
15
|
}, callerIdentity: any): Promise<void>;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { NamedIdentity } from 'openfin-adapter/src/identity';
|
|
2
1
|
import { WorkspaceContextMenuItemData } from '../../../../client-api-platform/src/shapes';
|
|
3
|
-
export declare const saveWorkspaceHandler: (identity:
|
|
4
|
-
export declare const saveWorkspaceAsHandler: (identity:
|
|
2
|
+
export declare const saveWorkspaceHandler: (identity: OpenFin.Identity) => Promise<void>;
|
|
3
|
+
export declare const saveWorkspaceAsHandler: (identity: OpenFin.Identity) => void;
|
|
5
4
|
/**
|
|
6
5
|
* @param identity Identity of browser window to execute save on.
|
|
7
6
|
* @param pageId Id of a page to save. If omitted, active page is saved.
|
|
8
7
|
*/
|
|
9
|
-
export declare const savePageHandler: (identity:
|
|
8
|
+
export declare const savePageHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
|
|
10
9
|
/**
|
|
11
10
|
* @param identity Identity of browser window to execute save on.
|
|
12
11
|
* @param pageId Id of a page to save. If omitted, active page is saved.
|
|
13
12
|
*/
|
|
14
|
-
export declare const savePageAsHandler: (identity:
|
|
15
|
-
export declare const switchWorkspaceHandler: (winIdentity:
|
|
16
|
-
export declare const deleteWorkspaceHandler: (winIdentity:
|
|
13
|
+
export declare const savePageAsHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
|
|
14
|
+
export declare const switchWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
|
|
15
|
+
export declare const deleteWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="openfin
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
2
|
import { WorkspacePlatformModule } from '../shapes';
|
|
3
3
|
export declare const wrapSync: (identity: OpenFin.ApplicationIdentity) => WorkspacePlatformModule;
|
|
4
4
|
export declare const getCurrentSync: () => WorkspacePlatformModule;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="openfin
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
2
|
import type { AttachPagesToWindowPayload } from '../../../../common/src/api/pages/shapes';
|
|
3
3
|
import type { CreateSavedPageRequest, Page, UpdateSavedPageRequest } from '../../../../client-api-platform/src/shapes';
|
|
4
4
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="openfin-adapter/fin" />
|
|
2
1
|
import { Page } from '../../../common/src/api/pages/shapes';
|
|
3
2
|
import type { CreateSavedPageRequest, CreateSavedWorkspaceRequest, UpdateSavedPageRequest, UpdateSavedWorkspaceRequest, Workspace } from '../shapes';
|
|
4
|
-
export declare const getStorageApi: (identity:
|
|
3
|
+
export declare const getStorageApi: (identity: any) => {
|
|
5
4
|
createPage: (req: CreateSavedPageRequest) => Promise<any>;
|
|
6
5
|
deletePage: (id: string) => Promise<any>;
|
|
7
6
|
updatePage: (req: UpdateSavedPageRequest) => Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="openfin
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
2
|
import type { CustomThemes } from '../../../common/src/api/theming';
|
|
3
3
|
export declare const getThemingApi: (identity: OpenFin.ApplicationIdentity) => {
|
|
4
4
|
getThemes: () => Promise<CustomThemes>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="openfin
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
2
|
import type { BrowserInitConfig } from '../../../client-api-platform/src/shapes';
|
|
3
3
|
import { WorkspacePlatformOverrideCallback, WorkspacePlatformProvider } from '..';
|
|
4
4
|
export declare const getOverrideCallback: (browserInitOptions: BrowserInitConfig, overrideCallback?: WorkspacePlatformOverrideCallback) => OpenFin.OverrideCallback<WorkspacePlatformProvider>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="openfin
|
|
2
|
-
import {
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
|
+
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
6
|
export declare function preserveInteropIfManifestConflict(opts: Partial<OpenFin.ViewOptions>, fetchManifest: ({ manifestUrl: string }: {
|
|
7
7
|
manifestUrl: any;
|
|
8
|
-
}, callerIdentity: Identity) => any, callerIdentity: Identity): Promise<any>;
|
|
8
|
+
}, callerIdentity: OpenFin.Identity) => any, callerIdentity: OpenFin.Identity): Promise<any>;
|
|
9
9
|
export declare const filterSnapshotWindows: (win: OpenFin.WindowOptions) => boolean;
|
|
10
10
|
/**
|
|
11
11
|
* fitToMonitor()
|
|
@@ -24,11 +24,11 @@ export declare const filterSnapshotWindows: (win: OpenFin.WindowOptions) => bool
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const fitToMonitor: (options: any) => Promise<any>;
|
|
26
26
|
declare type LegacyWindowOptions = Omit<OpenFin.PlatformWindowCreationOptions, 'workspacePlatform'> & {
|
|
27
|
-
pages?:
|
|
28
|
-
workstacks?:
|
|
27
|
+
pages?: Page[];
|
|
28
|
+
workstacks?: Page[];
|
|
29
29
|
};
|
|
30
30
|
export declare const initWorkspacePlatformOptions: (options: LegacyWindowOptions | OpenFin.PlatformWindowCreationOptions) => OpenFin.PlatformWindowCreationOptions;
|
|
31
|
-
export declare const applyPageDefaults: (pages:
|
|
31
|
+
export declare const applyPageDefaults: (pages: Page[], defaultPageOptions?: BrowserInitConfig['defaultPageOptions']) => Promise<{
|
|
32
32
|
title: string;
|
|
33
33
|
layout: any;
|
|
34
34
|
pageId: string;
|
|
@@ -37,6 +37,7 @@ export declare const applyPageDefaults: (pages: OpenFin.Page[], defaultPageOptio
|
|
|
37
37
|
isReadOnly?: boolean;
|
|
38
38
|
unsavedIconUrl?: string;
|
|
39
39
|
iconUrl?: string;
|
|
40
|
+
isLocked?: boolean;
|
|
40
41
|
closeButton?: {
|
|
41
42
|
hidden?: boolean;
|
|
42
43
|
disabled?: boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="openfin
|
|
2
|
-
import type { InteropBroker } from 'openfin-adapter/src/api/interop';
|
|
3
|
-
import { NamedIdentity } from 'openfin-adapter/src/identity';
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
4
2
|
import { IconProps } from '@openfin/ui-library';
|
|
3
|
+
import { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
|
|
5
4
|
import type { AttachedPage, Page, PageWithUpdatableRuntimeAttribs } from '../../common/src/api/pages/shapes';
|
|
6
5
|
import type { CustomThemes } from '../../common/src/api/theming';
|
|
7
6
|
import type { App } from '../../client-api/src/shapes';
|
|
@@ -9,6 +8,7 @@ export { AppManifestType } from '../../client-api/src/shapes';
|
|
|
9
8
|
export type { App, AppIntent, Image } from '../../client-api/src/shapes';
|
|
10
9
|
export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs } from '../../common/src/api/pages/shapes';
|
|
11
10
|
export type { CustomThemes } from '../../common/src/api/theming';
|
|
11
|
+
export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
|
|
12
12
|
/**
|
|
13
13
|
* Request for creating a saved page in persistent storage.
|
|
14
14
|
*/
|
|
@@ -120,7 +120,7 @@ export declare type OpenGlobalContextMenuPayload = OpenGlobalContextMenuRequest
|
|
|
120
120
|
/** Template defining the options to show in the context menu. */
|
|
121
121
|
template: GlobalContextMenuItemTemplate[];
|
|
122
122
|
/** Identity of the Browser window where context menu should be shown. */
|
|
123
|
-
identity:
|
|
123
|
+
identity: OpenFin.Identity;
|
|
124
124
|
/** Default function that handles stock context menu options. */
|
|
125
125
|
callback: (data: GlobalContextMenuItemData, payload: OpenGlobalContextMenuPayload) => any;
|
|
126
126
|
};
|
|
@@ -174,7 +174,7 @@ export interface ViewTabCustomActionPayload {
|
|
|
174
174
|
/** Any data necessary for the functioning of specified custom action*/
|
|
175
175
|
customData: any;
|
|
176
176
|
/** Identity of the Browser window where context menu should be shown. */
|
|
177
|
-
windowIdentity:
|
|
177
|
+
windowIdentity: OpenFin.Identity;
|
|
178
178
|
selectedViews: OpenFin.Identity[];
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
@@ -182,7 +182,7 @@ export interface ViewTabCustomActionPayload {
|
|
|
182
182
|
*/
|
|
183
183
|
export declare type OpenViewTabContextMenuPayload = OpenViewTabContextMenuRequest & {
|
|
184
184
|
/** Identity of the Browser window where context menu should be shown. */
|
|
185
|
-
identity:
|
|
185
|
+
identity: OpenFin.Identity;
|
|
186
186
|
/** Default function that handles stock context menu options. */
|
|
187
187
|
callback: (data: ViewTabMenuData, req: OpenViewTabContextMenuPayload) => any;
|
|
188
188
|
};
|
|
@@ -191,7 +191,7 @@ export declare type OpenViewTabContextMenuPayload = OpenViewTabContextMenuReques
|
|
|
191
191
|
*/
|
|
192
192
|
export declare type OpenPageTabContextMenuPayload = OpenPageTabContextMenuRequest & {
|
|
193
193
|
/** Identity of the Browser window where context menu should be shown. */
|
|
194
|
-
identity:
|
|
194
|
+
identity: OpenFin.Identity;
|
|
195
195
|
/** Template defining the options to show in the context menu. */
|
|
196
196
|
template: PageTabContextMenuItemTemplate[];
|
|
197
197
|
/** Default function that handles stock context menu options. */
|
|
@@ -236,20 +236,23 @@ export interface CustomButtonActionPayload {
|
|
|
236
236
|
/** Screen y-coordinate where custom button should be shown. */
|
|
237
237
|
y: number;
|
|
238
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* The shape of the payload sent by a custom dropdown menu item to a custom action handler
|
|
241
|
+
*/
|
|
242
|
+
export interface CustomDropdownItemActionPayload {
|
|
243
|
+
/** Calling the CustomButton type */
|
|
244
|
+
callerType: CustomActionCallerType.CustomDropdownItem;
|
|
245
|
+
/** Identity for the current window. */
|
|
246
|
+
windowIdentity: OpenFin.Identity;
|
|
247
|
+
/** Any data necessary for the functioning of specified custom action*/
|
|
248
|
+
customData: any;
|
|
249
|
+
}
|
|
239
250
|
/**
|
|
240
251
|
* Custom browser buttons
|
|
241
252
|
*/
|
|
242
|
-
export interface CustomBrowserButtonConfig {
|
|
253
|
+
export interface CustomBrowserButtonConfig extends CustomButtonConfig {
|
|
243
254
|
/** Type of cutom browser button */
|
|
244
255
|
type: BrowserButtonType.Custom;
|
|
245
|
-
/** Button name text when hovered over */
|
|
246
|
-
tooltip: string;
|
|
247
|
-
/** Disable custom button true or false */
|
|
248
|
-
disabled?: boolean;
|
|
249
|
-
/** icon URL for icon image */
|
|
250
|
-
iconUrl: string;
|
|
251
|
-
/** Custom action once the button is clicked */
|
|
252
|
-
action: CustomActionSpecifier;
|
|
253
256
|
}
|
|
254
257
|
/**
|
|
255
258
|
* Default Browser Button types
|
|
@@ -325,7 +328,7 @@ export interface OpenSaveButtonContextMenuRequest {
|
|
|
325
328
|
*/
|
|
326
329
|
export declare type OpenSaveButtonContextMenuPayload = OpenSaveButtonContextMenuRequest & {
|
|
327
330
|
/** Identity of the Browser window where context menu should be shown. */
|
|
328
|
-
identity:
|
|
331
|
+
identity: OpenFin.Identity;
|
|
329
332
|
/** Template defining the options to show in the context menu. */
|
|
330
333
|
template: SaveButtonContextMenuItemTemplate[];
|
|
331
334
|
/** Default function that handles stock context menu options. */
|
|
@@ -1158,6 +1161,7 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
|
|
|
1158
1161
|
*/
|
|
1159
1162
|
export declare enum CustomActionCallerType {
|
|
1160
1163
|
CustomButton = "CustomButton",
|
|
1164
|
+
CustomDropdownItem = "CustomDropdownItem",
|
|
1161
1165
|
GlobalContextMenu = "GlobalContextMenu",
|
|
1162
1166
|
ViewTabContextMenu = "ViewTabContextMenu",
|
|
1163
1167
|
PageTabContextMenu = "PageTabContextMenu",
|
|
@@ -1169,16 +1173,7 @@ export declare enum CustomActionCallerType {
|
|
|
1169
1173
|
* When `callerType == CustomActionCallerType.API`, the payload is defined by the code directly invoking the action.*/
|
|
1170
1174
|
export declare type CustomActionPayload = {
|
|
1171
1175
|
callerType: CustomActionCallerType.API;
|
|
1172
|
-
} | CustomButtonActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
|
|
1173
|
-
/**
|
|
1174
|
-
* Configures a custom action when the control is invoked
|
|
1175
|
-
*/
|
|
1176
|
-
export interface CustomActionSpecifier {
|
|
1177
|
-
/** Identifier of a custom action defined at platform initialization*/
|
|
1178
|
-
id: string;
|
|
1179
|
-
/** Any data necessary for the functioning of specified custom action*/
|
|
1180
|
-
customData?: any;
|
|
1181
|
-
}
|
|
1176
|
+
} | CustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
|
|
1182
1177
|
/**
|
|
1183
1178
|
* Defines custom action map where the key is the custom action ID and value is the action handler
|
|
1184
1179
|
*/
|
|
@@ -1246,7 +1241,7 @@ export interface WorkspacePlatformInitConfig {
|
|
|
1246
1241
|
* Override workspace platform interop behavior
|
|
1247
1242
|
* https://cdn.openfin.co/docs/javascript/stable/InteropBroker.html
|
|
1248
1243
|
*/
|
|
1249
|
-
interopOverride?: OpenFin.OverrideCallback<InteropBroker, InteropBroker>;
|
|
1244
|
+
interopOverride?: OpenFin.OverrideCallback<OpenFin.InteropBroker, OpenFin.InteropBroker>;
|
|
1250
1245
|
}
|
|
1251
1246
|
/**
|
|
1252
1247
|
* Extend or replace default functionality in order to customize behavior of a Workspace Platform Provider.
|
|
@@ -1388,9 +1383,9 @@ export interface BrowserInitConfig {
|
|
|
1388
1383
|
/**
|
|
1389
1384
|
* @deprecated
|
|
1390
1385
|
* Override workspace platform interop behavior
|
|
1391
|
-
* https://cdn.openfin.co/docs/javascript/stable/InteropBroker.html
|
|
1386
|
+
* https://cdn.openfin.co/docs/javascript/stable/OpenFin.InteropBroker.html
|
|
1392
1387
|
*/
|
|
1393
|
-
interopOverride?: OpenFin.OverrideCallback<InteropBroker, InteropBroker>;
|
|
1388
|
+
interopOverride?: OpenFin.OverrideCallback<OpenFin.InteropBroker, OpenFin.InteropBroker>;
|
|
1394
1389
|
}
|
|
1395
1390
|
interface WorkspaceMetadata {
|
|
1396
1391
|
APIVersion: string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configures a custom action when the control is invoked
|
|
3
|
+
*/
|
|
4
|
+
export interface CustomActionSpecifier {
|
|
5
|
+
/** Identifier of a custom action defined at platform initialization*/
|
|
6
|
+
id: string;
|
|
7
|
+
/** Any data necessary for the functioning of specified custom action*/
|
|
8
|
+
customData?: any;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Base configuration for a custom button
|
|
12
|
+
*/
|
|
13
|
+
export interface BaseCustomButtonConfig {
|
|
14
|
+
/** Button name text when hovered over */
|
|
15
|
+
tooltip: string;
|
|
16
|
+
/** Disable custom button true or false */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** icon URL for icon image */
|
|
19
|
+
iconUrl?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface BaseCustomDropdownItem extends BaseCustomButtonConfig {
|
|
22
|
+
/** Is this dropdown item checked? Any value other than undefined will decorate the dropdown option as a checkbox option. */
|
|
23
|
+
checked?: boolean;
|
|
24
|
+
/** icon URL for icon image */
|
|
25
|
+
action?: any;
|
|
26
|
+
}
|
|
27
|
+
export declare type BaseCustomDropdownItems = BaseCustomDropdownItem[] | (() => Promise<BaseCustomDropdownItem[]>);
|
|
28
|
+
/**
|
|
29
|
+
* Base Configuration for a custom dropdown
|
|
30
|
+
*/
|
|
31
|
+
export interface BaseCustomDropdownConfig extends BaseCustomButtonConfig {
|
|
32
|
+
/** Dropdown options */
|
|
33
|
+
options: BaseCustomDropdownItems;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Configuration for a buttons with a custom action
|
|
37
|
+
*/
|
|
38
|
+
export interface CustomButtonConfig extends BaseCustomButtonConfig {
|
|
39
|
+
/** Custom action once the button is clicked */
|
|
40
|
+
action: CustomActionSpecifier;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Configuration for a button that presents a dropdown menu with options that dispatch custom actions when clicked.
|
|
44
|
+
*/
|
|
45
|
+
export interface CustomDropdownConfig extends BaseCustomDropdownConfig {
|
|
46
|
+
/** Options that will be displayed in the dropdown */
|
|
47
|
+
options: CustomButtonConfig[];
|
|
48
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface StyleOverrides {
|
|
2
|
+
iconUrl: string;
|
|
3
|
+
}
|
|
4
|
+
interface HotkeyOverrides {
|
|
5
|
+
toggleHomeVisibility: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Overrides {
|
|
8
|
+
disableBrowserNewPageButton: boolean;
|
|
9
|
+
enableWorkspaceDock: boolean;
|
|
10
|
+
hotkeys: HotkeyOverrides;
|
|
11
|
+
style: StyleOverrides;
|
|
12
|
+
browserWindowTitle: string;
|
|
13
|
+
flags: {
|
|
14
|
+
[key: string]: boolean;
|
|
15
|
+
};
|
|
16
|
+
disableRuntimeValidation: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const overrides: Overrides;
|
|
19
|
+
export default overrides;
|
|
20
|
+
export declare const useOverrides: () => Overrides;
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
/// <reference types="openfin
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
2
|
import type { AttachedPage, AttachPagesToWindowPayload, DetachPagesFromWindowPayload, ReorderPagesForWindowPayload, SetActivePageForWindowPayload, UpdatePageForWindowPayload } from './shapes';
|
|
3
|
-
/**
|
|
4
|
-
* All of the remote procedures that can be called in the
|
|
5
|
-
* platform window's address space regarding attached pages.
|
|
6
|
-
*/
|
|
7
|
-
export declare enum ChannelAction {
|
|
8
|
-
GetPages = "get-pages",
|
|
9
|
-
GetActivePageForWindow = "get-active-page-for-window",
|
|
10
|
-
AttachPagesToWindow = "attach-pages-to-window",
|
|
11
|
-
DetachPagesFromWindow = "detach-pages-from-window",
|
|
12
|
-
SetActivePageForWindow = "set-active-page-for-window",
|
|
13
|
-
RenamePage = "rename-page",
|
|
14
|
-
ReorderPagesForWindow = "reorder-pages-for-window",
|
|
15
|
-
UpdatePageForWindow = "update-page-for-window",
|
|
16
|
-
UpdatePagesWindowOptions = "update-pages-window-options",
|
|
17
|
-
IsDetachingPages = "is-detaching-pages",
|
|
18
|
-
IsActivePageChanging = "is-active-page-changing"
|
|
19
|
-
}
|
|
20
3
|
export declare enum EventType {
|
|
21
4
|
AttachedPagesToWindow = "attached-pages-to-window",
|
|
22
5
|
DetachedPagesFromWindow = "detached-pages-from-window"
|
|
@@ -19,4 +19,4 @@ export declare const makePage: (title: string, layout: LayoutExtended) => Promis
|
|
|
19
19
|
* @param page the page to clone.
|
|
20
20
|
* @returns a clone of the given page.
|
|
21
21
|
*/
|
|
22
|
-
export declare const clonePage: (page: Page) => PageWithUpdatableRuntimeAttribs
|
|
22
|
+
export declare const clonePage: (page: Page) => Promise<PageWithUpdatableRuntimeAttribs>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
|
+
export declare const getWindowChannelId: (identity: OpenFin.Identity) => string;
|
|
3
|
+
export declare const getChannelClient: (identity: OpenFin.Identity) => Promise<import("@openfin/core/src/api/interappbus/channel/client").default>;
|
|
4
|
+
/**
|
|
5
|
+
* If the browser window is reloaded too quickly, runtime will
|
|
6
|
+
* respond that the channel provider has already been created.
|
|
7
|
+
* Hence, we retry a couple of times to make sure this does not occur.
|
|
8
|
+
* (Should only happen in local development)
|
|
9
|
+
*/
|
|
10
|
+
export declare const createChannel: () => Promise<import("@openfin/core/src/api/interappbus/channel/provider").ChannelProvider>;
|
|
11
|
+
export interface AddToChannelRequest {
|
|
12
|
+
newChannelId: string;
|
|
13
|
+
selectedViews: OpenFin.Identity[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* These actions are used to handle functionality activated by user in the UI (e.g. context menu)
|
|
17
|
+
* and hence show dialogs, indicators etc.
|
|
18
|
+
* Not to be confused with attached pages actions, which are for API use.
|
|
19
|
+
*/
|
|
20
|
+
declare enum GeneralBrowserChannelActions {
|
|
21
|
+
CloseBrowserWindow = "close-browser-window",
|
|
22
|
+
QuitPlatform = "quit-platform",
|
|
23
|
+
ClosePage = "close-page",
|
|
24
|
+
AddToChannel = "add-to-channel",
|
|
25
|
+
RemoveFromChannel = "remove-from-channel",
|
|
26
|
+
OpenSaveModalInternal = "open-save-modal-internal",
|
|
27
|
+
DuplicatePage = "duplicate-page"
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* All of the remote procedures that can be called in the
|
|
31
|
+
* platform window's address space regarding attached pages.
|
|
32
|
+
*/
|
|
33
|
+
export declare enum PageChannelAction {
|
|
34
|
+
GetPages = "get-pages",
|
|
35
|
+
GetActivePageForWindow = "get-active-page-for-window",
|
|
36
|
+
AttachPagesToWindow = "attach-pages-to-window",
|
|
37
|
+
DetachPagesFromWindow = "detach-pages-from-window",
|
|
38
|
+
SetActivePageForWindow = "set-active-page-for-window",
|
|
39
|
+
RenamePage = "rename-page",
|
|
40
|
+
ReorderPagesForWindow = "reorder-pages-for-window",
|
|
41
|
+
UpdatePageForWindow = "update-page-for-window",
|
|
42
|
+
UpdatePagesWindowOptions = "update-pages-window-options",
|
|
43
|
+
IsDetachingPages = "is-detaching-pages",
|
|
44
|
+
IsActivePageChanging = "is-active-page-changing"
|
|
45
|
+
}
|
|
46
|
+
export declare const BrowserChannelAction: {
|
|
47
|
+
GetPages: PageChannelAction.GetPages;
|
|
48
|
+
GetActivePageForWindow: PageChannelAction.GetActivePageForWindow;
|
|
49
|
+
AttachPagesToWindow: PageChannelAction.AttachPagesToWindow;
|
|
50
|
+
DetachPagesFromWindow: PageChannelAction.DetachPagesFromWindow;
|
|
51
|
+
SetActivePageForWindow: PageChannelAction.SetActivePageForWindow;
|
|
52
|
+
RenamePage: PageChannelAction.RenamePage;
|
|
53
|
+
ReorderPagesForWindow: PageChannelAction.ReorderPagesForWindow;
|
|
54
|
+
UpdatePageForWindow: PageChannelAction.UpdatePageForWindow;
|
|
55
|
+
UpdatePagesWindowOptions: PageChannelAction.UpdatePagesWindowOptions;
|
|
56
|
+
IsDetachingPages: PageChannelAction.IsDetachingPages;
|
|
57
|
+
IsActivePageChanging: PageChannelAction.IsActivePageChanging;
|
|
58
|
+
CloseBrowserWindow: GeneralBrowserChannelActions.CloseBrowserWindow;
|
|
59
|
+
QuitPlatform: GeneralBrowserChannelActions.QuitPlatform;
|
|
60
|
+
ClosePage: GeneralBrowserChannelActions.ClosePage;
|
|
61
|
+
AddToChannel: GeneralBrowserChannelActions.AddToChannel;
|
|
62
|
+
RemoveFromChannel: GeneralBrowserChannelActions.RemoveFromChannel;
|
|
63
|
+
OpenSaveModalInternal: GeneralBrowserChannelActions.OpenSaveModalInternal;
|
|
64
|
+
DuplicatePage: GeneralBrowserChannelActions.DuplicatePage;
|
|
65
|
+
};
|
|
66
|
+
export declare type BrowserChannelAction = typeof BrowserChannelAction;
|
|
67
|
+
export {};
|