@openfin/workspace 8.1.7 → 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.
Files changed (64) hide show
  1. package/client-api/src/dock.d.ts +19 -0
  2. package/client-api/src/dock.test.d.ts +1 -0
  3. package/client-api/src/home.d.ts +1 -1
  4. package/client-api/src/index.d.ts +6 -0
  5. package/client-api/src/shapes/common.d.ts +8 -0
  6. package/client-api/src/shapes/dock.d.ts +63 -0
  7. package/client-api/src/shapes/index.d.ts +2 -0
  8. package/client-api/src/shapes/provider.d.ts +18 -0
  9. package/client-api/src/shapes/store.d.ts +2 -15
  10. package/client-api/src/store.d.ts +1 -1
  11. package/client-api-platform/src/api/app-directory.d.ts +2 -1
  12. package/client-api-platform/src/api/browser/browser-module.d.ts +1 -1
  13. package/client-api-platform/src/api/browser/index.d.ts +1 -1
  14. package/client-api-platform/src/api/context-menu/index.d.ts +5 -5
  15. package/client-api-platform/src/api/context-menu/utils.d.ts +7 -7
  16. package/client-api-platform/src/api/pages/helper.d.ts +1 -1
  17. package/client-api-platform/src/api/pages/index.d.ts +1 -1
  18. package/client-api-platform/src/api/storage.d.ts +1 -1
  19. package/client-api-platform/src/init/browser-window-focus.d.ts +1 -1
  20. package/client-api-platform/src/init/override-callback.d.ts +1 -1
  21. package/client-api-platform/src/init/utils.d.ts +7 -6
  22. package/client-api-platform/src/shapes.d.ts +26 -31
  23. package/common/src/api/action.d.ts +48 -0
  24. package/common/src/api/overrides.d.ts +20 -0
  25. package/common/src/api/pages/attached.d.ts +1 -18
  26. package/common/src/api/pages/shapes.d.ts +1 -1
  27. package/common/src/api/protocol/browser.d.ts +67 -0
  28. package/{client-api-platform/src/api/protocol.d.ts → common/src/api/protocol/workspace-platform.d.ts} +4 -3
  29. package/common/src/api/{protocol.d.ts → protocol/workspace.d.ts} +10 -10
  30. package/common/src/api/provider.d.ts +48 -0
  31. package/common/src/api/storefront.d.ts +1 -15
  32. package/common/src/api/workspaces/index.d.ts +1 -1
  33. package/common/src/utils/application.d.ts +3 -3
  34. package/common/src/utils/channels.d.ts +1 -1
  35. package/common/src/utils/context-menu.d.ts +2 -3
  36. package/common/src/utils/defer-show.d.ts +2 -2
  37. package/common/src/utils/env.d.ts +1 -1
  38. package/common/src/utils/global-context-menu.d.ts +2 -2
  39. package/common/src/utils/indicators/helper.d.ts +1 -1
  40. package/common/src/utils/landing-page.d.ts +3 -4
  41. package/common/src/utils/layout.d.ts +2 -3
  42. package/common/src/utils/local-storage-key.d.ts +2 -1
  43. package/common/src/utils/menu-config.d.ts +1 -1
  44. package/common/src/utils/menu-window-provider.d.ts +4 -5
  45. package/common/src/utils/page-tab-context-menu.d.ts +2 -2
  46. package/common/src/utils/route.d.ts +1 -1
  47. package/common/src/utils/router/base.d.ts +2 -1
  48. package/common/src/utils/snapshot.d.ts +1 -1
  49. package/common/src/utils/usage-register.d.ts +2 -0
  50. package/common/src/utils/window.d.ts +17 -10
  51. package/common/src/utils/workspace-modals.d.ts +2 -2
  52. package/home.js +1 -1
  53. package/home.js.map +1 -1
  54. package/index.js +1 -1
  55. package/index.js.map +1 -1
  56. package/notifications.js +124 -49
  57. package/notifications.js.LICENSE.txt +2 -9
  58. package/notifications.js.map +1 -1
  59. package/package.json +1 -1
  60. package/search-api/src/provider/remote/registration.d.ts +4 -1
  61. package/search-api/src/shapes.d.ts +10 -14
  62. package/store.js +1 -1
  63. package/store.js.map +1 -1
  64. package/common/src/api/browser-protocol.d.ts +0 -28
