@openfin/workspace-platform 22.5.21 → 23.0.1

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 (44) hide show
  1. package/client-api/src/integrations/microsoft.utils.d.ts +6 -6
  2. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  3. package/client-api-platform/src/api/controllers/theme-storage-controller-store.d.ts +2 -1
  4. package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +18 -4
  5. package/client-api-platform/src/api/dock.d.ts +5 -3
  6. package/client-api-platform/src/api/language.d.ts +1 -1
  7. package/client-api-platform/src/api/pages/open-pages.d.ts +2 -2
  8. package/client-api-platform/src/api/theming.d.ts +11 -0
  9. package/client-api-platform/src/api/theming.test.d.ts +1 -0
  10. package/client-api-platform/src/init/override-callback/page-defaults.d.ts +1 -1
  11. package/client-api-platform/src/init/override-callback/view-components.d.ts +1 -1
  12. package/client-api-platform/src/init/override-callback/view-options.d.ts +1 -1
  13. package/client-api-platform/src/init/theming.d.ts +2 -1
  14. package/client-api-platform/src/shapes.d.ts +22 -17
  15. package/common/src/api/pages/idb.d.ts +2 -4
  16. package/common/src/api/protocol/browser.d.ts +8 -6
  17. package/common/src/api/protocol/shapes/workspace.d.ts +8 -0
  18. package/common/src/api/protocol/workspace-platform.d.ts +25 -23
  19. package/common/src/api/provider.d.ts +1 -1
  20. package/common/src/api/storefront.d.ts +5 -5
  21. package/common/src/api/theming.d.ts +25 -15
  22. package/common/src/utils/enterprise-menu.d.ts +1 -1
  23. package/common/src/utils/find-in-page/findInPageChannel.d.ts +35 -0
  24. package/common/src/utils/find-in-page/showFindInPageHandler.d.ts +2 -0
  25. package/common/src/utils/global-context-menu.d.ts +8 -1
  26. package/common/src/utils/layout.d.ts +1 -2
  27. package/common/src/utils/logger.d.ts +22 -0
  28. package/common/src/utils/menu-window-provider.d.ts +6 -6
  29. package/common/src/utils/modal-bounds.d.ts +1 -1
  30. package/common/src/utils/namespaced-local-storage.d.ts +2 -2
  31. package/common/src/utils/popup-window.d.ts +15 -0
  32. package/common/src/utils/route.d.ts +3 -1
  33. package/common/src/utils/shared-emitter.d.ts +4 -4
  34. package/common/src/utils/types.d.ts +1 -1
  35. package/common/src/utils/window.d.ts +10 -1
  36. package/common/src/utils/workspace-modals.d.ts +1 -1
  37. package/dock3/src/shapes/shapes.d.ts +9 -1
  38. package/index.js +2 -1
  39. package/index.js.LICENSE.txt +1 -0
  40. package/index.js.map +1 -1
  41. package/package.json +4 -3
  42. package/search-api/src/provider/remote/info.d.ts +1 -1
  43. package/search-api/src/shapes.d.ts +22 -1
  44. package/workspace_platform.zip +0 -0
@@ -0,0 +1,22 @@
1
+ export declare const log: {
2
+ /**
3
+ * Calls console.debug with provided parameters and stringifies JS objects prior to logging
4
+ */
5
+ debug: (...args: unknown[]) => void;
6
+ /**
7
+ * Calls console.info with provided parameters and stringifies JS objects prior to logging
8
+ */
9
+ info: (...args: unknown[]) => void;
10
+ /**
11
+ * Calls console.warn with provided parameters and stringifies JS objects prior to logging
12
+ */
13
+ warn: (...args: unknown[]) => void;
14
+ /**
15
+ * Calls console.error with provided parameters and stringifies JS objects prior to logging
16
+ */
17
+ error: (...args: unknown[]) => void;
18
+ /**
19
+ * Calls console.trace with provided parameters and stringifies JS objects prior to logging
20
+ */
21
+ trace: (...args: unknown[]) => void;
22
+ };
@@ -17,12 +17,12 @@ export interface ModalResponseEvent {
17
17
  }
