@openfin/workspace 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 (64) hide show
  1. package/client-api/src/dock.test.d.ts +1 -1
  2. package/client-api/src/home.d.ts +3 -3
  3. package/client-api/src/internal.d.ts +2 -1
  4. package/client-api/src/shapes/store.d.ts +44 -15
  5. package/client-api/src/store.test.d.ts +1 -1
  6. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  7. package/client-api-platform/src/api/browser/browser-module.d.ts +1 -0
  8. package/client-api-platform/src/api/browser/index.d.ts +1 -0
  9. package/client-api-platform/src/api/context-menu/index.d.ts +1 -1
  10. package/client-api-platform/src/api/context-menu/utils.d.ts +1 -0
  11. package/client-api-platform/src/api/index.d.ts +1 -0
  12. package/client-api-platform/src/api/pages/helper.d.ts +1 -1
  13. package/client-api-platform/src/api/pages/index.d.ts +3 -2
  14. package/client-api-platform/src/api/storage.d.ts +1 -0
  15. package/client-api-platform/src/api/theming.d.ts +1 -0
  16. package/client-api-platform/src/api/workspaces/idb.d.ts +1 -1
  17. package/client-api-platform/src/init/browser-window-focus.d.ts +1 -1
  18. package/client-api-platform/src/init/custom-actions.d.ts +1 -1
  19. package/client-api-platform/src/init/dialogs.d.ts +1 -0
  20. package/client-api-platform/src/init/override-callback.d.ts +1 -0
  21. package/client-api-platform/src/init/panels.d.ts +4 -0
  22. package/client-api-platform/src/init/utils.d.ts +3 -17
  23. package/client-api-platform/src/shapes.d.ts +55 -3
  24. package/common/src/api/overrides.d.ts +2 -2
  25. package/common/src/api/pages/attached.d.ts +4 -14
  26. package/common/src/api/pages/idb.d.ts +1 -1
  27. package/common/src/api/pages/index.d.ts +2 -2
  28. package/common/src/api/pages/shapes.d.ts +44 -1
  29. package/common/src/api/protocol/browser.d.ts +1 -1
  30. package/common/src/api/protocol/notifications.d.ts +1 -1
  31. package/common/src/api/protocol/workspace-platform.d.ts +1 -0
  32. package/common/src/api/protocol/workspace.d.ts +2 -1
  33. package/common/src/api/provider.d.ts +1 -1
  34. package/common/src/api/storefront.d.ts +28 -7
  35. package/common/src/api/theming.d.ts +1 -0
  36. package/common/src/api/workspaces/index.d.ts +1 -1
  37. package/common/src/test/fin-mocks.d.ts +1 -0
  38. package/common/src/utils/application.d.ts +1 -1
  39. package/common/src/utils/context-menu.d.ts +1 -1
  40. package/common/src/utils/defer-show.d.ts +2 -2
  41. package/common/src/utils/global-context-menu.d.ts +1 -0
  42. package/common/src/utils/indicators/browser.d.ts +3 -3
  43. package/common/src/utils/indicators/helper.d.ts +1 -1
  44. package/common/src/utils/landing-page.d.ts +1 -0
  45. package/common/src/utils/layout.d.ts +44 -3
  46. package/common/src/utils/menu-config.d.ts +1 -1
  47. package/common/src/utils/menu-window-provider.d.ts +1 -1
  48. package/common/src/utils/modal-bounds.d.ts +1 -1
  49. package/common/src/utils/page-tab-context-menu.d.ts +1 -0
  50. package/common/src/utils/snapshot.d.ts +1 -1
  51. package/common/src/utils/usage-register.d.ts +1 -1
  52. package/common/src/utils/window.d.ts +1 -1
  53. package/common/src/utils/workspace-modals.d.ts +1 -0
  54. package/home.js +191 -102
  55. package/home.js.map +1 -1
  56. package/index.js +191 -102
  57. package/index.js.map +1 -1
  58. package/notifications.js +191 -102
  59. package/notifications.js.map +1 -1
  60. package/package.json +1 -1
  61. package/search-api/src/internal-shapes.d.ts +1 -1
  62. package/search-api/src/shapes.d.ts +1 -1
  63. package/store.js +204 -115
  64. package/store.js.map +1 -1
@@ -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;
@@ -0,0 +1 @@
1
+ export {};
@@ -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'] & {
@@ -12,7 +12,7 @@ export declare type LayoutStack = {
12
12
  type: 'stack';
13
13
  content: OpenFin.LayoutContent;
14
14
  };
