@openfin/workspace-platform 10.3.8 → 10.4.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 (55) 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 +1 -1
  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 +1 -1
  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/utils.d.ts +1 -1
  21. package/client-api-platform/src/shapes.d.ts +53 -2
  22. package/common/src/api/overrides.d.ts +2 -2
  23. package/common/src/api/pages/attached.d.ts +1 -11
  24. package/common/src/api/pages/idb.d.ts +1 -1
  25. package/common/src/api/pages/shapes.d.ts +1 -1
  26. package/common/src/api/protocol/browser.d.ts +1 -1
  27. package/common/src/api/protocol/notifications.d.ts +1 -1
  28. package/common/src/api/protocol/workspace-platform.d.ts +1 -0
  29. package/common/src/api/protocol/workspace.d.ts +2 -1
  30. package/common/src/api/provider.d.ts +1 -1
  31. package/common/src/api/storefront.d.ts +28 -7
  32. package/common/src/api/theming.d.ts +1 -0
  33. package/common/src/api/workspaces/index.d.ts +1 -1
  34. package/{client-api-platform → common}/src/test/fin-mocks.d.ts +0 -0
  35. package/common/src/utils/application.d.ts +1 -1
  36. package/common/src/utils/context-menu.d.ts +1 -1
  37. package/common/src/utils/defer-show.d.ts +2 -2
  38. package/common/src/utils/global-context-menu.d.ts +1 -0
  39. package/common/src/utils/indicators/browser.d.ts +3 -3
  40. package/common/src/utils/indicators/helper.d.ts +1 -1
  41. package/common/src/utils/landing-page.d.ts +1 -0
  42. package/common/src/utils/layout.d.ts +1 -1
  43. package/common/src/utils/menu-config.d.ts +1 -1
  44. package/common/src/utils/menu-window-provider.d.ts +1 -1
  45. package/common/src/utils/modal-bounds.d.ts +1 -1
  46. package/common/src/utils/page-tab-context-menu.d.ts +1 -0
  47. package/common/src/utils/snapshot.d.ts +1 -1
  48. package/common/src/utils/usage-register.d.ts +1 -1
  49. package/common/src/utils/window.d.ts +1 -1
  50. package/common/src/utils/workspace-modals.d.ts +1 -0
  51. package/index.js +148 -59
  52. package/index.js.map +1 -1
  53. package/package.json +1 -1
  54. package/search-api/src/internal-shapes.d.ts +1 -1
  55. 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,4 +1,4 @@
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.
@@ -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,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import type { AttachedPage, AttachPagesToWindowPayload, DetachPagesFromWindowPayload, ReorderPagesForWindowPayload, SetActivePageForWindowPayload, UpdatePageForWindowPayload } from '../../../../common/src/api/pages/shapes';
3
3
  import type { CreateSavedPageRequest, Page, UpdateSavedPageRequest } from '../../../../client-api-platform/src/shapes';
4
4
  /**
@@ -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>;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import type { 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 '..';
@@ -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';
@@ -289,6 +289,56 @@ export interface CustomButtonActionPayload {
289
289
  /** Screen y-coordinate where custom button should be shown. */
290
290
  y: number;
291
291
  }
292
+ /**
293
+ * The shape that is used by {@link StoreCustomButtonActionPayload.updateButtonState} method payload parameter in {@link StoreCustomButtonActionPayload}.
294
+ */
295
+ export interface UpdateStoreCustomButtonStateRequest {
296
+ /**
297
+ * New title for the primary button.
298
+ */
299
+ title: string;
300
+ /**
301
+ * New disabled state for the primary button.
302
+ */
303
+ disabled?: boolean;
304
+ }
305
+ /**
306
+ * The shape of the payload that is sent by a store app primary button or secondary button click to a platform custom action handler
307
+ */
308
+ export interface StoreCustomButtonActionPayload extends Omit<CustomButtonActionPayload, 'callerType'> {
309
+ /**
310
+ * Invoking application id.
311
+ */
312
+ appId: string;
313
+ /**
314
+ * Callback that allows the update of app's primary button config properties, such as: title and disabled flag.
315
+ * Below of `updateButtonState` use in the context of platform custom actions.
316
+ *
317
+ * ```ts
318
+ * WorkspacePlatform.init({
319
+ * customActions: {
320
+ * 'changeButtonState': async (payload: StoreCustomButtonActionPayload) => {
321
+ * await payload.updateButtonState({
322
+ * title: 'Disabled Primary Button For 2 Seconds',
323
+ * disabled: true
324
+ * });
325
+ * setTimeout(async () => {
326
+ * await payload.updateButtonState({
327
+ * disabled: false,
328
+ * title: 'Active Test Primary Button'
329
+ * });
330
+ * }, 2000);
331
+ * }
332
+ * }
333
+ * });
334
+ * ```
335
+ */
336
+ updateButtonState: (updateRequest: UpdateStoreCustomButtonStateRequest) => Promise<void>;
337
+ /**
338
+ * callerType - StoreCustomButton type.
339
+ */
340
+ callerType: CustomActionCallerType.StoreCustomButton;
341
+ }
292
342
  /**
293
343
  * The shape of the payload sent by a custom dropdown menu item to a custom action handler
294
344
  */
