@openfin/workspace-platform 10.3.8 → 11.0.0

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 (57) hide show
  1. package/client-api/src/home.d.ts +3 -3
  2. package/client-api/src/internal.d.ts +2 -1
  3. package/client-api/src/shapes/store.d.ts +44 -15
  4. package/client-api-platform/src/api/app-directory.d.ts +2 -2
  5. package/client-api-platform/src/api/browser/browser-module.d.ts +1 -0
  6. package/client-api-platform/src/api/browser/index.d.ts +1 -1
  7. package/client-api-platform/src/api/context-menu/index.d.ts +1 -1
  8. package/client-api-platform/src/api/context-menu/utils.d.ts +1 -0
  9. package/client-api-platform/src/api/index.d.ts +1 -1
  10. package/client-api-platform/src/api/pages/helper.d.ts +1 -1
  11. package/client-api-platform/src/api/pages/index.d.ts +3 -3
  12. package/client-api-platform/src/api/storage.d.ts +1 -1
  13. package/client-api-platform/src/api/theming.d.ts +1 -1
  14. package/client-api-platform/src/api/workspaces/idb.d.ts +1 -1
  15. package/client-api-platform/src/init/browser-window-focus.d.ts +1 -1
  16. package/client-api-platform/src/init/custom-actions.d.ts +1 -1
  17. package/client-api-platform/src/init/dialogs.d.ts +1 -1
  18. package/client-api-platform/src/init/index.test.d.ts +1 -1
  19. package/client-api-platform/src/init/override-callback.d.ts +1 -1
  20. package/client-api-platform/src/init/panels.d.ts +4 -0
  21. package/client-api-platform/src/init/utils.d.ts +3 -17
  22. package/client-api-platform/src/shapes.d.ts +55 -3
  23. package/common/src/api/overrides.d.ts +2 -2
  24. package/common/src/api/pages/attached.d.ts +4 -14
  25. package/common/src/api/pages/idb.d.ts +1 -1
  26. package/common/src/api/pages/index.d.ts +2 -2
  27. package/common/src/api/pages/shapes.d.ts +44 -1
  28. package/common/src/api/protocol/browser.d.ts +1 -1
  29. package/common/src/api/protocol/notifications.d.ts +1 -1
  30. package/common/src/api/protocol/workspace-platform.d.ts +1 -0
  31. package/common/src/api/protocol/workspace.d.ts +2 -1
  32. package/common/src/api/provider.d.ts +1 -1
  33. package/common/src/api/storefront.d.ts +28 -7
  34. package/common/src/api/theming.d.ts +1 -0
  35. package/common/src/api/workspaces/index.d.ts +1 -1
  36. package/{client-api-platform → common}/src/test/fin-mocks.d.ts +0 -0
  37. package/common/src/utils/application.d.ts +1 -1
  38. package/common/src/utils/context-menu.d.ts +1 -1
  39. package/common/src/utils/defer-show.d.ts +2 -2
  40. package/common/src/utils/global-context-menu.d.ts +1 -0
  41. package/common/src/utils/indicators/browser.d.ts +3 -3
  42. package/common/src/utils/indicators/helper.d.ts +1 -1
  43. package/common/src/utils/landing-page.d.ts +1 -0
  44. package/common/src/utils/layout.d.ts +44 -3
  45. package/common/src/utils/menu-config.d.ts +1 -1
  46. package/common/src/utils/menu-window-provider.d.ts +1 -1
  47. package/common/src/utils/modal-bounds.d.ts +1 -1
  48. package/common/src/utils/page-tab-context-menu.d.ts +1 -0
  49. package/common/src/utils/snapshot.d.ts +1 -1
  50. package/common/src/utils/usage-register.d.ts +1 -1
  51. package/common/src/utils/window.d.ts +1 -1
  52. package/common/src/utils/workspace-modals.d.ts +1 -0
  53. package/index.js +148 -59
  54. package/index.js.map +1 -1
  55. package/package.json +1 -1
  56. package/search-api/src/internal-shapes.d.ts +1 -1
  57. package/search-api/src/shapes.d.ts +1 -1
