@openfin/workspace-platform 22.0.2 → 22.0.3
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/context-menu/index.d.ts +2 -2
- package/client-api-platform/src/api/modal.d.ts +4 -0
- package/client-api-platform/src/init/override-callback/dialogs.d.ts +2 -1
- package/client-api-platform/src/shapes.d.ts +7 -0
- package/common/src/api/pages/enterprise-shapes.d.ts +57 -0
- package/common/src/api/protocol/workspace-platform.d.ts +3 -1
- package/common/src/utils/color-linking.d.ts +4 -0
- package/common/src/utils/context-menu.d.ts +3 -2
- package/common/src/utils/enterprise-channels.d.ts +1 -0
- package/common/src/utils/menu-config.d.ts +5 -1
- package/common/src/utils/menu-window-provider.d.ts +9 -3
- package/common/src/utils/popup-window.d.ts +43 -8
- package/common/src/utils/window.d.ts +2 -1
- package/common/src/utils/workspace-modals.d.ts +6 -0
- package/externals.report.json +8 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +3 -2
- package/workspace_platform.zip +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import {
|
|
2
|
+
import { EnterpriseMenuType } 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?: EnterpriseMenuType, 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>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { SendUpdateVersionModalResponsePayload } from '../../../client-api-platform/src/shapes';
|
|
3
|
+
export declare const enterpriseModalChannelClient: () => Promise<OpenFin.ChannelClient>;
|
|
4
|
+
export declare function sendUpdateVersionModalResponse(payload: SendUpdateVersionModalResponsePayload): Promise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import { ShowQuitPlatformDialogRequest } from '../../../../client-api-platform/src/shapes';
|
|
2
|
+
import { ShowQuitPlatformDialogRequest, ShowUpdateVersionModalRequest } from '../../../../client-api-platform/src/shapes';
|
|
3
3
|
export declare const showQuitPlatformDialogInternal: (req: ShowQuitPlatformDialogRequest, identity: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<void>;
|
|
4
|
+
export declare const showUpdateVersionModalInternal: (req: ShowUpdateVersionModalRequest, identity: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<void>;
|
|
@@ -161,12 +161,16 @@ export declare enum PageTabContextMenuOptionType {
|
|
|
161
161
|
Print = "Print",
|
|
162
162
|
PrintAll = "PrintAll",
|
|
163
163
|
PrintScreen = "PrintScreen",
|
|
164
|
+
AddToChannel = "AddToChannel",
|
|
164
165
|
Custom = "Custom"
|
|
165
166
|
}
|
|
166
167
|
/**Shape of the data property of a global context menu template item */
|
|
167
168
|
export interface GlobalContextMenuItemData extends ContextMenuItemData {
|
|
168
169
|
type: GlobalContextMenuOptionType;
|
|
169
170
|
}
|
|
171
|
+
export interface AddToChanel extends GlobalContextMenuItemData {
|
|
172
|
+
workspaceId: string;
|
|
173
|
+
}
|
|
170
174
|
export interface WorkspaceContextMenuItemData extends GlobalContextMenuItemData {
|
|
171
175
|
workspaceId: string;
|
|
172
176
|
}
|
|
@@ -178,6 +182,9 @@ export type GlobalContextMenuItemTemplate = OpenFin.MenuItemTemplate<GlobalConte
|
|
|
178
182
|
/**Shape of the data property of a page tab context menu template item */
|
|
179
183
|
export interface PageTabContextMenuItemData extends ContextMenuItemData {
|
|
180
184
|
type: PageTabContextMenuOptionType;
|
|
185
|
+
/** Property to specify which option was selected when there are
|
|
186
|
+
* several options of the same type (e.g. which channel was selected) */
|
|
187
|
+
option?: string;
|
|
181
188
|
}
|
|
182
189
|
/**Configuration of an option in the page tab context menu */
|
|
183
190
|
export interface PageTabContextMenuItemTemplate extends OpenFin.MenuItemTemplate {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { OpenFin } from '@openfin/core';
|
|
2
|
+
import { ExtendedPanelConfig, PageLayout, PanelConfig } from '../../../../client-api-platform/src/index';
|
|
3
|
+
export interface Page {
|
|
4
|
+
/** A UI friendly title for the page. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** The unique ID of the page. */
|
|
7
|
+
pageId: string;
|
|
8
|
+
/** An optional UI friendly description of the page. */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** A optional UI friendly tooltip for the page. */
|
|
11
|
+
tooltip?: string;
|
|
12
|
+
/**
|
|
13
|
+
* True if the page is read only. In this state, the page is locked and cannot be unlocked.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated This property is deprecated and will be removed in a future release. Setting it has no effect. To _"lock"_ a page, and prevent the ability to close pages, drag pages within the window and drag pages into/out of the window, use the `isLocked` property.
|
|
16
|
+
*/
|
|
17
|
+
isReadOnly?: boolean;
|
|
18
|
+
/** Icon that appears on a page tab if there are unsaved changes (dirty state). If 'undefined', default icon will appear. */
|
|
19
|
+
unsavedIconUrl?: string;
|
|
20
|
+
/** Icon that appears on a page tab if there are no unsaved changes. If 'undefined', default icon will appear. */
|
|
21
|
+
iconUrl?: string;
|
|
22
|
+
/** The layout of the page. */
|
|
23
|
+
layout: PageLayout;
|
|
24
|
+
/** True if the page is locked. */
|
|
25
|
+
isLocked?: boolean;
|
|
26
|
+
/** Used to manipulate behaviour of a close button on a page tab. If `undefined`, then close button is visible and actionable.
|
|
27
|
+
* If either property true, this page tab's context menu will disable its 'Close Page' option.
|
|
28
|
+
*/
|
|
29
|
+
closeButton?: {
|
|
30
|
+
hidden?: boolean;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
};
|
|
33
|
+
/** Used to configure fixed views on the edges of the browser window. Only one panel per side is supported. */
|
|
34
|
+
panels?: PanelConfig[];
|
|
35
|
+
/** Used to define the context group for the page */
|
|
36
|
+
contextGroup?: string;
|
|
37
|
+
/** Optional property to attach custom metadata to the page object, such as version or timestamp. Must be serializable. */
|
|
38
|
+
customData?: any;
|
|
39
|
+
}
|
|
40
|
+
type AttachedPageMetadata = {
|
|
41
|
+
/** The window the page is currently attached to. */
|
|
42
|
+
parentIdentity?: OpenFin.Identity;
|
|
43
|
+
/** True if the page is the currently active page for its parent window. */
|
|
44
|
+
isActive?: boolean;
|
|
45
|
+
/** True if the page has unsaved changes. */
|
|
46
|
+
hasUnsavedChanges?: boolean;
|
|
47
|
+
/** Panel config with all view identities in place */
|
|
48
|
+
panels?: ExtendedPanelConfig[];
|
|
49
|
+
};
|
|
50
|
+
export type AttachedPage = Page & AttachedPageMetadata;
|
|
51
|
+
export type AttachedPageInternal = {
|
|
52
|
+
layoutContainerKey?: string;
|
|
53
|
+
singleViewName?: string;
|
|
54
|
+
attachedPageType?: 'singleView' | 'multiView' | undefined;
|
|
55
|
+
isLayoutCreated?: boolean;
|
|
56
|
+
} & AttachedPage;
|
|
57
|
+
export {};
|
|
@@ -87,7 +87,9 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
87
87
|
HandleDockWorkspacesMenuResponseInternal = "handleDockWorkspacesMenuResponseInternal",
|
|
88
88
|
RemoveDockFavoriteInternal = "removeDockFavoriteInternal",
|
|
89
89
|
AddDockFavoriteInternal = "addDockFavoriteInternal",
|
|
90
|
-
FocusAndExpandSearchInternal = "focusAndExpandSearchInternal"
|
|
90
|
+
FocusAndExpandSearchInternal = "focusAndExpandSearchInternal",
|
|
91
|
+
SendUpdateVersionModalResponseInternal = "sendUpdateVersionModalResponseInternal",
|
|
92
|
+
ShowUpdateVersionModalInternal = "showUpdateVersionModalInternal"
|
|
91
93
|
}
|
|
92
94
|
export type PlatFormSupportedFeatures = boolean | {
|
|
93
95
|
isWorkspacePlatform: boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { ViewTabContextMenuTemplate } from '../../../client-api-platform/src/shapes';
|
|
3
|
+
export declare const getChannelsMenuOptions: (channelsForViews: string[], colorGroups: OpenFin.ContextGroupInfo[]) => Promise<ViewTabContextMenuTemplate[]>;
|
|
4
|
+
export declare const ENTERPRISE_COLOR_CHANNELS: Map<string, OpenFin.ContextGroupInfo['displayMetadata']>;
|
|
@@ -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 { EnterpriseMenuType } from './popup-window';
|
|
5
5
|
export declare enum MenuItemType {
|
|
6
6
|
Label = "normal",
|
|
7
7
|
Separator = "separator",
|
|
@@ -10,9 +10,10 @@ export declare enum MenuItemType {
|
|
|
10
10
|
}
|
|
11
11
|
export type ShowContextMenuResponse = OpenFin.MenuResult & {
|
|
12
12
|
data: any;
|
|
13
|
+
requestId?: string;
|
|
13
14
|
};
|
|
14
15
|
export declare function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window): Promise<ShowContextMenuResponse>;
|
|
15
|
-
export declare const showEnterpriseContextMenu: (opts: OpenFin.ShowPopupMenuOptions, type:
|
|
16
|
+
export declare const showEnterpriseContextMenu: (opts: OpenFin.ShowPopupMenuOptions, type: EnterpriseMenuType, anchorBehavior: AnchorBehavior, win?: OpenFin.Window) => Promise<ShowContextMenuResponse>;
|
|
16
17
|
export declare const Separator: OpenFin.MenuItemTemplate;
|
|
17
18
|
export declare const EmptyContextMenuItem: OpenFin.MenuItemTemplate;
|
|
18
19
|
export declare const DefaultSaveMenuBounds: {
|
|
@@ -12,3 +12,4 @@ export declare const connectToBookmarkPanelActionsMonitor: () => Promise<OpenFin
|
|
|
12
12
|
export declare const createContextMenuChannel: () => Promise<OpenFin.ChannelProvider>;
|
|
13
13
|
export declare const connectToContextMenuChannel: () => Promise<OpenFin.ChannelClient>;
|
|
14
14
|
export declare const connectToEnterpriseContentChannel: (uuid: string) => Promise<OpenFin.ChannelClient>;
|
|
15
|
+
export declare const connectToEnterpriseModalChannel: (uuid: string) => Promise<OpenFin.ChannelClient>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import type { OptionalExceptFor } from '../../../common/src/utils/types';
|
|
3
3
|
export interface MenuConfig {
|
|
4
|
-
windowOptions: OptionalExceptFor<OpenFin.WindowOptions, 'url' | 'name' | 'defaultHeight' | 'defaultWidth'
|
|
4
|
+
windowOptions: OptionalExceptFor<OpenFin.WindowOptions, 'url' | 'name' | 'defaultHeight' | 'defaultWidth'> & {
|
|
5
|
+
preventBlur?: boolean;
|
|
6
|
+
closeOnResponse?: boolean;
|
|
7
|
+
};
|
|
5
8
|
title: string;
|
|
6
9
|
parameters?: URLSearchParams;
|
|
7
10
|
}
|
|
@@ -39,4 +42,5 @@ export type ButtonConfig = {
|
|
|
39
42
|
type: 'primary' | 'secondary';
|
|
40
43
|
id: string;
|
|
41
44
|
variant?: 'critical' | 'outline' | 'submit';
|
|
45
|
+
dataTestId?: string;
|
|
42
46
|
};
|
|
@@ -27,13 +27,19 @@ type WindowOptionsWithBounds = OptionalExceptFor<OpenFin.WindowOptions, 'name' |
|
|
|
27
27
|
top: number;
|
|
28
28
|
left: number;
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
type ModalWindowOptions = WindowOptionsWithBounds & {
|
|
31
|
+
preventBlur?: boolean;
|
|
32
|
+
closeOnResponse?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare function createChildWindow(opts: OptionalExceptFor<OpenFin.WindowOptions, 'name' | 'url'> & {
|
|
35
|
+
preventBlur?: boolean;
|
|
36
|
+
}, route?: string, bounds?: Partial<OpenFin.Bounds>): Promise<OpenFin.Window>;
|
|
31
37
|
export interface ShowChildOptions {
|
|
32
|
-
options:
|
|
38
|
+
options: ModalWindowOptions;
|
|
33
39
|
parameters?: URLSearchParams;
|
|
34
40
|
}
|
|
35
41
|
export interface ResponseModalOptions {
|
|
36
|
-
options:
|
|
42
|
+
options: ModalWindowOptions;
|
|
37
43
|
content: ResponseModalContent;
|
|
38
44
|
parameters?: URLSearchParams;
|
|
39
45
|
}
|
|
@@ -33,7 +33,7 @@ export type BrowserSearchMenuKeyboardEvent = {
|
|
|
33
33
|
altKey?: boolean;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
export declare enum
|
|
36
|
+
export declare enum EnterpriseMenuType {
|
|
37
37
|
GlobalMenu = "global-menu",
|
|
38
38
|
ContextMenu = "context-menu",
|
|
39
39
|
RenameSupertab = "rename-supertab",
|
|
@@ -41,19 +41,54 @@ export declare enum ContextMenuType {
|
|
|
41
41
|
DropdownMenu = "dropdown-menu"
|
|
42
42
|
}
|
|
43
43
|
export type BookmarkButtonPayload = {
|
|
44
|
-
selectedViewIdentity
|
|
44
|
+
selectedViewIdentity: OpenFin.Identity;
|
|
45
45
|
};
|
|
46
|
-
export type
|
|
46
|
+
export type BaseEnterpriseMenuChannelMessage = {
|
|
47
|
+
type: EnterpriseMenuType;
|
|
48
|
+
/**
|
|
49
|
+
* The identity of the window the dialog/menu invocation came from.
|
|
50
|
+
*/
|
|
47
51
|
parentIdentity: OpenFin.Identity;
|
|
52
|
+
/**
|
|
53
|
+
* The identity of the window the dialog/menu should respond to.
|
|
54
|
+
*
|
|
55
|
+
* This may differ from the parentIdentity, such as in the case of custom context menus, where the
|
|
56
|
+
* parent is a browser window but the context menu should respond to the provider window.
|
|
57
|
+
*/
|
|
48
58
|
responseIdentity: OpenFin.Identity;
|
|
49
|
-
|
|
59
|
+
anchorBehavior?: AnchorBehavior;
|
|
50
60
|
x: number;
|
|
51
61
|
y: number;
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
};
|
|
63
|
+
export type ContextMenuChannelMessage = BaseEnterpriseMenuChannelMessage & {
|
|
64
|
+
type: EnterpriseMenuType.ContextMenu | EnterpriseMenuType.GlobalMenu;
|
|
65
|
+
/**
|
|
66
|
+
* The unique request ID of the context menu invocation.
|
|
67
|
+
*/
|
|
68
|
+
requestId: string;
|
|
69
|
+
payload: OpenFin.ShowPopupMenuOptions;
|
|
70
|
+
};
|
|
71
|
+
export type BookmarkDialogChannelMessage = BaseEnterpriseMenuChannelMessage & {
|
|
72
|
+
type: EnterpriseMenuType.AddEditBookmark;
|
|
73
|
+
payload: BookmarkButtonPayload;
|
|
74
|
+
};
|
|
75
|
+
export type DropdownMenuChannelMessage = BaseEnterpriseMenuChannelMessage & {
|
|
76
|
+
type: EnterpriseMenuType.DropdownMenu;
|
|
77
|
+
payload: {
|
|
78
|
+
template: Array<OpenFin.MenuItemTemplate>;
|
|
79
|
+
/**
|
|
80
|
+
* The width of the dropdown element in the DOM to determine the width of the menu window.
|
|
81
|
+
*/
|
|
82
|
+
width: number;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export type RenameSupertabChannelMessage = BaseEnterpriseMenuChannelMessage & {
|
|
86
|
+
type: EnterpriseMenuType.RenameSupertab;
|
|
87
|
+
payload: {
|
|
88
|
+
/**
|
|
89
|
+
* The pageId of the page being renamed.
|
|
90
|
+
*/
|
|
54
91
|
pageId: string;
|
|
55
|
-
} | BookmarkButtonPayload) & {
|
|
56
|
-
width?: number;
|
|
57
92
|
};
|
|
58
93
|
};
|
|
59
94
|
export type SearchMenuChannelResponse = {
|
|
@@ -15,7 +15,8 @@ export declare enum WindowName {
|
|
|
15
15
|
EnterpriseBookmarkDialogWindow = "openfin-enterprise-bookmark-dialog",
|
|
16
16
|
DropdownMenu = "openfin-enterprise-dropdown-menu",
|
|
17
17
|
DockCompanion = "openfin-dock-companion",
|
|
18
|
-
AICompanionPrefix = "openfin-ai-companion-"
|
|
18
|
+
AICompanionPrefix = "openfin-ai-companion-",
|
|
19
|
+
UpdateVersionModal = "here-update-version-modal"
|
|
19
20
|
}
|
|
20
21
|
export interface WindowIdentity {
|
|
21
22
|
uuid: ApplicationUUID | string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { ResponseModalConfig } from '../../../common/src/utils/menu-config';
|
|
3
|
+
import { ModalResponseEvent } from './menu-window-provider';
|
|
3
4
|
export declare const restoreChangesMenu: (windowIdentity: OpenFin.Identity) => Promise<ResponseModalConfig>;
|
|
4
5
|
export declare const deletePageMenu: (windowIdentity: OpenFin.Identity, pageTitle: string) => Promise<ResponseModalConfig>;
|
|
5
6
|
/**
|
|
@@ -23,3 +24,8 @@ export declare const showQuitBrowserModal: (windowIdentity: OpenFin.Identity) =>
|
|
|
23
24
|
export declare const showRestoreChangesModal: (windowIdentity: OpenFin.Identity) => Promise<boolean>;
|
|
24
25
|
export declare const getOverwriteWorkspaceMenu: (workspaceTitle: string) => Promise<ResponseModalConfig>;
|
|
25
26
|
export declare const showDeletePageModal: (windowIdentity: OpenFin.Identity, pageTitle: string) => Promise<boolean>;
|
|
27
|
+
export declare const showUpdateVersionModal: ({ identity, title, description }: {
|
|
28
|
+
identity: OpenFin.Identity;
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
}) => Promise<ModalResponseEvent['data']>;
|
package/externals.report.json
CHANGED
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
"issuer": "common/src/utils/layout.ts"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
|
+
"title-case": [
|
|
17
|
+
{
|
|
18
|
+
"type": "root-implicit",
|
|
19
|
+
"version": "3.0.3",
|
|
20
|
+
"packageName": "common/package.json",
|
|
21
|
+
"issuer": "common/src/utils/color-linking.ts"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
16
24
|
"react-i18next": [
|
|
17
25
|
{
|
|
18
26
|
"type": "root-implicit",
|