@@ -0,0 +1,19 @@
1
+ import type { DockProvider } from './shapes/dock';
2
+ export * from './shapes/dock';
3
+ /**
4
+ * Registers a Dock provider
5
+ */
6
+ export declare const register: (provider: DockProvider) => Promise<void>;
7
+ /**
8
+ * Deregister a Dock provider
9
+ */
10
+ export declare const deregister: () => Promise<void>;
11
+ /**
12
+ * API function to minimize Dock
13
+ * @returns promise - invokes action
14
+ */
15
+ export declare const minimize: () => Promise<void>;
16
+ /**
17
+ * Shows Dock window if enabled & registered
18
+ */
19
+ export declare const show: () => Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -4,7 +4,7 @@ export * from './shapes/home';
4
4
  * Register a provider that can return search results to Home.
5
5
  * @param provider the Home provider implementation.
6
6
  */
7
- export declare const register: (provider: HomeProvider | CLIProvider) => Promise<void>;
7
+ export declare const register: (provider: HomeProvider | CLIProvider) => Promise<import("@search/shapes").RegistrationMetaInfo>;
8
8
  /**
9
9
  * Deregister a provider.
10
10
  * @param provider the Home provider implementation.
@@ -1,3 +1,4 @@
1
+ import * as DockAPI from './dock';
1
2
  import * as HomeAPI from './home';
2
3
  import * as LegacyAPI from './legacy';
3
4
  import * as StorefrontAPI from './store';
@@ -5,6 +6,7 @@ export * from './shapes/common';
5
6
  export * from './shapes/templates';
6
7
  export * from './shapes/home';
7
8
  export * from './shapes/store';
9
+ export * from './shapes/dock';
8
10
  /**
9
11
  Namespace for Storefront integrations.
10
12
  */
@@ -13,6 +15,10 @@ export { StorefrontAPI as Storefront };
13
15
  Namespace for Home integrations.
14
16
  */
15
17
  export { HomeAPI as Home };
18
+ /**
19
+ Namespace for Dock integrations.
20
+ */
21
+ export { DockAPI as Dock };
16
22
  /**
17
23
  Namespace for Legacy integrations.
18
24
  */
@@ -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
+ }
@@ -3,5 +3,7 @@
3
3
  */
4
4
  export * from './common';
5
5
  export * from './home';
6
+ export * from './provider';
6
7
  export * from './store';
7
8
  export * from './templates';
9
+ export * from './dock';
@@ -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.
@@ -10,7 +10,7 @@ export declare const register: (provider: StorefrontProvider) => Promise<void>;
10
10
  export declare const deregister: (providerId: string) => Promise<void>;
11
11
  /**
12
12
  * API function to hide Storefront
13
- * @returns promise - invokes hide-storefront action
13
+ * @returns promise - invokes hide action
14
14
  */
15
15
  export declare const hide: () => Promise<void>;
