@openfin/workspace-platform 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/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/__tests__/theme-storage-controller-store.test.d.ts +2 -0
- package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +15 -1
- package/client-api-platform/src/api/pages/index.d.ts +7 -2
- package/client-api-platform/src/api/theming.set-scheme.test.d.ts +1 -0
- package/client-api-platform/src/api/utils.d.ts +1 -1
- package/client-api-platform/src/api/utils.test.d.ts +1 -0
- 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 +108 -1
- 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/protocol/browser.d.ts +0 -2
- 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/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/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 +16 -16
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/package.json +6 -2
- package/common/src/api/tabs.d.ts +0 -16
- package/index.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,23 @@ 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;
|
|
87
95
|
/**
|
|
88
96
|
* Set the theme's default scheme from palette configuration
|
|
89
97
|
* @param scheme The default scheme specified in the palette
|
|
90
98
|
*/
|
|
91
99
|
setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
|
|
92
100
|
setGeneratedPalettes(generatedPalettes: GeneratedPalettes): void;
|
|
101
|
+
/**
|
|
102
|
+
* Write the theme palette sheet to both in-memory state and providerStorage (namespaced localStorage)
|
|
103
|
+
* immediately. This ensures the theme is available for themeLoader on same-origin pages
|
|
104
|
+
* without waiting for the workspace storage proxy to be initialised.
|
|
105
|
+
*/
|
|
106
|
+
setThemePaletteSheet(sheet: string): void;
|
|
93
107
|
/**
|
|
94
108
|
* Returns the current scheme
|
|
95
109
|
* @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).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@common/test/fin-mocks';
|
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@common/test/fin-mocks';
|
|
@@ -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,5 +1,6 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import type { IconProps, IconType, Languages } from '@openfin/ui-library';
|
|
3
|
+
import type { WorkspaceIndicatorConfig } from '../../common/src/utils/indicators/workspace-indicators';
|
|
3
4
|
import type { AnalyticsEvent } from '../../common/src/utils/usage-register';
|
|
4
5
|
import type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
|
|
5
6
|
import type { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageLayoutsWithSelectedViews, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
|
|
@@ -154,7 +155,7 @@ export declare enum PageTabContextMenuOptionType {
|
|
|
154
155
|
Rename = "Rename",
|
|
155
156
|
Save = "Save",
|
|
156
157
|
SaveAs = "Save As",
|
|
157
|
-
NewPage = "New Page"
|
|
158
|
+
NewPage = "New Page",// Enterprise
|
|
158
159
|
DeletePage = "Delete Page",// Enterprise
|
|
159
160
|
SaveWorkspaceAs = "SaveWorkspaceAs",// Enterprise
|
|
160
161
|
Refresh = "Refresh",// Enterprise
|
|
@@ -615,6 +616,19 @@ export interface BrowserCreateViewRequest extends OpenFin.PlatformViewCreationOp
|
|
|
615
616
|
export interface BrowserViewState extends OpenFin.ViewState {
|
|
616
617
|
workspacePlatform?: BrowserWorkspacePlatformViewOptions;
|
|
617
618
|
}
|
|
619
|
+
/**
|
|
620
|
+
* Enables or disables the tab-search chevron button for a specific tab location.
|
|
621
|
+
*/
|
|
622
|
+
export interface TabSearchLocationOptions {
|
|
623
|
+
enabled: boolean;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Configures where tab-search chevron buttons should be shown in a browser window.
|
|
627
|
+
*/
|
|
628
|
+
export interface TabSearchButtonOptions {
|
|
629
|
+
pageTabs?: TabSearchLocationOptions;
|
|
630
|
+
viewTabs?: TabSearchLocationOptions;
|
|
631
|
+
}
|
|
618
632
|
export interface BrowserWorkspacePlatformWindowOptions {
|
|
619
633
|
/** For internal usage. Defaults to 'browser' when Browser is enabled when the WorkspacePlatform is initialized. In order to use
|
|
620
634
|
* non-Browser layout windows ('platform' windows) in a Browser-enabled workspace platform, set windowType to `platform`. In that instance, the other properties
|
|
@@ -664,6 +678,32 @@ export interface BrowserWorkspacePlatformWindowOptions {
|
|
|
664
678
|
minWidth?: string;
|
|
665
679
|
maxWidth?: string;
|
|
666
680
|
};
|
|
681
|
+
/**
|
|
682
|
+
* Controls whether tab-search chevron buttons are shown for page tabs and view tabs.
|
|
683
|
+
*
|
|
684
|
+
* By default, both locations are disabled unless explicitly enabled.
|
|
685
|
+
*
|
|
686
|
+
* @example
|
|
687
|
+
* ```ts
|
|
688
|
+
* workspacePlatform: {
|
|
689
|
+
* tabSearchButton: {
|
|
690
|
+
* viewTabs: { enabled: true },
|
|
691
|
+
* pageTabs: { enabled: true }
|
|
692
|
+
* }
|
|
693
|
+
* }
|
|
694
|
+
* ```
|
|
695
|
+
*
|
|
696
|
+
* @example
|
|
697
|
+
* ```ts
|
|
698
|
+
* workspacePlatform: {
|
|
699
|
+
* tabSearchButton: {
|
|
700
|
+
* viewTabs: { enabled: true },
|
|
701
|
+
* // pageTabs omitted: disabled
|
|
702
|
+
* }
|
|
703
|
+
* }
|
|
704
|
+
* ```
|
|
705
|
+
*/
|
|
706
|
+
tabSearchButton?: TabSearchButtonOptions;
|
|
667
707
|
/**
|
|
668
708
|
* Accessibility options for the browser window.
|
|
669
709
|
* These options override the default accessibility options set at the platform or browser initialization level.
|
|
@@ -2304,6 +2344,26 @@ export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<Workspa
|
|
|
2304
2344
|
* @deprecated
|
|
2305
2345
|
*/
|
|
2306
2346
|
export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
|
|
2347
|
+
/**
|
|
2348
|
+
* Content menu entry shape cloned and re-exported from UI Library.
|
|
2349
|
+
*/
|
|
2350
|
+
export type ContentMenuEntry = {
|
|
2351
|
+
bookmarked?: boolean;
|
|
2352
|
+
} & ({
|
|
2353
|
+
type: 'folder';
|
|
2354
|
+
id: string;
|
|
2355
|
+
label: string;
|
|
2356
|
+
children: ContentMenuEntry[];
|
|
2357
|
+
} | {
|
|
2358
|
+
type: 'item';
|
|
2359
|
+
id: string;
|
|
2360
|
+
icon: string | {
|
|
2361
|
+
dark: string;
|
|
2362
|
+
light: string;
|
|
2363
|
+
};
|
|
2364
|
+
label: string;
|
|
2365
|
+
itemData: any;
|
|
2366
|
+
});
|
|
2307
2367
|
export type LaunchDockEntryPayload = {
|
|
2308
2368
|
entry: DockEntry;
|
|
2309
2369
|
sourceEvent?: Pick<MouseEvent, 'ctrlKey' | 'metaKey' | 'shiftKey'>;
|
|
@@ -2311,6 +2371,27 @@ export type LaunchDockEntryPayload = {
|
|
|
2311
2371
|
export type BookmarkDockEntryPayload = {
|
|
2312
2372
|
entry: DockEntry;
|
|
2313
2373
|
};
|
|
2374
|
+
/**
|
|
2375
|
+
* Represents dock entry for favorites
|
|
2376
|
+
*/
|
|
2377
|
+
export type DockEntry = {
|
|
2378
|
+
type: 'folder';
|
|
2379
|
+
id: string;
|
|
2380
|
+
label: string;
|
|
2381
|
+
icon?: string | {
|
|
2382
|
+
dark: string;
|
|
2383
|
+
light: string;
|
|
2384
|
+
};
|
|
2385
|
+
} | {
|
|
2386
|
+
type: 'item';
|
|
2387
|
+
id: string;
|
|
2388
|
+
icon: string | {
|
|
2389
|
+
dark: string;
|
|
2390
|
+
light: string;
|
|
2391
|
+
};
|
|
2392
|
+
label: string;
|
|
2393
|
+
itemData?: any;
|
|
2394
|
+
};
|
|
2314
2395
|
/**
|
|
2315
2396
|
* Configuration options for Browser window's icons.
|
|
2316
2397
|
*/
|
|
@@ -2376,6 +2457,32 @@ export interface BrowserInitConfig {
|
|
|
2376
2457
|
* https://developer.openfin.co/docs/javascript/stable/classes/OpenFin.InteropBroker.html
|
|
2377
2458
|
*/
|
|
2378
2459
|
interopOverride?: OpenFin.OverrideCallback<OpenFin.InteropBroker, OpenFin.InteropBroker>;
|
|
2460
|
+
/**
|
|
2461
|
+
* When true, allows multiple pages to share the same title across browser
|
|
2462
|
+
* windows. No numeric suffixes are appended and attach/add operations
|
|
2463
|
+
* will not reject on title collision. `pageId` remains the unique
|
|
2464
|
+
* identifier for all page operations.
|
|
2465
|
+
*
|
|
2466
|
+
* Defaults to `false` (current unique-title behavior preserved).
|
|
2467
|
+
*/
|
|
2468
|
+
allowDuplicatePageTitles?: boolean;
|
|
2469
|
+
/**
|
|
2470
|
+
* Opt-in suppression flags for workspace success indicators.
|
|
2471
|
+
* Both flags default to `false`; existing platforms see no behaviour change.
|
|
2472
|
+
*
|
|
2473
|
+
* @example
|
|
2474
|
+
* ```ts
|
|
2475
|
+
* await WorkspacePlatform.init({
|
|
2476
|
+
* browser: {
|
|
2477
|
+
* indicators: {
|
|
2478
|
+
* suppressWorkspaceSwitched: true,
|
|
2479
|
+
* suppressWorkspaceSaved: true,
|
|
2480
|
+
* },
|
|
2481
|
+
* },
|
|
2482
|
+
* });
|
|
2483
|
+
* ```
|
|
2484
|
+
*/
|
|
2485
|
+
indicators?: WorkspaceIndicatorConfig;
|
|
2379
2486
|
}
|
|
2380
2487
|
interface WorkspaceMetadata {
|
|
2381
2488
|
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. */
|
|
@@ -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
|
export declare enum CompanionDockChannelAction {
|
|
@@ -77,7 +76,6 @@ export declare const BrowserChannelAction: {
|
|
|
77
76
|
ReorderPagesForWindow: PageChannelAction.ReorderPagesForWindow;
|
|
78
77
|
UpdatePageForWindow: PageChannelAction.UpdatePageForWindow;
|
|
79
78
|
UpdatePagesWindowOptions: PageChannelAction.UpdatePagesWindowOptions;
|
|
80
|
-
IsDetachingPages: PageChannelAction.IsDetachingPages;
|
|
81
79
|
IsActivePageChanging: PageChannelAction.IsActivePageChanging;
|
|
82
80
|
CloseBrowserWindow: GeneralBrowserChannelActions.CloseBrowserWindow;
|
|
83
81
|
QuitPlatform: GeneralBrowserChannelActions.QuitPlatform;
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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
|
*/
|