@openfin/workspace 18.1.28 → 18.1.30
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/browser-pagetab-handler.d.ts +1 -1
- package/client-api-platform/src/api/context-menu/index.d.ts +5 -6
- package/client-api-platform/src/shapes.d.ts +9 -1
- package/common/src/utils/context-menu.d.ts +2 -1
- package/common/src/utils/menu.d.ts +22 -0
- package/common/src/utils/popup-window.d.ts +59 -0
- package/home.js +1 -1
- package/home.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/notifications.js +1 -1
- package/notifications.js.map +1 -1
- package/package.json +1 -1
- package/store.js +1 -1
- package/store.js.map +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { OpenPageTabContextMenuPayload } from '../../../../client-api-platform/src/index';
|
|
2
2
|
import { PageTabContextMenuItemData } from '../../../../client-api-platform/src/shapes';
|
|
3
|
-
export declare const pageTabContextMenuItemHandler: (data: PageTabContextMenuItemData, payload: OpenPageTabContextMenuPayload) => Promise<void>;
|
|
3
|
+
export declare const pageTabContextMenuItemHandler: (data: PageTabContextMenuItemData, payload: OpenPageTabContextMenuPayload, pageTabRect?: DOMRect) => Promise<void>;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ContextMenuType } from '../../../../common/src/utils/popup-window';
|
|
3
|
+
import { InternalOpenGlobalContextMenuRequest, InternalOpenPageTabContextMenuRequest, OpenGlobalContextMenuPayload, OpenPageTabContextMenuPayload, OpenSaveButtonContextMenuPayload, OpenSaveButtonContextMenuRequest, OpenViewTabContextMenuPayload, OpenViewTabContextMenuRequest, WorkspacePlatformProvider } from '../../../../client-api-platform/src/shapes';
|
|
3
4
|
export declare enum AnchorBehavior {
|
|
4
5
|
BottomLeft = 0,
|
|
5
6
|
BottomRight = 1,
|
|
6
|
-
|
|
7
|
-
TopRight = 3,
|
|
8
|
-
Center = 4
|
|
7
|
+
Center = 2
|
|
9
8
|
}
|
|
10
|
-
export declare const openCommonContextMenu: (payload: OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload, _callerIdentity: OpenFin.Identity, anchorBehavior?: AnchorBehavior) => Promise<void>;
|
|
9
|
+
export declare const openCommonContextMenu: (payload: OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload, _callerIdentity: OpenFin.Identity, type?: ContextMenuType, anchorBehavior?: AnchorBehavior) => Promise<void>;
|
|
11
10
|
export declare function openGlobalContextMenuInternal(this: WorkspacePlatformProvider, payload: InternalOpenGlobalContextMenuRequest & {
|
|
12
11
|
identity: OpenFin.Identity;
|
|
13
12
|
}, callerIdentity: OpenFin.Identity): Promise<void>;
|
|
14
13
|
export declare function openViewTabContextMenuInternal(this: WorkspacePlatformProvider, payload: OpenViewTabContextMenuRequest & {
|
|
15
14
|
identity: OpenFin.Identity;
|
|
16
15
|
}, callerIdentity: OpenFin.Identity): Promise<void>;
|
|
17
|
-
export declare function openPageTabContextMenuInternal(this: WorkspacePlatformProvider, payload:
|
|
16
|
+
export declare function openPageTabContextMenuInternal(this: WorkspacePlatformProvider, payload: InternalOpenPageTabContextMenuRequest & {
|
|
18
17
|
identity: OpenFin.Identity;
|
|
19
18
|
}, callerIdentity: OpenFin.Identity): Promise<void>;
|
|
20
19
|
export declare function openSaveButtonContextMenuInternal(this: WorkspacePlatformProvider, payload: OpenSaveButtonContextMenuRequest & {
|
|
@@ -352,6 +352,14 @@ export type OpenPageTabContextMenuPayload = OpenPageTabContextMenuRequest & {
|
|
|
352
352
|
/** Default function that handles stock context menu options. */
|
|
353
353
|
callback: (data: PageTabContextMenuItemData, req: OpenPageTabContextMenuPayload) => any;
|
|
354
354
|
};
|
|
355
|
+
/**
|
|
356
|
+
* Request for opening the global context menu with custom context menu in Enterprise Browser.
|
|
357
|
+
* @internal
|
|
358
|
+
*/
|
|
359
|
+
export type InternalOpenPageTabContextMenuRequest = OpenPageTabContextMenuRequest & {
|
|
360
|
+
/** Coordinates associated with a target element for a custom context menu request. */
|
|
361
|
+
rect?: DOMRect;
|
|
362
|
+
};
|
|
355
363
|
/**
|
|
356
364
|
* Request to update the attributes of a page in which is attached to a running browser window.
|
|
357
365
|
*/
|
|
@@ -999,7 +1007,7 @@ export interface BrowserWindowModule {
|
|
|
999
1007
|
/** @internal */
|
|
1000
1008
|
_openViewTabContextMenu(req: OpenViewTabContextMenuRequest): Promise<void>;
|
|
1001
1009
|
/** @internal */
|
|
1002
|
-
_openPageTabContextMenu(req:
|
|
1010
|
+
_openPageTabContextMenu(req: InternalOpenPageTabContextMenuRequest): Promise<void>;
|
|
1003
1011
|
/** @internal */
|
|
1004
1012
|
_openSaveButtonContextMenu(req: OpenSaveButtonContextMenuRequest): Promise<void>;
|
|
1005
1013
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { AnchorBehavior } from '../../../client-api-platform/src/api/context-menu';
|
|
3
|
+
import { ContextMenuType } from './popup-window';
|
|
3
4
|
export declare enum MenuItemType {
|
|
4
5
|
Label = "normal",
|
|
5
6
|
Separator = "separator",
|
|
@@ -10,7 +11,7 @@ export type ShowContextMenuResponse = OpenFin.MenuResult & {
|
|
|
10
11
|
data: any;
|
|
11
12
|
};
|
|
12
13
|
export declare function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window): Promise<ShowContextMenuResponse>;
|
|
13
|
-
export declare const showEnterpriseContextMenu: (opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window
|
|
14
|
+
export declare const showEnterpriseContextMenu: (opts: OpenFin.ShowPopupMenuOptions, type: ContextMenuType, anchorBehavior: AnchorBehavior, win?: OpenFin.Window) => Promise<ShowContextMenuResponse>;
|
|
14
15
|
export declare const Separator: OpenFin.MenuItemTemplate;
|
|
15
16
|
export declare const EmptyContextMenuItem: OpenFin.MenuItemTemplate;
|
|
16
17
|
export declare const DefaultSaveMenuBounds: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SaveModalType } from '../../../client-api-platform/src/shapes';
|
|
2
|
+
export declare enum Menu {
|
|
3
|
+
SAVE = "SAVE_MENU",
|
|
4
|
+
SHARE = "SHARE_MENU",
|
|
5
|
+
COLOR_LINK = "COLOR_LINK_MENU",
|
|
6
|
+
LAYOUT = "LAYOUT_MENU"
|
|
7
|
+
}
|
|
8
|
+
export interface UserMenuParams {
|
|
9
|
+
[Menu.SAVE]: {
|
|
10
|
+
id: string;
|
|
11
|
+
menuType: SaveModalType;
|
|
12
|
+
invocationId?: string;
|
|
13
|
+
};
|
|
14
|
+
[Menu.SHARE]: {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
[Menu.LAYOUT]: null;
|
|
19
|
+
[Menu.COLOR_LINK]: {
|
|
20
|
+
selectedViews: string;
|
|
21
|
+
} | null;
|
|
22
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { UserMenuParams } from '../../../common/src/utils/menu';
|
|
3
|
+
import { OptionalExceptFor } from '../../../common/src/utils/types';
|
|
4
|
+
import { AnchorBehavior } from '../../../client-api-platform/src/api/context-menu';
|
|
5
|
+
import { Site, SiteAction } from '../../../client-api-platform/src/shapes';
|
|
6
|
+
export declare enum SaveMenuType {
|
|
7
|
+
Save = "Save",
|
|
8
|
+
SaveAs = "SaveAs"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* getSaveContextMenuTemplate
|
|
12
|
+
* @param saveMenuType accepts SaveMenuTypes, default SaveMenuType.Save
|
|
13
|
+
* @returns an array of objects for context menu
|
|
14
|
+
*/
|
|
15
|
+
export declare const getSaveContextMenuTemplate: (saveMenuType?: SaveMenuType) => OpenFin.MenuItemTemplate[];
|
|
16
|
+
export declare function showModalWin<T extends keyof UserMenuParams>(params: UserMenuParams[T], windowOpts: OptionalExceptFor<OpenFin.WindowOptions, 'x' | 'y' | 'defaultWidth' | 'url' | 'name'>): Promise<OpenFin.Window>;
|
|
17
|
+
export interface SearchMenuChannelRequest {
|
|
18
|
+
selectedViews: OpenFin.Identity[];
|
|
19
|
+
openViews: OpenFin.Identity[];
|
|
20
|
+
windowId: OpenFin.Identity;
|
|
21
|
+
type?: 'focus-view';
|
|
22
|
+
}
|
|
23
|
+
export declare enum ContextMenuType {
|
|
24
|
+
GlobalMenu = "global-menu",
|
|
25
|
+
ContextMenu = "context-menu",
|
|
26
|
+
RenameSupertab = "rename-supertab"
|
|
27
|
+
}
|
|
28
|
+
export type ContextMenuChannelMessageData = {
|
|
29
|
+
parentIdentity: OpenFin.Identity;
|
|
30
|
+
anchorBehavior: AnchorBehavior;
|
|
31
|
+
type: ContextMenuType;
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
payload: OpenFin.ShowPopupMenuOptions | {
|
|
35
|
+
pageId: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export type SearchMenuChannelResponse = {
|
|
39
|
+
type: 'search-response';
|
|
40
|
+
selectedSite?: Site;
|
|
41
|
+
searchText?: string;
|
|
42
|
+
selectedView: OpenFin.Identity;
|
|
43
|
+
inputUpdate?: string;
|
|
44
|
+
trigger?: SiteAction;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'expand-status-changed';
|
|
47
|
+
isExpanded: boolean;
|
|
48
|
+
} | {
|
|
49
|
+
type: 'update-input';
|
|
50
|
+
inputText: string;
|
|
51
|
+
isSecure: boolean;
|
|
52
|
+
landingPage: boolean;
|
|
53
|
+
} | {
|
|
54
|
+
type: 'resize-view';
|
|
55
|
+
isExpanded: boolean;
|
|
56
|
+
height: number;
|
|
57
|
+
width: number;
|
|
58
|
+
};
|
|
59
|
+
export declare function showPopupWin<T extends keyof UserMenuParams>(parentWindow: OpenFin.Window, params: UserMenuParams[T], windowOpts: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
|