@openfin/workspace 24.1.0 → 24.1.2
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/app-directory.d.ts +1 -1
- 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/index.d.ts +1 -1
- 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 +86 -3
- package/common/src/api/pages/attached.d.ts +0 -5
- package/common/src/api/pages/enterprise-shapes.d.ts +4 -0
- package/common/src/api/pages/shapes.d.ts +8 -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/env.d.ts +1 -1
- package/common/src/utils/indicators/showIndicator.d.ts +8 -1
- package/common/src/utils/indicators/workspace-indicators.d.ts +13 -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/dock3/src/api/protocol.d.ts +2 -0
- package/externals.report.json +1 -1
- 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/common/src/api/tabs.d.ts +0 -16
- 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
|
}
|
|
@@ -7,7 +7,7 @@ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site }
|
|
|
7
7
|
* @param app the app directory entry.
|
|
8
8
|
* @param opts launch options.
|
|
9
9
|
*/
|
|
10
|
-
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.
|
|
10
|
+
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.View | OpenFin.Identity | OpenFin.Platform | OpenFin.Application>;
|
|
11
11
|
export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
|
|
12
12
|
export declare function getResults(payload: {
|
|
13
13
|
req: SearchSitesRequest;
|
|
@@ -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.
|
|
@@ -35,4 +35,4 @@ import { WorkspacePlatformInitConfig } from '../../../client-api-platform/src/sh
|
|
|
35
35
|
* ```
|
|
36
36
|
* @param options options for configuring the platform.
|
|
37
37
|
*/
|
|
38
|
-
export declare const init: (
|
|
38
|
+
export declare const init: (config: WorkspacePlatformInitConfig) => Promise<OpenFin.Platform>;
|
|
@@ -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>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import type { IconProps, IconType, Languages } from '@openfin/ui-library';
|
|
3
3
|
import type { ModalResponseEvent } from '../../common/src/utils/menu-window-provider';
|
|
4
|
+
import type { WorkspaceIndicatorConfig } from '../../common/src/utils/indicators/workspace-indicators';
|
|
4
5
|
import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/utils/usage-register';
|
|
5
6
|
import type { BaseCustomDropdownItem, CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
|
|
6
7
|
import type { Resource } from '../../common/src/api/i18next';
|
|
@@ -160,6 +161,10 @@ export declare enum PageTabContextMenuOptionType {
|
|
|
160
161
|
Save = "Save",
|
|
161
162
|
SaveAs = "Save As",
|
|
162
163
|
NewPage = "New Page",
|
|
164
|
+
/** Enterprise Browser: toggle Golden Layout view tab headers (multi-view Supertabs).
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
ShowHideTabs = "ShowHideTabs",// Enterprise
|
|
163
168
|
DeletePage = "Delete Page",// Enterprise
|
|
164
169
|
SaveWorkspaceAs = "SaveWorkspaceAs",// Enterprise
|
|
165
170
|
Refresh = "Refresh",// Enterprise
|
|
@@ -175,7 +180,6 @@ export declare enum PageTabContextMenuOptionType {
|
|
|
175
180
|
/** @internal */
|
|
176
181
|
export declare enum EnterpriseMainContextMenuOptionType {
|
|
177
182
|
Lock = "Lock",
|
|
178
|
-
ShowHideTabs = "ShowHideTabs",
|
|
179
183
|
AddToChanel = "AddToChannel",
|
|
180
184
|
ManageDesktopSignals = "ManageDesktopSignals",// Enterprise
|
|
181
185
|
FindInPage = "FindInPage",// Enterprise
|
|
@@ -666,6 +670,19 @@ export interface BrowserCreateViewRequest extends OpenFin.PlatformViewCreationOp
|
|
|
666
670
|
export interface BrowserViewState extends OpenFin.ViewState {
|
|
667
671
|
workspacePlatform?: BrowserWorkspacePlatformViewOptions;
|
|
668
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
* Enables or disables the tab-search chevron button for a specific tab location.
|
|
675
|
+
*/
|
|
676
|
+
export interface TabSearchLocationOptions {
|
|
677
|
+
enabled: boolean;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Configures where tab-search chevron buttons should be shown in a browser window.
|
|
681
|
+
*/
|
|
682
|
+
export interface TabSearchButtonOptions {
|
|
683
|
+
pageTabs?: TabSearchLocationOptions;
|
|
684
|
+
viewTabs?: TabSearchLocationOptions;
|
|
685
|
+
}
|
|
669
686
|
export interface BrowserWorkspacePlatformWindowOptions {
|
|
670
687
|
/** For internal usage. Defaults to 'browser' when Browser is enabled when the WorkspacePlatform is initialized. In order to use
|
|
671
688
|
* non-Browser layout windows ('platform' windows) in a Browser-enabled workspace platform, set windowType to `platform`. In that instance, the other properties
|
|
@@ -716,6 +733,32 @@ export interface BrowserWorkspacePlatformWindowOptions {
|
|
|
716
733
|
minWidth?: string;
|
|
717
734
|
maxWidth?: string;
|
|
718
735
|
};
|
|
736
|
+
/**
|
|
737
|
+
* Controls whether tab-search chevron buttons are shown for page tabs and view tabs.
|
|
738
|
+
*
|
|
739
|
+
* By default, both locations are disabled unless explicitly enabled.
|
|
740
|
+
*
|
|
741
|
+
* @example
|
|
742
|
+
* ```ts
|
|
743
|
+
* workspacePlatform: {
|
|
744
|
+
* tabSearchButton: {
|
|
745
|
+
* viewTabs: { enabled: true },
|
|
746
|
+
* pageTabs: { enabled: true }
|
|
747
|
+
* }
|
|
748
|
+
* }
|
|
749
|
+
* ```
|
|
750
|
+
*
|
|
751
|
+
* @example
|
|
752
|
+
* ```ts
|
|
753
|
+
* workspacePlatform: {
|
|
754
|
+
* tabSearchButton: {
|
|
755
|
+
* viewTabs: { enabled: true },
|
|
756
|
+
* // pageTabs omitted: disabled
|
|
757
|
+
* }
|
|
758
|
+
* }
|
|
759
|
+
* ```
|
|
760
|
+
*/
|
|
761
|
+
tabSearchButton?: TabSearchButtonOptions;
|
|
719
762
|
/**
|
|
720
763
|
* Accessibility options for the browser window.
|
|
721
764
|
* These options override the default accessibility options set at the platform or browser initialization level.
|
|
@@ -813,6 +856,12 @@ export interface BrowserWorkspacePlatformWindowOptions {
|
|
|
813
856
|
* Taskbar Icon for the Browser Window. If light and dark icon are defined, then the taskbar icon will change when the scheme changes.
|
|
814
857
|
*/
|
|
815
858
|
icon?: string | TaskbarIcon;
|
|
859
|
+
/**
|
|
860
|
+
* The size of icons in the browser window. This is set from the platform-level
|
|
861
|
+
* `browserIconSize` option during window creation.
|
|
862
|
+
* @internal Propagated from BrowserInitConfig.browserIconSize
|
|
863
|
+
*/
|
|
864
|
+
browserIconSize?: IconSize;
|
|
816
865
|
}
|
|
817
866
|
/**
|
|
818
867
|
* Request for creating a browser window.
|
|
@@ -1818,6 +1867,11 @@ export interface ThemeApi {
|
|
|
1818
1867
|
* @returns the selected scheme.
|
|
1819
1868
|
*/
|
|
1820
1869
|
getSelectedScheme(): Promise<ColorSchemeOptionType>;
|
|
1870
|
+
/**
|
|
1871
|
+
* @internal
|
|
1872
|
+
* Whether the active platform theme is a legacy theme defined with a single shared palette (light and dark are not independently specified).
|
|
1873
|
+
*/
|
|
1874
|
+
getIsLegacySinglePaletteTheme(): Promise<boolean>;
|
|
1821
1875
|
/**
|
|
1822
1876
|
* @internal
|
|
1823
1877
|
* Get the notification indicator colors from the platform provider.
|
|
@@ -2259,6 +2313,11 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
|
|
|
2259
2313
|
* @param schemeType {@link ColorSchemeOptionType scheme} to be set
|
|
2260
2314
|
*/
|
|
2261
2315
|
setSelectedScheme(schemeType: ColorSchemeOptionType): Promise<void>;
|
|
2316
|
+
/**
|
|
2317
|
+
* @internal
|
|
2318
|
+
* Whether the active platform theme is a legacy single-palette theme (Appearance scheme switching is not supported).
|
|
2319
|
+
*/
|
|
2320
|
+
getIsLegacySinglePaletteTheme(): boolean;
|
|
2262
2321
|
/**
|
|
2263
2322
|
* Implementation for handling Workspace analytics events
|
|
2264
2323
|
* @param req the payload received by the provider
|
|
@@ -2829,7 +2888,6 @@ export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<Workspa
|
|
|
2829
2888
|
export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
|
|
2830
2889
|
/**
|
|
2831
2890
|
* Content menu entry shape cloned and re-exported from UI Library.
|
|
2832
|
-
* @internal
|
|
2833
2891
|
*/
|
|
2834
2892
|
export type ContentMenuEntry = {
|
|
2835
2893
|
bookmarked?: boolean;
|
|
@@ -2857,7 +2915,6 @@ export type BookmarkDockEntryPayload = {
|
|
|
2857
2915
|
};
|
|
2858
2916
|
/**
|
|
2859
2917
|
* Represents dock entry for favorites
|
|
2860
|
-
* @internal
|
|
2861
2918
|
*/
|
|
2862
2919
|
export type DockEntry = {
|
|
2863
2920
|
type: 'folder';
|
|
@@ -2958,6 +3015,32 @@ export interface BrowserInitConfig {
|
|
|
2958
3015
|
* @internal
|
|
2959
3016
|
*/
|
|
2960
3017
|
aiPanelOptions?: AiPanelOptions;
|
|
3018
|
+
/**
|
|
3019
|
+
* When true, allows multiple pages to share the same title across browser
|
|
3020
|
+
* windows. No numeric suffixes are appended and attach/add operations
|
|
3021
|
+
* will not reject on title collision. `pageId` remains the unique
|
|
3022
|
+
* identifier for all page operations.
|
|
3023
|
+
*
|
|
3024
|
+
* Defaults to `false` (current unique-title behavior preserved).
|
|
3025
|
+
*/
|
|
3026
|
+
allowDuplicatePageTitles?: boolean;
|
|
3027
|
+
/**
|
|
3028
|
+
* Opt-in suppression flags for workspace success indicators.
|
|
3029
|
+
* Both flags default to `false`; existing platforms see no behaviour change.
|
|
3030
|
+
*
|
|
3031
|
+
* @example
|
|
3032
|
+
* ```ts
|
|
3033
|
+
* await WorkspacePlatform.init({
|
|
3034
|
+
* browser: {
|
|
3035
|
+
* indicators: {
|
|
3036
|
+
* suppressWorkspaceSwitched: true,
|
|
3037
|
+
* suppressWorkspaceSaved: true,
|
|
3038
|
+
* },
|
|
3039
|
+
* },
|
|
3040
|
+
* });
|
|
3041
|
+
* ```
|
|
3042
|
+
*/
|
|
3043
|
+
indicators?: WorkspaceIndicatorConfig;
|
|
2961
3044
|
}
|
|
2962
3045
|
interface WorkspaceMetadata {
|
|
2963
3046
|
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.
|
|
@@ -32,8 +32,12 @@ export interface Page {
|
|
|
32
32
|
panels?: PanelConfig[];
|
|
33
33
|
/** Used to define the context group for the page */
|
|
34
34
|
contextGroup?: string;
|
|
35
|
+
/** When true, view tab headers within this Supertab are hidden. */
|
|
36
|
+
viewTabsHidden?: boolean;
|
|
35
37
|
/** Optional property to attach custom metadata to the page object, such as version or timestamp. Must be serializable. */
|
|
36
38
|
customData?: any;
|
|
39
|
+
/** True when this page is an admin-published supertab. */
|
|
40
|
+
isPublished?: boolean;
|
|
37
41
|
}
|
|
38
42
|
type AttachedPageMetadata = {
|
|
39
43
|
/** The window the page is currently attached to. */
|
|
@@ -96,12 +96,20 @@ export type AttachedPageInternal = {
|
|
|
96
96
|
isLayoutCreated?: boolean;
|
|
97
97
|
pageIcon?: string;
|
|
98
98
|
isPublished?: boolean;
|
|
99
|
+
/** Enterprise Browser: hide Golden Layout view tab headers (multi-view Supertabs).
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
viewTabsHidden?: boolean;
|
|
99
103
|
} & AttachedPage;
|
|
100
104
|
export type ReparentAttachedPage = AttachedPage & {
|
|
101
105
|
multiInstanceViewBehavior?: 'reparent';
|
|
102
106
|
};
|
|
103
107
|
export type PageWithUpdatableRuntimeAttribs = Page & Pick<AttachedPage, 'hasUnsavedChanges'> & {
|
|
104
108
|
multiInstanceViewBehavior?: OpenFin.MultiInstanceViewBehavior;
|
|
109
|
+
/** Enterprise Browser: hide Golden Layout view tab headers (multi-view Supertabs).
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
viewTabsHidden?: boolean;
|
|
105
113
|
};
|
|
106
114
|
export interface DetachPagesFromWindowPayload {
|
|
107
115
|
/** The OF window identity to detach the pages from. */
|
|
@@ -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>;
|
|
@@ -11,7 +11,7 @@ export declare const isDocumentDefined: boolean;
|
|
|
11
11
|
export declare const isWindowDefinedWithIndexDB: boolean;
|
|
12
12
|
export declare const finUUID: string;
|
|
13
13
|
export declare const finName: string;
|
|
14
|
-
export declare const finEntityType: "" | "
|
|
14
|
+
export declare const finEntityType: "" | "window" | "view";
|
|
15
15
|
export declare const isEnvLocal: boolean;
|
|
16
16
|
export declare const isEnvDev: boolean;
|
|
17
17
|
export declare const isEnvStaging: boolean;
|
|
@@ -50,6 +50,13 @@ export declare function showSuccess(payload: ShowSuccessPayload): Promise<void>;
|
|
|
50
50
|
*/
|
|
51
51
|
export declare function showInfo(payload: ShowInfoPayload): Promise<void>;
|
|
52
52
|
/**
|
|
53
|
-
* Creates a window centered on monitor containing a success indicator for switching workspaces
|
|
53
|
+
* Creates a window centered on monitor containing a success indicator for switching workspaces.
|
|
54
|
+
* No-ops when `suppressWorkspaceSwitched` has been set via `BrowserInitConfig.indicators`.
|
|
54
55
|
*/
|
|
55
56
|
export declare function showSwitchWorkspaceSuccess(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a success indicator for workspace save and save-as operations.
|
|
59
|
+
* No-ops when `suppressWorkspaceSaved` has been set via `BrowserInitConfig.indicators`.
|
|
60
|
+
* Rename operations are intentionally unaffected — use `showSuccess` directly for those.
|
|
61
|
+
*/
|
|
62
|
+
export declare const showWorkspaceSavedSuccess: (payload: ShowSuccessPayload) => Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for suppressing workspace success indicators.
|
|
3
|
+
*/
|
|
4
|
+
export interface WorkspaceIndicatorConfig {
|
|
5
|
+
/** Suppress the "Workspace Switched" indicator on all applyWorkspace calls. @default false */
|
|
6
|
+
suppressWorkspaceSwitched?: boolean;
|
|
7
|
+
/** Suppress the "Workspace Saved" indicator on regular workspace save only. Save-as and rename are unaffected. @default false */
|
|
8
|
+
suppressWorkspaceSaved?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const initWorkspaceIndicators: (config?: WorkspaceIndicatorConfig) => void;
|
|
11
|
+
export declare const getSuppressWorkspaceSwitched: () => boolean;
|
|
12
|
+
/** Returns true when the "Workspace Saved" indicator should be suppressed (save only; save-as and rename are unaffected). */
|
|
13
|
+
export declare const getSuppressWorkspaceSaved: () => boolean;
|
|
@@ -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