@openfin/workspace-platform 22.5.25 → 23.0.1-alpha.0966d5cc

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/integrations/microsoft.utils.d.ts +6 -6
  2. package/client-api/src/shapes/index.d.ts +1 -1
  3. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  4. package/client-api-platform/src/api/controllers/theme-storage-controller-store.d.ts +16 -1
  5. package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +42 -25
  6. package/client-api-platform/src/api/dock.d.ts +5 -3
  7. package/client-api-platform/src/api/language.d.ts +1 -1
  8. package/client-api-platform/src/api/pages/open-pages.d.ts +2 -2
  9. package/client-api-platform/src/api/theming.d.ts +12 -0
  10. package/client-api-platform/src/api/theming.test.d.ts +1 -0
  11. package/client-api-platform/src/api/utils.d.ts +11 -0
  12. package/client-api-platform/src/init/override-callback/enterprise-page-required-layout-settings.d.ts +5 -0
  13. package/client-api-platform/src/init/override-callback/page-defaults.d.ts +1 -1
  14. package/client-api-platform/src/init/override-callback/view-components.d.ts +1 -1
  15. package/client-api-platform/src/init/override-callback/view-defaults.d.ts +2 -1
  16. package/client-api-platform/src/init/override-callback/view-options.d.ts +1 -1
  17. package/client-api-platform/src/init/theming.d.ts +5 -1
  18. package/client-api-platform/src/shapes.d.ts +124 -21
  19. package/common/src/api/pages/idb.d.ts +2 -4
  20. package/common/src/api/protocol/browser.d.ts +8 -6
  21. package/common/src/api/protocol/notifications.d.ts +8 -0
  22. package/common/src/api/protocol/shapes/workspace.d.ts +8 -0
  23. package/common/src/api/protocol/workspace-platform.d.ts +30 -25
  24. package/common/src/api/protocol/workspace.d.ts +2 -2
  25. package/common/src/api/provider.d.ts +1 -1
  26. package/common/src/api/shapes/notifications.d.ts +1 -0
  27. package/common/src/api/storefront.d.ts +5 -5
  28. package/common/src/api/theming.d.ts +40 -17
  29. package/common/src/utils/application.d.ts +7 -0
  30. package/common/src/utils/enterprise-menu.d.ts +1 -1
  31. package/common/src/utils/find-in-page/findInPageChannel.d.ts +37 -0
  32. package/common/src/utils/find-in-page/showFindInPageHandler.d.ts +2 -0
  33. package/common/src/utils/global-context-menu.d.ts +8 -1
  34. package/common/src/utils/layout.d.ts +38 -10
  35. package/common/src/utils/logger.d.ts +131 -0
  36. package/common/src/utils/menu-window-provider.d.ts +13 -9
  37. package/common/src/utils/merge-deep.d.ts +1 -0
  38. package/common/src/utils/modal-bounds.d.ts +1 -1
  39. package/common/src/utils/namespaced-local-storage.d.ts +5 -4
  40. package/common/src/utils/popup-window.d.ts +16 -0
  41. package/common/src/utils/route.d.ts +5 -1
  42. package/common/src/utils/shared-emitter.d.ts +4 -4
  43. package/common/src/utils/theming.d.ts +6 -0
  44. package/common/src/utils/types.d.ts +1 -1
  45. package/common/src/utils/window.d.ts +20 -9
  46. package/common/src/utils/workspace-modals.d.ts +1 -1
  47. package/dock3/src/api/utils.d.ts +11 -0
  48. package/dock3/src/shapes/shapes.d.ts +13 -1
  49. package/externals.report.json +20 -12
  50. package/index.js +2 -1
  51. package/index.js.LICENSE.txt +1 -0
  52. package/index.js.map +1 -1
  53. package/package.json +4 -3
  54. package/search-api/src/provider/remote/info.d.ts +1 -1
  55. package/search-api/src/shapes.d.ts +22 -1
  56. package/common/src/brand/default-brand.d.ts +0 -8
  57. package/workspace_platform.zip +0 -0
