@openfin/workspace-platform 24.0.14 → 24.0.15
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/init/index.d.ts +1 -1
- package/client-api-platform/src/init/override-callback/snapshot.page-tab-groups.test.d.ts +1 -0
- package/client-api-platform/src/shapes.d.ts +23 -1
- package/common/src/api/pages/enterprise-shapes.d.ts +4 -0
- package/common/src/api/pages/shapes.d.ts +10 -2
- package/common/src/api/theming.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/layout.d.ts +9 -0
- package/common/src/utils/popup-window.d.ts +23 -4
- package/externals.report.json +14 -14
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/workspace_platform.zip +0 -0
|
@@ -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.Identity | OpenFin.
|
|
10
|
+
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.View | OpenFin.Platform | OpenFin.Application>;
|
|
11
11
|
export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
|
|
12
12
|
export declare function getResults(payload: {
|
|
13
13
|
req: SearchSitesRequest;
|
|
@@ -36,4 +36,4 @@ export declare const MAX_FIRST_THEME_SYNC_WAIT = 3000;
|
|
|
36
36
|
* ```
|
|
37
37
|
* @param options options for configuring the platform.
|
|
38
38
|
*/
|
|
39
|
-
export declare const init: (
|
|
39
|
+
export declare const init: (config: WorkspacePlatformInitConfig) => Promise<OpenFin.Platform>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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';
|
|
@@ -11,7 +12,7 @@ export * from '../../dock3/src/shapes';
|
|
|
11
12
|
export { AppManifestType } from '../../client-api/src/shapes';
|
|
12
13
|
export type { App, AppIntent, Image } from '../../client-api/src/shapes';
|
|
13
14
|
export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
|
|
14
|
-
export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs, PanelConfigHorizontal, PanelConfigVertical, PanelConfig, ExtendedPanelConfig, CopyPagePayload, HandleSaveModalOnPageClosePayload, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
|
|
15
|
+
export type { AttachedPage, Page, PagePinnedState, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs, PanelConfigHorizontal, PanelConfigVertical, PanelConfig, ExtendedPanelConfig, CopyPagePayload, HandleSaveModalOnPageClosePayload, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
|
|
15
16
|
export { PanelPosition } from '../../common/src/api/pages/shapes';
|
|
16
17
|
export type { CustomThemes, CustomThemeOptions, ThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemeSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
|
|
17
18
|
export type { AnalyticsEvent } from '../../common/src/utils/usage-register';
|
|
@@ -155,6 +156,10 @@ export declare enum PageTabContextMenuOptionType {
|
|
|
155
156
|
Save = "Save",
|
|
156
157
|
SaveAs = "Save As",
|
|
157
158
|
NewPage = "New Page",
|
|
159
|
+
/** Workspace Browser: pin a normal tab (sets `pinned: 'user'`). */
|
|
160
|
+
Pin = "Pin",
|
|
161
|
+
/** Workspace Browser: unpin a user-pinned tab (clears `pinned`). */
|
|
162
|
+
Unpin = "Unpin",// Enterprise
|
|
158
163
|
DeletePage = "Delete Page",// Enterprise
|
|
159
164
|
SaveWorkspaceAs = "SaveWorkspaceAs",// Enterprise
|
|
160
165
|
Refresh = "Refresh",// Enterprise
|
|
@@ -2472,6 +2477,23 @@ export interface BrowserInitConfig {
|
|
|
2472
2477
|
* Defaults to `false` (current unique-title behavior preserved).
|
|
2473
2478
|
*/
|
|
2474
2479
|
allowDuplicatePageTitles?: boolean;
|
|
2480
|
+
/**
|
|
2481
|
+
* Opt-in suppression flags for workspace success indicators.
|
|
2482
|
+
* Both flags default to `false`; existing platforms see no behaviour change.
|
|
2483
|
+
*
|
|
2484
|
+
* @example
|
|
2485
|
+
* ```ts
|
|
2486
|
+
* await WorkspacePlatform.init({
|
|
2487
|
+
* browser: {
|
|
2488
|
+
* indicators: {
|
|
2489
|
+
* suppressWorkspaceSwitched: true,
|
|
2490
|
+
* suppressWorkspaceSaved: true,
|
|
2491
|
+
* },
|
|
2492
|
+
* },
|
|
2493
|
+
* });
|
|
2494
|
+
* ```
|
|
2495
|
+
*/
|
|
2496
|
+
indicators?: WorkspaceIndicatorConfig;
|
|
2475
2497
|
}
|
|
2476
2498
|
interface WorkspaceMetadata {
|
|
2477
2499
|
APIVersion: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OpenFin } from '@openfin/core';
|
|
2
2
|
import { ExtendedPanelConfig, PageLayout, PanelConfig } from '../../../../client-api-platform/src/index';
|
|
3
|
+
import type { PagePinnedState } from '../../../../common/src/api/pages/shapes';
|
|
3
4
|
export interface Page {
|
|
4
5
|
/** A UI friendly title for the page. */
|
|
5
6
|
title: string;
|
|
@@ -21,6 +22,9 @@ export interface Page {
|
|
|
21
22
|
layout: PageLayout;
|
|
22
23
|
/** True if the page is locked. */
|
|
23
24
|
isLocked?: boolean;
|
|
25
|
+
/** Not used by enterprise — page pinning is a workspace-only feature. Declared here because
|
|
26
|
+
* shared code (page-tab-context-menu.ts) casts to AttachedPageInternal and accesses this field. */
|
|
27
|
+
pinned?: PagePinnedState;
|
|
24
28
|
/** Used to manipulate behaviour of a close button on a page tab. If `undefined`, then close button is visible and actionable.
|
|
25
29
|
* If either property true, this page tab's context menu will disable its 'Close Page' option.
|
|
26
30
|
*/
|
|
@@ -12,6 +12,8 @@ export interface PageLayoutDetails {
|
|
|
12
12
|
export type PageLayout = OpenFin.LayoutOptions & {
|
|
13
13
|
layoutDetails?: PageLayoutDetails;
|
|
14
14
|
};
|
|
15
|
+
/** The pinned state of a page tab. `'platform'` = developer-locked; `'user'` = end-user pinned. */
|
|
16
|
+
export type PagePinnedState = 'platform' | 'user';
|
|
15
17
|
/**
|
|
16
18
|
* Provides configuration options for a set of Workspace Views. An array of Page objects is a required option of the {@link workspacePlatform}
|
|
17
19
|
* property of the {@link BrowserCreateWindowRequest} interface.
|
|
@@ -62,6 +64,8 @@ export interface Page {
|
|
|
62
64
|
layout: PageLayout;
|
|
63
65
|
/** True if the page is locked. */
|
|
64
66
|
isLocked?: boolean;
|
|
67
|
+
/** Pinned state: `'platform'` (developer-locked), `'user'` (end-user pinned), or omitted (normal). */
|
|
68
|
+
pinned?: PagePinnedState;
|
|
65
69
|
/** Used to manipulate behaviour of a close button on a page tab. If `undefined`, then close button is visible and actionable.
|
|
66
70
|
* If either property true, this page tab's context menu will disable its 'Close Page' option.
|
|
67
71
|
*/
|
|
@@ -124,17 +128,21 @@ export interface ReorderPagesForWindowPayload {
|
|
|
124
128
|
/** The ordered ids of the attached pages. */
|
|
125
129
|
pageIds: string[];
|
|
126
130
|
}
|
|
131
|
+
/** Page fields for update payloads. `null` signals "clear this field" over IPC (null survives JSON serialization, undefined does not). */
|
|
132
|
+
type PageUpdateNullableOverrides = {
|
|
133
|
+
pinned?: PagePinnedState | null;
|
|
134
|
+
};
|
|
127
135
|
export interface UpdatePageForWindowPayload {
|
|
128
136
|
/** The OF window identity the pages to change the order of. */
|
|
129
137
|
identity: OpenFin.Identity;
|
|
130
138
|
/** The id of the attached page to update. */
|
|
131
139
|
pageId: string;
|
|
132
140
|
/** The partial updated state of the page. */
|
|
133
|
-
page: Partial<PageWithUpdatableRuntimeAttribs
|
|
141
|
+
page: Omit<Partial<PageWithUpdatableRuntimeAttribs>, 'pinned'> & PageUpdateNullableOverrides;
|
|
134
142
|
}
|
|
135
143
|
export interface ExtendedUpdatePageForWindowPayload extends UpdatePageForWindowPayload {
|
|
136
144
|
/** The partial updated state of the page. */
|
|
137
|
-
page: Partial<AttachedPage
|
|
145
|
+
page: Omit<Partial<AttachedPage>, 'pinned'> & PageUpdateNullableOverrides;
|
|
138
146
|
}
|
|
139
147
|
export interface AttachPagesToWindowPayload {
|
|
140
148
|
/** The OF window identity to attach the pages to. */
|
|
@@ -307,7 +307,7 @@ export declare const constructThemePaletteSheet: (themes: GeneratedPalettes, leg
|
|
|
307
307
|
dark: string;
|
|
308
308
|
}) => string;
|
|
309
309
|
export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<{
|
|
310
|
-
theme:
|
|
310
|
+
theme: GeneratedPalettes | CustomThemes;
|
|
311
311
|
defaultScheme: ColorSchemeOptionType;
|
|
312
312
|
themePaletteSheet: string;
|
|
313
313
|
}>;
|
|
@@ -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 type { PagePinnedState } from '../../../common/src/api/pages/shapes';
|
|
2
3
|
import { WindowIdentity } from '../../../common/src/utils/window';
|
|
3
4
|
import { AttachedPage, PageLayout } from '../../../client-api-platform/src/shapes';
|
|
4
5
|
export type LayoutDOMEventType =
|
|
@@ -115,6 +116,14 @@ export declare const cleanupLayoutObservers: (layoutName: string) => void;
|
|
|
115
116
|
* Initialize the layout for the current OF window.
|
|
116
117
|
*/
|
|
117
118
|
export declare const initLayoutListeners: () => Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Returns true when a page's in-page layout should be locked.
|
|
121
|
+
* This applies for user-locked pages (`isLocked`) and platform-pinned pages (`pinned === 'platform'`).
|
|
122
|
+
*/
|
|
123
|
+
export declare const isPageLayoutLocked: (page: {
|
|
124
|
+
isLocked?: boolean;
|
|
125
|
+
pinned?: PagePinnedState;
|
|
126
|
+
}) => boolean;
|
|
118
127
|
/**
|
|
119
128
|
* Deep clones a layout and changes its settings to make it "locked".
|
|
120
129
|
* @param layout The Layout to be locked
|
|
@@ -113,12 +113,31 @@ export type RenameSupertabChannelMessage = BasePopupMenuChannelMessage & {
|
|
|
113
113
|
pageId: string;
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* A row in the tab search list. {@link showPin} / {@link showUnpin} are optional; when omitted, no row action.
|
|
118
|
+
*/
|
|
119
|
+
export type TabSearchListItem = {
|
|
120
|
+
id: string;
|
|
121
|
+
title: string;
|
|
122
|
+
/** When true, show a control to pin (move to the user page group). Core UI + ungrouped only. */
|
|
123
|
+
showPin?: boolean;
|
|
124
|
+
/** When true, show a control to unpin (leave the user page group). */
|
|
125
|
+
showUnpin?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* When true, show a non-interactive lock (workspace / platform locked); ungrouped pages only.
|
|
128
|
+
* Mutually exclusive with {@link showPin} in the browser; does not replace {@link showUnpin}.
|
|
129
|
+
*/
|
|
130
|
+
showPlatformLocked?: boolean;
|
|
131
|
+
};
|
|
116
132
|
export type TabSearchModalContent = {
|
|
117
133
|
variant: 'page' | 'view';
|
|
118
|
-
tabs:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
tabs: TabSearchListItem[];
|
|
135
|
+
};
|
|
136
|
+
/** Channel action: browser → tab-search popup; refreshes list rows after pin/unpin while open. */
|
|
137
|
+
export declare const TAB_SEARCH_CHANNEL_ACTION_UPDATE_TABS: "update-tabs";
|
|
138
|
+
export type TabSearchUpdateTabsMessage = {
|
|
139
|
+
requestId: string;
|
|
140
|
+
tabs: TabSearchListItem[];
|
|
122
141
|
};
|
|
123
142
|
export type TabSearchChannelMessage = BasePopupMenuChannelMessage & {
|
|
124
143
|
type: PopupWindowMenuType.TabSearch;
|
package/externals.report.json
CHANGED
|
@@ -21,43 +21,43 @@
|
|
|
21
21
|
"issuer": "common/src/utils/color-linking.ts"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
24
|
-
"
|
|
24
|
+
"lodash.clonedeep": [
|
|
25
25
|
{
|
|
26
26
|
"type": "explicit",
|
|
27
|
-
"version": "
|
|
27
|
+
"version": "4.5.0",
|
|
28
28
|
"packageName": "common/package.json",
|
|
29
|
-
"issuer": "common/src/
|
|
29
|
+
"issuer": "common/src/utils/layout.ts"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
|
-
"i18next": [
|
|
32
|
+
"react-i18next": [
|
|
33
33
|
{
|
|
34
34
|
"type": "explicit",
|
|
35
|
-
"version": "
|
|
35
|
+
"version": "15.4.0",
|
|
36
36
|
"packageName": "common/package.json",
|
|
37
37
|
"issuer": "common/src/api/i18next.ts"
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
|
-
"
|
|
40
|
+
"i18next": [
|
|
41
41
|
{
|
|
42
42
|
"type": "explicit",
|
|
43
|
-
"version": "
|
|
43
|
+
"version": "^23.7.16",
|
|
44
44
|
"packageName": "common/package.json",
|
|
45
|
-
"issuer": "common/src/
|
|
45
|
+
"issuer": "common/src/api/i18next.ts"
|
|
46
46
|
}
|
|
47
47
|
],
|
|
48
48
|
"dexie": [
|
|
49
|
-
{
|
|
50
|
-
"type": "explicit",
|
|
51
|
-
"version": "^4.0.11",
|
|
52
|
-
"packageName": "client-api-platform/package.json",
|
|
53
|
-
"issuer": "client-api-platform/src/api/dock/idb.ts"
|
|
54
|
-
},
|
|
55
49
|
{
|
|
56
50
|
"type": "root-implicit",
|
|
57
51
|
"version": "^4.0.11",
|
|
58
52
|
"packageName": "dock3/package.json",
|
|
59
53
|
"issuer": "dock3/src/api/idb.ts"
|
|
60
54
|
},
|
|
55
|
+
{
|
|
56
|
+
"type": "explicit",
|
|
57
|
+
"version": "^4.0.11",
|
|
58
|
+
"packageName": "client-api-platform/package.json",
|
|
59
|
+
"issuer": "client-api-platform/src/api/dock/idb.ts"
|
|
60
|
+
},
|
|
61
61
|
{
|
|
62
62
|
"type": "explicit",
|
|
63
63
|
"version": "^4.0.11",
|