@@ -1231,6 +1281,7 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1231
1281
  */
1232
1282
  export declare enum CustomActionCallerType {
1233
1283
  CustomButton = "CustomButton",
1284
+ StoreCustomButton = "StoreCustomButton",
1234
1285
  CustomDropdownItem = "CustomDropdownItem",
1235
1286
  GlobalContextMenu = "GlobalContextMenu",
1236
1287
  ViewTabContextMenu = "ViewTabContextMenu",
@@ -1243,7 +1294,7 @@ export declare enum CustomActionCallerType {
1243
1294
  * When `callerType == CustomActionCallerType.API`, the payload is defined by the code directly invoking the action.*/
1244
1295
  export declare type CustomActionPayload = {
1245
1296
  callerType: CustomActionCallerType.API;
1246
- } | CustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
1297
+ } | CustomButtonActionPayload | StoreCustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
1247
1298
  /**
1248
1299
  * Defines custom action map where the key is the custom action ID and value is the action handler
1249
1300
  */
@@ -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" />
1
+ import type OpenFin from '@openfin/core';
2
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
- };
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.
@@ -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,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. */
@@ -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",
@@ -1,5 +1,6 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { App, StorefrontFooter, StorefrontLandingPage, StorefrontNavigationItemAppGrid, StorefrontNavigationSection, StorefrontProviderInfo } from '../../../client-api/src/shapes';
3
+ import { UpdateStoreCustomButtonStateRequest } from '../../../client-api-platform/src/shapes';
3
4
  export interface StorefrontProviderInfoWithIdentity extends StorefrontProviderInfo {
4
5
  platformIdentity: OpenFin.Identity;
5
6
  }
@@ -17,42 +18,62 @@ export interface StorefrontProviderIdentity {
17
18
  */
18
19
  platformIdentity: OpenFin.Identity;
19
20
  }
21
+ /**
22
+ * Request object to launch an app.
23
+ */
20
24
  export interface LaunchStorefrontProviderAppRequest extends StorefrontProviderIdentity {
25
+ /**
26
+ * App to launch.
27
+ */
21
28
  app: App;
22
29
  }
23
30
  /**
24
31
  * Launch a Storefront app.
25
- * @param platformIdentity the identity of the platform that provided the app.
32
+ * @param req LaunchStorefrontProviderAppRequest request object.
26
33
  */
27
34
  export declare const launchStorefrontApp: (req: LaunchStorefrontProviderAppRequest) => Promise<void>;
35
+ /**
36
+ * A request to update store primary button state.
37
+ */
38
+ export interface UpdateStoreCustomButtonStateRequestWithProvider extends UpdateStoreCustomButtonStateRequest, StorefrontProviderIdentity {
39
+ /**
40
+ * App id.
41
+ */
42
+ appId: string;
43
+ }
44
+ /**
45
+ * Updates primary button state.
46
+ * @param req update request.
47
+ */
48
+ export declare const setStoreButtonState: (req: UpdateStoreCustomButtonStateRequestWithProvider) => Promise<void>;
28
49
  /**
29
50
  * Get a list of applications for Storefront.
30
- * @param platformIdentity the identity of the platform to get the apps from.
51
+ * @param identity of the platform to get the apps from.
31
52
  * @returns the list of Storefront apps for the platform.
32
53
  */
33
54
  export declare const getStorefrontApps: (identity: StorefrontProviderIdentity) => Promise<App[]>;
34
55
  /**
35
56
  * Get the platform's landing page for Storefront.
36
- * @param platformIdentity the identity of the platform to get the landing page of.
57
+ * @param identity of the platform to get the landing page of.
37
58
  * @returns the platform's landing page.
38
59
  */
39
60
  export declare const getStorefrontLandingPage: (identity: StorefrontProviderIdentity) => Promise<StorefrontLandingPage | undefined>;
40
61
  /**
41
62
  * Get the platform's footer for Storefront.
42
- * @param platformIdentity the identity of the platform to get the footer of.
63
+ * @param identity of the platform to get the footer of.
43
64
  * @returns the platform's footer.
44
65
  */
45
66
  export declare const getStorefrontFooter: (identity: StorefrontProviderIdentity) => Promise<StorefrontFooter>;
46
67
  /**
47
68
  * Get the platform's navigation for Storefront.
48
- * @param platformIdentity the identity of the platform to get the navigation of.
69
+ * @param identity of the platform to get the navigation of.
49
70
  * @returns the platform's navigation.
50
71
  */
51
72
  export declare const getStorefrontNavigation: (identity: StorefrontProviderIdentity) => Promise<[StorefrontNavigationSection?, StorefrontNavigationSection?]>;
52
73
  /**
53
74
  * A helper method that gets a Storefront navigation item by ID.
54
75
  * @param navigationItemId the id of the Storefront navigation item.
55
- * @param platformIdentity the platform identity.
76
+ * @param identity of the platform.
56
77
  * @returns the navigation item with the ID.
57
78
  */
