@openfin/workspace-platform 18.0.0 → 18.0.2

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.
@@ -1,8 +1,13 @@
1
1
  import type OpenFin from '@openfin/core';
2
- import type { LaunchAppRequest } from '../shapes';
2
+ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse } from '../shapes';
3
3
  /**
4
4
  * Launch the app described by an App Directory entry.
5
5
  * @param app the app directory entry.
6
6
  * @param opts launch options.
7
7
  */
8
8
  export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Application | OpenFin.Identity | OpenFin.View | OpenFin.Platform>;
9
+ export declare function getResults(payload: {
10
+ req: SearchSitesRequest;
11
+ } & {
12
+ identity: OpenFin.Identity;
13
+ }): Promise<SearchSitesResponse>;
@@ -1,3 +1,6 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import { OpenViewTabContextMenuPayload, ViewTabMenuData } from '../../../../client-api-platform/src/index';
3
+ export declare const addToChannel: (winIdentity: OpenFin.Identity, newChannelId: string, selectedViews: OpenFin.Identity[]) => Promise<void>;
4
+ export declare const removeFromChannel: (winIdentity: OpenFin.Identity, selectedViews: OpenFin.Identity[]) => Promise<void>;
2
5
  declare const handler: (data: ViewTabMenuData, payload: OpenViewTabContextMenuPayload) => Promise<void>;
3
6
  export default handler;
@@ -15,6 +15,27 @@ export declare const savePageAsHandler: (identity: OpenFin.Identity, pageId?: st
15
15
  export declare const switchWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
16
16
  export declare const deleteWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
17
17
  export declare const downloadsHandler: (identity: OpenFin.Identity) => Promise<void>;
18
+ /**
19
+ * Reload activ view
20
+ * Enterprise Browser
21
+ * @param identity
22
+ * @param pageId
23
+ */
24
+ export declare const reloadPageHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
25
+ /**
26
+ * Close page, without Save Modal
27
+ * Enterprise Browser
28
+ * @param identity
29
+ * @param pageId
30
+ */
31
+ export declare const closePageHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
32
+ /**
33
+ * Close other pages
34
+ * Enterprise Browser
35
+ * @param identity
36
+ * @param pageId
37
+ */
38
+ export declare const closeOtherPagesHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
18
39
  /**
19
40
  * @param viewIdentities Array of views to execute print on.
20
41
  */
@@ -1,3 +1,3 @@
1
1
  import type { AttachedPage, AttachedPageInternal } from '../../../../common/src/api/pages/shapes';
2
2
  import type { BrowserInitConfig } from '../..';
3
- export declare const applyPageDefaults: (pages: AttachedPage[], initOptions?: Pick<BrowserInitConfig, 'defaultPageOptions' | 'defaultViewOptions'>) => Promise<AttachedPageInternal[]>;
3
+ export declare const applyPageDefaults: (pages: AttachedPage[], initOptions?: Pick<BrowserInitConfig, 'defaultPageOptions' | 'defaultViewOptions'>, isEnterprise?: boolean) => Promise<AttachedPageInternal[]>;
@@ -23,7 +23,7 @@ type LegacyWindowOptions = Omit<OpenFin.PlatformWindowCreationOptions, 'workspac
23
23
  workstacks?: Page[];
24
24
  };
25
25
  export declare const initWorkspacePlatformOptions: (options: LegacyWindowOptions | OpenFin.PlatformWindowCreationOptions) => OpenFin.PlatformWindowCreationOptions;
26
- export type WindowType = 'browser' | 'platform' | 'classic' | 'mixed';
26
+ export type WindowType = 'browser' | 'platform' | 'classic' | 'mixed' | 'enterprise';
27
27
  /**
28
28
  * checkHasBrowserWindows
29
29
  * Determines whether the snapshot has browser windows.
@@ -119,12 +119,27 @@ export declare enum PageTabContextMenuOptionType {
119
119
  Rename = "Rename",
120
120
  Save = "Save",
121
121
  SaveAs = "Save As",
122
+ SaveWorkspaceAs = "SaveWorkspaceAs",
123
+ Refresh = "Refresh",
124
+ CloseOthers = "Close others",
122
125
  Custom = "Custom"
123
126
  }
127
+ export declare enum EnterpriseMainContextMenuOptionType {
128
+ Lock = "Lock",
129
+ ShowHideTabs = "ShowHideTabs",
130
+ AddToChanel = "AddToChannel",
131
+ QuitBrowser = "QuitBrowser",
132
+ Print = "Print",
133
+ Pin = "Pin"
134
+ }
124
135
  /**Shape of the data property of a global context menu template item */
