@openfin/workspace 18.1.23 → 18.1.24
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 +10 -3
- package/client-api-platform/src/shapes.d.ts +54 -20
- package/common/src/utils/context-menu.d.ts +3 -1
- package/common/src/utils/route.d.ts +2 -1
- package/common/src/utils/window.d.ts +1 -0
- package/home.js +120 -7
- package/home.js.map +1 -1
- package/index.js +115 -2
- package/index.js.map +1 -1
- package/notifications.js +155 -42
- package/notifications.js.map +1 -1
- package/package.json +1 -1
- package/store.js +120 -7
- package/store.js.map +1 -1
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import {
|
|
3
|
-
export declare
|
|
2
|
+
import { InternalOpenGlobalContextMenuRequest, OpenGlobalContextMenuPayload, OpenPageTabContextMenuPayload, OpenPageTabContextMenuRequest, OpenSaveButtonContextMenuPayload, OpenSaveButtonContextMenuRequest, OpenViewTabContextMenuPayload, OpenViewTabContextMenuRequest, WorkspacePlatformProvider } from '../../../../client-api-platform/src/shapes';
|
|
3
|
+
export declare enum AnchorBehavior {
|
|
4
|
+
BottomLeft = 0,
|
|
5
|
+
BottomRight = 1,
|
|
6
|
+
TopLeft = 2,
|
|
7
|
+
TopRight = 3,
|
|
8
|
+
Center = 4
|
|
9
|
+
}
|
|
10
|
+
export declare const openCommonContextMenu: (payload: OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload, _callerIdentity: OpenFin.Identity, anchorBehavior?: AnchorBehavior) => Promise<void>;
|
|
11
|
+
export declare function openGlobalContextMenuInternal(this: WorkspacePlatformProvider, payload: InternalOpenGlobalContextMenuRequest & {
|
|
4
12
|
identity: OpenFin.Identity;
|
|
5
13
|
}, callerIdentity: OpenFin.Identity): Promise<void>;
|
|
6
|
-
export declare const openCommonContextMenu: (payload: OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload, _callerIdentity: OpenFin.Identity) => Promise<void>;
|
|
7
14
|
export declare function openViewTabContextMenuInternal(this: WorkspacePlatformProvider, payload: OpenViewTabContextMenuRequest & {
|
|
8
15
|
identity: OpenFin.Identity;
|
|
9
16
|
}, callerIdentity: OpenFin.Identity): Promise<void>;
|
|
@@ -87,9 +87,9 @@ export interface ReorderPagesRequest {
|
|
|
87
87
|
* Request for opening a logo context menu in Browser.
|
|
88
88
|
*/
|
|
89
89
|
export interface OpenGlobalContextMenuRequest {
|
|
90
|
-
/**
|
|
90
|
+
/** Client x-coordinate where context menu should be shown. */
|
|
91
91
|
x: number;
|
|
92
|
-
/**
|
|
92
|
+
/** Client y-coordinate where context menu should be shown. */
|
|
93
93
|
y: number;
|
|
94
94
|
/** Miscellaneous options necessary for implementing custom logic in the provider override. */
|
|
95
95
|
customData?: any;
|
|
@@ -225,28 +225,37 @@ export type OpenGlobalContextMenuPayload = OpenGlobalContextMenuRequest & {
|
|
|
225
225
|
/** Default function that handles stock context menu options. */
|
|
226
226
|
callback: (data: GlobalContextMenuItemData, payload: OpenGlobalContextMenuPayload) => any;
|
|
227
227
|
};
|
|
228
|
+
/**
|
|
229
|
+
* Request for opening the global context menu with custom context menu in Enterprise Browser.
|
|
230
|
+
* @internal
|
|
231
|
+
*/
|
|
232
|
+
export type InternalOpenGlobalContextMenuRequest = OpenGlobalContextMenuRequest & {
|
|
233
|
+
/** Coordinates associated with a target element for a custom context menu request. */
|
|
234
|
+
rect?: DOMRect;
|
|
235
|
+
};
|
|
228
236
|
export type ViewTabContextMenuTemplate = OpenFin.MenuItemTemplate<ViewTabMenuData>;
|
|
229
237
|
/**
|
|
230
238
|
* Request for opening a view tab context menu in Browser.
|
|
231
239
|
*/
|
|
232
240
|
export interface OpenViewTabContextMenuRequest {
|
|
233
|
-
/**
|
|
241
|
+
/** Client x-coordinate where context menu should be shown. */
|
|
234
242
|
x: number;
|
|
235
|
-
/**
|
|
243
|
+
/** Client y-coordinate where context menu should be shown. */
|
|
236
244
|
y: number;
|
|
237
245
|
/** Miscellaneous options necessary for implementing custom logic in the provider override. */
|
|
238
246
|
customData?: any;
|
|
239
247
|
/** Template defining the options to show in the context menu. */
|
|
240
248
|
template: ViewTabContextMenuTemplate[];
|
|
249
|
+
/** Ids of selected views */
|
|
241
250
|
selectedViews: OpenFin.Identity[];
|
|
242
251
|
}
|
|
243
252
|
/**
|
|
244
253
|
* Request for opening a page tab context menu in Browser.
|
|
245
254
|
*/
|
|
246
255
|
export interface OpenPageTabContextMenuRequest {
|
|
247
|
-
/**
|
|
256
|
+
/** Client x-coordinate where context menu should be shown. */
|
|
248
257
|
x: number;
|
|
249
|
-
/**
|
|
258
|
+
/** Client y-coordinate where context menu should be shown. */
|
|
250
259
|
y: number;
|
|
251
260
|
/** Miscellaneous options necessary for implementing custom logic in the provider override. */
|
|
252
261
|
customData?: any;
|
|
@@ -523,9 +532,9 @@ export interface SaveButtonContextMenuItemTemplate extends OpenFin.MenuItemTempl
|
|
|
523
532
|
* Request for opening a context menu from save button in Browser.
|
|
524
533
|
*/
|
|
525
534
|
export interface OpenSaveButtonContextMenuRequest {
|
|
526
|
-
/**
|
|
535
|
+
/** Client x-coordinate where context menu should be shown. */
|
|
527
536
|
x: number;
|
|
528
|
-
/**
|
|
537
|
+
/** Client y-coordinate where context menu should be shown. */
|
|
529
538
|
y: number;
|
|
530
539
|
/** Screen x-coordinate of save button */
|
|
531
540
|
buttonLeft: number;
|
|
@@ -986,7 +995,7 @@ export interface BrowserWindowModule {
|
|
|
986
995
|
* @param req the global context menu request.
|
|
987
996
|
* @internal
|
|
988
997
|
*/
|
|
989
|
-
_openGlobalContextMenu(req:
|
|
998
|
+
_openGlobalContextMenu(req: InternalOpenGlobalContextMenuRequest): Promise<void>;
|
|
990
999
|
/** @internal */
|
|
991
1000
|
_openViewTabContextMenu(req: OpenViewTabContextMenuRequest): Promise<void>;
|
|
992
1001
|
/** @internal */
|
|
@@ -1067,6 +1076,7 @@ export type NavigationRequest = {
|
|
|
1067
1076
|
viewIdentity: OpenFin.Identity;
|
|
1068
1077
|
} & ({
|
|
1069
1078
|
action: 'result-selected';
|
|
1079
|
+
trigger?: SiteAction;
|
|
1070
1080
|
site: Site;
|
|
1071
1081
|
} | (SearchSitesRequest & {
|
|
1072
1082
|
action: 'search-input';
|
|
@@ -1080,29 +1090,53 @@ export type SearchSitesRequest = {
|
|
|
1080
1090
|
/**
|
|
1081
1091
|
* @internal
|
|
1082
1092
|
*/
|
|
1083
|
-
export type SearchSitesResponse =
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1093
|
+
export type SearchSitesResponse = Record<string, Site[]>;
|
|
1094
|
+
/**
|
|
1095
|
+
* @internal
|
|
1096
|
+
*/
|
|
1097
|
+
export type SiteAction = {
|
|
1098
|
+
id: string;
|
|
1099
|
+
title: string;
|
|
1100
|
+
altText?: string;
|
|
1101
|
+
lightIcon?: string;
|
|
1102
|
+
darkIcon?: string;
|
|
1088
1103
|
};
|
|
1089
1104
|
/**
|
|
1090
1105
|
* @internal
|
|
1091
1106
|
*/
|
|
1092
|
-
export type
|
|
1107
|
+
export type SiteInfo = {
|
|
1093
1108
|
id: string;
|
|
1094
1109
|
title: string;
|
|
1110
|
+
subTitle?: string;
|
|
1095
1111
|
cta?: string;
|
|
1112
|
+
actions?: SiteAction[];
|
|
1113
|
+
};
|
|
1114
|
+
/**
|
|
1115
|
+
* @internal
|
|
1116
|
+
*/
|
|
1117
|
+
export type AppSite = SiteInfo & {
|
|
1096
1118
|
type: 'app' | 'website';
|
|
1097
|
-
url
|
|
1119
|
+
url?: string;
|
|
1098
1120
|
icon: string;
|
|
1099
1121
|
customData?: unknown;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1122
|
+
};
|
|
1123
|
+
/**
|
|
1124
|
+
* @internal
|
|
1125
|
+
*/
|
|
1126
|
+
export type WorkspaceSite = SiteInfo & {
|
|
1104
1127
|
type: 'page' | 'workspace';
|
|
1105
1128
|
};
|
|
1129
|
+
/**
|
|
1130
|
+
* @internal
|
|
1131
|
+
*/
|
|
1132
|
+
export type Site = AppSite | WorkspaceSite;
|
|
1133
|
+
/**
|
|
1134
|
+
* @internal
|
|
1135
|
+
* action is undefined when the site is actioned with the default action.
|
|
1136
|
+
*/
|
|
1137
|
+
export type ActionedSite = Site & {
|
|
1138
|
+
action?: SiteAction;
|
|
1139
|
+
};
|
|
1106
1140
|
/**
|
|
1107
1141
|
* Factory for wrapping browser windows and global operations.
|
|
1108
1142
|
*/
|
|
@@ -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
|
export declare enum MenuItemType {
|
|
3
4
|
Label = "normal",
|
|
4
5
|
Separator = "separator",
|
|
@@ -8,7 +9,8 @@ export declare enum MenuItemType {
|
|
|
8
9
|
export type ShowContextMenuResponse = OpenFin.MenuResult & {
|
|
9
10
|
data: any;
|
|
10
11
|
};
|
|
11
|
-
export
|
|
12
|
+
export declare function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window): Promise<ShowContextMenuResponse>;
|
|
13
|
+
export declare const showEnterpriseContextMenu: (opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window, anchorBehavior?: AnchorBehavior) => Promise<ShowContextMenuResponse>;
|
|
12
14
|
export declare const Separator: OpenFin.MenuItemTemplate;
|
|
13
15
|
export declare const EmptyContextMenuItem: OpenFin.MenuItemTemplate;
|
|
14
16
|
export declare const DefaultSaveMenuBounds: {
|
|
@@ -22,7 +22,8 @@ export declare enum PageRoute {
|
|
|
22
22
|
Storefront = "/storefront/",
|
|
23
23
|
DeprecatedAlert = "/provider/deprecated-alert/",
|
|
24
24
|
Analytics = "/provider/analytics/",
|
|
25
|
-
EnterpriseBrowser = "/browser/enterprise/"
|
|
25
|
+
EnterpriseBrowser = "/browser/enterprise/",
|
|
26
|
+
EnterpriseContextMenu = "/browser/enterprise/context-menu/"
|
|
26
27
|
}
|
|
27
28
|
export declare const Assets: {
|
|
28
29
|
readonly IconOpenFinLogo: "/icons/openfinlogo.svg";
|
|
@@ -10,6 +10,7 @@ export declare enum WindowName {
|
|
|
10
10
|
BrowserIndicator = "openfin-browser-indicator",
|
|
11
11
|
BrowserWindow = "internal-generated-window",
|
|
12
12
|
ClassicWindow = "internal-generated-classic-window",
|
|
13
|
+
EnterpriseContextMenu = "openfin-enterprise-context-menu",
|
|
13
14
|
BrowserAddressSearchPrefix = "openfin-browser-menu-address-search-"
|
|
14
15
|
}
|
|
15
16
|
export interface WindowIdentity {
|