58
79
  export declare const getStorefrontNavigationItemAppGrid: (navigationItemId: string, identity: StorefrontProviderIdentity) => Promise<StorefrontNavigationItemAppGrid | undefined>;
@@ -1,3 +1,4 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import type { ThemePaletteSet } from '@openfin/ui-library';
2
3
  import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
3
4
  export interface ComputedThemes extends Array<ComputedTheme> {
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  export interface Workspace {
3
3
  workspaceId: string;
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  export declare enum ApplicationUUID {
3
3
  /**
4
4
  * The UUID of workspace.
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  export declare enum MenuItemType {
3
3
  Label = "normal",
4
4
  Separator = "separator",
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  interface InternalWindowOptions extends OpenFin.PlatformWindowCreationOptions {
3
3
  workspacePlatform: OpenFin.WindowOptions['workspacePlatform'] & {
4
4
  _internalDeferShowOptions?: {
@@ -32,7 +32,7 @@ export declare const applyDeferShowOptions: (opts: OpenFin.PlatformWindowCreatio
32
32
  * @param superCreateWindow the create window method to decorate.
33
33
  * @returns the `createWindow` method wrapped with this middleware.
34
34
  */
35
- export declare const withDeferShow: (superCreateWindow: (opts: OpenFin.PlatformWindowCreationOptions, callerIdentity: OpenFin.Identity) => Promise<OpenFin.Window>) => (opts: OpenFin.PlatformWindowCreationOptions, callerIdentity?: OpenFin.Identity) => Promise<import("@openfin/core/src/api/window")._Window>;
35
+ export declare const withDeferShow: (superCreateWindow: (opts: OpenFin.PlatformWindowCreationOptions, callerIdentity: OpenFin.Identity) => Promise<OpenFin.Window>) => (opts: OpenFin.PlatformWindowCreationOptions, callerIdentity: OpenFin.Identity) => Promise<import("@openfin/core/src/api/window")._Window>;
36
36
  /**
37
37
  * Assert if the window is able to be shown or not.
38
38
  * Upon calling `setCanShow(true)`, if the window was previously prevented
@@ -1,3 +1,4 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import { MenuItemType } from '../../../common/src/utils/context-menu';
2
3
  import * as WP from '../../../client-api-platform/src/index';
3
4
  import { GlobalContextMenuItemTemplate, GlobalContextMenuOptionType, Workspace } from '../../../client-api-platform/src/shapes';
@@ -5,12 +5,12 @@ export declare enum BrowserIndicatorIcon {
5
5
  /**
6
6
  * Creates a window containing an error indicator
7
7
  */
8
- export declare function showBrowserError(message: string, parentBrowserName: string, icon?: BrowserIndicatorIcon): Promise<void>;
8
+ export declare function showBrowserError(message: string, parentBrowserName?: string, icon?: BrowserIndicatorIcon): Promise<void>;
9
9
  /**
10
10
  * Creates a window containing a success indicator
11
11
  */
12
- export declare function showBrowserSuccess(message: string, parentBrowserName: string, icon?: BrowserIndicatorIcon): Promise<void>;
12
+ export declare function showBrowserSuccess(message: string, parentBrowserName?: string, icon?: BrowserIndicatorIcon): Promise<void>;
13
13
  /**
14
14
  * Creates a window containing an info indicator
15
15
  */
16
- export declare function showBrowserInfo(message: string, parentBrowserName: string, icon?: BrowserIndicatorIcon): Promise<void>;
16
+ export declare function showBrowserInfo(message: string, parentBrowserName?: string, icon?: BrowserIndicatorIcon): Promise<void>;
@@ -1,2 +1,2 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  export default function makeShowIndicator(opts?: OpenFin.PlatformWindowCreationOptions): (namespace: string, url: string, message: string, type: string) => Promise<void>;
@@ -1,3 +1,4 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  interface LandingPageUrls {
2
3
  newPageUrl: string | false;
3
4
  newTabUrl: string | false;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { AttachedPage, PageLayout } from '../../../client-api-platform/src/shapes';
3
3
  import { WindowIdentity } from './window';
4
4
  export declare type LayoutComponentStateExtended = OpenFin.LayoutComponent['componentState'] & {
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import type { OptionalExceptFor } from '../../../common/src/utils/types';
3
3
  export interface ModalResponseContent {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { ModalResponseContent } from '../../../common/src/utils/menu-config';
3
3
  import { Listener } from '../../../common/src/utils/shared-emitter';
4
4
  import type { OptionalExceptFor } from '../../../common/src/utils/types';
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { ResponseModalConfig } from './menu-config';
3
3
  /**
4
4
  * returns the correct bounds for the response modal to be displayed at
@@ -1,2 +1,3 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import { PageTabContextMenuItemTemplate } from '../../../client-api-platform/src/shapes';
2
3
  export declare const getPageTabMenuTemplate: (pageId: string, winIdentity: OpenFin.Identity) => Promise<PageTabContextMenuItemTemplate[]>;