125
136
  export interface GlobalContextMenuItemData extends ContextMenuItemData {
126
137
  type: GlobalContextMenuOptionType;
127
138
  }
139
+ export interface EnterpriseMainContextMenuItemData extends ContextMenuItemData {
140
+ type: GlobalContextMenuOptionType | EnterpriseMainContextMenuOptionType | ViewTabMenuOptionType;
141
+ option?: string;
142
+ }
128
143
  export interface WorkspaceContextMenuItemData extends GlobalContextMenuItemData {
129
144
  workspaceId: string;
130
145
  }
@@ -133,6 +148,7 @@ export interface AppearanceContextMenuItemData extends GlobalContextMenuItemData
133
148
  }
134
149
  /**Configuration of an option in the global context menu */
135
150
  export type GlobalContextMenuItemTemplate = OpenFin.MenuItemTemplate<GlobalContextMenuItemData>;
151
+ export type EnterpriseMainContextMenuItemTemplate = OpenFin.MenuItemTemplate<EnterpriseMainContextMenuItemData>;
136
152
  /**Shape of the data property of a page tab context menu template item */
137
153
  export interface PageTabContextMenuItemData extends ContextMenuItemData {
138
154
  type: PageTabContextMenuOptionType;
@@ -375,6 +391,7 @@ export interface PreDefinedButtonConfig {
375
391
  iconUrl?: string;
376
392
  iconProps?: IconProps;
377
393
  disabled?: boolean;
394
+ parentHover?: boolean;
378
395
  }
379
396
  /**
380
397
  * Configuration Object for the show/hide tabs button within the browser toolbar
@@ -910,9 +927,6 @@ export interface BrowserWindowModule {
910
927
  * @property {string} [value] - The value associated with the 'custom' type.
911
928
  */
912
929
  updateBrowserWindowTitle(title: WindowTitle): Promise<void>;
913
- _openViewTabContextMenu(req: OpenViewTabContextMenuRequest): Promise<void>;
914
- _openPageTabContextMenu(req: OpenPageTabContextMenuRequest): Promise<void>;
915
- _openSaveButtonContextMenu(req: OpenSaveButtonContextMenuRequest): Promise<void>;
916
930
  }
917
931
  /**
918
932
  * Factory for wrapping browser windows and global operations.
@@ -17,6 +17,7 @@ export interface BaseCustomButtonConfig {
17
17
  disabled?: boolean;
18
18
  /** icon URL for icon image */
19
19
  iconUrl?: string;
20
+ parentHover?: boolean;
20
21
  }