18
18
  export declare const menuEvents: {
19
19
  emit: <EventKey extends keyof MenuEventTypes>(event: EventKey, ...payload: MenuEventTypes[EventKey]) => Promise<void>;
20
- addListener: <EventKey_1 extends keyof MenuEventTypes>(event: EventKey_1, listener: (...payload: MenuEventTypes[EventKey_1]) => void) => void;
21
- addListenerWithUUID: (uuid: string) => <EventKey_1 extends keyof MenuEventTypes>(event: EventKey_1, listener: (...payload: MenuEventTypes[EventKey_1]) => void) => void;
22
- removeListener: <EventKey_2 extends keyof MenuEventTypes>(event: EventKey_2, listener: (...payload: MenuEventTypes[EventKey_2]) => void) => void;
23
- once: <EventKey_3 extends keyof MenuEventTypes>(event: EventKey_3, listener: (...payload: MenuEventTypes[EventKey_3]) => void) => void;
20
+ addListener: <EventKey extends keyof MenuEventTypes>(event: EventKey, listener: (...payload: MenuEventTypes[EventKey]) => void) => void;
21
+ addListenerWithUUID: (uuid: string) => <EventKey extends keyof MenuEventTypes>(event: EventKey, listener: (...payload: MenuEventTypes[EventKey]) => void) => void;
22
+ removeListener: <EventKey extends keyof MenuEventTypes>(event: EventKey, listener: (...payload: MenuEventTypes[EventKey]) => void) => void;
23
+ once: <EventKey extends keyof MenuEventTypes>(event: EventKey, listener: (...payload: MenuEventTypes[EventKey]) => void) => void;
24
24
  };
