@openfin/workspace 22.5.25 → 23.0.1-alpha.75ce533e

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 (66) hide show
  1. package/client-api/src/integrations/microsoft.utils.d.ts +6 -6
  2. package/client-api/src/notifications.d.ts +2 -2
  3. package/client-api/src/shapes/index.d.ts +1 -1
  4. package/client-api/src/shapes/notifications.d.ts +1 -1
  5. package/client-api-platform/src/api/controllers/theme-storage-controller-store.d.ts +16 -1
  6. package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +42 -25
  7. package/client-api-platform/src/api/dock.d.ts +5 -3
  8. package/client-api-platform/src/api/language.d.ts +1 -1
  9. package/client-api-platform/src/api/pages/open-pages.d.ts +2 -2
  10. package/client-api-platform/src/api/theming.d.ts +12 -0
  11. package/client-api-platform/src/api/utils.d.ts +11 -0
  12. package/client-api-platform/src/init/override-callback/page-defaults.d.ts +1 -1
  13. package/client-api-platform/src/init/override-callback/view-components.d.ts +1 -1
  14. package/client-api-platform/src/init/override-callback/view-defaults.d.ts +2 -1
  15. package/client-api-platform/src/init/override-callback/view-options.d.ts +1 -1
  16. package/client-api-platform/src/init/theming.d.ts +5 -1
  17. package/client-api-platform/src/shapes.d.ts +159 -27
  18. package/common/src/api/pages/idb.d.ts +2 -4
  19. package/common/src/api/protocol/browser.d.ts +13 -11
  20. package/common/src/api/protocol/notifications.d.ts +8 -0
  21. package/common/src/api/protocol/shapes/workspace.d.ts +8 -0
  22. package/common/src/api/protocol/workspace-platform.d.ts +30 -25
  23. package/common/src/api/protocol/workspace.d.ts +2 -2
  24. package/common/src/api/provider.d.ts +1 -1
  25. package/common/src/api/shapes/notifications.d.ts +1 -0
  26. package/common/src/api/storefront.d.ts +5 -5
  27. package/common/src/api/theming.d.ts +39 -17
  28. package/common/src/utils/application.d.ts +7 -0
  29. package/common/src/utils/enterprise-menu.d.ts +1 -1
  30. package/common/src/utils/find-in-page/findInPageChannel.d.ts +37 -0
  31. package/common/src/utils/find-in-page/showFindInPageHandler.d.ts +2 -0
  32. package/common/src/utils/global-context-menu.d.ts +8 -1
  33. package/common/src/utils/landing-page.d.ts +1 -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/protocol.d.ts +6 -1
  48. package/dock3/src/api/utils.d.ts +11 -0
  49. package/dock3/src/shapes/enterprise.d.ts +25 -1
  50. package/dock3/src/shapes/shapes.d.ts +13 -1
  51. package/externals.report.json +18 -8
  52. package/home.js +2 -1
  53. package/home.js.LICENSE.txt +1 -0
  54. package/home.js.map +1 -1
  55. package/index.js +2 -1
  56. package/index.js.LICENSE.txt +1 -0
  57. package/index.js.map +1 -1
  58. package/notifications.js +2 -1
  59. package/notifications.js.LICENSE.txt +1 -0
  60. package/notifications.js.map +1 -1
  61. package/package.json +7 -5
  62. package/search-api/src/shapes.d.ts +22 -1
  63. package/store.js +2 -1
  64. package/store.js.LICENSE.txt +1 -0
  65. package/store.js.map +1 -1
  66. package/common/src/brand/default-brand.d.ts +0 -8