@@ -8,14 +8,14 @@ export * from './shapes/home';
8
8
  export declare const register: (provider: HomeProvider | CLIProvider) => Promise<HomeRegistration>;
9
9
  /**
10
10
  * Deregister a provider.
11
- * @param provider the Home provider implementation.
11
+ * @param providerId the Home provider ID.
12
12
  */
13
13
  export declare const deregister: (providerId: string) => Promise<void>;
14
14
  /**
15
15
  * Show the Home UI.
16
16
  */
17
- export declare function show(): Promise<any>;
17
+ export declare function show(): Promise<void>;
18
18
  /**
19
19
  * Hide the Home UI.
20
20
  */
21
- export declare function hide(): Promise<any>;
21
+ export declare function hide(): Promise<void>;
@@ -13,4 +13,5 @@ export interface ChannelDispatch {
13
13
  * @param fallbackResponse optional response for the fallback action.
14
14
  * @returns channel response is returned if action was succesful. If fallback was used, fallbackResponse is returned instead.
15
15
  */
16
- export declare function tryDispatch<T = void>(action: ChannelDispatch, fallback: ChannelDispatch, fallbackResponse?: T): Promise<T>;
16
+ export declare function tryDispatch(action: ChannelDispatch, fallback: ChannelDispatch): Promise<void>;
17
+ export declare function tryDispatch<T = undefined>(action: ChannelDispatch, fallback: ChannelDispatch, fallbackResponse: T): Promise<T>;
@@ -3,7 +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 { RegistrationMetaInfo } from './common';
6
+ import { CustomButtonConfig, RegistrationMetaInfo } from './common';
7
7
  import { ProviderInfo } from './provider';
8
8
  /**
9
9
  * Describes the type of the app directory entry `manifest` attributes.
@@ -41,6 +41,12 @@ export interface Image {
41
41
  size?: string;
42
42
  purpose?: string;
43
43
  }
44
+ /**
45
+ * Store custom button configuration
46
+ */
47
+ export interface StoreButtonConfig extends Omit<CustomButtonConfig, 'tooltip' | 'iconUrl'> {
48
+ title: string;
49
+ }
44
50
  /**
45
51
  * Detailed metadata describing an application.
46
52
  */
@@ -56,7 +62,7 @@ export interface App {
56
62
  /**
57
63
  * URL to application manifest.
58
64
  */
59
- manifest: string;
65
+ manifest?: string;
60
66
  /**
61
67
  * UI friendly description for an application.
62
68
  */
@@ -65,7 +71,7 @@ export interface App {
65
71
  * Describes the type of manifest resolved by the `manifest` field.
66
72
  * Launch mechanics are determined by the manifest type.
67
73
  */
68
- manifestType: AppManifestType | string;
74
+ manifestType?: AppManifestType | string;
69
75
  /**
70
76
  * A list of icons that can be rendered in UI for this application.
71
77
  */
@@ -74,6 +80,14 @@ export interface App {
74
80
  * A list of optional images that highlight application functionality.
75
81
  */
76
82
  images?: Image[];
83
+ /**
84
+ * Primary button configuration.
85
+ */
86
+ primaryButton?: StoreButtonConfig;
87
+ /**
88
+ * Array of secondary button configurations.
89
+ */
90
+ secondaryButtons?: StoreButtonConfig[];
77
91
  intents?: AppIntent[];
78
92
  tags?: string[];
79
93
  version?: string;
@@ -133,6 +147,30 @@ export interface StorefrontNavigationSection {
133
147
  StorefrontNavigationItem?
134
148
  ];
135
149
  }
150
+ /**
151
+ * Represents the existing StorefrontDetailedNavigationItem and existing App interfaces
152
+ * Used by StorefrontLandingPage to represent items in the bottom, middle and top rows.
153
+ */
154
+ export declare type StorefrontLandingPageItem = StorefrontDetailedNavigationItem | App;
155
+ export declare type StorefrontLandingPageTopRow = [
156
+ StorefrontLandingPageItem?,
157
+ StorefrontLandingPageItem?,
158
+ StorefrontLandingPageItem?,
159
+ StorefrontLandingPageItem?
160
+ ];
161
+ export declare type StorefrontLandingPageMiddleRow = [
162
+ StorefrontLandingPageItem?,
163
+ StorefrontLandingPageItem?,
164
+ StorefrontLandingPageItem?,
165
+ StorefrontLandingPageItem?,
166
+ StorefrontLandingPageItem?,
167
+ StorefrontLandingPageItem?
168
+ ];
169
+ export declare type StorefrontLandingPageBottomRow = [
170
+ StorefrontLandingPageItem?,
171
+ StorefrontLandingPageItem?,
172
+ StorefrontLandingPageItem?
173
+ ];
136
174
  export interface StorefrontLandingPage {
137
175
  hero?: {
138
176
  title: string;
@@ -142,24 +180,15 @@ export interface StorefrontLandingPage {
142
180
  };
143
181
  topRow: {
144
182
  title: string;
145
- items: [
146
- StorefrontDetailedNavigationItem?,
147
- StorefrontDetailedNavigationItem?,
148
- StorefrontDetailedNavigationItem?,
149
- StorefrontDetailedNavigationItem?
150
- ];
183
+ items: StorefrontLandingPageTopRow;
151
184
  };
152
185
  middleRow: {
153
186
  title: string;
154
- apps: [App?, App?, App?, App?, App?, App?];
187
+ apps: StorefrontLandingPageMiddleRow;
155
188
  };
156
189
  bottomRow: {
157
190
  title: string;
158
- items: [
159
- StorefrontDetailedNavigationItem?,
160
- StorefrontDetailedNavigationItem?,
161
- StorefrontDetailedNavigationItem?
162
- ];
191
+ items: StorefrontLandingPageBottomRow;
163
192
  };
164
193
  }
165
194
  /**
@@ -1,8 +1,8 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import type { LaunchAppRequest } from '../shapes';
3
3
  /**
4
4
  * Launch the app described by an App Directory entry.
5
5
  * @param app the app directory entry.
6
6
  * @param opts launch options.
7
7
  */
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>;
8
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | import("@openfin/core/src/api/application").Application | OpenFin.Identity | import("@openfin/core/src/api/view").View | import("@openfin/core/src/api/platform").Platform>;
@@ -1,2 +1,3 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import { BrowserWindowModule } from '../../../../client-api-platform/src/shapes';
2
3
  export declare const getBrowserModule: (identity: OpenFin.Identity) => BrowserWindowModule;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@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) => {
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { OpenGlobalContextMenuPayload, OpenGlobalContextMenuRequest, OpenPageTabContextMenuPayload, OpenPageTabContextMenuRequest, OpenSaveButtonContextMenuPayload, OpenSaveButtonContextMenuRequest, OpenViewTabContextMenuPayload, OpenViewTabContextMenuRequest, WorkspacePlatformProvider } from '../../../../client-api-platform/src/shapes';
3
3
  export declare function openGlobalContextMenuInternal(this: WorkspacePlatformProvider, payload: OpenGlobalContextMenuRequest & {
4
4
  identity: OpenFin.Identity;
@@ -1,3 +1,4 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import { WorkspaceContextMenuItemData } from '../../../../client-api-platform/src/shapes';
2
3
  export declare const saveWorkspaceHandler: (identity: OpenFin.Identity) => Promise<void>;
3
4
  export declare const saveWorkspaceAsHandler: (identity: OpenFin.Identity) => void;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@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/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { SnapshotExtended } from '../../../../common/src/utils/snapshot';
3
3
  /**
4
4
  * Get a snapshot with pages.
@@ -1,5 +1,5 @@
1
- /// <reference types="@openfin/core" />
2
- import type { AttachedPage, AttachPagesToWindowPayload, DetachPagesFromWindowPayload, ReorderPagesForWindowPayload, SetActivePageForWindowPayload, UpdatePageForWindowPayload } from '../../../../common/src/api/pages/shapes';
1
+ import type OpenFin from '@openfin/core';
2
+ import type { AttachedPage, DetachPagesFromWindowPayload, ExtendedAttachPagesToWindowPayload, 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.
@@ -10,7 +10,7 @@ export declare const createSavedPageInternal: ({ page }: CreateSavedPageRequest)
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
- export declare const attachPagesToWindow: (payload: AttachPagesToWindowPayload) => Promise<void>;
13
+ export declare const attachPagesToWindow: (payload: ExtendedAttachPagesToWindowPayload) => Promise<void>;
14
14
  export declare const updatePageForWindow: (payload: UpdatePageForWindowPayload) => Promise<void>;
15
15
  export declare const detachPagesFromWindow: (payload: DetachPagesFromWindowPayload) => Promise<void>;
16
16
  export declare const setActivePage: (payload: SetActivePageForWindowPayload) => Promise<void>;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { Page } from '../../../common/src/api/pages/shapes';
3
3
  import type { CreateSavedPageRequest, CreateSavedWorkspaceRequest, UpdateSavedPageRequest, UpdateSavedWorkspaceRequest, Workspace } from '../shapes';
4
4
  export declare const getStorageApi: (identity: OpenFin.ApplicationIdentity) => {
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { ColorSchemeOptionType, ThemeApi } from '../../../client-api-platform/src/shapes';
3
3
  export declare const getThemingApi: (identity: OpenFin.ApplicationIdentity) => ThemeApi;
4
4
  export declare const setSelectedScheme: (schemeType: ColorSchemeOptionType) => Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from '../../../../client-api-platform/src/shapes';
2
2
  export declare const store: import("idb-keyval").UseStore;
3
- export declare function getWorkspace(id: string): Promise<Workspace>;
3
+ export declare function getWorkspace(id: string): Promise<Workspace | undefined>;
4
4
  export declare function getWorkspaceList(filter?: string): Promise<Workspace[]>;
5
5
  export declare function createWorkspace({ workspace }: {
6
6
  workspace: Workspace;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  /**
3
3
  * Get the last focused browser window.
4
4
  * @returns the last focused browser window.
@@ -1,3 +1,3 @@
1
1
  import { CustomActionsMap, InvokeCustomActionRequest } from '..';
2
2
  export declare const initCustomActions: (actions: CustomActionsMap) => void;
3
- export declare const invokeCustomActionInternal: ({ actionId, payload }: InvokeCustomActionRequest) => any;
3
+ export declare const makeInvokeCustomActionInternal: (identity: OpenFin.ApplicationIdentity) => ({ actionId, payload }: InvokeCustomActionRequest) => Promise<any>;
@@ -1,3 +1,3 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { ShowQuitPlatformDialogRequest } from '..';
3
3
  export declare const showQuitPlatformDialogInternal: (req: ShowQuitPlatformDialogRequest, identity: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<void>;
@@ -1 +1 @@
1
- import '../test/fin-mocks';
1
+ import '@common/test/fin-mocks';
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@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>;
@@ -0,0 +1,4 @@
1
+ import { AttachedPage, ExtendedPanelConfig, PanelConfig } from '../../../common/src/api/pages/shapes';
2
+ export declare function convertPanelViewOpts(panels: PanelConfig[]): ExtendedPanelConfig[];
3
+ export declare function createPanelViewsForPages(pages: AttachedPage[]): Promise<import("@openfin/core/src/api/view").View[][]>;
4
+ export declare function createPanelViews(panels: PanelConfig[]): Promise<import("@openfin/core/src/api/view").View[]>;
@@ -1,5 +1,5 @@
1
- /// <reference types="@openfin/core" />
2
- import type { Page } from '../../../common/src/api/pages/shapes';
1
+ import type OpenFin from '@openfin/core';
2
+ import type { AttachedPage, Page } from '../../../common/src/api/pages/shapes';
3
3
  import type { CustomThemeOptions, CustomThemeOptionsWithScheme } 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;
@@ -28,21 +28,7 @@ declare type LegacyWindowOptions = Omit<OpenFin.PlatformWindowCreationOptions, '
28
28
  workstacks?: Page[];
29
29
  };
30
30
  export declare const initWorkspacePlatformOptions: (options: LegacyWindowOptions | OpenFin.PlatformWindowCreationOptions) => OpenFin.PlatformWindowCreationOptions;
31
- export declare const applyPageDefaults: (pages: Page[], defaultPageOptions?: BrowserInitConfig['defaultPageOptions']) => Promise<{
32
- title: string;
33
- layout: any;
34
- pageId: string;
35
- description?: string;
36
- tooltip?: string;
37
- isReadOnly?: boolean;
38
- unsavedIconUrl?: string;
39
- iconUrl?: string;
40
- isLocked?: boolean;
41
- closeButton?: {
42
- hidden?: boolean;
43
- disabled?: boolean;
44
- };
45
- }[]>;
31
+ export declare const applyPageDefaults: (pages: Page[], defaultPageOptions?: BrowserInitConfig['defaultPageOptions']) => Promise<AttachedPage[]>;
46
32
  export declare const applyBrowserDefaults: (options: OpenFin.PlatformWindowCreationOptions, initOptions: Pick<BrowserInitConfig, 'title' | 'defaultWindowOptions' | 'defaultPageOptions'>, theme: CustomThemeOptions | CustomThemeOptionsWithScheme) => Promise<OpenFin.PlatformWindowCreationOptions>;
47
33
  export declare enum WindowType {
48
34
  Browser = "browser",
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { IconProps } from '@openfin/ui-library';
3
3
  import type { AnalyticsEvent } from '../../common/src/utils/usage-register';
4
4
  import { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
@@ -8,7 +8,8 @@ import type { App } from '../../client-api/src/shapes';
8
8
  export { AppManifestType } from '../../client-api/src/shapes';
9
9
  export type { App, AppIntent, Image } from '../../client-api/src/shapes';
10
10
  export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
11
- export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs } from '../../common/src/api/pages/shapes';
11
+ export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs, PanelConfigHorizontal, PanelConfigVertical, PanelConfig, ExtendedPanelConfig } from '../../common/src/api/pages/shapes';
12
+ export { PanelPosition } from '../../common/src/api/pages/shapes';
12
13
  export type { CustomThemes, CustomThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet } from '../../common/src/api/theming';
13
14
  export type { AnalyticsEvent } from '../../common/src/utils/usage-register';
14
15
  /**
@@ -289,6 +290,56 @@ export interface CustomButtonActionPayload {
289
290
  /** Screen y-coordinate where custom button should be shown. */
290
291
  y: number;
291
292
  }
293
+ /**
294
+ * The shape that is used by {@link StoreCustomButtonActionPayload.updateButtonState} method payload parameter in {@link StoreCustomButtonActionPayload}.
295
+ */
296
+ export interface UpdateStoreCustomButtonStateRequest {
297
+ /**
298
+ * New title for the primary button.
299
+ */
300
+ title: string;
301
+ /**
302
+ * New disabled state for the primary button.
303
+ */
304
+ disabled?: boolean;
305
+ }
306
+ /**
307
+ * The shape of the payload that is sent by a store app primary button or secondary button click to a platform custom action handler
308
+ */
309
+ export interface StoreCustomButtonActionPayload extends Omit<CustomButtonActionPayload, 'callerType'> {
310
+ /**
311
+ * Invoking application id.
312
+ */
313
+ appId: string;
314
+ /**
315
+ * Callback that allows the update of app's primary button config properties, such as: title and disabled flag.
316
+ * Below of `updateButtonState` use in the context of platform custom actions.
317
+ *
318
+ * ```ts
319
+ * WorkspacePlatform.init({
320
+ * customActions: {
321
+ * 'changeButtonState': async (payload: StoreCustomButtonActionPayload) => {
322
+ * await payload.updateButtonState({
323
+ * title: 'Disabled Primary Button For 2 Seconds',
324
+ * disabled: true
325
+ * });
326
+ * setTimeout(async () => {
327
+ * await payload.updateButtonState({
328
+ * disabled: false,
329
+ * title: 'Active Test Primary Button'
330
+ * });
331
+ * }, 2000);
332
+ * }
333
+ * }
334
+ * });
335
+ * ```
336
+ */
337
+ updateButtonState: (updateRequest: UpdateStoreCustomButtonStateRequest) => Promise<void>;
338
+ /**
339
+ * callerType - StoreCustomButton type.
340
+ */
341
+ callerType: CustomActionCallerType.StoreCustomButton;
342
+ }
292
343
  /**
293
344
  * The shape of the payload sent by a custom dropdown menu item to a custom action handler
294
345
  */
@@ -1231,6 +1282,7 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1231
1282
  */
1232
1283
  export declare enum CustomActionCallerType {
1233
1284
  CustomButton = "CustomButton",
1285
+ StoreCustomButton = "StoreCustomButton",
1234
1286
  CustomDropdownItem = "CustomDropdownItem",
1235
1287
  GlobalContextMenu = "GlobalContextMenu",
1236
1288
  ViewTabContextMenu = "ViewTabContextMenu",
@@ -1243,7 +1295,7 @@ export declare enum CustomActionCallerType {
1243
1295
  * When `callerType == CustomActionCallerType.API`, the payload is defined by the code directly invoking the action.*/
1244
1296
  export declare type CustomActionPayload = {
1245
1297
  callerType: CustomActionCallerType.API;
1246
- } | CustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
1298
+ } | CustomButtonActionPayload | StoreCustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
1247
1299
  /**
1248
1300
  * Defines custom action map where the key is the custom action ID and value is the action handler
1249
1301
  */
@@ -16,6 +16,6 @@ export interface Overrides {
16
16
  disableRuntimeValidation: boolean;
17
17
  enableOpenFinAnalytics: boolean;
18
18
  }
19
- export declare function getOverrides(): Promise<Overrides>;
20
- export declare const useOverrides: () => Overrides;
19
+ export declare function getOverrides(): Promise<Partial<Overrides>>;
20
+ export declare const useOverrides: () => Partial<Overrides>;
21
21
  export {};
@@ -1,15 +1,5 @@
1
- /// <reference types="@openfin/core" />
2
- import type { AttachedPage, AttachPagesToWindowPayload, DetachPagesFromWindowPayload, ReorderPagesForWindowPayload, SetActivePageForWindowPayload, UpdatePageForWindowPayload } from './shapes';
3
- export declare enum EventType {
4
- AttachedPagesToWindow = "attached-pages-to-window",
5
- DetachedPagesFromWindow = "detached-pages-from-window"
6
- }
7
- export declare const getEventEmitter: (identity: OpenFin.Identity) => {
8
- emit: (event: string | number, ...payload: any[]) => Promise<void>;
9
- addListener: (event: string | number, listener: import("@common/utils/shared-emitter").Listener) => void;
10
- removeListener: (event: string | number, listener: import("@common/utils/shared-emitter").Listener) => void;
11
- once: (event: string | number, listener: import("@common/utils/shared-emitter").Listener) => void;
12
- };
1
+ import type OpenFin from '@openfin/core';
2
+ import type { AttachedPage, DetachPagesFromWindowPayload, ExtendedAttachPagesToWindowPayload, ExtendedUpdatePageForWindowPayload, ReorderPagesForWindowPayload, SetActivePageForWindowPayload } from './shapes';
13
3
  /**
14
4
  * Get the pages attached to a window.
15
5
  * @param identity the identity of the window to get the attached pages of.
@@ -33,7 +23,7 @@ export declare const setActivePageForWindow: (payload: SetActivePageForWindowPay
33
23
  *
34
24
  * @param payload the attach pages to window payload.
35
25
  */
36
- export declare const attachPagesToWindow: (payload: AttachPagesToWindowPayload) => Promise<void>;
26
+ export declare const attachPagesToWindow: (payload: ExtendedAttachPagesToWindowPayload) => Promise<void>;
37
27
  /**
38
28
  * Detach pages from the window they are currently attached to.
39
29
  * A detached page will not have its views cleaned up.
@@ -65,7 +55,7 @@ export declare const reorderPagesForWindow: (payload: ReorderPagesForWindowPaylo
65
55
  * Update a page attached to a window.
66
56
  * @param payload the update page for window payload.
67
57
  */
68
- export declare const updatePageForWindow: (payload: UpdatePageForWindowPayload) => Promise<void>;
58
+ export declare const updatePageForWindow: (payload: ExtendedUpdatePageForWindowPayload) => Promise<void>;
69
59
  /**
70
60
  * Forces a window to save its attached page state to window options.
71
61
  * @param identity the identity of the window to save the pages of in window options.
@@ -1,6 +1,6 @@
1
1
  import type { Page } from '../../../../common/src/api/pages/shapes';
2
2
  export declare const store: import("idb-keyval").UseStore;
3
- export declare function getPage(id: string): Promise<Page>;
3
+ export declare function getPage(id: string): Promise<Page | undefined>;
4
4
  export declare function getPageList(filter?: string): Promise<Page[]>;
5
5
  export declare function createPage({ page }: {
6
6
  page: Page;
@@ -1,7 +1,7 @@
1
1
  import { LayoutExtended } from '../../../../common/src/utils/layout';
2
2
  import type { AttachedPage, Page, PageLayout, PageWithUpdatableRuntimeAttribs } from './shapes';
3
3
  export declare function getLegacyPages(): Promise<Page[]>;
4
- export declare function cleanPage(page: AttachedPage): Page;
4
+ export declare function cleanPage<T extends AttachedPage | Page>(page: T): T;
5
5
  /**
6
6
  * Get a page layout.
7
7
  * @param layout the layout to add details to.
@@ -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) => Promise<PageWithUpdatableRuntimeAttribs>;
22
+ export declare const clonePage: <T extends Page | AttachedPage>(page: T) => Promise<T>;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@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. */
@@ -35,6 +35,8 @@ export interface Page {
35
35
  hidden?: boolean;
36
36
  disabled?: boolean;
37
37
  };
38
+ /** Used to configure fixed views on the edges of the browser window. Only one panel per side is supported. */
39
+ panels?: PanelConfig[];
38
40
  }
39
41
  declare type AttachedPageMetadata = {
40
42
  /** The window the page is currently attached to. */
@@ -43,6 +45,8 @@ declare type AttachedPageMetadata = {
43
45
  isActive?: boolean;
44
46
  /** True if the page has unsaved changes. */
45
47
  hasUnsavedChanges?: boolean;
48
+ /** Panel config with all view identities in place */
49
+ panels?: ExtendedPanelConfig[];
46
50
  };
47
51
  export declare type AttachedPage = Page & AttachedPageMetadata;
48
52
  export declare type PageWithUpdatableRuntimeAttribs = Page & Pick<AttachedPage, 'hasUnsavedChanges'>;
@@ -75,16 +79,55 @@ export interface UpdatePageForWindowPayload {
75
79
  /** The partial updated state of the page. */
76
80
  page: Partial<PageWithUpdatableRuntimeAttribs>;
77
81
  }
82
+ export interface ExtendedUpdatePageForWindowPayload extends UpdatePageForWindowPayload {
83
+ /** The partial updated state of the page. */
84
+ page: Partial<AttachedPage>;
85
+ }
78
86
  export interface AttachPagesToWindowPayload {
79
87
  /** The OF window identity to attach the pages to. */
80
88
  identity: OpenFin.Identity;
81
89
  /** The pages to attach. */
82
90
  pages: PageWithUpdatableRuntimeAttribs[];
83
91
  }
92
+ export interface ExtendedAttachPagesToWindowPayload extends AttachPagesToWindowPayload {
93
+ /** The pages to attach. */
94
+ pages: AttachedPage[];
95
+ }
84
96
  export interface GetSavedPageMetadataPayload {
85
97
  /** The OF window identity to attach the pages to. */
86
98
  identity: OpenFin.Identity;
87
99
  /** The id of the page to get the save state of. */
88
100
  pageId: string;
89
101
  }
102
+ export declare enum PanelPosition {
103
+ Left = "Left",
104
+ Right = "Right",
105
+ Top = "Top",
106
+ Bottom = "Bottom"
107
+ }
108
+ export interface PanelConfigHorizontal {
109
+ /** Position of the panel in the page. */
110
+ position: PanelPosition.Top | PanelPosition.Bottom;
111
+ /** Size of the top/bottom panel, formatted as CSS property value with units. E.g. "0px", "10%", "3rem". */
112
+ height: string;
113
+ }
114
+ export interface PanelConfigVertical {
115
+ /** Position of the panel in the page. */
116
+ position: PanelPosition.Left | PanelPosition.Right;
117
+ /** Size of the left/right panel, formatted as CSS property value with units. E.g. "0px", "10%", "3rem". */
118
+ width: string;
119
+ /** When true, the left/right panel extends all the way to the top of the window,
120
+ * thus taking priority over the top panel.*/
121
+ extendToTop?: boolean;
122
+ /** When true, the left/right panel extends all the way to the bottom of the window,
123
+ * thus taking priority over the bottom panel.*/
124
+ extendToBottom?: boolean;
125
+ }
126
+ export declare type PanelConfig = (PanelConfigHorizontal | PanelConfigVertical) & {
127
+ /** The options with which to initialize the panel view.*/
128
+ viewOptions: Omit<OpenFin.PlatformViewCreationOptions, 'bounds' | 'target'>;
129
+ };
130
+ export declare type ExtendedPanelConfig = PanelConfig & {
131
+ viewOptions: PanelConfig['viewOptions'] & OpenFin.Identity;
132
+ };
90
133
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  export declare const getWindowChannelId: (identity: OpenFin.Identity) => string;
3
3
  export interface ChannelClient extends OpenFin.ChannelClient {
4
4
  dispatch: (action: typeof BrowserChannelAction[keyof BrowserChannelAction], payload?: any) => Promise<any>;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { ColorSchemeOptionType } from '../../../../client-api-platform/src/shapes';
3
3
  export declare const NOTIFICATIONS_SYNC_CHANNEL = "of-workspace-notifications-sync";
4
4
  export declare enum NotificationsChannelAction {
@@ -1,3 +1,4 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  /**
2
3
  * All of the remote procedures that can be called in the
3
4
  * a Workspace Platform's address space.
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  /** The name of the channel for the centralized workspace protocol. */
3
3
  export declare const channelName = "__of_workspace_protocol__";
4
4
  /**
@@ -27,6 +27,7 @@ export declare enum WorkspaceChannelAction {
27
27
  AssignHomeSearchContext = "assign-home-search-context",
28
28
  SetSearchQuery = "set-search-query",
29
29
  OpenHomeAndSetSearchQuery = "open-home-and-set-search-query",
30
+ SetStoreButtonState = "set-store-button-state",
30
31
  GetLegacyPages = "get-legacy-pages",
31
32
  GetLegacyWorkspaces = "get-legacy-workspaces",
32
33
  GetComputedPlatformTheme = "get-computed-platform-theme",
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { ProviderInfo } from '../../../client-api/src/shapes';
3
3
  export declare enum ProviderType {
4
4
  Storefront = "storefront",