25
- export declare const emitMenuResponse: (data: ModalResponseEvent['data']) => Promise<void>;
25
+ export declare const emitMenuResponse: (data: ModalResponseEvent["data"]) => Promise<void>;
26
26
  type WindowOptionsWithBounds = OptionalExceptFor<OpenFin.WindowOptions, 'name' | 'url'> & {
27
27
  top: number;
28
28
  left: number;
@@ -49,6 +49,6 @@ export declare function createMenuPosition(windowOptions: OptionalExceptFor<Open
49
49
  }>;
50
50
  export declare function showChildWindow({ options, parameters }: ShowChildOptions): Promise<OpenFin.Window>;
51
51
  export declare const waitForModalResponse: ({ options, content, parameters }: ResponseModalOptions) => Promise<{
52
- data: ModalResponseEvent['data'];
52
+ data: ModalResponseEvent["data"];
53
53
  }>;
54
54
  export {};
@@ -16,7 +16,7 @@ export declare const getCenterOfParentWindowMonitor: (parentWindowIdentity?: Ope
16
16
  * @param centerOnMonitor whether the modal should be centered on the monitor
17
17
  * @returns the bounds for where the modal is to be displayed
18
18
  */
19
- export declare const getResponseModalBounds: (modalOptions: Pick<ResponseModalConfig['windowOptions'], 'defaultWidth' | 'defaultHeight'>, parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean) => Promise<OpenFin.Bounds>;
19
+ export declare const getResponseModalBounds: (modalOptions: Pick<ResponseModalConfig["windowOptions"], "defaultWidth" | "defaultHeight">, parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean) => Promise<OpenFin.Bounds>;
20
20
  export declare function getResponseModalBoundsAndCenterParentIfModalOffScreen(modalOptions: Parameters<typeof getResponseModalBounds>[0], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean, relativeBounds?: boolean): Promise<OpenFin.Bounds>;
21
21
  /**
22
22
  * Adjusts the given bounds to be within the closest monitor's available bounds if they are offscreen.
@@ -1,4 +1,4 @@
1
- export declare const createNamespacedLocalStorage: <TKey extends string>(namespace: string) => Pick<Storage, 'setItem' | 'getItem' | 'removeItem'>;
1
+ export declare const createNamespacedLocalStorage: <TKey extends string>(namespace: string) => Pick<Storage, "setItem" | "getItem" | "removeItem">;
2
2
  export declare const setItem: (key: string, value: string) => void;
3
- export declare const getItem: (key: string) => string;
3
+ export declare const getItem: (key: string) => string | null;
4
4
  export declare const removeItem: (key: string) => void;
@@ -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"
@@ -116,8 +122,17 @@ export type SearchMenuChannelResponse = {
116
122
  } | {
117
123
  type: 'keyboard-event';
118
124
  keyboardEvent: BrowserSearchMenuKeyboardEvent;
125
+ } | {
126
+ type: 'focused-changed';
127
+ payload: SelectableResult;
119
128
  } | {
120
129
  type: 'search-provider-changed';
130
+ } | {
131
+ type: 'all-providers-results-announcement';
132
+ message: string;
133
+ } | {
134
+ type: 'single-provider-results-announcement';
135
+ message: string;
121
136
  };
122
137
  export declare function showPopupWin<T extends keyof UserMenuParams>(parentWindow: OpenFin.Window, params: UserMenuParams[T], windowOpts: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
123
138
  export {};
@@ -33,7 +33,8 @@ declare enum BrowserRoute {
33
33
  EnterpriseDock = "/dock/",
34
34
  ZoomControlsDialog = "/zoom-controls-dialog/",
35
35
  DesktopSignalsModal = "/popup-menu/desktop-signals-modal/",
36
- IntentsResolverModal = "/popup-menu/intents-resolver-modal/"
36
+ IntentsResolverModal = "/popup-menu/intents-resolver-modal/",
37
+ FindInPageModal = "/find-in-page-modal/"
37
38
  }
38
39
  declare const PageRoute: {
39
40
  Browser: BrowserRoute.Browser;
@@ -55,6 +56,7 @@ declare const PageRoute: {
55
56
  ZoomControlsDialog: BrowserRoute.ZoomControlsDialog;
56
57
  DesktopSignalsModal: BrowserRoute.DesktopSignalsModal;
57
58
  IntentsResolverModal: BrowserRoute.IntentsResolverModal;
59
+ FindInPageModal: BrowserRoute.FindInPageModal;
58
60
  Home: WorkspaceRoute.Home;
59
61
  HomeSearch: WorkspaceRoute.HomeSearch;
60
62
  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
  };
@@ -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,4 +1,5 @@
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",
@@ -21,7 +22,8 @@ export declare enum WindowName {
21
22
  ZoomControlsDialog = "here-zoom-controls-dialog",
22
23
  AboutPageWindow = "here-about-page",
23
24
  DesktopSignalsModal = "here-desktop-signals-modal",
24
- IntentsResolverModal = "here-intents-resolver-modal"
25
+ IntentsResolverModal = "here-intents-resolver-modal",
26
+ FindInPageViewPrefix = "here-find-in-page-view-"
25
27
  }
26
28
  export interface WindowIdentity {
27
29
  uuid: ApplicationUUID | string;
@@ -173,6 +175,13 @@ export declare const getComponentWindowStatus: () => Promise<{
173
175
  }>;
174
176
  export declare const deserializeWindowBounds: (serialized: string) => OpenFin.WindowBounds | null;
175
177
  export declare const serializeWindowBounds: (bounds: OpenFin.WindowBounds) => string;
178
+ /**
179
+ * Calculates the dynamic height for the home window based on subheader configuration
180
+ * @param baseHeight - The base height for the home window
181
+ * @param subHeaderConfig - The subheader configuration from search provider
182
+ * @returns The calculated height based on missing subheader elements
183
+ */
184
+ export declare const calculateHomeWindowHeight: (baseHeight: number, subHeaderConfig?: SearchProviderInfo["subHeader"]) => number;
176
185
  export declare const getWindowBounds: (window: OpenFin.Window) => Promise<OpenFin.RectangleByEdgePositions>;
177
186
  /**
178
187
  * 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
@@ -75,4 +75,12 @@ 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
+ };