16
16
  /**
@@ -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-adapter").Application | import("openfin-adapter/src/api/platform").Platform | import("openfin-adapter").View | import("openfin-adapter").Identity>;
8
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | import("@openfin/core/src/api/view").View | OpenFin.Identity | import("@openfin/core/src/api/platform").Platform | import("@openfin/core/src/api/application").Application>;
@@ -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-adapter").Window;
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>;
@@ -3,7 +3,7 @@ import type { BrowserCreateWindowRequest, BrowserWindowModule } from '../../shap
3
3
  export declare const getBrowserApi: (identity: OpenFin.ApplicationIdentity) => {
4
4
  wrapSync: (windowIdentity: OpenFin.Identity) => {
5
5
  identity: OpenFin.Identity;
6
- openfinWindow: import("openfin-adapter").Window;
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: import("@common/api/pages/shapes").PageWithUpdatableRuntimeAttribs) => Promise<void>;
@@ -1,15 +1,15 @@
1
- import { NamedIdentity } from 'openfin-adapter/src/identity';
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: NamedIdentity;
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: NamedIdentity;
8
+ identity: OpenFin.Identity;
9
9
  }, callerIdentity: any): Promise<void>;
10
10
  export declare function openPageTabContextMenuInternal(payload: OpenPageTabContextMenuRequest & {
11
- identity: NamedIdentity;
11
+ identity: OpenFin.Identity;
12
12
  }, callerIdentity: any): Promise<void>;
13
13
  export declare function openSaveButtonContextMenuInternal(payload: OpenSaveButtonContextMenuRequest & {
14
- identity: NamedIdentity;
14
+ identity: OpenFin.Identity;
15
15
  }, callerIdentity: any): Promise<void>;
@@ -1,16 +1,16 @@
1
- import { NamedIdentity } from 'openfin-adapter/src/identity';
1
+ /// <reference types="@openfin/core" />
2
2
  import { WorkspaceContextMenuItemData } from '../../../../client-api-platform/src/shapes';
3
- export declare const saveWorkspaceHandler: (identity: NamedIdentity) => Promise<void>;
4
- export declare const saveWorkspaceAsHandler: (identity: NamedIdentity) => void;
3
+ export declare const saveWorkspaceHandler: (identity: OpenFin.Identity) => Promise<void>;
4
+ export declare const saveWorkspaceAsHandler: (identity: OpenFin.Identity) => void;
5
5
  /**
6
6
  * @param identity Identity of browser window to execute save on.
7
7
  * @param pageId Id of a page to save. If omitted, active page is saved.
8
8
  */
9
- export declare const savePageHandler: (identity: NamedIdentity, pageId?: string) => Promise<void>;
9
+ export declare const savePageHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
10
10
  /**
11
11
  * @param identity Identity of browser window to execute save on.
12
12
  * @param pageId Id of a page to save. If omitted, active page is saved.
13
13
  */