15
- export declare type LayoutContentItemExtended = OpenFin.LayoutRow | OpenFin.LayoutColumn | LayoutComponentExtended | LayoutStack;
15
+ export declare type LayoutContentItemExtended = OpenFin.LayoutRow | OpenFin.LayoutColumn | LayoutStack | LayoutComponentExtended | OpenFin.LayoutItemConfig;
16
16
  export declare type LayoutContentExtended = LayoutContentItemExtended[];
17
17
  export declare type LayoutSettingsExtended = OpenFin.LayoutOptions['settings'] & {
18
18
  reorderEnabled?: boolean;
@@ -43,12 +43,23 @@ export declare const getFirstViewFromLayout: (identity?: WindowIdentity) => Prom
43
43
  name: any;
44
44
  uuid: any;
45
45
  }>;
46
+ /**
47
+ * Copies the componentState and generates a name if it's not there
48
+ * @param componentState view's componentState in the layout object, corresponds to View options
49
+ * @returns A copy of the componentState with name filled in
50
+ */
51
+ export declare const generateViewNameIfNotExists: <T extends {
52
+ name?: string;
53
+ }>(componentState: T) => T & {
54
+ name: string;
55
+ };
46
56
  /**
47
57
  * Deep clones a layout and adds view names if they don't exist.
48
58
  * @param layout The Layout to be cloned
49
59
  * @returns A copy of the layout with names added where necessary
50
60
  */
51
61
  export declare const cloneLayoutAndFillInViewNames: (layout: PageLayout) => any;
62
+ export declare const cloneViewComponentWithoutName: (componentState: any) => any;
52
63
  /**
53
64
  * Deep clones a layout and removes view names.
54
65
  * @param layout The Layout to be cloned
@@ -56,7 +67,37 @@ export declare const cloneLayoutAndFillInViewNames: (layout: PageLayout) => any;
56
67
  */
57
68
  export declare const cloneLayoutAndRemoveNames: (layout: PageLayout) => any;
58
69
  export declare const mapContentComponentState: (content: OpenFin.LayoutContent | LayoutContentExtended) => LayoutComponentStateExtended[];
59
- export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: OpenFin.Identity) => Promise<any>;
70
+ export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: OpenFin.Identity) => Promise<{
71
+ content: {
72
+ type: string;
73
+ content: {
74
+ type: string;
75
+ componentName: string;
76
+ componentState: {
77
+ title: string;
78
+ url: string;
79
+ };
80
+ }[];
81
+ }[];
82
+ settings?: {
83
+ popoutWholeStack?: boolean;
84
+ constrainDragToContainer?: boolean;
85
+ showPopoutIcon?: boolean;
86
+ showMaximiseIcon?: boolean;
87
+ showCloseIcon?: boolean;
88
+ constrainDragToHeaders?: boolean;
89
+ hasHeaders?: boolean;
90
+ reorderEnabled?: boolean;
91
+ preventDragOut?: boolean;
92
+ preventDragIn?: boolean;
93
+ };
94
+ dimensions?: {
95
+ borderWidth?: number;
96
+ minItemHeight?: number;
97
+ minItemWidth?: number;
98
+ headerHeight?: number;
99
+ };
100
+ }>;
60
101
  export declare const isLayoutTabActive: (tabSelector: string) => boolean;
61
102
  export declare const containerId = "layout_container";
62
103
  export declare const getViewComponents: () => LayoutContentExtended;
@@ -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[]>;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  export declare type SnapshotDetailsExtended = OpenFin.Snapshot['snapshotDetails'] & {
3
3
  machineId: string;
4
4
  machineName?: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { AttachedPage } from '../../../client-api-platform/src/shapes';
3
3
  export interface RegisterUsageStatus {
4
4
  apiVersion?: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="@openfin/core" />
1
+ import type OpenFin from '@openfin/core';
2
2
  import { ApplicationUUID } from './application';
3
3
  export declare enum WindowName {
4
4
  Home = "openfin-home",
@@ -1,3 +1,4 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import { ResponseModalConfig } from '../../../common/src/utils/menu-config';
2
3
  export declare const restoreChangesMenu: (windowIdentity: OpenFin.Identity) => Promise<ResponseModalConfig>;
3
4
  export declare const showSwitchWorkspaceModal: (windowIdentity: OpenFin.Identity, workspaceTitle: string) => Promise<boolean>;