@openfin/workspace-platform 24.0.3 → 24.0.4
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/context-menu/index.d.ts +2 -2
- package/client-api-platform/src/init/browser-window-focus.d.ts +4 -0
- package/client-api-platform/src/shapes.d.ts +39 -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/modal-bounds.d.ts +20 -0
- package/common/src/utils/popup-window.d.ts +27 -15
- package/common/src/utils/route.d.ts +2 -0
- package/common/src/utils/window.d.ts +1 -1
- package/externals.report.json +12 -12
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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>;
|
|
@@ -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.
|
|
@@ -615,6 +615,19 @@ export interface BrowserCreateViewRequest extends OpenFin.PlatformViewCreationOp
|
|
|
615
615
|
export interface BrowserViewState extends OpenFin.ViewState {
|
|
616
616
|
workspacePlatform?: BrowserWorkspacePlatformViewOptions;
|
|
617
617
|
}
|
|
618
|
+
/**
|
|
619
|
+
* Enables or disables the tab-search chevron button for a specific tab location.
|
|
620
|
+
*/
|
|
621
|
+
export interface TabSearchLocationOptions {
|
|
622
|
+
enabled: boolean;
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Configures where tab-search chevron buttons should be shown in a browser window.
|
|
626
|
+
*/
|
|
627
|
+
export interface TabSearchButtonOptions {
|
|
628
|
+
pageTabs?: TabSearchLocationOptions;
|
|
629
|
+
viewTabs?: TabSearchLocationOptions;
|
|
630
|
+
}
|
|
618
631
|
export interface BrowserWorkspacePlatformWindowOptions {
|
|
619
632
|
/** For internal usage. Defaults to 'browser' when Browser is enabled when the WorkspacePlatform is initialized. In order to use
|
|
620
633
|
* non-Browser layout windows ('platform' windows) in a Browser-enabled workspace platform, set windowType to `platform`. In that instance, the other properties
|
|
@@ -664,6 +677,32 @@ export interface BrowserWorkspacePlatformWindowOptions {
|
|
|
664
677
|
minWidth?: string;
|
|
665
678
|
maxWidth?: string;
|
|
666
679
|
};
|
|
680
|
+
/**
|
|
681
|
+
* Controls whether tab-search chevron buttons are shown for page tabs and view tabs.
|
|
682
|
+
*
|
|
683
|
+
* By default, both locations are disabled unless explicitly enabled.
|
|
684
|
+
*
|
|
685
|
+
* @example
|
|
686
|
+
* ```ts
|
|
687
|
+
* workspacePlatform: {
|
|
688
|
+
* tabSearchButton: {
|
|
689
|
+
* viewTabs: { enabled: true },
|
|
690
|
+
* pageTabs: { enabled: true }
|
|
691
|
+
* }
|
|
692
|
+
* }
|
|
693
|
+
* ```
|
|
694
|
+
*
|
|
695
|
+
* @example
|
|
696
|
+
* ```ts
|
|
697
|
+
* workspacePlatform: {
|
|
698
|
+
* tabSearchButton: {
|
|
699
|
+
* viewTabs: { enabled: true },
|
|
700
|
+
* // pageTabs omitted: disabled
|
|
701
|
+
* }
|
|
702
|
+
* }
|
|
703
|
+
* ```
|
|
704
|
+
*/
|
|
705
|
+
tabSearchButton?: TabSearchButtonOptions;
|
|
667
706
|
/**
|
|
668
707
|
* Accessibility options for the browser window.
|
|
669
708
|
* These options override the default accessibility options set at the platform or browser initialization level.
|
|
@@ -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>;
|
|
@@ -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,20 @@ 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
|
-
ZoomControls = "zoom-controls"
|
|
48
|
+
ZoomControls = "zoom-controls",
|
|
49
|
+
TabSearch = "tab-search"
|
|
49
50
|
}
|
|
50
51
|
export type BookmarkButtonPayload = {
|
|
51
52
|
selectedViewIdentity: OpenFin.Identity;
|
|
52
53
|
};
|
|
53
|
-
export type
|
|
54
|
-
type:
|
|
54
|
+
export type BasePopupMenuChannelMessage = {
|
|
55
|
+
type: PopupWindowMenuType;
|
|
55
56
|
/**
|
|
56
57
|
* The identity of the window the dialog/menu invocation came from.
|
|
57
58
|
*/
|
|
@@ -67,16 +68,16 @@ export type BaseEnterpriseMenuChannelMessage = {
|
|
|
67
68
|
x: number;
|
|
68
69
|
y: number;
|
|
69
70
|
};
|
|
70
|
-
export type ContextMenuChannelMessage =
|
|
71
|
-
type:
|
|
71
|
+
export type ContextMenuChannelMessage = BasePopupMenuChannelMessage & {
|
|
72
|
+
type: PopupWindowMenuType.ContextMenu | PopupWindowMenuType.GlobalMenu;
|
|
72
73
|
/**
|
|
73
74
|
* The unique request ID of the context menu invocation.
|
|
74
75
|
*/
|
|
75
76
|
requestId: string;
|
|
76
77
|
payload: OpenFin.ShowPopupMenuOptions;
|
|
77
78
|
};
|
|
78
|
-
export type BookmarkDialogChannelMessage =
|
|
79
|
-
type:
|
|
79
|
+
export type BookmarkDialogChannelMessage = BasePopupMenuChannelMessage & {
|
|
80
|
+
type: PopupWindowMenuType.AddEditBookmark;
|
|
80
81
|
payload: BookmarkButtonPayload;
|
|
81
82
|
};
|
|
82
83
|
export type ZoomControlsDialogPayload = {
|
|
@@ -84,12 +85,12 @@ export type ZoomControlsDialogPayload = {
|
|
|
84
85
|
zoomPercent?: number;
|
|
85
86
|
openedViaMouseClick?: boolean;
|
|
86
87
|
};
|
|
87
|
-
export type ZoomControlsDialogChannelMessage =
|
|
88
|
-
type:
|
|
88
|
+
export type ZoomControlsDialogChannelMessage = BasePopupMenuChannelMessage & {
|
|
89
|
+
type: PopupWindowMenuType.ZoomControls;
|
|
89
90
|
payload: ZoomControlsDialogPayload;
|
|
90
91
|
};
|
|
91
|
-
export type DropdownMenuChannelMessage =
|
|
92
|
-
type:
|
|
92
|
+
export type DropdownMenuChannelMessage = BasePopupMenuChannelMessage & {
|
|
93
|
+
type: PopupWindowMenuType.DropdownMenu;
|
|
93
94
|
payload: {
|
|
94
95
|
template: Array<OpenFin.MenuItemTemplate>;
|
|
95
96
|
/**
|
|
@@ -98,8 +99,8 @@ export type DropdownMenuChannelMessage = BaseEnterpriseMenuChannelMessage & {
|
|
|
98
99
|
width: number;
|
|
99
100
|
};
|
|
100
101
|
};
|
|
101
|
-
export type RenameSupertabChannelMessage =
|
|
102
|
-
type:
|
|
102
|
+
export type RenameSupertabChannelMessage = BasePopupMenuChannelMessage & {
|
|
103
|
+
type: PopupWindowMenuType.RenameSupertab;
|
|
103
104
|
payload: {
|
|
104
105
|
/**
|
|
105
106
|
* The pageId of the page being renamed.
|
|
@@ -107,6 +108,18 @@ export type RenameSupertabChannelMessage = BaseEnterpriseMenuChannelMessage & {
|
|
|
107
108
|
pageId: string;
|
|
108
109
|
};
|
|
109
110
|
};
|
|
111
|
+
export type TabSearchModalContent = {
|
|
112
|
+
variant: 'page' | 'view';
|
|
113
|
+
tabs: {
|
|
114
|
+
title: string;
|
|
115
|
+
id: string;
|
|
116
|
+
}[];
|
|
117
|
+
};
|
|
118
|
+
export type TabSearchChannelMessage = BasePopupMenuChannelMessage & {
|
|
119
|
+
type: PopupWindowMenuType.TabSearch;
|
|
120
|
+
requestId: string;
|
|
121
|
+
payload: TabSearchModalContent;
|
|
122
|
+
};
|
|
110
123
|
export type SearchMenuChannelResponse = {
|
|
111
124
|
type: 'ready';
|
|
112
125
|
} | {
|
|
@@ -135,5 +148,4 @@ export type SearchMenuChannelResponse = {
|
|
|
135
148
|
type: 'single-provider-results-announcement';
|
|
136
149
|
message: string;
|
|
137
150
|
};
|
|
138
|
-
export declare function showPopupWin<T extends keyof UserMenuParams>(parentWindow: OpenFin.Window, params: UserMenuParams[T], windowOpts: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
|
|
139
151
|
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,6 +19,7 @@ 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",
|
|
@@ -144,7 +145,6 @@ export declare function animateSize(width: number, height: number): Promise<void
|
|
|
144
145
|
* @returns boolean
|
|
145
146
|
*/
|
|
146
147
|
export declare const isBrowserWindow: (identity: OpenFin.Identity) => Promise<any>;
|
|
147
|
-
export declare const isModalWindowExceptZoomDialog: (identity: OpenFin.Identity) => boolean;
|
|
148
148
|
/**
|
|
149
149
|
* Force document body size. Called when resizing or on scaling changes.
|
|
150
150
|
*/
|
package/externals.report.json
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"issuer": "common/src/utils/layout.ts"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
|
-
"
|
|
16
|
+
"title-case": [
|
|
17
17
|
{
|
|
18
18
|
"type": "explicit",
|
|
19
|
-
"version": "
|
|
19
|
+
"version": "3.0.3",
|
|
20
20
|
"packageName": "common/package.json",
|
|
21
|
-
"issuer": "common/src/utils/
|
|
21
|
+
"issuer": "common/src/utils/color-linking.ts"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
24
24
|
"react-i18next": [
|
|
@@ -37,27 +37,27 @@
|
|
|
37
37
|
"issuer": "common/src/api/i18next.ts"
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
|
-
"
|
|
40
|
+
"lodash.clonedeep": [
|
|
41
41
|
{
|
|
42
42
|
"type": "explicit",
|
|
43
|
-
"version": "
|
|
43
|
+
"version": "4.5.0",
|
|
44
44
|
"packageName": "common/package.json",
|
|
45
|
-
"issuer": "common/src/utils/
|
|
45
|
+
"issuer": "common/src/utils/layout.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",
|