21
22
  export interface BaseCustomDropdownItem extends BaseCustomButtonConfig {
22
23
  /** Is this dropdown item checked? Any value other than undefined will decorate the dropdown option as a checkbox option. */
@@ -1,4 +1,6 @@
1
+ import type OpenFin from '@openfin/core';
1
2
  import type { Page } from '../../../../common/src/api/pages/shapes';
3
+ import { SearchSitesRequest, Site } from '../../../../client-api-platform/src/shapes';
2
4
  export declare const store: import("idb-keyval").UseStore;
3
5
  export declare function getPage(id: string): Promise<Page | undefined>;
4
6
  export declare function getPageList(filter?: string): Promise<Page[]>;
@@ -10,3 +12,17 @@ export declare function updatePage({ pageId, page }: {
10
12
  page: Page;
11
13
  pageId: string;
12
14
  }): Promise<void>;
15
+ export declare const storeEnterpriseRemovedTab: import("idb-keyval").UseStore;
16
+ export declare const addRemovedTab: (payload: any) => Promise<void>;
17
+ export declare const popLastRemovedTab: () => Promise<any>;
18
+ export declare const storeEnterpriseVisitedSites: import("idb-keyval").UseStore;
19
+ export declare const trackVisitedSite: (payload: Site) => Promise<void>;
20
+ export declare const getRecentVisitedSites: (numOfSites?: number) => Promise<TrackedSite[] | [
21
+ ]>;
22
+ export declare const getFrequentlyVisitedSites: () => Promise<TrackedSite[] | [
23
+ ]>;
24
+ export declare const searchSites: (payload: {
25
+ req: SearchSitesRequest;
26
+ } & {
27
+ identity: OpenFin.Identity;
28
+ }) => Promise<any[]>;
@@ -59,6 +59,13 @@ export declare enum WorkspacePlatformChannelAction {
59
59
  HandleSaveModalOnPageClose = "handleSaveModalOnPageClose",
60
60
  CopyPage = "copyPage",
61
61
  HandlePageChanges = "handlePageChanges",
62
+ TrackRemovedTabInternal = "trackRemovedTabInternal",
63
+ RestoreRemovedTabInternal = "restoreRemovedTabInternal",
64
+ TrackVisitedSiteInternal = "trackVisitedSiteInternal",
65
+ GetRecentVisitedSitesInternal = "getRecentVisitedSitesInternal",
66
+ GetFrequentlyVisitedSitesInternal = "getFrequentlyVisitedSitesInternal",
67
+ SearchSitesInternal = "searchSitesInternal",
68
+ HandleRequestNavigationInternal = "handleRequestNavigationInternal",
62
69
  GetNotificationsConfig = "getNotificationsConfig"
63
70
  }
64
71
  export type PlatFormSupportedFeatures = boolean | {
@@ -0,0 +1,16 @@
1
+ import type OpenFin from '@openfin/core';
2
+ export interface TabsHandler {
3
+ /**
4
+ * Shows tabs for specified window instance. Does nothing if tabs are visible.
5
+ */
6
+ show(): Promise<void>;
7
+ /**
8
+ * Hides tabs for specified window instance. Does nothing if tabs are hidden.
9
+ */
10
+ hide(layoutOverrides?: OpenFin.LayoutOptions): Promise<void>;
11
+ /**
12
+ * Checks if the tabs for specified window are visible and resolves with true/false.
13
+ */
14
+ isShowingTabs(): Promise<boolean>;
15
+ }
16
+ export declare const getTabsHandler: (identity: OpenFin.Identity) => TabsHandler;
@@ -0,0 +1,3 @@
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[]>;
@@ -6,7 +6,7 @@ export declare enum MenuItemType {
6
6
  Checkbox = "checkbox"
7
7
  }
8
8
  export type ShowContextMenuResponse = OpenFin.MenuResult & {
9
- data: string;
9
+ data: any;
10
10
  };
11
11
  export default function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window): Promise<ShowContextMenuResponse>;
12
12
  export declare const Separator: OpenFin.MenuItemTemplate;
@@ -0,0 +1,8 @@
1
+ import type OpenFin from '@openfin/core';
2
+ import { EnterpriseMainContextMenuItemData, EnterpriseMainContextMenuItemTemplate, OpenGlobalContextMenuPayload } from '../../../client-api-platform/src/shapes';
3
+ export declare const getEnterpriseContextMenuTemplate: ({ identity, selectedViews, contextGroups }: {
4
+ identity: OpenFin.Identity;
5
+ selectedViews: OpenFin.Identity[];
6
+ contextGroups: OpenFin.ContextGroupInfo[];
7
+ }) => Promise<EnterpriseMainContextMenuItemTemplate[]>;
8
+ export declare const handleEnterpriseMenuResponse: (data: EnterpriseMainContextMenuItemData, payload: OpenGlobalContextMenuPayload) => Promise<boolean>;
@@ -0,0 +1,2 @@
1
+ import type OpenFin from '@openfin/core';
2
+ export declare const isEnterpriseBrowser: (id?: OpenFin.Identity) => Promise<boolean>;
@@ -1,4 +1,101 @@
1
1
  import type OpenFin from '@openfin/core';
2
- import { GlobalContextMenuItemTemplate } from '../../../client-api-platform/src/shapes';
2
+ import { MenuItemType } from '../../../common/src/utils/context-menu';
3
+ import * as WP from '../../../client-api-platform/src/index';
4
+ import { GlobalContextMenuItemTemplate, GlobalContextMenuOptionType, Workspace } from '../../../client-api-platform/src/shapes';
3
5
  export declare const isOSWindows: () => Promise<boolean>;
6
+ export declare const getCloseWindow: () => {
7
+ type: MenuItemType;
8
+ label: string;
9
+ data: {
10
+ type: WP.GlobalContextMenuOptionType;
11
+ };
12
+ };
13
+ export declare const newWindow: () => {
14
+ type: MenuItemType;
15
+ label: string;
16
+ data: {
17
+ type: WP.GlobalContextMenuOptionType;
18
+ };
19
+ };
20
+ export declare const savePage: () => {
21
+ type: MenuItemType;
22
+ label: string;
23
+ data: {
24
+ type: WP.GlobalContextMenuOptionType;
25
+ };
26
+ };
27
+ export declare const savePageAs: () => {
28
+ type: MenuItemType;
29
+ label: string;
30
+ data: {
31
+ type: WP.GlobalContextMenuOptionType;
32
+ };
33
+ };
34
+ export declare const newPage: (enabled: boolean) => {
35
+ type: MenuItemType;
36
+ label: string;
37
+ data: {
38
+ type: WP.GlobalContextMenuOptionType;
39
+ };
40
+ enabled: boolean;
41
+ };
42
+ export declare const restoreChanges: () => {
43
+ type: MenuItemType;
44
+ label: string;
45
+ data: {
46
+ type: WP.GlobalContextMenuOptionType;
47
+ };
48
+ };
49
+ export declare const saveWorkspace: () => {
50
+ type: MenuItemType;
51
+ label: string;
52
+ data: {
53
+ type: WP.GlobalContextMenuOptionType;
54
+ };
55
+ };
56
+ export declare const saveWorkspaceAs: () => {
57
+ type: MenuItemType;
58
+ label: string;
59
+ data: {
60
+ type: WP.GlobalContextMenuOptionType;
61
+ };
62
+ };
63
+ export declare const renameWorkspace: () => {
64
+ type: MenuItemType;
65
+ label: string;
66
+ data: {
67
+ type: WP.GlobalContextMenuOptionType;
68
+ };
69
+ };
70
+ export declare const switchWorkspace: () => {
71
+ label: string;
72
+ };
73
+ export declare const deleteWorkspace: () => {
74
+ label: string;
75
+ };
76
+ export declare const downloads: () => {
77
+ label: string;
78
+ };
79
+ export declare const appearance: () => {
80
+ label: string;
81
+ };
82
+ export declare const getSavedWorkspaceContextMenuOptions: (activeWorkspace: Workspace, savedWorkspaces: Workspace[], contextMenuOptionType: GlobalContextMenuOptionType) => {
83
+ label: string;
84
+ type: MenuItemType;
85
+ enabled: boolean;
86
+ checked: boolean;
87
+ data: {
88
+ type: WP.GlobalContextMenuOptionType;
89
+ workspaceId: string;
90
+ };
91
+ }[];
92
+ export declare const getAppearanceContextMenuOptions: () => Promise<{
93
+ label: string;
94
+ type: MenuItemType;
95
+ checked: boolean;
96
+ data: {
97
+ type: WP.GlobalContextMenuOptionType;
98
+ scheme: WP.ColorSchemeOptionType;
99
+ };
100
+ }[]>;
4
101
  export declare const getGlobalContextMenuTemplate: (winIdentity: OpenFin.Identity, selectedViews?: OpenFin.Identity[]) => Promise<GlobalContextMenuItemTemplate[]>;
@@ -0,0 +1,20 @@
1
+ import type OpenFin from '@openfin/core';
2
+ export declare enum InteropEventType {
3
+ JoinedContextGroup = "joined-context-group",
4
+ RemovedFromContextGroup = "removed-from-context-group"
5
+ }
6
+ export type InteropListener = (identity: OpenFin.Identity) => void;
7
+ /**
8
+ * Returns contextGroup data.
9
+ * @returns Promise<ContextGroup[]>
10
+ */
11
+ export declare function getContextGroups(): Promise<OpenFin.ContextGroupInfo[]>;
12
+ export declare const joinContextGroup: (view: OpenFin.Identity, contextGroupId: string) => Promise<void>;
13
+ export declare const removeFromGroup: (view: OpenFin.Identity) => Promise<void>;
14
+ export declare function getViewContextGroupId(viewIdentity: OpenFin.Identity): Promise<string | null | undefined>;
15
+ /**
16
+ * Listen for interop events.
17
+ * @param event the interop event to listen for.
18
+ * @param listener the function to call when the event occurs.
19
+ */
20
+ export declare const addInteropListener: (event: InteropEventType, listener: InteropListener) => Promise<void>;
@@ -1,10 +1,14 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { AttachedPage, PageLayout } from '../../../client-api-platform/src/shapes';
3
3
  export type LayoutDOMEventType =
4
+ /**
5
+ * Fired when a tab is created in a container. (Emmitted by ??)
6
+ */
7
+ 'tabs-list-resized'
4
8
  /**
5
9
  * Fired when a tab is created in a container. (Emmitted by core)
6
10
  */
7
- 'tab-created'
11
+ | 'tab-created'
8
12
  /**
9
13
  * Fired when the layout container is ready to be used. (Emitted by us)
10
14
  */
@@ -22,6 +26,8 @@ export type LayoutDOMEvent = {
22
26
  uuid: string;
23
27
  };
24
28
  isInitialized: boolean;
29
+ } | {
30
+ type: Extract<LayoutDOMEventType, 'tabs-list-resized'>;
25
31
  };
