@openfin/workspace 24.1.0 → 24.1.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.
- package/client-api/src/dock.test.d.ts +1 -0
- package/client-api/src/internal/providers.d.ts +26 -0
- package/client-api-platform/src/api/context-menu/index.d.ts +2 -2
- package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +17 -1
- package/client-api-platform/src/api/pages/index.d.ts +7 -2
- package/client-api-platform/src/api/theming.d.ts +2 -0
- package/client-api-platform/src/api/utils.d.ts +1 -1
- package/client-api-platform/src/init/browser-window-focus.d.ts +4 -0
- package/client-api-platform/src/init/override-callback/browser-defaults.d.ts +1 -1
- package/client-api-platform/src/init/override-callback/page-defaults.d.ts +1 -1
- package/client-api-platform/src/init/theming.d.ts +4 -3
- package/client-api-platform/src/shapes.d.ts +64 -2
- package/common/src/api/pages/attached.d.ts +0 -5
- package/common/src/api/pages/enterprise-shapes.d.ts +2 -0
- package/common/src/api/protocol/browser.d.ts +0 -2
- package/common/src/api/protocol/workspace-platform.d.ts +3 -1
- package/common/src/api/theming.d.ts +1 -0
- package/common/src/test/logger-mock.d.ts +5 -0
- package/common/src/utils/application.d.ts +7 -0
- package/common/src/utils/context-menu.d.ts +2 -2
- package/common/src/utils/enterprise-channels.d.ts +3 -0
- package/common/src/utils/modal-bounds.d.ts +20 -0
- package/common/src/utils/os.d.ts +2 -0
- package/common/src/utils/popup-window.d.ts +38 -21
- package/common/src/utils/route.d.ts +2 -0
- package/common/src/utils/window.d.ts +2 -1
- package/common/src/utils/workspace-modals.d.ts +3 -0
- package/externals.report.json +17 -17
- package/home.js +1 -2
- package/home.js.map +1 -1
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/notifications.js +1 -2
- package/notifications.js.map +1 -1
- package/package.json +4 -3
- package/store.js +1 -2
- package/store.js.map +1 -1
- package/home.js.LICENSE.txt +0 -1
- package/index.js.LICENSE.txt +0 -1
- package/notifications.js.LICENSE.txt +0 -1
- package/store.js.LICENSE.txt +0 -1
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
import { ProviderType } from '../../../common/src/api/provider';
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when attempting to use a provider that is not registered.
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* throw new ProviderNotRegisteredError('dock', 'my-dock-id');
|
|
7
|
+
* // Error: Dock Provider. Dock Provider with id my-dock-id is not currently registered.
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
2
10
|
export declare class ProviderNotRegisteredError extends Error {
|
|
3
11
|
constructor(providerType: ProviderType, id?: string);
|
|
4
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Error thrown when attempting to register a provider that is already registered.
|
|
15
|
+
* Call `deregister` before registering again.
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* throw new ProviderAlreadyRegisteredError('home', 'my-home-id');
|
|
19
|
+
* // Error: Home Provider. Home Provider with id my-home-id is already registered.
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
5
22
|
export declare class ProviderAlreadyRegisteredError extends Error {
|
|
6
23
|
constructor(providerType: ProviderType, id?: string);
|
|
7
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Error thrown when failing to retrieve a provider by ID.
|
|
27
|
+
* Typically thrown by `getProviderOrFail` when the requested provider does not exist.
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* throw new FailedToGetProviderError('storefront', 'unknown-id');
|
|
31
|
+
* // Error: Failed to get Storefront Provider. Storefront Provider with id unknown-id is not currently registered.
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
8
34
|
export declare class FailedToGetProviderError extends Error {
|
|
9
35
|
constructor(providerType: ProviderType, id?: string);
|
|
10
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import {
|
|
2
|
+
import { PopupWindowMenuType } from '../../../../common/src/utils/popup-window';
|
|
3
3
|
import { InternalOpenGlobalContextMenuRequest, InternalOpenPageTabContextMenuRequest, OpenGlobalContextMenuPayload, OpenPageTabContextMenuPayload, OpenSaveButtonContextMenuPayload, OpenSaveButtonContextMenuRequest, OpenViewTabContextMenuPayload, OpenViewTabContextMenuRequest, WorkspacePlatformProvider } from '../../../../client-api-platform/src/shapes';
|
|
4
4
|
/**
|
|
5
5
|
* Enum representing the possible anchor behaviors for positioning context menus.
|
|
@@ -17,7 +17,7 @@ export declare enum AnchorBehavior {
|
|
|
17
17
|
Center = 4
|
|
18
18
|
}
|
|
19
19
|
type ContextMenuPayload = OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload;
|
|
20
|
-
export declare const openCommonContextMenu: (payload: ContextMenuPayload, _callerIdentity: OpenFin.Identity, type?:
|
|
20
|
+
export declare const openCommonContextMenu: (payload: ContextMenuPayload, _callerIdentity: OpenFin.Identity, type?: PopupWindowMenuType, anchorBehavior?: AnchorBehavior) => Promise<void>;
|
|
21
21
|
export declare function openGlobalContextMenuInternal(this: WorkspacePlatformProvider, payload: InternalOpenGlobalContextMenuRequest & {
|
|
22
22
|
identity: OpenFin.Identity;
|
|
23
23
|
}, callerIdentity: OpenFin.Identity): Promise<void>;
|
|
@@ -31,7 +31,8 @@ export declare class ThemeStorageController {
|
|
|
31
31
|
private generatedPalettes?;
|
|
32
32
|
private workspaceStorage?;
|
|
33
33
|
private recreateFactory?;
|
|
34
|
-
|
|
34
|
+
private isLegacySinglePaletteTheme;
|
|
35
|
+
constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>);
|
|
35
36
|
/**
|
|
36
37
|
* Set the current Storage Proxy to enable Workspace Storage properties to be populated.
|
|
37
38
|
*/
|
|
@@ -63,6 +64,8 @@ export declare class ThemeStorageController {
|
|
|
63
64
|
/**
|
|
64
65
|
* Synchronize the current palette and scheme with workspace's storage instance if
|
|
65
66
|
* storage based theming is enabled. Only syncs when user has explicitly selected a scheme.
|
|
67
|
+
*
|
|
68
|
+
* Wrapped in try/catch so it does not throw
|
|
66
69
|
*/
|
|
67
70
|
trySynchronizeWorkspaceStorage: () => Promise<void>;
|
|
68
71
|
/**
|
|
@@ -84,12 +87,25 @@ export declare class ThemeStorageController {
|
|
|
84
87
|
* @param scheme 'light', 'dark' or 'system'.
|
|
85
88
|
*/
|
|
86
89
|
setScheme(scheme: ColorSchemeOptionType): void;
|
|
90
|
+
/**
|
|
91
|
+
* Clears an explicit user scheme choice (e.g. from Appearance) so resolution falls back to theme default.
|
|
92
|
+
*/
|
|
93
|
+
clearUserSelectedSchemePreference(): void;
|
|
94
|
+
setLegacySinglePaletteTheme(value: boolean): void;
|
|
95
|
+
/** @internal */
|
|
96
|
+
getIsLegacySinglePaletteTheme(): boolean;
|
|
87
97
|
/**
|
|
88
98
|
* Set the theme's default scheme from palette configuration
|
|
89
99
|
* @param scheme The default scheme specified in the palette
|
|
90
100
|
*/
|
|
91
101
|
setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
|
|
92
102
|
setGeneratedPalettes(generatedPalettes: GeneratedPalettes): void;
|
|
103
|
+
/**
|
|
104
|
+
* Write the theme palette sheet to both in-memory state and providerStorage (namespaced localStorage)
|
|
105
|
+
* immediately. This ensures the theme is available for themeLoader on same-origin pages
|
|
106
|
+
* without waiting for the workspace storage proxy to be initialised.
|
|
107
|
+
*/
|
|
108
|
+
setThemePaletteSheet(sheet: string): void;
|
|
93
109
|
/**
|
|
94
110
|
* Returns the current scheme
|
|
95
111
|
* @returns 'light' | 'system' | 'dark'
|
|
@@ -26,10 +26,15 @@ export declare const getActivePageIdForWindow: (identity: OpenFin.Identity) => P
|
|
|
26
26
|
*
|
|
27
27
|
* If the name is not unique, it will append a number to the end of the name.
|
|
28
28
|
*
|
|
29
|
+
* When `BrowserInitConfig.allowDuplicatePageTitles` is `true`, this function
|
|
30
|
+
* short-circuits and returns the supplied name (or the default title) as-is,
|
|
31
|
+
* without appending a numeric suffix.
|
|
32
|
+
*
|
|
29
33
|
* @param initialName The initial name to test
|
|
30
|
-
* @
|
|
34
|
+
* @param allowDuplicatePageTitles Whether duplicate page titles are permitted
|
|
35
|
+
* @returns string: a unique page name (or the input unchanged when duplicates are allowed)
|
|
31
36
|
*/
|
|
32
|
-
export declare function getUniquePageTitle(initialName?: string): Promise<string>;
|
|
37
|
+
export declare function getUniquePageTitle(initialName?: string, allowDuplicatePageTitles?: boolean): Promise<string>;
|
|
33
38
|
export declare function handleSaveModalOnPageClose({ page }: HandleSaveModalOnPageClosePayload): Promise<SaveModalOnPageCloseResult>;
|
|
34
39
|
/**
|
|
35
40
|
* Default implementation of shouldPageClose. If enableBeforeUnload isn't set to true, always returns True (proceed with close).
|
|
@@ -12,6 +12,8 @@ export declare const dispatchThemeToWorkspaceProvider: (themeData: {
|
|
|
12
12
|
}) => Promise<void>;
|
|
13
13
|
export declare const setSelectedScheme: (schemeType: ColorSchemeOptionType) => Promise<void>;
|
|
14
14
|
export declare const getSelectedScheme: () => ColorSchemeOptionType | null | undefined;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const getIsLegacySinglePaletteTheme: () => boolean;
|
|
15
17
|
export declare const getThemePaletteSheet: () => string | undefined;
|
|
16
18
|
export declare const mapLegacyThemeToCustomTheme: (legacyTheme: CustomTheme) => GenerateThemeParams;
|
|
17
19
|
export declare const mapLegacyBrandIcons: (legacyBrand: BaseThemeOptions["brand"]) => GenerateThemeParams[1];
|
|
@@ -3,7 +3,7 @@ export type StorageProxy = {
|
|
|
3
3
|
setItem: (data: string, value: string) => Promise<void>;
|
|
4
4
|
destroy: () => Promise<void>;
|
|
5
5
|
};
|
|
6
|
-
export declare const createStorageProxy: (url: string) => Promise<StorageProxy>;
|
|
6
|
+
export declare const createStorageProxy: (url: string, isEnterprise: boolean) => Promise<StorageProxy>;
|
|
7
7
|
/**
|
|
8
8
|
* Ensure the workspace storage proxy window exists. Recreates it if it was previously destroyed
|
|
9
9
|
* (e.g. when the last browser window closed with preventQuitOnLastWindowClosed true and a new
|
|
@@ -4,6 +4,10 @@ import type OpenFin from '@openfin/core';
|
|
|
4
4
|
* @returns {Promise<OpenFin.Identity | undefined>} The last focused browser window identity, or undefined if not found.
|
|
5
5
|
*/
|
|
6
6
|
export declare function getLastFocusedBrowserWindow(): Promise<OpenFin.Identity | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Gets all browser windows
|
|
9
|
+
*/
|
|
10
|
+
export declare function getAllBrowserWindows(): Promise<OpenFin.Window[]>;
|
|
7
11
|
/**
|
|
8
12
|
* Gets the last focused browser window that isn't minimized.
|
|
9
13
|
* @returns {Promise<OpenFin.Identity | undefined>} The last focused browser window identity that isn't minimized, or undefined if not found.
|
|
@@ -4,4 +4,4 @@ import { BrowserInitConfig } from '../../../../client-api-platform/src/shapes';
|
|
|
4
4
|
/**
|
|
5
5
|
* Applies default options to the creation of browser windows.
|
|
6
6
|
*/
|
|
7
|
-
export declare function applyBrowserDefaults(options: OpenFin.PlatformWindowCreationOptions, initOptions: Pick<BrowserInitConfig, 'defaultWindowOptions' | 'defaultPageOptions' | 'defaultViewOptions' | 'browserIconSize'> | undefined, themeData?: PreloadedThemeData): Promise<OpenFin.PlatformWindowCreationOptions>;
|
|
7
|
+
export declare function applyBrowserDefaults(options: OpenFin.PlatformWindowCreationOptions, initOptions: Pick<BrowserInitConfig, 'defaultWindowOptions' | 'defaultPageOptions' | 'defaultViewOptions' | 'browserIconSize' | 'allowDuplicatePageTitles'> | undefined, themeData?: PreloadedThemeData): Promise<OpenFin.PlatformWindowCreationOptions>;
|
|
@@ -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" | "allowDuplicatePageTitles">, overrideOptions?: OpenFin.PlatformWindowCreationOptions) => Promise<AttachedPageInternal[]>;
|
|
@@ -4,10 +4,11 @@ export declare const getThemes: () => CustomThemes | null;
|
|
|
4
4
|
export declare const getGeneratedPalettes: () => GeneratedPalettes;
|
|
5
5
|
export declare const getThemePaletteSheet: () => string;
|
|
6
6
|
export declare const getNotificationIndicatorColorsInternal: () => NotificationIndicatorColorsParsed;
|
|
7
|
+
export declare const isThemePreInitialised: () => boolean;
|
|
7
8
|
/**
|
|
8
9
|
* initTheming()
|
|
9
10
|
* @param customThemes array of theme objects
|
|
10
|
-
* Accepts an array of CustomThemes objects and stores it
|
|
11
|
-
*
|
|
11
|
+
* Accepts an array of CustomThemes objects and stores it.
|
|
12
|
+
* Sets themePreInitialised to true so subsequent calls are no-ops.
|
|
12
13
|
*/
|
|
13
|
-
export
|
|
14
|
+
export declare const initTheming: (customThemes: CustomThemes | undefined) => Promise<void>;
|
|
@@ -666,6 +666,19 @@ export interface BrowserCreateViewRequest extends OpenFin.PlatformViewCreationOp
|
|
|
666
666
|
export interface BrowserViewState extends OpenFin.ViewState {
|
|
667
667
|
workspacePlatform?: BrowserWorkspacePlatformViewOptions;
|
|
668
668
|
}
|
|
669
|
+
/**
|
|
670
|
+
* Enables or disables the tab-search chevron button for a specific tab location.
|
|
671
|
+
*/
|
|
672
|
+
export interface TabSearchLocationOptions {
|
|
673
|
+
enabled: boolean;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Configures where tab-search chevron buttons should be shown in a browser window.
|
|
677
|
+
*/
|
|
678
|
+
export interface TabSearchButtonOptions {
|
|
679
|
+
pageTabs?: TabSearchLocationOptions;
|
|
680
|
+
viewTabs?: TabSearchLocationOptions;
|
|
681
|
+
}
|
|
669
682
|
export interface BrowserWorkspacePlatformWindowOptions {
|
|
670
683
|
/** For internal usage. Defaults to 'browser' when Browser is enabled when the WorkspacePlatform is initialized. In order to use
|
|
671
684
|
* non-Browser layout windows ('platform' windows) in a Browser-enabled workspace platform, set windowType to `platform`. In that instance, the other properties
|
|
@@ -716,6 +729,32 @@ export interface BrowserWorkspacePlatformWindowOptions {
|
|
|
716
729
|
minWidth?: string;
|
|
717
730
|
maxWidth?: string;
|
|
718
731
|
};
|
|
732
|
+
/**
|
|
733
|
+
* Controls whether tab-search chevron buttons are shown for page tabs and view tabs.
|
|
734
|
+
*
|
|
735
|
+
* By default, both locations are disabled unless explicitly enabled.
|
|
736
|
+
*
|
|
737
|
+
* @example
|
|
738
|
+
* ```ts
|
|
739
|
+
* workspacePlatform: {
|
|
740
|
+
* tabSearchButton: {
|
|
741
|
+
* viewTabs: { enabled: true },
|
|
742
|
+
* pageTabs: { enabled: true }
|
|
743
|
+
* }
|
|
744
|
+
* }
|
|
745
|
+
* ```
|
|
746
|
+
*
|
|
747
|
+
* @example
|
|
748
|
+
* ```ts
|
|
749
|
+
* workspacePlatform: {
|
|
750
|
+
* tabSearchButton: {
|
|
751
|
+
* viewTabs: { enabled: true },
|
|
752
|
+
* // pageTabs omitted: disabled
|
|
753
|
+
* }
|
|
754
|
+
* }
|
|
755
|
+
* ```
|
|
756
|
+
*/
|
|
757
|
+
tabSearchButton?: TabSearchButtonOptions;
|
|
719
758
|
/**
|
|
720
759
|
* Accessibility options for the browser window.
|
|
721
760
|
* These options override the default accessibility options set at the platform or browser initialization level.
|
|
@@ -813,6 +852,12 @@ export interface BrowserWorkspacePlatformWindowOptions {
|
|
|
813
852
|
* Taskbar Icon for the Browser Window. If light and dark icon are defined, then the taskbar icon will change when the scheme changes.
|
|
814
853
|
*/
|
|
815
854
|
icon?: string | TaskbarIcon;
|
|
855
|
+
/**
|
|
856
|
+
* The size of icons in the browser window. This is set from the platform-level
|
|
857
|
+
* `browserIconSize` option during window creation.
|
|
858
|
+
* @internal Propagated from BrowserInitConfig.browserIconSize
|
|
859
|
+
*/
|
|
860
|
+
browserIconSize?: IconSize;
|
|
816
861
|
}
|
|
817
862
|
/**
|
|
818
863
|
* Request for creating a browser window.
|
|
@@ -1818,6 +1863,11 @@ export interface ThemeApi {
|
|
|
1818
1863
|
* @returns the selected scheme.
|
|
1819
1864
|
*/
|
|
1820
1865
|
getSelectedScheme(): Promise<ColorSchemeOptionType>;
|
|
1866
|
+
/**
|
|
1867
|
+
* @internal
|
|
1868
|
+
* Whether the active platform theme is a legacy theme defined with a single shared palette (light and dark are not independently specified).
|
|
1869
|
+
*/
|
|
1870
|
+
getIsLegacySinglePaletteTheme(): Promise<boolean>;
|
|
1821
1871
|
/**
|
|
1822
1872
|
* @internal
|
|
1823
1873
|
* Get the notification indicator colors from the platform provider.
|
|
@@ -2259,6 +2309,11 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
|
|
|
2259
2309
|
* @param schemeType {@link ColorSchemeOptionType scheme} to be set
|
|
2260
2310
|
*/
|
|
2261
2311
|
setSelectedScheme(schemeType: ColorSchemeOptionType): Promise<void>;
|
|
2312
|
+
/**
|
|
2313
|
+
* @internal
|
|
2314
|
+
* Whether the active platform theme is a legacy single-palette theme (Appearance scheme switching is not supported).
|
|
2315
|
+
*/
|
|
2316
|
+
getIsLegacySinglePaletteTheme(): boolean;
|
|
2262
2317
|
/**
|
|
2263
2318
|
* Implementation for handling Workspace analytics events
|
|
2264
2319
|
* @param req the payload received by the provider
|
|
@@ -2829,7 +2884,6 @@ export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<Workspa
|
|
|
2829
2884
|
export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
|
|
2830
2885
|
/**
|
|
2831
2886
|
* Content menu entry shape cloned and re-exported from UI Library.
|
|
2832
|
-
* @internal
|
|
2833
2887
|
*/
|
|
2834
2888
|
export type ContentMenuEntry = {
|
|
2835
2889
|
bookmarked?: boolean;
|
|
@@ -2857,7 +2911,6 @@ export type BookmarkDockEntryPayload = {
|
|
|
2857
2911
|
};
|
|
2858
2912
|
/**
|
|
2859
2913
|
* Represents dock entry for favorites
|
|
2860
|
-
* @internal
|
|
2861
2914
|
*/
|
|
2862
2915
|
export type DockEntry = {
|
|
2863
2916
|
type: 'folder';
|
|
@@ -2958,6 +3011,15 @@ export interface BrowserInitConfig {
|
|
|
2958
3011
|
* @internal
|
|
2959
3012
|
*/
|
|
2960
3013
|
aiPanelOptions?: AiPanelOptions;
|
|
3014
|
+
/**
|
|
3015
|
+
* When true, allows multiple pages to share the same title across browser
|
|
3016
|
+
* windows. No numeric suffixes are appended and attach/add operations
|
|
3017
|
+
* will not reject on title collision. `pageId` remains the unique
|
|
3018
|
+
* identifier for all page operations.
|
|
3019
|
+
*
|
|
3020
|
+
* Defaults to `false` (current unique-title behavior preserved).
|
|
3021
|
+
*/
|
|
3022
|
+
allowDuplicatePageTitles?: boolean;
|
|
2961
3023
|
}
|
|
2962
3024
|
interface WorkspaceMetadata {
|
|
2963
3025
|
APIVersion: string;
|
|
@@ -61,11 +61,6 @@ export declare const updatePageForWindow: (payload: ExtendedUpdatePageForWindowP
|
|
|
61
61
|
* @param identity the identity of the window to save the pages of in window options.
|
|
62
62
|
*/
|
|
63
63
|
export declare const updatePagesWindowOptions: (identity: OpenFin.Identity) => Promise<void>;
|
|
64
|
-
/**
|
|
65
|
-
* Check if the window identity is currently detaching pages.
|
|
66
|
-
* @param identity the OF window identity to check.
|
|
67
|
-
*/
|
|
68
|
-
export declare const isDetachingPages: (identity: OpenFin.Identity) => Promise<boolean>;
|
|
69
64
|
/**
|
|
70
65
|
* Check if the window identity is in the middle of changing active pages.
|
|
71
66
|
* @param identity the OF window identity to check.
|
|
@@ -34,6 +34,8 @@ export interface Page {
|
|
|
34
34
|
contextGroup?: string;
|
|
35
35
|
/** Optional property to attach custom metadata to the page object, such as version or timestamp. Must be serializable. */
|
|
36
36
|
customData?: any;
|
|
37
|
+
/** True when this page is an admin-published supertab. */
|
|
38
|
+
isPublished?: boolean;
|
|
37
39
|
}
|
|
38
40
|
type AttachedPageMetadata = {
|
|
39
41
|
/** The window the page is currently attached to. */
|
|
@@ -52,7 +52,6 @@ export declare enum PageChannelAction {
|
|
|
52
52
|
ReorderPagesForWindow = "reorder-pages-for-window",
|
|
53
53
|
UpdatePageForWindow = "update-page-for-window",
|
|
54
54
|
UpdatePagesWindowOptions = "update-pages-window-options",
|
|
55
|
-
IsDetachingPages = "is-detaching-pages",
|
|
56
55
|
IsActivePageChanging = "is-active-page-changing"
|
|
57
56
|
}
|
|
58
57
|
/**
|
|
@@ -103,7 +102,6 @@ export declare const BrowserChannelAction: {
|
|
|
103
102
|
ReorderPagesForWindow: PageChannelAction.ReorderPagesForWindow;
|
|
104
103
|
UpdatePageForWindow: PageChannelAction.UpdatePageForWindow;
|
|
105
104
|
UpdatePagesWindowOptions: PageChannelAction.UpdatePagesWindowOptions;
|
|
106
|
-
IsDetachingPages: PageChannelAction.IsDetachingPages;
|
|
107
105
|
IsActivePageChanging: PageChannelAction.IsActivePageChanging;
|
|
108
106
|
CloseBrowserWindow: GeneralBrowserChannelActions.CloseBrowserWindow;
|
|
109
107
|
QuitPlatform: GeneralBrowserChannelActions.QuitPlatform;
|
|
@@ -97,7 +97,9 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
97
97
|
SendUpdateVersionModalResponseInternal = "sendUpdateVersionModalResponseInternal",// Enterprise
|
|
98
98
|
ShowUpdateVersionModalInternal = "showUpdateVersionModalInternal",// Enterprise
|
|
99
99
|
ShowApplyAndPublishModalInternal = "showApplyAndPublishModalInternal",// Enterprise
|
|
100
|
-
GetNotificationIndicatorColorsInternal = "getNotificationIndicatorColorsInternal"
|
|
100
|
+
GetNotificationIndicatorColorsInternal = "getNotificationIndicatorColorsInternal",// Custom Notification Indicators Colors
|
|
101
|
+
/** @internal */
|
|
102
|
+
GetIsLegacySinglePaletteTheme = "getIsLegacySinglePaletteTheme"
|
|
101
103
|
}
|
|
102
104
|
export type PlatFormSupportedFeatures = boolean | {
|
|
103
105
|
isWorkspacePlatform: boolean;
|
|
@@ -29,6 +29,7 @@ interface EnterpriseBrandIcons {
|
|
|
29
29
|
* Internal brand options for Enterprise Browser
|
|
30
30
|
*/
|
|
31
31
|
symbol: string;
|
|
32
|
+
wordmark?: string;
|
|
32
33
|
}
|
|
33
34
|
export interface ThemeExtension extends DefaultTheme {
|
|
34
35
|
notificationIndicatorColors?: Record<string, Omit<NotificationIndicatorColorsSet, 'foreground'> & {
|
|
@@ -30,3 +30,10 @@ export declare const getWorkspaceOFApplication: () => OpenFin.Application;
|
|
|
30
30
|
* @returns A Promise resolving to the application manifest
|
|
31
31
|
*/
|
|
32
32
|
export declare const getCachedManifest: () => Promise<OpenFin.Manifest>;
|
|
33
|
+
/**
|
|
34
|
+
* Gets application info, caching the result after the first call.
|
|
35
|
+
* Application info (manifestUrl, licenseKey, runtime version, etc.) never changes
|
|
36
|
+
* during the application lifecycle. Multiple callers (overrides, sentry, analytics)
|
|
37
|
+
* share a single IPC call.
|
|
38
|
+
*/
|
|
39
|
+
export declare const getCachedAppInfo: () => Promise<OpenFin.ApplicationInfo>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { AnchorBehavior } from '../../../client-api-platform/src/api/context-menu';
|
|
3
3
|
import { PageTabContextMenuItemTemplate, ViewTabContextMenuTemplate } from '../../../client-api-platform/src/shapes';
|
|
4
|
-
import {
|
|
4
|
+
import { PopupWindowMenuType } from './popup-window';
|
|
5
5
|
export declare enum MenuItemType {
|
|
6
6
|
Label = "normal",
|
|
7
7
|
Separator = "separator",
|
|
@@ -13,7 +13,7 @@ export type ShowContextMenuResponse = OpenFin.MenuResult & {
|
|
|
13
13
|
requestId?: string;
|
|
14
14
|
};
|
|
15
15
|
export declare function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window): Promise<ShowContextMenuResponse>;
|
|
16
|
-
export declare const showEnterpriseContextMenu: (opts: OpenFin.ShowPopupMenuOptions, type:
|
|
16
|
+
export declare const showEnterpriseContextMenu: (opts: OpenFin.ShowPopupMenuOptions, type: PopupWindowMenuType, anchorBehavior: AnchorBehavior, win?: OpenFin.Window) => Promise<ShowContextMenuResponse>;
|
|
17
17
|
export declare const Separator: OpenFin.MenuItemTemplate;
|
|
18
18
|
export declare const EmptyContextMenuItem: OpenFin.MenuItemTemplate;
|
|
19
19
|
export declare const DefaultSaveMenuBounds: {
|
|
@@ -16,3 +16,6 @@ export declare const connectToEnterpriseContentChannel: (uuid: string) => Promis
|
|
|
16
16
|
export declare const connectToEnterpriseModalChannel: (uuid: string) => Promise<OpenFin.ChannelClient>;
|
|
17
17
|
export declare const createZoomControlsDialogChannel: () => Promise<OpenFin.ChannelProvider>;
|
|
18
18
|
export declare const connectToZoomControlsDialogChannel: () => Promise<OpenFin.ChannelClient>;
|
|
19
|
+
export declare const getTabSearchChannelName: () => string;
|
|
20
|
+
export declare const createTabSearchChannel: () => Promise<OpenFin.ChannelProvider>;
|
|
21
|
+
export declare const connectToTabSearchChannel: () => Promise<OpenFin.ChannelClient>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { AnchorBehavior } from '../../../client-api-platform/src/api/context-menu';
|
|
2
3
|
import { ResponseModalConfig } from './menu-config';
|
|
3
4
|
import { Point } from './window';
|
|
4
5
|
/**
|
|
@@ -59,3 +60,22 @@ export declare function getBoundsCenteredAndFitOnMonitor(height: number, width:
|
|
|
59
60
|
left: number;
|
|
60
61
|
top: number;
|
|
61
62
|
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Calculates the final popup bounds relative to a parent window, accounting for:
|
|
65
|
+
* - Windows 10/11 maximized window shadow offset (Electron bug)
|
|
66
|
+
* - Anchor behavior (e.g. BottomRight, TopLeft)
|
|
67
|
+
* - Off-screen clamping to keep the popup within monitor bounds
|
|
68
|
+
*
|
|
69
|
+
* @param parentIdentity - The identity of the parent window.
|
|
70
|
+
* @param contentDimensions - The width and height of the popup content.
|
|
71
|
+
* @param position - The desired x/y position relative to the parent window.
|
|
72
|
+
* @param anchorBehavior - Optional anchor behavior to adjust positioning.
|
|
73
|
+
* @returns Bounds relative to the parent window, clamped to the nearest monitor.
|
|
74
|
+
*/
|
|
75
|
+
export declare const getPopupBoundsRelativeToParent: (parentIdentity: OpenFin.Identity, contentDimensions: {
|
|
76
|
+
width: number;
|
|
77
|
+
height: number;
|
|
78
|
+
}, position: {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
}, anchorBehavior?: AnchorBehavior) => Promise<OpenFin.Bounds>;
|
package/common/src/utils/os.d.ts
CHANGED
|
@@ -39,19 +39,19 @@ export type BrowserSearchMenuKeyboardEvent = {
|
|
|
39
39
|
altKey?: boolean;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
export declare enum
|
|
42
|
+
export declare enum PopupWindowMenuType {
|
|
43
43
|
GlobalMenu = "global-menu",
|
|
44
44
|
ContextMenu = "context-menu",
|
|
45
45
|
RenameSupertab = "rename-supertab",
|
|
46
46
|
AddEditBookmark = "add-edit-bookmark",
|
|
47
47
|
DropdownMenu = "dropdown-menu",
|
|
48
|
-
|
|
48
|
+
TabSearch = "tab-search"
|
|
49
49
|
}
|
|
50
50
|
export type BookmarkButtonPayload = {
|
|
51
51
|
selectedViewIdentity: OpenFin.Identity;
|
|
52
52
|
};
|
|
53
|
-
export type
|
|
54
|
-
type:
|
|
53
|
+
export type BasePopupMenuChannelMessage = {
|
|
54
|
+
type: PopupWindowMenuType;
|
|
55
55
|
/**
|
|
56
56
|
* The identity of the window the dialog/menu invocation came from.
|
|
57
57
|
*/
|
|
@@ -67,29 +67,35 @@ export type BaseEnterpriseMenuChannelMessage = {
|
|
|
67
67
|
x: number;
|
|
68
68
|
y: number;
|
|
69
69
|
};
|
|
70
|
-
export type ContextMenuChannelMessage =
|
|
71
|
-
type:
|
|
70
|
+
export type ContextMenuChannelMessage = BasePopupMenuChannelMessage & {
|
|
71
|
+
type: PopupWindowMenuType.ContextMenu | PopupWindowMenuType.GlobalMenu;
|
|
72
72
|
/**
|
|
73
73
|
* The unique request ID of the context menu invocation.
|
|
74
74
|
*/
|
|
75
75
|
requestId: string;
|
|
76
76
|
payload: OpenFin.ShowPopupMenuOptions;
|
|
77
77
|
};
|
|
78
|
-
export type BookmarkDialogChannelMessage =
|
|
79
|
-
type:
|
|
78
|
+
export type BookmarkDialogChannelMessage = BasePopupMenuChannelMessage & {
|
|
79
|
+
type: PopupWindowMenuType.AddEditBookmark;
|
|
80
80
|
payload: BookmarkButtonPayload;
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
/** Sent from browser to zoom dialog window to position and hydrate UI (initial open or live sync). */
|
|
83
|
+
export type ZoomControlsDialogStateMessage = {
|
|
84
|
+
/**
|
|
85
|
+
* The identity of the window the dialog/menu invocation came from.
|
|
86
|
+
*/
|
|
87
|
+
parentIdentity: OpenFin.Identity;
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
payload: {
|
|
91
|
+
selectedViewIdentity?: OpenFin.Identity;
|
|
92
|
+
zoomPercent?: number;
|
|
93
|
+
openedViaMouseClick?: boolean;
|
|
94
|
+
};
|
|
90
95
|
};
|
|
91
|
-
export
|
|
92
|
-
|
|
96
|
+
export declare const ZOOM_DIALOG_CHANNEL_ACTION: "state";
|
|
97
|
+
export type DropdownMenuChannelMessage = BasePopupMenuChannelMessage & {
|
|
98
|
+
type: PopupWindowMenuType.DropdownMenu;
|
|
93
99
|
payload: {
|
|
94
100
|
template: Array<OpenFin.MenuItemTemplate>;
|
|
95
101
|
/**
|
|
@@ -98,8 +104,8 @@ export type DropdownMenuChannelMessage = BaseEnterpriseMenuChannelMessage & {
|
|
|
98
104
|
width: number;
|
|
99
105
|
};
|
|
100
106
|
};
|
|
101
|
-
export type RenameSupertabChannelMessage =
|
|
102
|
-
type:
|
|
107
|
+
export type RenameSupertabChannelMessage = BasePopupMenuChannelMessage & {
|
|
108
|
+
type: PopupWindowMenuType.RenameSupertab;
|
|
103
109
|
payload: {
|
|
104
110
|
/**
|
|
105
111
|
* The pageId of the page being renamed.
|
|
@@ -107,6 +113,18 @@ export type RenameSupertabChannelMessage = BaseEnterpriseMenuChannelMessage & {
|
|
|
107
113
|
pageId: string;
|
|
108
114
|
};
|
|
109
115
|
};
|
|
116
|
+
export type TabSearchModalContent = {
|
|
117
|
+
variant: 'page' | 'view';
|
|
118
|
+
tabs: {
|
|
119
|
+
title: string;
|
|
120
|
+
id: string;
|
|
121
|
+
}[];
|
|
122
|
+
};
|
|
123
|
+
export type TabSearchChannelMessage = BasePopupMenuChannelMessage & {
|
|
124
|
+
type: PopupWindowMenuType.TabSearch;
|
|
125
|
+
requestId: string;
|
|
126
|
+
payload: TabSearchModalContent;
|
|
127
|
+
};
|
|
110
128
|
export type SearchMenuChannelResponse = {
|
|
111
129
|
type: 'ready';
|
|
112
130
|
} | {
|
|
@@ -135,5 +153,4 @@ export type SearchMenuChannelResponse = {
|
|
|
135
153
|
type: 'single-provider-results-announcement';
|
|
136
154
|
message: string;
|
|
137
155
|
};
|
|
138
|
-
export declare function showPopupWin<T extends keyof UserMenuParams>(parentWindow: OpenFin.Window, params: UserMenuParams[T], windowOpts: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
|
|
139
156
|
export {};
|
|
@@ -31,6 +31,7 @@ declare enum BrowserRoute {
|
|
|
31
31
|
EnterpriseAboutPage = "/popup-menu/about/",
|
|
32
32
|
StorageProxy = "/storage-proxy",
|
|
33
33
|
DropdownMenu = "/dropdown-menu/",
|
|
34
|
+
TabSearchModal = "/popup-menu/tab-search-modal/",
|
|
34
35
|
EnterpriseDock = "/dock/",
|
|
35
36
|
ZoomControlsDialog = "/zoom-controls-dialog/",
|
|
36
37
|
DesktopSignalsModal = "/popup-menu/desktop-signals-modal/",
|
|
@@ -54,6 +55,7 @@ declare const PageRoute: {
|
|
|
54
55
|
EnterpriseAboutPage: BrowserRoute.EnterpriseAboutPage;
|
|
55
56
|
StorageProxy: BrowserRoute.StorageProxy;
|
|
56
57
|
DropdownMenu: BrowserRoute.DropdownMenu;
|
|
58
|
+
TabSearchModal: BrowserRoute.TabSearchModal;
|
|
57
59
|
EnterpriseDock: BrowserRoute.EnterpriseDock;
|
|
58
60
|
ZoomControlsDialog: BrowserRoute.ZoomControlsDialog;
|
|
59
61
|
DesktopSignalsModal: BrowserRoute.DesktopSignalsModal;
|
|
@@ -19,10 +19,12 @@ export declare enum WindowName {
|
|
|
19
19
|
DockSaveWorkspaceMenu = "openfin-dock3-save-workspace-menu",
|
|
20
20
|
DropdownMenu = "openfin-enterprise-dropdown-menu",
|
|
21
21
|
EnterpriseContextMenu = "openfin-enterprise-context-menu",
|
|
22
|
+
TabSearchMenu = "openfin-browser-tab-search-menu",
|
|
22
23
|
EnterpriseBookmarkDialogWindow = "openfin-enterprise-bookmark-dialog",
|
|
23
24
|
ZoomControlsDialog = "here-zoom-controls-dialog",
|
|
24
25
|
UpdateVersionModal = "here-update-version-modal",
|
|
25
26
|
ApplyAndPublishModal = "here-apply-and-publish-modal",
|
|
27
|
+
PublishOnCloseModal = "here-publish-on-close-modal",
|
|
26
28
|
DesktopSignalsModal = "here-desktop-signals-modal",
|
|
27
29
|
IntentsResolverModal = "here-intents-resolver-modal"
|
|
28
30
|
}
|
|
@@ -144,7 +146,6 @@ export declare function animateSize(width: number, height: number): Promise<void
|
|
|
144
146
|
* @returns boolean
|
|
145
147
|
*/
|
|
146
148
|
export declare const isBrowserWindow: (identity: OpenFin.Identity) => Promise<any>;
|
|
147
|
-
export declare const isModalWindowExceptZoomDialog: (identity: OpenFin.Identity) => boolean;
|
|
148
149
|
/**
|
|
149
150
|
* Force document body size. Called when resizing or on scaling changes.
|
|
150
151
|
*/
|
|
@@ -35,6 +35,9 @@ export declare const showUpdateVersionModal: ({ identity, title, description }:
|
|
|
35
35
|
description: string;
|
|
36
36
|
}) => Promise<ModalResponseEvent["data"]>;
|
|
37
37
|
export declare const showApplyAndPublishModal: (identity: OpenFin.Identity) => Promise<boolean>;
|
|
38
|
+
export declare const showPublishOnCloseModal: (windowIdentity: OpenFin.Identity) => Promise<{
|
|
39
|
+
data: ModalResponseEvent["data"];
|
|
40
|
+
}>;
|
|
38
41
|
/**
|
|
39
42
|
* Shows the intents resolver modal and returns the user's selection
|
|
40
43
|
* @param request - The request containing modal configuration
|