14
- export declare const savePageAsHandler: (identity: NamedIdentity, pageId?: string) => Promise<void>;
15
- export declare const switchWorkspaceHandler: (winIdentity: NamedIdentity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
16
- export declare const deleteWorkspaceHandler: (winIdentity: NamedIdentity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
14
+ export declare const savePageAsHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
15
+ export declare const switchWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
16
+ export declare const deleteWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
@@ -1,4 +1,4 @@
1
- /// <reference types="openfin-adapter/fin" />
1
+ /// <reference types="@openfin/core" />
2
2
  import { SnapshotExtended } from '../../../../common/src/utils/snapshot';
3
3
  /**
4
4
  * Get a snapshot with pages.
@@ -1,4 +1,4 @@
1
- /// <reference types="openfin-adapter/fin" />
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,6 +1,6 @@
1
1
  import { Page } from '../../../common/src/api/pages/shapes';
2
2
  import type { CreateSavedPageRequest, CreateSavedWorkspaceRequest, UpdateSavedPageRequest, UpdateSavedWorkspaceRequest, Workspace } from '../shapes';
3
- export declare const getStorageApi: (identity: OpenFin.ApplicationIdentity) => {
3
+ export declare const getStorageApi: (identity: any) => {
4
4
  createPage: (req: CreateSavedPageRequest) => Promise<any>;
5
5
  deletePage: (id: string) => Promise<any>;
6
6
  updatePage: (req: UpdateSavedPageRequest) => Promise<any>;
@@ -1,4 +1,4 @@
1
- /// <reference types="openfin-adapter/fin" />
1
+ /// <reference types="@openfin/core" />
2
2
  /**
3
3
  * Get the last focused browser window.
4
4
  * @returns the last focused browser window.
@@ -1,4 +1,4 @@
1
- /// <reference types="openfin-adapter/fin" />
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-adapter/fin" />
2
- import { Identity } from 'openfin-adapter';
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?: OpenFin.Page[];
28
- workstacks?: OpenFin.Page[];
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: OpenFin.Page[], defaultPageOptions?: BrowserInitConfig['defaultPageOptions']) => Promise<{
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-adapter/fin" />
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: NamedIdentity;
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: NamedIdentity;
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: NamedIdentity;
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: NamedIdentity;
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: NamedIdentity;
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. */
@@ -669,7 +672,7 @@ export interface BrowserWindowModule {
669
672
  * @param req the modal request object
670
673
  * @internal
671
674
  */
672
- _openSaveModal(req: OpenSaveMenuRequest): Promise<NamedIdentity>;
675
+ _openSaveModal(req: OpenSaveMenuRequest): Promise<OpenFin.Identity>;
673
676
  }
674
677
  /**
675
678
  * Factory for wrapping browser windows and global operations.
@@ -1207,6 +1210,7 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1207
1210
  */
1208
1211
  export declare enum CustomActionCallerType {
1209
1212
  CustomButton = "CustomButton",
1213
+ CustomDropdownItem = "CustomDropdownItem",
1210
1214
  GlobalContextMenu = "GlobalContextMenu",
1211
1215
  ViewTabContextMenu = "ViewTabContextMenu",
1212
1216
  PageTabContextMenu = "PageTabContextMenu",
@@ -1218,16 +1222,7 @@ export declare enum CustomActionCallerType {
1218
1222
  * When `callerType == CustomActionCallerType.API`, the payload is defined by the code directly invoking the action.*/
1219
1223
  export declare type CustomActionPayload = {
1220
1224
  callerType: CustomActionCallerType.API;
1221
- } | CustomButtonActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
1222
- /**
1223
- * Configures a custom action when the control is invoked
1224
- */
1225
- export interface CustomActionSpecifier {
1226
- /** Identifier of a custom action defined at platform initialization*/
1227
- id: string;
1228
- /** Any data necessary for the functioning of specified custom action*/
1229
- customData?: any;
1230
- }
1225
+ } | CustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
1231
1226
  /**
1232
1227
  * Payload received by invokeCustomActionInternal platform provider method
1233
1228
  * @internal
@@ -1303,7 +1298,7 @@ export interface WorkspacePlatformInitConfig {
1303
1298
  * Override workspace platform interop behavior
1304
1299
  * https://cdn.openfin.co/docs/javascript/stable/InteropBroker.html
1305
1300
  */
1306
- interopOverride?: OpenFin.OverrideCallback<InteropBroker, InteropBroker>;
1301
+ interopOverride?: OpenFin.OverrideCallback<OpenFin.InteropBroker, OpenFin.InteropBroker>;
1307
1302
  }
1308
1303
  /**
1309
1304
  * Extend or replace default functionality in order to customize behavior of a Workspace Platform Provider.
@@ -1445,9 +1440,9 @@ export interface BrowserInitConfig {
1445
1440
  /**
1446
1441
  * @deprecated
1447
1442
  * Override workspace platform interop behavior
1448
- * https://cdn.openfin.co/docs/javascript/stable/InteropBroker.html
1443
+ * https://cdn.openfin.co/docs/javascript/stable/OpenFin.InteropBroker.html
1449
1444
  */
1450
- interopOverride?: OpenFin.OverrideCallback<InteropBroker, InteropBroker>;
1445
+ interopOverride?: OpenFin.OverrideCallback<OpenFin.InteropBroker, OpenFin.InteropBroker>;
1451
1446
  }
1452
1447
  interface WorkspaceMetadata {
1453
1448
  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-adapter/fin" />
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"
@@ -1,4 +1,4 @@
1
- /// <reference types="openfin-adapter/fin" />
1
+ /// <reference types="@openfin/core" />
2
2
  import type { LayoutExtended } from '../../utils/layout';
3
3
  export interface PageLayoutDetails {
4
4
  /** The id of the machine that created the page. */