26
32
  export type LayoutDOMEventListener = (ev: LayoutDOMEvent) => void;
27
33
  export declare const getFirstActiveViewFromLayout: (identity: OpenFin.LayoutIdentity) => Promise<OpenFin.Identity>;
@@ -58,6 +64,7 @@ export declare const mapContentComponentState: (content: OpenFin.LayoutContent)
58
64
  export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: OpenFin.Identity) => Promise<any>;
59
65
  export declare const isLayoutTabActive: (tabSelector: string) => boolean;
60
66
  export declare const containerId = "layout_container";
67
+ export declare const viewTabslistSelectors = ".lm_tabs";
61
68
  export declare const addLayoutEventListener: (event: LayoutDOMEventType, listener: LayoutDOMEventListener) => void;
62
69
  /**
63
70
  * Initialize the layout for the current OF window.
@@ -84,3 +91,5 @@ export declare const getUnlockedLayout: (lockedLayout: PageLayout, referenceUnlo
84
91
  * @returns
85
92
  */
86
93
  export declare const replaceLayout: (layout: PageLayout, page: AttachedPage) => Promise<void>;
94
+ export declare const findViewInLayout: (node: any, viewId: OpenFin.Identity) => any[];
95
+ export declare const checkShowHeader: () => Promise<void>;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * All routes that serve HTML pages for the app.
3
- * Routes should include the zone the the HTML page is a part of.
3
+ * Routes should include the zone that the HTML page is a part of.
4
4
  * Make sure to include trailing slash, as it is essential for deployed version to route correctly.
