@openfin/workspace-platform 18.1.23 → 18.1.25
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 +4 -0
- package/client-api-platform/src/api/context-menu/index.d.ts +10 -3
- package/client-api-platform/src/api/context-menu/index.test.d.ts +1 -0
- package/client-api-platform/src/shapes.d.ts +9 -8
- package/common/src/api/protocol/workspace-platform.d.ts +1 -1
- package/common/src/utils/context-menu.d.ts +3 -1
- package/common/src/utils/enterprise-context-menu-cahnnels.d.ts +3 -0
- package/common/src/utils/route.d.ts +2 -1
- package/common/src/utils/window.d.ts +1 -0
- package/index.js +118 -5
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { App } from '../../../client-api/src/shapes';
|
|
2
3
|
import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site } from '../shapes';
|
|
3
4
|
/**
|
|
4
5
|
* Launch the app described by an App Directory entry.
|
|
@@ -15,3 +16,6 @@ export declare function getResults(payload: {
|
|
|
15
16
|
export declare function getCuratedContent(payload: {
|
|
16
17
|
identity: OpenFin.Identity;
|
|
17
18
|
}): Promise<Site[]>;
|
|
19
|
+
export declare function getRecentlyVisited(payload: {
|
|
20
|
+
identity: OpenFin.Identity;
|
|
21
|
+
}): Promise<App[]>;
|
|
@@ -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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@common/test/fin-mocks';
|
|
@@ -85,9 +85,9 @@ export interface ReorderPagesRequest {
|
|
|
85
85
|
* Request for opening a logo context menu in Browser.
|
|
86
86
|
*/
|
|
87
87
|
export interface OpenGlobalContextMenuRequest {
|
|
88
|
-
/**
|
|
88
|
+
/** Client x-coordinate where context menu should be shown. */
|
|
89
89
|
x: number;
|
|
90
|
-
/**
|
|
90
|
+
/** Client y-coordinate where context menu should be shown. */
|
|
91
91
|
y: number;
|
|
92
92
|
/** Miscellaneous options necessary for implementing custom logic in the provider override. */
|
|
93
93
|
customData?: any;
|
|
@@ -213,23 +213,24 @@ export type ViewTabContextMenuTemplate = OpenFin.MenuItemTemplate<ViewTabMenuDat
|
|
|
213
213
|
* Request for opening a view tab context menu in Browser.
|
|
214
214
|
*/
|
|
215
215
|
export interface OpenViewTabContextMenuRequest {
|
|
216
|
-
/**
|
|
216
|
+
/** Client x-coordinate where context menu should be shown. */
|
|
217
217
|
x: number;
|
|
218
|
-
/**
|
|
218
|
+
/** Client y-coordinate where context menu should be shown. */
|
|
219
219
|
y: number;
|
|
220
220
|
/** Miscellaneous options necessary for implementing custom logic in the provider override. */
|
|
221
221
|
customData?: any;
|
|
222
222
|
/** Template defining the options to show in the context menu. */
|
|
223
223
|
template: ViewTabContextMenuTemplate[];
|
|
224
|
+
/** Ids of selected views */
|
|
224
225
|
selectedViews: OpenFin.Identity[];
|
|
225
226
|
}
|
|
226
227
|
/**
|
|
227
228
|
* Request for opening a page tab context menu in Browser.
|
|
228
229
|
*/
|
|
229
230
|
export interface OpenPageTabContextMenuRequest {
|
|
230
|
-
/**
|
|
231
|
+
/** Client x-coordinate where context menu should be shown. */
|
|
231
232
|
x: number;
|
|
232
|
-
/**
|
|
233
|
+
/** Client y-coordinate where context menu should be shown. */
|
|
233
234
|
y: number;
|
|
234
235
|
/** Miscellaneous options necessary for implementing custom logic in the provider override. */
|
|
235
236
|
customData?: any;
|
|
@@ -506,9 +507,9 @@ export interface SaveButtonContextMenuItemTemplate extends OpenFin.MenuItemTempl
|
|
|
506
507
|
* Request for opening a context menu from save button in Browser.
|
|
507
508
|
*/
|
|
508
509
|
export interface OpenSaveButtonContextMenuRequest {
|
|
509
|
-
/**
|
|
510
|
+
/** Client x-coordinate where context menu should be shown. */
|
|
510
511
|
x: number;
|
|
511
|
-
/**
|
|
512
|
+
/** Client y-coordinate where context menu should be shown. */
|
|
512
513
|
y: number;
|
|
513
514
|
/** Screen x-coordinate of save button */
|
|
514
515
|
buttonLeft: number;
|
|
@@ -65,7 +65,7 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
65
65
|
TrackRemovedTabInternal = "trackRemovedTabInternal",
|
|
66
66
|
RestoreRemovedTabInternal = "restoreRemovedTabInternal",
|
|
67
67
|
TrackVisitedSiteInternal = "trackVisitedSiteInternal",
|
|
68
|
-
|
|
68
|
+
GetRecentlyVisitedSitesInternal = "getRecentlyVisitedSitesInternal",
|
|
69
69
|
GetFrequentlyVisitedSitesInternal = "getFrequentlyVisitedSitesInternal",
|
|
70
70
|
SearchSitesInternal = "searchSitesInternal",
|
|
71
71
|
GetCuratedContentInternal = "getCuratedContentInternal",
|
|
@@ -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 {
|