@openfin/workspace 24.1.1 → 24.1.2-alpha.c84bc0a1
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-platform/src/api/app-directory.d.ts +1 -1
- package/client-api-platform/src/api/controllers/storage-proxies/channel-storage-proxy.d.ts +19 -0
- package/client-api-platform/src/api/controllers/storage-proxies/local-storage-proxy.d.ts +12 -0
- package/client-api-platform/src/api/controllers/theme-storage-controller-store.d.ts +17 -0
- package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +10 -20
- package/client-api-platform/src/api/utils.d.ts +2 -7
- package/client-api-platform/src/init/index.d.ts +2 -1
- package/client-api-platform/src/shapes.d.ts +29 -1
- package/common/src/api/pages/enterprise-shapes.d.ts +2 -0
- package/common/src/api/pages/shapes.d.ts +8 -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/dock3/src/api/protocol.d.ts +2 -0
- package/externals.report.json +9 -9
- package/home.js +1 -1
- package/home.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/notifications.js +1 -1
- package/notifications.js.map +1 -1
- package/package.json +3 -3
- package/store.js +1 -1
- package/store.js.map +1 -1
- package/common/src/api/tabs.d.ts +0 -16
|
@@ -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;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StorageProxy } from '../../../../../client-api-platform/src/api/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Channel Storage Proxy allows population of storage keys in a different origin, assuming that origin has set up
|
|
4
|
+
* a storage proxy on the specified URL.
|
|
5
|
+
*
|
|
6
|
+
* This is useful for writing to the localStorage of workspace when the provider is on a different origin.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ChannelStorageProxy implements StorageProxy {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(url: string);
|
|
11
|
+
get isDestroyed(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Sets a key in the proxied storage partition.
|
|
14
|
+
* @param key Key to set
|
|
15
|
+
* @param value Value.
|
|
16
|
+
*/
|
|
17
|
+
setItem(key: string, value: string): Promise<void>;
|
|
18
|
+
destroy(): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StorageProxy } from '../../../../../client-api-platform/src/api/utils';
|
|
2
|
+
/**
|
|
3
|
+
* LocalStorage backed StorageProxy, for use in same origin scenarios (i.e. when the provider and workspace UI are guaranteed
|
|
4
|
+
* to share a storage partition).
|
|
5
|
+
*/
|
|
6
|
+
export declare class LocalStorageProxy implements StorageProxy {
|
|
7
|
+
#private;
|
|
8
|
+
constructor(storage: Pick<Storage, 'setItem'>);
|
|
9
|
+
setItem(key: string, value: string): Promise<void>;
|
|
10
|
+
destroy(): Promise<void>;
|
|
11
|
+
get isDestroyed(): boolean;
|
|
12
|
+
}
|
|
@@ -17,3 +17,20 @@ export declare const initialiseStoragePalettes: (customThemes: CustomThemes | un
|
|
|
17
17
|
notificationIndicatorColors: NotificationIndicatorColorsParsed | null;
|
|
18
18
|
};
|
|
19
19
|
export declare const getThemeStorageController: () => ThemeStorageController;
|
|
20
|
+
/**
|
|
21
|
+
* Resolves when the first theme sync completes. Use this to ensure that we do not launch UI such as browser until this has completed.
|
|
22
|
+
*
|
|
23
|
+
* @param allowFailure Whether to suppress rejections and continue anyway. Recommended for most use cases.
|
|
24
|
+
*/
|
|
25
|
+
export declare const waitForFirstThemeSync: (allowFailure?: boolean) => Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Creates and initialises the Theme Storage Controller singleton.
|
|
28
|
+
*
|
|
29
|
+
* Triggers the first theme sync, but does not await it. To ensure dependent UI can guarantee the theme palette is synced,
|
|
30
|
+
* you can call `await waitForFirstThemeSync` (e.g. in the createWindow provider override).
|
|
31
|
+
*
|
|
32
|
+
* @param isEnterprise Whether in enterprise mode (allows using local storage proxy directly).
|
|
33
|
+
* @param baseUrl Base url of the hosted workspace UI.
|
|
34
|
+
* @param syncTimeout How long `waitForFirstThemeSync` should wait before rejecting.
|
|
35
|
+
*/
|
|
36
|
+
export declare const initialiseThemeController: (isEnterprise: boolean, baseUrl: string, syncTimeout: number) => void;
|
|
@@ -24,37 +24,29 @@ export type Palettes = {
|
|
|
24
24
|
dark: string;
|
|
25
25
|
};
|
|
26
26
|
export declare class ThemeStorageController {
|
|
27
|
+
#private;
|
|
27
28
|
private providerStorage;
|
|
28
29
|
private darkPaletteVars?;
|
|
29
30
|
private lightPaletteVars?;
|
|
30
31
|
private themePaletteSheet?;
|
|
31
32
|
private generatedPalettes?;
|
|
32
33
|
private workspaceStorage?;
|
|
33
|
-
private
|
|
34
|
+
private storageFactory?;
|
|
34
35
|
private isLegacySinglePaletteTheme;
|
|
35
36
|
constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>);
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* Set a factory to recreate the storage proxy if it was destroyed (e.g. when a new browser
|
|
42
|
-
* window is opened after the last one closed with preventQuitOnLastWindowClosed true).
|
|
43
|
-
* Called once at platform init; avoids createWindow needing URL/env dependencies.
|
|
38
|
+
* Sets the storage factory. This can only be done once, and will throw for subsequent calls.
|
|
39
|
+
*
|
|
40
|
+
* All storage writes will be pending until the factory is created.
|
|
41
|
+
* @param factory
|
|
44
42
|
*/
|
|
45
|
-
|
|
43
|
+
setStorageFactory: (factory: () => StorageProxy) => void;
|
|
46
44
|
/**
|
|
47
45
|
* Close the storage proxy window and clear the reference. Called when the last browser window
|
|
48
46
|
* closes so the platform can quit (storage proxy would otherwise keep the process alive).
|
|
49
|
-
* Clears the reference before awaiting destroy() to avoid a race with
|
|
47
|
+
* Clears the reference before awaiting destroy() to avoid a race with getOrCreateStorageProxy.
|
|
50
48
|
*/
|
|
51
49
|
destroyWorkspaceStorageProxy: () => Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Ensure the workspace storage proxy exists, recreating via the factory set at init if it was
|
|
54
|
-
* previously destroyed. No-op if no factory was set (e.g. in tests). Call before using
|
|
55
|
-
* workspace storage (e.g. when creating a browser window).
|
|
56
|
-
*/
|
|
57
|
-
ensureWorkspaceStorageProxy: () => Promise<void>;
|
|
58
50
|
/**
|
|
59
51
|
* Check if there's an explicit user preference stored in localStorage.
|
|
60
52
|
* A user preference is indicated by the presence of a SelectedColorScheme key. Which is something assigned if you click on the Appearance dropdown.
|
|
@@ -63,11 +55,9 @@ export declare class ThemeStorageController {
|
|
|
63
55
|
private hasUserPreference;
|
|
64
56
|
/**
|
|
65
57
|
* Synchronize the current palette and scheme with workspace's storage instance if
|
|
66
|
-
* storage based theming is enabled.
|
|
67
|
-
*
|
|
68
|
-
* Wrapped in try/catch so it does not throw
|
|
58
|
+
* storage based theming is enabled.
|
|
69
59
|
*/
|
|
70
|
-
|
|
60
|
+
synchronizeWorkspaceStorage: () => Promise<void>;
|
|
71
61
|
/**
|
|
72
62
|
* Set the current Palette to be used by workspace. This palette will be converted into
|
|
73
63
|
* css vars and combined into a single stylesheet. This stylesheet is exposed in localstorage
|
|
@@ -2,11 +2,6 @@ export declare const listenForStoreClose: () => void;
|
|
|
2
2
|
export type StorageProxy = {
|
|
3
3
|
setItem: (data: string, value: string) => Promise<void>;
|
|
4
4
|
destroy: () => Promise<void>;
|
|
5
|
+
isDestroyed: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare const
|
|
7
|
-
/**
|
|
8
|
-
* Ensure the workspace storage proxy window exists. Recreates it if it was previously destroyed
|
|
9
|
-
* (e.g. when the last browser window closed with preventQuitOnLastWindowClosed true and a new
|
|
10
|
-
* browser window is now being created). Uses the factory registered at init; no-op in tests.
|
|
11
|
-
*/
|
|
12
|
-
export declare const ensureWorkspaceStorageProxy: () => Promise<void>;
|
|
7
|
+
export declare const getStorageFactory: (isEnterprise: boolean, baseUrl: string) => (() => StorageProxy);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import OpenFin from '@openfin/core';
|
|
2
2
|
import { WorkspacePlatformInitConfig } from '../../../client-api-platform/src/shapes';
|
|
3
|
+
export declare const MAX_FIRST_THEME_SYNC_WAIT = 3000;
|
|
3
4
|
/**
|
|
4
5
|
* Initilaize a Workspace Platform.
|
|
5
6
|
*
|
|
@@ -35,4 +36,4 @@ import { WorkspacePlatformInitConfig } from '../../../client-api-platform/src/sh
|
|
|
35
36
|
* ```
|
|
36
37
|
* @param options options for configuring the platform.
|
|
37
38
|
*/
|
|
38
|
-
export declare const init: (
|
|
39
|
+
export declare const init: (config: WorkspacePlatformInitConfig) => Promise<OpenFin.Platform>;
|
|
@@ -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
|
|
@@ -848,6 +852,13 @@ export interface BrowserWorkspacePlatformWindowOptions {
|
|
|
848
852
|
* When true, disables the ability to close pages in the window. False by default.
|
|
849
853
|
*/
|
|
850
854
|
preventPageClose?: boolean;
|
|
855
|
+
/**
|
|
856
|
+
* When true, disables the find in page feature for the window.
|
|
857
|
+
* The find in page view will not be created and no find in page logic will run.
|
|
858
|
+
* This option must be set at window creation time and cannot be changed dynamically.
|
|
859
|
+
* False by default.
|
|
860
|
+
*/
|
|
861
|
+
disableFindInPage?: boolean;
|
|
851
862
|
/**
|
|
852
863
|
* Taskbar Icon for the Browser Window. If light and dark icon are defined, then the taskbar icon will change when the scheme changes.
|
|
853
864
|
*/
|
|
@@ -3020,6 +3031,23 @@ export interface BrowserInitConfig {
|
|
|
3020
3031
|
* Defaults to `false` (current unique-title behavior preserved).
|
|
3021
3032
|
*/
|
|
3022
3033
|
allowDuplicatePageTitles?: boolean;
|
|
3034
|
+
/**
|
|
3035
|
+
* Opt-in suppression flags for workspace success indicators.
|
|
3036
|
+
* Both flags default to `false`; existing platforms see no behaviour change.
|
|
3037
|
+
*
|
|
3038
|
+
* @example
|
|
3039
|
+
* ```ts
|
|
3040
|
+
* await WorkspacePlatform.init({
|
|
3041
|
+
* browser: {
|
|
3042
|
+
* indicators: {
|
|
3043
|
+
* suppressWorkspaceSwitched: true,
|
|
3044
|
+
* suppressWorkspaceSaved: true,
|
|
3045
|
+
* },
|
|
3046
|
+
* },
|
|
3047
|
+
* });
|
|
3048
|
+
* ```
|
|
3049
|
+
*/
|
|
3050
|
+
indicators?: WorkspaceIndicatorConfig;
|
|
3023
3051
|
}
|
|
3024
3052
|
interface WorkspaceMetadata {
|
|
3025
3053
|
APIVersion: string;
|
|
@@ -32,6 +32,8 @@ 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;
|
|
37
39
|
/** True when this page is an admin-published supertab. */
|
|
@@ -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. */
|
|
@@ -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,6 +1,7 @@
|
|
|
1
1
|
import type { OpenFin } from '@openfin/core';
|
|
2
2
|
import { BaseCustomDropdownItem } from '../../../client-api/src/shapes';
|
|
3
3
|
import { BookmarkDockEntryPayload, DockEntry, LaunchDockEntryPayload, Collection } from '../../../client-api-platform/src/shapes';
|
|
4
|
+
import { WorkspaceIndicatorConfig } from '../../../common/src/utils/indicators/workspace-indicators';
|
|
4
5
|
import { Dock3Config, DockCompanionButton } from '../../../dock3/src/shapes';
|
|
5
6
|
/**
|
|
6
7
|
* Payload for more menu custom option actions
|
|
@@ -40,6 +41,7 @@ export type Dock3ChannelClientChannelActions = {
|
|
|
40
41
|
'navigate-content-menu': (payload: {
|
|
41
42
|
targetId: string;
|
|
42
43
|
}) => void;
|
|
44
|
+
'handle-indicator-config': (payload: WorkspaceIndicatorConfig) => void;
|
|
43
45
|
};
|
|
44
46
|
/**
|
|
45
47
|
* @internal
|
package/externals.report.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"@openfin/notifications": [
|
|
3
3
|
{
|
|
4
4
|
"type": "explicit",
|
|
5
|
-
"version": "2.14.0-alpha-
|
|
5
|
+
"version": "2.14.0-alpha-4620",
|
|
6
6
|
"packageName": "client-api/package.json",
|
|
7
7
|
"issuer": "client-api/src/notifications.ts"
|
|
8
8
|
}
|
|
@@ -43,14 +43,6 @@
|
|
|
43
43
|
"issuer": "common/src/utils/layout.ts"
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
|
-
"lodash.clonedeep": [
|
|
47
|
-
{
|
|
48
|
-
"type": "explicit",
|
|
49
|
-
"version": "4.5.0",
|
|
50
|
-
"packageName": "common/package.json",
|
|
51
|
-
"issuer": "common/src/utils/layout.ts"
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
46
|
"react-i18next": [
|
|
55
47
|
{
|
|
56
48
|
"type": "explicit",
|
|
@@ -67,6 +59,14 @@
|
|
|
67
59
|
"issuer": "common/src/api/i18next.ts"
|
|
68
60
|
}
|
|
69
61
|
],
|
|
62
|
+
"lodash.clonedeep": [
|
|
63
|
+
{
|
|
64
|
+
"type": "explicit",
|
|
65
|
+
"version": "4.5.0",
|
|
66
|
+
"packageName": "common/package.json",
|
|
67
|
+
"issuer": "common/src/utils/layout.ts"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
70
|
"dexie": [
|
|
71
71
|
{
|
|
72
72
|
"type": "root-implicit",
|