5
5
  */
6
6
  export declare enum PageRoute {
@@ -15,12 +15,14 @@ export declare enum PageRoute {
15
15
  BrowserPopupMenuLayouts = "/browser/popup-menu/layouts/layouts/",
16
16
  BrowserPopupMenuColorLinking = "/browser/popup-menu/color-linking/color-linking/",
17
17
  BrowserIndicator = "/browser/indicator/",
18
+ BrowserPopupMenuAddressSearch = "/browser/popup-menu/address-search/",
18
19
  ResponseModal = "/browser/popup-menu/response-modal/",
19
20
  CloseConfirmationModal = "/browser/popup-menu/close-confirmation-modal/",
20
21
  Docs = "/provider/docs/",
21
22
  Storefront = "/storefront/",
22
23
  DeprecatedAlert = "/provider/deprecated-alert/",
23
- Analytics = "/provider/analytics/"
24
+ Analytics = "/provider/analytics/",
25
+ EnterpriseBrowser = "/browser/enterprise/"
24
26
  }
25
27
  export declare const Assets: {
26
28
  readonly IconOpenFinLogo: "/icons/openfinlogo.svg";
@@ -9,7 +9,8 @@ export declare enum WindowName {
9
9
  BrowserSaveMenu = "openfin-browser-save-menu",
10
10
  BrowserIndicator = "openfin-browser-indicator",
11
11
  BrowserWindow = "internal-generated-window",
12
- ClassicWindow = "internal-generated-classic-window"
12
+ ClassicWindow = "internal-generated-classic-window",
13
+ BrowserAddressSearch = "openfin-browser-menu-address-search"
13
14
  }
14
15
  export interface WindowIdentity {
15
16
  uuid: ApplicationUUID | string;