@@ -36,9 +36,9 @@ export declare const MICROSOFT_365_SEARCH_RESULT_ACTIONS: {
36
36
  * @param req The user input request object from which to extract the selected filters.
37
37
  * @returns An array of CLIFilter objects representing the validated filters.
38
38
  */
39
- export declare const getValidFilters: (req: Parameters<HomeProvider['onUserInput']>[0], searchTypePossibleFilters: Set<Microsoft365DocumentType>) => CLIFilter[];
40
- export declare const getValidContactFilters: (users: MicrosoftGraphTypes.User[], req: Parameters<HomeProvider['onUserInput']>[0]) => CLIFilter[];
41
- export declare const getContactFiltersFromRequest: (req: Parameters<HomeProvider['onUserInput']>[0]) => {
39
+ export declare const getValidFilters: (req: Parameters<HomeProvider["onUserInput"]>[0], searchTypePossibleFilters: Set<Microsoft365DocumentType>) => CLIFilter[];
40
+ export declare const getValidContactFilters: (users: MicrosoftGraphTypes.User[], req: Parameters<HomeProvider["onUserInput"]>[0]) => CLIFilter[];
41
+ export declare const getContactFiltersFromRequest: (req: Parameters<HomeProvider["onUserInput"]>[0]) => {
42
42
  department: string[];
43
43
  jobTitle: string[];
44
44
  };
@@ -58,7 +58,7 @@ export declare const filterContactFromRequest: (items: MicrosoftGraphTypes.User[
58
58
  * If no types are selected or all types are deselected, the function marks all types to be shown.
59
59
  * Otherwise, it marks only the selected types to be shown.
60
60
  */
61
- export declare const getTypeFiltersFromRequest: (req: Parameters<HomeProvider['onUserInput']>[0], searchTypePossibleFilters: Set<Microsoft365DocumentType>) => {
61
+ export declare const getTypeFiltersFromRequest: (req: Parameters<HomeProvider["onUserInput"]>[0], searchTypePossibleFilters: Set<Microsoft365DocumentType>) => {
62
62
  readonly showDocuments: boolean;
63
63
  readonly showContacts: boolean;
64
64
  /** Teams Messages */
@@ -70,7 +70,7 @@ export declare const getTypeFiltersFromRequest: (req: Parameters<HomeProvider['o
70
70
  /** SharePoint Lists */
71
71
  readonly showLists: boolean;
72
72
  };
73
- export declare const getDocumentFiltersFromRequest: (req: Parameters<HomeProvider['onUserInput']>[0]) => {
73
+ export declare const getDocumentFiltersFromRequest: (req: Parameters<HomeProvider["onUserInput"]>[0]) => {
74
74
  readonly filterFiles: boolean;
75
75
  readonly showWord: boolean;
76
76
  readonly showExcel: boolean;
@@ -81,6 +81,6 @@ export declare const getDocumentFiltersFromRequest: (req: Parameters<HomeProvide
81
81
  export declare const filterDocumentsFromRequest: (items: MicrosoftGraphTypes.DriveItem[], filter: ReturnType<typeof getDocumentFiltersFromRequest>) => MicrosoftGraphTypes.DriveItem[];
82
82
  export declare const getFileType: (fileName?: string) => string;
83
83
  export declare const getFileIcon: (fileName?: string) => string;
84
- export declare const mapMicrosoftAvailabilityToPresence: (availability: Presence) => CLISearchResultContact['templateContent']['onlineStatus'] | undefined;
84
+ export declare const mapMicrosoftAvailabilityToPresence: (availability: Presence) => CLISearchResultContact["templateContent"]["onlineStatus"] | undefined;
85
85
  /** base64IdToUrl converts a base64 encoded id to a url safe id */
86
86
  export declare const base64IdToUrl: (b64Id: string) => string;
@@ -1,6 +1,6 @@
1
- import * as Notifications from 'openfin-notifications/dist/client/without-auto-launch';
1
+ import * as Notifications from '@openfin/notifications';
2
2
  import type { NotificationsPlatform, NotificationsRegisterOptions } from './shapes/notifications';
3
- export * from 'openfin-notifications/dist/client/without-auto-launch';
3
+ export * from '@openfin/notifications';
4
4
  export * from './shapes/notifications';
5
5
  /**
6
6
  * @deprecated Use `register` with {@link NotificationsRegisterOptions | options?: NotificationsRegisterOptions} argument instead.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * WARNING: Do not export from './notifications' here. Not unless we move 'openfin-notifications' here.
2
+ * WARNING: Do not export from './notifications' here. Not unless we move '@openfin/notifications' here.
3
3
  */
4
4
  export * from './common';
5
5
  export * from './home';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This module exports only notifications types that are not defined in 'openfin-notifications' npm package
2
+ * This module exports only notifications types that are not defined in '@openfin/notifications' npm package
3
3
  */
4
4
  import { NotificationsCustomManifestOptions } from '../../../common/src/api/shapes/notifications';
5
5
  /**
@@ -1,4 +1,19 @@
1
+ import { GeneratedPalettes, NotificationIndicatorColorsParsed } from '../../../../common/src/api/theming';
1
2
  import { ThemeStorageController } from '../../../../client-api-platform/src/api/controllers/theme-storage-controller';
2
3
  import { CustomThemes } from '../../../../client-api-platform/src/shapes';
3
- export declare const initialiseStoragePalettes: (customThemes: CustomThemes | undefined, isWindows: boolean) => CustomThemes;
4
+ /**
5
+ * Initialises the storage palettes from the custom themes. This function is called on platform init.
6
+ * This function takes both the legacy themes and the new theme system tokens and
7
+ * passes them into the theme engine to generate the css variables.
8
+ *
9
+ * @param customThemes the custom themes to initialise the storage palettes from.
10
+ * @param isWindows whether the operating system is Windows.
11
+ * @returns the generated palettes fromt the theme engine, theme palette sheet which is injected into the DOM, and legacy theme object if it exists.
12
+ */
13
+ export declare const initialiseStoragePalettes: (customThemes: CustomThemes | undefined, isWindows: boolean) => {
14
+ generatedPalettes: GeneratedPalettes;
15
+ themePaletteSheet: string;
16
+ legacyTheme: CustomThemes | null;
17
+ notificationIndicatorColors: NotificationIndicatorColorsParsed | null;
18
+ };
4
19
  export declare const getThemeStorageController: () => ThemeStorageController;
@@ -1,52 +1,59 @@
1
+ import { GeneratedPalettes } from '../../../../common/src/api/theming';
2
+ import { StorageProxy } from '../../../../client-api-platform/src/api/utils';
1
3
  import { ColorSchemeOptionType, CustomPaletteSet } from '../../../../client-api-platform/src/shapes';
2
4
  /**
3
5
  * Palette extensions can be used to add new variables to the palette set.
4
6
  *
5
7
  * This is particularly useful if a value uses a different palette constant depending on scheme.
6
8
  */
7
- export declare const getPaletteExtensions: (palette: CustomPaletteSet, paletteScheme: 'light' | 'dark', isWindows: boolean) => {
8
- dockExpandedContainerBorderColor: string;
9
+ export declare const getPaletteExtensions: (palette: CustomPaletteSet, paletteScheme: "light" | "dark", isWindows: boolean) => {
9
10
  dockExpandedContainerBorderRadius: string;
10
- dockExpandedContainerBackground: string;
11
11
  fillerBackgroundColor: string;
12
- dockCompanionContainerBackground: string;
13
- dockComponentContainerBackground: string;
14
- styledDropdownActiveBackground: string;
15
- contentMenuWrapperInternalDivBorderColor: string;
16
- contentMenuItemContainerActiveBackground: string;
17
- contentMenuItemContainerHoverBackground: string;
18
- contentMenuHeaderBorderColor: string;
19
- dockCompanionSeparatorBorderColor: string;
20
- dockComponentContainerBorderColor: string;
21
- companionDockButtonActiveBackground: string;
22
- companionDockButtonHoverBackground: string;
23
12
  'computed-scrollbar-thumb-alpha': number;
24
13
  'computed-scrollbar-track-alpha': number;
25
14
  'scrollbar-thumb-rgb': string;
26
15
  'scrollbar-track-rgb': string;
27
16
  selectedTab: string;
28
17
  };
29
- export type Palettes = {
18
+ export type LegacyPalettes = {
30
19
  dark: CustomPaletteSet;
31
20
  light: CustomPaletteSet;
32
21
  };
22
+ export type Palettes = {
23
+ light: string;
24
+ dark: string;
25
+ };
33
26
  export declare class ThemeStorageController {
34
27
  private providerStorage;
35
28
  private darkPaletteVars?;
36
29
  private lightPaletteVars?;
30
+ private themePaletteSheet?;
31
+ private generatedPalettes?;
37
32
  private workspaceStorage?;
33
+ private recreateFactory?;
38
34
  constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem'>);
39
- private getVarsByScheme;
40
35
  /**
41
36
  * Set the current Storage Proxy to enable Workspace Storage properties to be populated.
42
- *
43
- * Currently, we only support same Storage Based theming for same origin scenarios like EB, where the provider
44
- * is in the same origin as the workspace pages.
45
- *
46
- * A workaround that can be leveraged in cross origin scenarios (which is the majority of the workspace use case) is available in this commit: 233e843cda6cd68968fd5831fb20597e0d5bb7cc
47
- * `git revert 233e843cda6cd68968fd5831fb20597e0d5bb7cc --no-commit`
48
37
  */
49
- setWorkspaceStorage: (proxy: Pick<Storage, 'setItem'>) => void;
38
+ setWorkspaceStorageProxy: (proxy: StorageProxy) => void;
39
+ /**
40
+ * Set a factory to recreate the storage proxy if it was destroyed (e.g. when a new browser
41
+ * window is opened after the last one closed with preventQuitOnLastWindowClosed true).
42
+ * Called once at platform init; avoids createWindow needing URL/env dependencies.
43
+ */
44
+ setRecreateFactory: (factory: () => Promise<StorageProxy>) => void;
45
+ /**
46
+ * Close the storage proxy window and clear the reference. Called when the last browser window
47
+ * closes so the platform can quit (storage proxy would otherwise keep the process alive).
48
+ * Clears the reference before awaiting destroy() to avoid a race with ensureWorkspaceStorageProxy.
49
+ */
50
+ destroyWorkspaceStorageProxy: () => Promise<void>;
51
+ /**
52
+ * Ensure the workspace storage proxy exists, recreating via the factory set at init if it was
53
+ * previously destroyed. No-op if no factory was set (e.g. in tests). Call before using
54
+ * workspace storage (e.g. when creating a browser window).
55
+ */
56
+ ensureWorkspaceStorageProxy: () => Promise<void>;
50
57
  /**
51
58
  * Check if there's an explicit user preference stored in localStorage.
52
59
  * A user preference is indicated by the presence of a SelectedColorScheme key. Which is something assigned if you click on the Appearance dropdown.
@@ -57,14 +64,18 @@ export declare class ThemeStorageController {
57
64
  * Synchronize the current palette and scheme with workspace's storage instance if
58
65
  * storage based theming is enabled. Only syncs when user has explicitly selected a scheme.
59
66
  */
60
- trySynchronizeWorkspaceStorage: () => void;
67
+ trySynchronizeWorkspaceStorage: () => Promise<void>;
61
68
  /**
62
69
  * Set the current Palette to be used by workspace. This palette will be converted into
63
70
  * css vars and combined into a single stylesheet. This stylesheet is exposed in localstorage
64
71
  * to allow workspace UI elements to load the palette before their first paint.
65
72
  * @param palettes Light and Dark Palette constants
66
73
  */
67
- setPalettes: ({ light, dark }: Palettes, isWindows: boolean) => Promise<void>;
74
+ setLegacyPalettes: ({ light, dark }: LegacyPalettes, isWindows: boolean) => Promise<void>;
75
+ setPalettes: ({ light, dark }: {
76
+ light: string;
77
+ dark: string;
78
+ }) => Promise<void>;
68
79
  /**
69
80
  * Set the current scheme of workspace. Specifically setting light or dark
70
81
  * will ignore the OS scheme, whereas 'system' will always respect it.
@@ -78,9 +89,15 @@ export declare class ThemeStorageController {
78
89
  * @param scheme The default scheme specified in the palette
79
90
  */
80
91
  setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
92
+ setGeneratedPalettes(generatedPalettes: GeneratedPalettes): void;
81
93
  /**
82
94
  * Returns the current scheme
83
95
  * @returns 'light' | 'system' | 'dark'
84
96
  */
85
97
  getScheme(): ColorSchemeOptionType;
98
+ getThemePaletteSheet(): string | undefined;
99
+ getThemePalette(): {
100
+ light: string;
101
+ dark: string;
102
+ };
86
103
  }
@@ -1,15 +1,17 @@
1
- import { ContentMenuEntry } from '@openfin/ui-library';
2
- import { DockCompanionButton, DockEntry, LaunchDockEntryPayload } from '../../../client-api-platform/src/shapes';
1
+ import type { ContentMenuEntry } from '@openfin/ui-library';
2
+ import { Collection, DockCompanionButton, DockEntry, LaunchDockEntryPayload } from '../../../client-api-platform/src/shapes';
3
3
  export declare const DockCompanionUpdatesPrefix = "dock-companion-updates";
4
4
  export declare const refreshDockBookmarksPanel: () => Promise<void>;
5
5
  export declare const updateDockFavoriteEntries: (favorites: DockEntry[]) => Promise<void>;
6
6
  export declare const updateContentMenu: (contentMenu: ContentMenuEntry[]) => Promise<void>;
7
7
  export declare const navigateContentMenu: (id: string) => Promise<void>;
8
+ export declare const refreshDockCollectionMenu: (collections: Collection[]) => Promise<void>;
8
9
  export declare const launchDockEntry: (payload: LaunchDockEntryPayload) => Promise<void>;
9
10
  export declare const setDockFavoritesOrder: (favorites: DockEntry[]) => Promise<void>;
10
11
  export declare const setDefaultDockButtonsOrder: (defaultDockButtons: DockCompanionButton[]) => Promise<void>;
11
- export declare const getDockWorkspacesContextMenu: () => Promise<import("@common/api/action").BaseCustomDropdownItem<any>[]>;
12
+ export declare const getDockWorkspacesContextMenu: () => Promise<import("@client/index").BaseCustomDropdownItem<any>[]>;
12
13
  export declare const handleDockWorkspacesMenuResponse: (payload: any) => Promise<void>;
14
+ export declare const launchCollection: (collection: Collection) => Promise<void>;
13
15
  export declare const removeFavoriteEntry: (entry: DockEntry) => Promise<void>;
14
16
  export declare const addFavoriteEntry: (entry: DockEntry) => Promise<void>;
15
17
  export declare const focusAndExpandSearchMenu: () => Promise<void>;
@@ -4,7 +4,7 @@ export declare const dispatchLanguageToBrowserWindows: (language: Locale) => Pro
4
4
  export declare const setLanguage: (locale: Locale) => Promise<void>;
5
5
  export declare function getLanguageResourcesInternal(): {
6
6
  currentLanguage: "en-US" | "ja-JP" | "zh-CN" | "ko-KR" | "ru-RU" | "de-DE" | "zh-Hant";
7
- resources: import("i18next/typescript/options").Resource;
7
+ resources: import("i18next").Resource;
8
8
  };
9
9
  /**
10
10
  * initLanguage()
@@ -1,5 +1,5 @@
1
1
  import { AnalyticsEventInternal } from '../../../../common/src/utils/usage-register';
2
2
  import { Page } from '../../../../client-api-platform/src/shapes';
3
3
  export declare const getOpenPages: () => Map<string, AnalyticsEventInternal>;
4
- export declare const addOpenPageToCache: (pageId: Page['pageId'], event: AnalyticsEventInternal) => void;
5
- export declare const removeOpenPageFromCache: (pageId: Page['pageId']) => boolean;
4
+ export declare const addOpenPageToCache: (pageId: Page["pageId"], event: AnalyticsEventInternal) => void;
5
+ export declare const removeOpenPageFromCache: (pageId: Page["pageId"]) => boolean;
@@ -1,5 +1,17 @@
1
1
  import type OpenFin from '@openfin/core';
2
+ import type { BaseThemeOptions, CustomTheme, GenerateThemeParams } from '../../../common/src/api/theming';
2
3
  import { ColorSchemeOptionType, ThemeApi } from '../../../client-api-platform/src/shapes';
3
4
  export declare const getThemingApi: (identity: OpenFin.ApplicationIdentity) => ThemeApi;
5
+ export declare const dispatchThemeToWorkspaceProvider: (themeData: {
6
+ themePaletteSheet: string;
7
+ selectedScheme: ColorSchemeOptionType;
8
+ themePalette: {
9
+ light: string;
10
+ dark: string;
11
+ };
12
+ }) => Promise<void>;
4
13
  export declare const setSelectedScheme: (schemeType: ColorSchemeOptionType) => Promise<void>;
5
14
  export declare const getSelectedScheme: () => ColorSchemeOptionType | null | undefined;
15
+ export declare const getThemePaletteSheet: () => string | undefined;
16
+ export declare const mapLegacyThemeToCustomTheme: (legacyTheme: CustomTheme) => GenerateThemeParams;
17
+ export declare const mapLegacyBrandIcons: (legacyBrand: BaseThemeOptions["brand"]) => GenerateThemeParams[1];
@@ -1 +1,12 @@
1
1
  export declare const listenForStoreClose: () => void;
2
+ export type StorageProxy = {
3
+ setItem: (data: string, value: string) => Promise<void>;
4
+ destroy: () => Promise<void>;
5
+ };
6
+ export declare const createStorageProxy: (url: string) => Promise<StorageProxy>;
7
+ /**
8
+ * Ensure the workspace storage proxy window exists. Recreates it if it was previously destroyed
9
+ * (e.g. when the last browser window closed with preventQuitOnLastWindowClosed true and a new
10
+ * browser window is now being created). Uses the factory registered at init; no-op in tests.
11
+ */
12
+ export declare const ensureWorkspaceStorageProxy: () => Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import OpenFin from '@openfin/core';
2
2
  import type { AttachedPage, AttachedPageInternal } from '../../../../common/src/api/pages/shapes';
3
3
  import { BrowserInitConfig } from '../..';
4
- export declare const applyPageDefaults: (pages: AttachedPage[], initOptions?: Pick<BrowserInitConfig, 'defaultPageOptions' | 'defaultViewOptions' | 'defaultWindowOptions'>, overrideOptions?: OpenFin.PlatformWindowCreationOptions) => Promise<AttachedPageInternal[]>;
4
+ export declare const applyPageDefaults: (pages: AttachedPage[], initOptions?: Pick<BrowserInitConfig, "defaultPageOptions" | "defaultViewOptions" | "defaultWindowOptions">, overrideOptions?: OpenFin.PlatformWindowCreationOptions) => Promise<AttachedPageInternal[]>;
@@ -1,2 +1,2 @@
1
1
  import { OpenFin } from '@openfin/core';
2
- export declare const createNonLayoutViewComponents: (overrideOptions: OpenFin.PlatformWindowCreationOptions) => Promise<void>;
2
+ export declare const createNonLayoutViewComponents: (isEnterprise: boolean, overrideOptions: OpenFin.PlatformWindowCreationOptions) => Promise<void[]>;
@@ -1,7 +1,8 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  type DefaultViewOptions = Partial<OpenFin.MutableViewOptions> & {
3
3
  downloadShelf?: OpenFin.ConstWindowOptions['downloadShelf'];
4
+ hotkeys?: OpenFin.ViewOptions['hotkeys'];
4
5
  };
5
6
  export declare const DEFAULT_VIEW_OPTIONS: DefaultViewOptions;
6
- export declare function applyViewDefaults(options: Partial<OpenFin.ViewOptions>, initViewOptions?: Partial<OpenFin.ViewOptions>): any;
7
+ export declare function applyViewDefaults(options: Partial<OpenFin.ViewOptions>, initViewOptions?: Partial<OpenFin.ViewOptions>): Promise<any>;
7
8
  export {};
@@ -7,5 +7,5 @@ type ViewStateBase = Pick<BrowserViewState, '_internalWorkspaceData' | 'workspac
7
7
  export declare const mapInternalWorkspaceDataToWorkspacePlatform: <T extends ViewStateBase>(viewState: T) => T;
8
8
  export declare const mapWorkspacePlatformToInternalWorkspaceData: <T extends ViewStateBase>(viewState: T) => T;
9
9
  export declare const setHotkeysIfNavigationButtonsEnabled: (options: BrowserCreateViewRequest) => Promise<BrowserCreateViewRequest>;
10
- export declare const registerHotkeyListenersIfEnabled: (viewIdentity: OpenFin.Identity, buttonOptions?: BrowserWorkspacePlatformViewOptions['browserNavigationButtons']) => void;
10
+ export declare const registerHotkeyListenersIfEnabled: (viewIdentity: OpenFin.Identity, buttonOptions?: BrowserWorkspacePlatformViewOptions["browserNavigationButtons"]) => void;
11
11
  export {};
@@ -1,5 +1,9 @@
1
+ import { GeneratedPalettes, NotificationIndicatorColorsParsed } from '../../../common/src/api/theming';
1
2
  import { CustomThemes } from '../shapes';
2
- export declare const getThemes: () => CustomThemes;
3
+ export declare const getThemes: () => CustomThemes | null;
4
+ export declare const getGeneratedPalettes: () => GeneratedPalettes;
5
+ export declare const getThemePaletteSheet: () => string;
6
+ export declare const getNotificationIndicatorColorsInternal: () => NotificationIndicatorColorsParsed;
3
7
  /**
4
8
  * initTheming()
5
9
  * @param customThemes array of theme objects
@@ -1,16 +1,16 @@
1
1
  import type OpenFin from '@openfin/core';
2
- import { IconProps, IconType, Languages } from '@openfin/ui-library';
3
- import { ModalResponseEvent } from '../../common/src/utils/menu-window-provider';
2
+ import type { IconProps, IconType, Languages } from '@openfin/ui-library';
3
+ import type { ModalResponseEvent } from '../../common/src/utils/menu-window-provider';
4
4
  import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/utils/usage-register';
5
- import { BaseCustomDropdownItem, CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
6
- import { Resource } from '../../common/src/api/i18next';
7
- import { TrackedSite } from '../../common/src/api/pages/idb';
8
- import { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, CreateBookmarkNodeRequest, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageLayoutsWithSelectedViews, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, UpdateBookmarkNodeRequest, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
9
- import { NotificationsCustomManifestOptions } from '../../common/src/api/shapes/notifications';
10
- import type { CustomThemes } from '../../common/src/api/theming';
11
- import { App, DockProviderConfigWithIdentity, StoreButtonConfig } from '../../client-api/src/shapes';
5
+ import type { BaseCustomDropdownItem, CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
6
+ import type { Resource } from '../../common/src/api/i18next';
7
+ import type { TrackedSite } from '../../common/src/api/pages/idb';
8
+ import type { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, CreateBookmarkNodeRequest, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageLayoutsWithSelectedViews, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, UpdateBookmarkNodeRequest, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
9
+ import type { NotificationsCustomManifestOptions } from '../../common/src/api/shapes/notifications';
10
+ import type { CustomThemes, GeneratedPalettes, NotificationIndicatorColorsParsed } from '../../common/src/api/theming';
11
+ import type { App, DockProviderConfigWithIdentity, StoreButtonConfig } from '../../client-api/src/shapes';
12
12
  import type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
13
- import { DockCompanionButton } from '../../dock3/src/shapes/index';
13
+ import type { DockCompanionButton } from '../../dock3/src/shapes/index';
14
14
  import type { AddPagesOptions, BasePageOpts, PageOpts } from '../../enterprise-api/src/shapes';
15
15
  export * from '../../dock3/src/shapes';
16
16
  export { AppManifestType } from '../../client-api/src/shapes';
@@ -18,7 +18,7 @@ export type { App, AppIntent, Image } from '../../client-api/src/shapes';
18
18
  export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
19
19
  export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs, PanelConfigHorizontal, PanelConfigVertical, PanelConfig, ExtendedPanelConfig, CopyPagePayload, HandleSaveModalOnPageClosePayload, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
20
20
  export { PanelPosition } from '../../common/src/api/pages/shapes';
21
- export type { CustomThemes, CustomThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemeSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
21
+ export type { CustomThemes, CustomThemeOptions, ThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemeSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
22
22
  export type { AnalyticsEvent } from '../../common/src/utils/usage-register';
23
23
  export type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
24
24
  /**
@@ -124,6 +124,7 @@ export declare enum GlobalContextMenuOptionType {
124
124
  Downloads = "Downloads",
125
125
  OpenStorefront = "OpenStorefront",
126
126
  ManageDesktopSignals = "ManageDesktopSignals",
127
+ FindInPage = "FindInPage",
127
128
  Appearance = "Appearance",
128
129
  Quit = "Quit",
129
130
  Custom = "Custom"
@@ -159,16 +160,16 @@ export declare enum PageTabContextMenuOptionType {
159
160
  Save = "Save",
160
161
  SaveAs = "Save As",
161
162
  NewPage = "New Page",
162
- DeletePage = "Delete Page",
163
- SaveWorkspaceAs = "SaveWorkspaceAs",
164
- Refresh = "Refresh",
165
- CloseOthers = "Close others",
166
- Delete = "Delete",
167
- Print = "Print",
168
- PrintAll = "PrintAll",
169
- PrintScreen = "PrintScreen",
170
- ManageDesktopSignals = "ManageDesktopSignals",
171
- AddToChannel = "AddToChannel",
163
+ DeletePage = "Delete Page",// Enterprise
164
+ SaveWorkspaceAs = "SaveWorkspaceAs",// Enterprise
165
+ Refresh = "Refresh",// Enterprise
166
+ CloseOthers = "Close others",// Enterprise
167
+ Delete = "Delete",// Enterprise
168
+ Print = "Print",// Enterprise
169
+ PrintAll = "PrintAll",// Enterprise
170
+ PrintScreen = "PrintScreen",// Enterprise
171
+ ManageDesktopSignals = "ManageDesktopSignals",// Enterprise
172
+ AddToChannel = "AddToChannel",// Enterprise
172
173
  Custom = "Custom"
173
174
  }
174
175
  /** @internal */
@@ -176,7 +177,8 @@ export declare enum EnterpriseMainContextMenuOptionType {
176
177
  Lock = "Lock",
177
178
  ShowHideTabs = "ShowHideTabs",
178
179
  AddToChanel = "AddToChannel",
179
- ManageDesktopSignals = "ManageDesktopSignals",
180
+ ManageDesktopSignals = "ManageDesktopSignals",// Enterprise
181
+ FindInPage = "FindInPage",// Enterprise
180
182
  Print = "Print",
181
183
  Pin = "Pin"
182
184
  }
@@ -264,6 +266,40 @@ export type InternalOpenGlobalContextMenuRequest = OpenGlobalContextMenuRequest
264
266
  rect?: DOMRect;
265
267
  };
266
268
  export type ViewTabContextMenuTemplate = OpenFin.MenuItemTemplate<ViewTabMenuData>;
269
+ /**
270
+ * UI elements within a view tab that can be navigated to via keyboard.
271
+ */
272
+ export type ViewTabElements = 'inactive-tab' | 'active-tab' | 'inactive-tab-close-button' | 'active-tab-close-button' | 'add-tab-button';
273
+ /**
274
+ * Configuration options for view tab keyboard navigation behavior.
275
+ */
276
+ export interface ViewTabOptions {
277
+ /**
278
+ * Elements in the view tab that are able to be focused using
279
+ * arrow keys when an element in the view is selected.
280
+ * The order of the items in the array have no impact.
281
+ * Note: these are not mutually exclusive and can overlap.
282
+ * Default (when undefined): ["inactive-tab","active-tab","active-tab-close-button","inactive-tab-close-button","add-tab-button"]
283
+ */
284
+ arrowNavigation?: ViewTabElements[];
285
+ /**
286
+ * Elements in the view tab that are able to be focused using
287
+ * tab and shift+tab when an element in the view is selected.
288
+ * The order of the items in the array have no impact.
289
+ * Note: these are not mutually exclusive and can overlap.
290
+ * Default (when undefined): ["active-tab","add-tab-button"]
291
+ */
292
+ tabNavigation?: ViewTabElements[];
293
+ }
294
+ /**
295
+ * Configuration options for accessibility features in the Browser.
296
+ */
297
+ export interface AccessibilityOptions {
298
+ /**
299
+ * View tab keyboard navigation options.
300
+ */
301
+ viewTabOptions?: ViewTabOptions;
302
+ }
267
303
  /**
268
304
  * Request for opening a view tab context menu in Browser.
269
305
  */
@@ -413,6 +449,7 @@ export declare enum BrowserButtonType {
413
449
  LockUnlockPage = "LockUnlockPage",
414
450
  SaveMenu = "SaveMenu",
415
451
  SavePage = "SavePage",
452
+ Download = "Download",
416
453
  Minimise = "Minimise",
417
454
  Maximise = "Maximise",
418
455
  Close = "Close",
@@ -679,6 +716,30 @@ export interface BrowserWorkspacePlatformWindowOptions {
679
716
  minWidth?: string;
680
717
  maxWidth?: string;
681
718
  };
719
+ /**
720
+ * Accessibility options for the browser window.
721
+ * These options override the default accessibility options set at the platform or browser initialization level.
722
+ *
723
+ * @example
724
+ * ```ts
725
+ * import * as WorkspacePlatform from '@openfin/workspace-platform';
726
+ *
727
+ * const platform = WorkspacePlatform.getCurrentSync();
728
+ * const browserWin = platform.Browser.createWindow({
729
+ * ...,
730
+ * workspacePlatform: {
731
+ * ...,
732
+ * accessibilityOptions: {
733
+ * viewTabOptions: {
734
+ * arrowNavigation: ["inactive-tab", "active-tab"],
735
+ * tabNavigation: ["active-tab"]
736
+ * }
737
+ * }
738
+ * }
739
+ * });
740
+ * ```
741
+ */
742
+ accessibilityOptions?: AccessibilityOptions;
682
743
  /**
683
744
  * Use when you want to display navigation buttons in Browser toolbar. Disabled by default.
684
745
  *
@@ -1718,13 +1779,40 @@ export interface LaunchAppRequest {
1718
1779
  target?: OpenFin.EntityInfo;
1719
1780
  app: App;
1720
1781
  }
1721
- /**
1722
- * Get Themes from API
1723
- */
1724
1782
  export interface ThemeApi {
1725
- getThemes(): Promise<CustomThemes>;
1783
+ /**
1784
+ * @deprecated This method is deprecated. It is recommended to use {@link getGeneratedPalettes} instead.
1785
+ * Get the legacy themes from the platform provider.
1786
+ * @returns the legacy themes or null if the platform provider is using the new theme system.
1787
+ */
1788
+ getThemes(): Promise<CustomThemes | null>;
1789
+ /**
1790
+ * Get the generated palettes from the platform provider.
1791
+ * @returns the generated palettes.
1792
+ */
1793
+ getGeneratedPalettes(): Promise<GeneratedPalettes>;
1794
+ /**
1795
+ * @internal
1796
+ * Get the theme palette sheet from the platform provider.
1797
+ * @returns the theme palette sheet.
1798
+ */
1799
+ getThemePaletteSheet(): Promise<string>;
1800
+ /**
1801
+ * Set the selected scheme for the platform provider.
1802
+ * @param newScheme the new scheme to set.
1803
+ */
1726
1804
  setSelectedScheme(newScheme: ColorSchemeOptionType): Promise<void>;
1805
+ /**
1806
+ * Get the selected scheme from the platform provider.
1807
+ * @returns the selected scheme.
1808
+ */
1727
1809
  getSelectedScheme(): Promise<ColorSchemeOptionType>;
1810
+ /**
1811
+ * @internal
1812
+ * Get the notification indicator colors from the platform provider.
1813
+ * @returns the notification indicator colors.
1814
+ */
1815
+ getNotificationIndicatorColorsInternal(): Promise<NotificationIndicatorColorsParsed | null>;
1728
1816
  }
1729
1817
  /**
1730
1818
  * Controller for a Workspace Platform.
@@ -1914,6 +2002,7 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1914
2002
  setLanguage(locale: Locale): Promise<void>;
1915
2003
  /**
1916
2004
  * Implementation for getting the notifications workspace platform configuration.
2005
+ * @deprecated Notifications config is now part of the platform manifest and is automatically resolved by the notifications API. Do not use this method as it will not return the correct configuration.
1917
2006
  */
1918
2007
  getNotificationsConfig(): Promise<NotificationsCustomManifestOptions | undefined>;
1919
2008
  /**
@@ -1988,6 +2077,18 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1988
2077
  * @internal
1989
2078
  */
1990
2079
  _handleDockWorkspacesMenuResponseInternal(payload: any): Promise<void>;
2080
+ /**
2081
+ * Retrieves companion dock content dropdown context menu.
2082
+ * @param collections
2083
+ * @internal
2084
+ */
2085
+ _refreshDockCollectionMenuInternal(collections: Collection[]): Promise<void>;
2086
+ /**
2087
+ * Launch companion dock collection
2088
+ * @param collection
2089
+ * @internal
2090
+ */
2091
+ _launchCollectionInternal(collection: Collection): Promise<void>;
1991
2092
  /**
1992
2093
  *
1993
2094
  * Finds a browser window with only a single tab on the landing page, brings it forward, and
@@ -1996,7 +2097,7 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1996
2097
  * @internal
1997
2098
  */
1998
2099
  _focusAndExpandSearchInternal(): Promise<void>;
1999
- /** Shows a popup window for Here About page with provided data parameters
2100
+ /** Shows a popup window for HERE About page with provided data parameters
2000
2101
  * @internal
2001
2102
  */
2002
2103
  _showAboutPagePopup(payload: AboutPageConfig): Promise<OpenFin.Window>;
@@ -2286,6 +2387,10 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
2286
2387
  /** @internal */
2287
2388
  handleDockWorkspacesMenuResponseInternal(payload: any): Promise<void>;
2288
2389
  /** @internal */
2390
+ refreshDockCollectionMenuInternal(collections: Collection[]): Promise<void>;
2391
+ /** @internal */
2392
+ launchCollectionInternal(collection: Collection): Promise<void>;
2393
+ /** @internal */
2289
2394
  focusAndExpandSearchInternal(): Promise<void>;
2290
2395
  /** @internal */
2291
2396
  sendUpdateVersionModalResponseInternal(payload: SendUpdateVersionModalResponsePayload): Promise<void>;
@@ -2563,6 +2668,7 @@ export interface WorkspacePlatformInitConfig {
2563
2668
  /**
2564
2669
  * Config for overriding default notifications behaviour.
2565
2670
  * Leave undefined to use OpenFin hosted Notification Center.
2671
+ * @deprecated Notifications config is now part of the platform manifest and is automatically resolved by the notifications API. Do not use this property as it will not have any effect.
2566
2672
  */
2567
2673
  notifications?: NotificationsCustomManifestOptions;
2568
2674
  /**
@@ -2793,6 +2899,28 @@ export interface BrowserInitConfig {
2793
2899
  * that are PNGs you will need to update these assets for best results.
2794
2900
  */
2795
2901
  browserIconSize?: IconSize;
2902
+ /**
2903
+ * Default accessibility options that will be applied to all browser windows.
2904
+ * These options can be overridden at the window creation level via workspacePlatform.accessibilityOptions.
2905
+ *
2906
+ * @example
2907
+ * ```ts
2908
+ * import * as WorkspacePlatform from '@openfin/workspace-platform';
2909
+ *
2910
+ * await WorkspacePlatform.init({
2911
+ * browser: {
2912
+ * title: "My Browser",
2913
+ * accessibilityOptions: {
2914
+ * viewTabOptions: {
2915
+ * arrowNavigation: ["inactive-tab", "active-tab"],
2916
+ * tabNavigation: ["active-tab"]
2917
+ * }
2918
+ * }
2919
+ * }
2920
+ * });
2921
+ * ```
2922
+ */
2923
+ accessibilityOptions?: AccessibilityOptions;
2796
2924
  /**
2797
2925
  * Override workspace platform behavior
2798
2926
  *
@@ -2825,6 +2953,10 @@ export interface Workspace {
2825
2953
  metadata?: WorkspaceMetadata;
2826
2954
  snapshot: BrowserSnapshot;
2827
2955
  }
2956
+ export interface Collection {
2957
+ collectionId: string;
2958
+ title: string;
2959
+ }
2828
2960
  /**
2829
2961
  * Request for creating a saved workspace in persistent storage.
2830
2962
  */
@@ -14,10 +14,8 @@ export declare function updatePage({ pageId, page }: {
14
14
  export declare const addRemovedTab: (payload: TrackedTab) => Promise<void>;
15
15
  export declare const popLastRemovedTab: () => Promise<TrackedTab | undefined>;
16
16
  export declare const trackVisitedSite: (payload: Site) => Promise<void>;
17
- export declare const getRecentVisitedSites: (numOfSites?: number) => Promise<TrackedSite[] | [
18
- ]>;
19
- export declare const getFrequentlyVisitedSites: () => Promise<TrackedSite[] | [
20
- ]>;
17
+ export declare const getRecentVisitedSites: (numOfSites?: number) => Promise<TrackedSite[] | []>;
18
+ export declare const getFrequentlyVisitedSites: () => Promise<TrackedSite[] | []>;
21
19
  export declare const searchSites: (payload: {
22
20
  req: SearchSitesRequest;
23
21
  } & {