@@ -1,4 +1,5 @@
1
- export declare const createNamespacedLocalStorage: <TKey extends string>(namespace: string) => Pick<Storage, 'setItem' | 'getItem' | 'removeItem'>;
2
- export declare const setItem: (key: string, value: string) => void;
3
- export declare const getItem: (key: string) => string;
4
- export declare const removeItem: (key: string) => void;
1
+ import LocalStorageKey from './local-storage-key';
2
+ export declare const setItem: (key: LocalStorageKey, value: string) => void;
3
+ export declare const getItem: (key: LocalStorageKey) => string;
4
+ export declare const removeItem: (key: LocalStorageKey) => void;
5
+ export declare const createNamespacedLocalStorage: <TKey extends string>(namespace: string) => Pick<Storage, "setItem" | "getItem" | "removeItem">;
@@ -3,6 +3,12 @@ import { UserMenuParams } from '../../../common/src/utils/menu';
3
3
  import { OptionalExceptFor } from '../../../common/src/utils/types';
4
4
  import { AnchorBehavior } from '../../../client-api-platform/src/api/context-menu';
5
5
  import { Site, SiteAction } from '../../../client-api-platform/src/shapes';
6
+ export type ViewMoreButton = {
7
+ type: 'view-more-result';
8
+ id: string;
9
+ providerId: string;
10
+ };
11
+ export type SelectableResult = Site | ViewMoreButton;
6
12
  export declare enum SaveMenuType {
7
13
  Save = "Save",
8
14
  SaveAs = "SaveAs"
@@ -76,6 +82,7 @@ export type BookmarkDialogChannelMessage = BaseEnterpriseMenuChannelMessage & {
76
82
  export type ZoomControlsDialogPayload = {
77
83
  selectedViewIdentity?: OpenFin.Identity;
78
84
  zoomPercent?: number;
85
+ openedViaMouseClick?: boolean;
79
86
  };
80
87
  export type ZoomControlsDialogChannelMessage = BaseEnterpriseMenuChannelMessage & {
81
88
  type: EnterpriseMenuType.ZoomControls;
@@ -116,8 +123,17 @@ export type SearchMenuChannelResponse = {
116
123
  } | {
117
124
  type: 'keyboard-event';
118
125
  keyboardEvent: BrowserSearchMenuKeyboardEvent;
126
+ } | {
127
+ type: 'focused-changed';
128
+ payload: SelectableResult;
119
129
  } | {
120
130
  type: 'search-provider-changed';
131
+ } | {
132
+ type: 'all-providers-results-announcement';
133
+ message: string;
134
+ } | {
135
+ type: 'single-provider-results-announcement';
136
+ message: string;
121
137
  };
122
138
  export declare function showPopupWin<T extends keyof UserMenuParams>(parentWindow: OpenFin.Window, params: UserMenuParams[T], windowOpts: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
123
139
  export {};
@@ -29,11 +29,13 @@ declare enum BrowserRoute {
29
29
  EnterpriseContextMenu = "/context-menu/",
30
30
  EnterpriseBookmarkDialog = "/bookmark-dialog/",
31
31
  EnterpriseAboutPage = "/popup-menu/about/",
32
+ StorageProxy = "/storage-proxy",
32
33
  DropdownMenu = "/dropdown-menu/",
33
34
  EnterpriseDock = "/dock/",
34
35
  ZoomControlsDialog = "/zoom-controls-dialog/",
35
36
  DesktopSignalsModal = "/popup-menu/desktop-signals-modal/",
36
- IntentsResolverModal = "/popup-menu/intents-resolver-modal/"
37
+ IntentsResolverModal = "/popup-menu/intents-resolver-modal/",
38
+ FindInPageModal = "/popup-menu/find-in-page-modal/"
37
39
  }
38
40
  declare const PageRoute: {
39
41
  Browser: BrowserRoute.Browser;
@@ -50,11 +52,13 @@ declare const PageRoute: {
50
52
  EnterpriseContextMenu: BrowserRoute.EnterpriseContextMenu;
51
53
  EnterpriseBookmarkDialog: BrowserRoute.EnterpriseBookmarkDialog;
52
54
  EnterpriseAboutPage: BrowserRoute.EnterpriseAboutPage;
55
+ StorageProxy: BrowserRoute.StorageProxy;
53
56
  DropdownMenu: BrowserRoute.DropdownMenu;
54
57
  EnterpriseDock: BrowserRoute.EnterpriseDock;
55
58
  ZoomControlsDialog: BrowserRoute.ZoomControlsDialog;
56
59
  DesktopSignalsModal: BrowserRoute.DesktopSignalsModal;
57
60
  IntentsResolverModal: BrowserRoute.IntentsResolverModal;
61
+ FindInPageModal: BrowserRoute.FindInPageModal;
58
62
  Home: WorkspaceRoute.Home;
59
63
  HomeSearch: WorkspaceRoute.HomeSearch;
60
64
  HomePagesRename: WorkspaceRoute.HomePagesRename;
@@ -5,12 +5,12 @@ export default function makeSharedEmitter<EventMap extends {
5
5
  [key: string | number]: any[];
6
6
  }>(id: string): {
7
7
  emit: <EventKey extends keyof EventMap>(event: EventKey, ...payload: EventMap[EventKey]) => Promise<void>;
8
- addListener: <EventKey_1 extends keyof EventMap>(event: EventKey_1, listener: (...payload: EventMap[EventKey_1]) => void) => void;
8
+ addListener: <EventKey extends keyof EventMap>(event: EventKey, listener: (...payload: EventMap[EventKey]) => void) => void;
9
9
  /**
10
10
  * Creates a listener for a particular UUID instead of ApplicationUUID.Workspace.
11
11
  * @param uuid The UUID of the application to subscribe to.
12
12
  */
13
- addListenerWithUUID: (uuid: string) => <EventKey_1 extends keyof EventMap>(event: EventKey_1, listener: (...payload: EventMap[EventKey_1]) => void) => void;
14
- removeListener: <EventKey_2 extends keyof EventMap>(event: EventKey_2, listener: (...payload: EventMap[EventKey_2]) => void) => void;
15
- once: <EventKey_3 extends keyof EventMap>(event: EventKey_3, listener: (...payload: EventMap[EventKey_3]) => void) => void;
13
+ addListenerWithUUID: (uuid: string) => <EventKey extends keyof EventMap>(event: EventKey, listener: (...payload: EventMap[EventKey]) => void) => void;
14
+ removeListener: <EventKey extends keyof EventMap>(event: EventKey, listener: (...payload: EventMap[EventKey]) => void) => void;
15
+ once: <EventKey extends keyof EventMap>(event: EventKey, listener: (...payload: EventMap[EventKey]) => void) => void;
16
16
  };
@@ -1,4 +1,10 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import { BackgroundLayers, CustomPaletteSet } from '../../../common/src/api/theming';
3
+ export type ColorSchemeValue = 'light' | 'dark' | 'system';
4
+ export type WorkspaceSchemeSetting = 'light' | 'dark' | 'system';
5
+ export type MediaSchemeValue = 'light' | 'dark';
6
+ /** Maps a color scheme to OpenFin native theme preferences. */
7
+ export declare const mapColorSchemeToNativeTheme: (scheme: ColorSchemeValue) => OpenFin.NativeTheme;
2
8
  /**
3
9
  * Parses a CSS color string (hex, rgb(a), or hsl(a)) into a structured RGB string and alpha value.
4
10
  *
@@ -54,5 +54,5 @@ type MissingKeys<T, U> = Exclude<keyof T, U>;
54
54
  * fooChecker(['bar', 'qux', 'baz']); // 'baz' is not assignable to type keyof Foo;
55
55
  * ```
56
56
  */
57
- export declare const makeKeyChecker: <T extends object>() => <K extends (keyof T)[]>(arr: K & (Exclude<keyof T, K[number]> extends never ? unknown : `Error: Missing keys: ${string & Exclude<keyof T, K[number]>}`)) => K;
57
+ export declare const makeKeyChecker: <T extends object>() => <K extends (keyof T)[]>(arr: K & (MissingKeys<T, K[number]> extends never ? unknown : `Error: Missing keys: ${string & MissingKeys<T, K[number]>}`)) => K;
58
58
  export {};
@@ -1,25 +1,27 @@
1
1
  import type OpenFin from '@openfin/core';
2
+ import type { SearchProviderInfo } from '../../../search-api/src/shapes';
2
3
  import { ApplicationUUID } from './application';
3
4
  export declare enum WindowName {
4
5
  Home = "openfin-home",
5
6
  Dock = "openfin-dock",
6
7
  Storefront = "openfin-storefront",
7
8
  HomeInternal = "openfin-home-internal",
8
- BrowserMenu = "openfin-browser-menu",
9
- BrowserSaveMenu = "openfin-browser-save-menu",
10
- DockSaveWorkspaceMenu = "openfin-dock3-save-workspace-menu",
11
9
  BrowserIndicator = "openfin-browser-indicator",
12
10
  BrowserWindow = "internal-generated-window",
13
11
  ClassicWindow = "internal-generated-classic-window",
14
- EnterpriseContextMenu = "openfin-enterprise-context-menu",
15
12
  BrowserAddressSearchPrefix = "openfin-browser-menu-address-search-",
16
- EnterpriseBookmarkDialogWindow = "openfin-enterprise-bookmark-dialog",
17
- DropdownMenu = "openfin-enterprise-dropdown-menu",
18
13
  DockCompanion = "openfin-dock-companion",
19
14
  AICompanionPrefix = "openfin-ai-companion-",
20
- UpdateVersionModal = "here-update-version-modal",
21
- ZoomControlsDialog = "here-zoom-controls-dialog",
22
15
  AboutPageWindow = "here-about-page",
16
+ FindInPageViewPrefix = "here-find-in-page-view-",
17
+ BrowserMenu = "openfin-browser-menu",
18
+ BrowserSaveMenu = "openfin-browser-save-menu",
19
+ DockSaveWorkspaceMenu = "openfin-dock3-save-workspace-menu",
20
+ DropdownMenu = "openfin-enterprise-dropdown-menu",
21
+ EnterpriseContextMenu = "openfin-enterprise-context-menu",
22
+ EnterpriseBookmarkDialogWindow = "openfin-enterprise-bookmark-dialog",
23
+ ZoomControlsDialog = "here-zoom-controls-dialog",
24
+ UpdateVersionModal = "here-update-version-modal",
23
25
  DesktopSignalsModal = "here-desktop-signals-modal",
24
26
  IntentsResolverModal = "here-intents-resolver-modal"
25
27
  }
@@ -141,6 +143,7 @@ export declare function animateSize(width: number, height: number): Promise<void
141
143
  * @returns boolean
142
144
  */
143
145
  export declare const isBrowserWindow: (identity: OpenFin.Identity) => Promise<any>;
146
+ export declare const isModalWindowExceptZoomDialog: (identity: OpenFin.Identity) => boolean;
144
147
  /**
145
148
  * Force document body size. Called when resizing or on scaling changes.
146
149
  */
@@ -154,6 +157,7 @@ export declare function getModalWindows(): Promise<OpenFin.Window[]>;
154
157
  * Returns true if the OpenFin window for the provided identity is running.
155
158
  * */
156
159
  export declare const isWindowRunning: (identity: WindowIdentity) => Promise<boolean>;
160
+ export declare const isApplicationRunning: (uuid: string) => Promise<boolean>;
157
161
  /**
158
162
  * Check if Storefront window is running.
159
163
  * @returns true if the Storefront window is running.
@@ -161,7 +165,7 @@ export declare const isWindowRunning: (identity: WindowIdentity) => Promise<bool
161
165
  export declare const isStorefrontWindowRunning: () => Promise<boolean>;
162
166
  export declare const isDockWindowRunning: () => Promise<boolean>;
163
167
  export declare const isHomeWindowRunning: () => Promise<boolean>;
164
- export declare const isNotificationCenterWindowRunning: () => Promise<boolean>;
168
+ export declare const isNotificationCenterRunning: () => Promise<boolean>;
165
169
  export declare const showAndFocusStorefront: () => Promise<void>;
166
170
  export declare const showAndFocusDock: () => Promise<void>;
167
171
  export declare const getDisableMultiplePagesOption: (identity: WindowIdentity) => Promise<any>;
@@ -173,6 +177,13 @@ export declare const getComponentWindowStatus: () => Promise<{
173
177
  }>;
174
178
  export declare const deserializeWindowBounds: (serialized: string) => OpenFin.WindowBounds | null;
175
179
  export declare const serializeWindowBounds: (bounds: OpenFin.WindowBounds) => string;
180
+ /**
181
+ * Calculates the dynamic height for the home window based on subheader configuration
182
+ * @param baseHeight - The base height for the home window
183
+ * @param subHeaderConfig - The subheader configuration from search provider
184
+ * @returns The calculated height based on missing subheader elements
185
+ */
186
+ export declare const calculateHomeWindowHeight: (baseHeight: number, subHeaderConfig?: SearchProviderInfo["subHeader"]) => number;
176
187
  export declare const getWindowBounds: (window: OpenFin.Window) => Promise<OpenFin.RectangleByEdgePositions>;
177
188
  /**
178
189
  * calculates the percenage of the window that is present within the monitor (float in range 0-1)
@@ -33,7 +33,7 @@ export declare const showUpdateVersionModal: ({ identity, title, description }:
33
33
  identity: OpenFin.Identity;
34
34
  title: string;
35
35
  description: string;
36
- }) => Promise<ModalResponseEvent['data']>;
36
+ }) => Promise<ModalResponseEvent["data"]>;
37
37
  /**
38
38
  * Shows the intents resolver modal and returns the user's selection
39
39
  * @param request - The request containing modal configuration
@@ -0,0 +1,11 @@
1
+ import type { CompanionDockConfig } from '../shapes/enterprise';
2
+ import type { DockAllowedWindowOptions } from '../shapes/shapes';
3
+ export declare const getSnapZone: (config: CompanionDockConfig | unknown, options?: DockAllowedWindowOptions) => {
4
+ enabled: boolean;
5
+ threshold?: number;
6
+ locationPreference?: Array<"top" | "bottom">;
7
+ } | {
8
+ enabled: boolean;
9
+ threshold: number;
10
+ locationPreference: readonly ["top", "bottom"];
11
+ };
@@ -75,4 +75,16 @@ export interface Dock3Config {
75
75
  };
76
76
  };
77
77
  }
78
- export type DockAllowedWindowOptions = Partial<Pick<OpenFin.PlatformWindowOptions, 'defaultCentered' | 'saveWindowState' | 'taskbarIconGroup' | 'defaultTop' | 'defaultLeft'>>;
78
+ export type DockAllowedWindowOptions = Partial<Pick<OpenFin.PlatformWindowOptions, 'defaultCentered' | 'saveWindowState' | 'taskbarIconGroup' | 'defaultTop' | 'defaultLeft'>> & {
79
+ experimental?: {
80
+ snapZone?: {
81
+ enabled: boolean;
82
+ threshold?: number;
83
+ locationPreference?: Array<'top' | 'bottom'>;
84
+ };
85
+ };
86
+ contextMenuOptions?: {
87
+ enabled?: boolean;
88
+ template?: Array<'snapToTop' | 'snapToBottom' | 'inspect'>;
89
+ };
90
+ };
@@ -7,7 +7,7 @@
7
7
  "issuer": "client-api-platform/src/init/cleanup.ts"
8
8
  },
9
9
  {
10
- "type": "root-implicit",
10
+ "type": "explicit",
11
11
  "version": "^4.0.8",
12
12
  "packageName": "common/package.json",
13
13
  "issuer": "common/src/utils/layout.ts"
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "react-i18next": [
17
17
  {
18
- "type": "root-implicit",
18
+ "type": "explicit",
19
19
  "version": "15.4.0",
20
20
  "packageName": "common/package.json",
21
21
  "issuer": "common/src/api/i18next.ts"
@@ -23,27 +23,29 @@
23
23
  ],
24
24
  "i18next": [
25
25
  {
26
- "type": "root-implicit",
26
+ "type": "explicit",
27
27
  "version": "^23.7.16",
28
28
  "packageName": "common/package.json",
29
29
  "issuer": "common/src/api/i18next.ts"
30
30
  }
31
31
  ],
32
+ "lodash.clonedeep": [
33
+ {
34
+ "type": "explicit",
35
+ "version": "4.5.0",
36
+ "packageName": "common/package.json",
37
+ "issuer": "common/src/utils/layout.ts"
38
+ }
39
+ ],
32
40
  "title-case": [
33
41
  {
34
- "type": "root-implicit",
42
+ "type": "explicit",
35
43
  "version": "3.0.3",
36
44
  "packageName": "common/package.json",
37
45
  "issuer": "common/src/utils/color-linking.ts"
38
46
  }
39
47
  ],
40
48
  "dexie": [
41
- {
42
- "type": "explicit",
43
- "version": "^4.0.11",
44
- "packageName": "client-api-platform/package.json",
45
- "issuer": "client-api-platform/src/api/dock/idb.ts"
46
- },
47
49
  {
48
50
  "type": "root-implicit",
49
51
  "version": "^4.0.11",
@@ -51,13 +53,19 @@
51
53
  "issuer": "dock3/src/api/idb.ts"
52
54
  },
53
55
  {
54
- "type": "root-implicit",
56
+ "type": "explicit",
57
+ "version": "^4.0.11",
58
+ "packageName": "client-api-platform/package.json",
59
+ "issuer": "client-api-platform/src/api/dock/idb.ts"
60
+ },
61
+ {
62
+ "type": "explicit",
55
63
  "version": "^4.0.11",
56
64
  "packageName": "common/package.json",
57
65
  "issuer": "common/src/api/pages/idb.ts"
58
66
  },
59
67
  {
60
- "type": "root-implicit",
68
+ "type": "explicit",
61
69
  "version": "^4.0.11",
62
70
  "packageName": "common/package.json",
63
71
  "issuer": "common/src/utils/create-and-migrate-ibd-store.ts"