@openfin/workspace-platform 21.0.2 → 21.0.3

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.
@@ -120,6 +120,12 @@ export type DockButton = {
120
120
  * Optional button identifier, if not provided will be automatically generated by the provider
121
121
  */
122
122
  id?: string;
123
+ /**
124
+ * Specifies button context menu, if present and has one of the options enabled, the button will have a context menu on right click.
125
+ */
126
+ contextMenu?: {
127
+ removeOption?: boolean;
128
+ };
123
129
  } & (DockButtonConfig | DockDropdownConfig);
124
130
  /**
125
131
  * The names of the buttons for the workspace components on the Dock.
@@ -1,13 +1,15 @@
1
1
  import { ContentMenuEntry } from '@openfin/ui-library';
2
- import type { DockEntry, WorkspacePanelButton } from '../../../client-api-platform/src/shapes';
2
+ import type { DockCompanionButton, DockEntry } from '../../../client-api-platform/src/shapes';
3
3
  export declare const DockCompanionUpdatesPrefix = "dock-companion-updates";
4
+ export declare const refreshDockBookmarksPanel: () => Promise<void>;
4
5
  export declare const updateDockFavoriteEntries: (favorites: DockEntry[]) => Promise<void>;
5
6
  export declare const updateContentMenu: (contentMenu: ContentMenuEntry[]) => Promise<void>;
6
7
  export declare const navigateContentMenu: (id: string) => Promise<void>;
7
8
  export declare const launchDockEntry: (entry: DockEntry) => Promise<void>;
8
9
  export declare const setDockFavoritesOrder: (favorites: DockEntry[]) => Promise<void>;
9
- export declare const setDockWorkspaceButtonsOrder: (favorites: WorkspacePanelButton[]) => Promise<void>;
10
+ export declare const setDefaultDockButtonsOrder: (defaultDockButtons: DockCompanionButton[]) => Promise<void>;
10
11
  export declare const getDockWorkspacesContextMenu: () => Promise<import("@client/index").BaseCustomDropdownItem[]>;
11
12
  export declare const handleDockWorkspacesMenuResponse: (payload: any) => Promise<void>;
12
13
  export declare const removeFavoriteEntry: (entry: DockEntry) => Promise<void>;
13
14
  export declare const addFavoriteEntry: (entry: DockEntry) => Promise<void>;
15
+ export declare const focusAndExpandSearchMenu: () => Promise<void>;
@@ -1,15 +1,18 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  /**
3
- * Get the last focused browser window.
4
- * @returns the last focused browser window.
3
+ * Gets the last focused browser window.
4
+ * @returns {Promise<OpenFin.Identity | undefined>} The last focused browser window identity, or undefined if not found.
5
+ * @throws {Error} If there is an error retrieving the last focused browser window.
5
6
  */
6
7
  export declare function getLastFocusedBrowserWindow(): Promise<OpenFin.Identity | undefined>;
7
8
  /**
8
- * Listen for a browser window to be focused.
9
- * When a browser window is focused, store it in local storage as the last focused browser window.
9
+ * Gets the last focused browser window that isn't minimized.
10
+ * @returns {Promise<OpenFin.Identity | undefined>} The last focused browser window identity that isn't minimized, or undefined if not found.
10
11
  */
11
- export declare function listenForBrowserWindowFocus(): Promise<void>;
12
+ export declare function getLastFocusedUnminimizedBrowserWindow(): Promise<OpenFin.Identity | undefined>;
12
13
  /**
13
- * Stop listening for a browser window to be focused.
14
+ * Listen for a browser window to be focused or closed.
15
+ * When a browser window is focused, store it in local storage as the last focused browser window.
16
+ * When a browser window is closed, remove it from the LRU.
14
17
  */
15
- export declare function removeBrowserWindowFocusListener(): Promise<void>;
18
+ export declare function listenForBrowserWindowFocus(): Promise<void>;
@@ -1561,7 +1561,7 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1561
1561
  */
1562
1562
  _launchDockEntryInternal: (entry: DockEntry) => Promise<void>;
1563
1563
  _setDockFavoritesInternal: (favorites: DockEntry[]) => Promise<void>;
1564
- _setDockWorkspaceButtonsOrderInternal: (favorites: WorkspacePanelButton[]) => Promise<void>;
1564
+ _setDefaultDockButtonsOrderInternal: (favorites: DockCompanionButton[]) => Promise<void>;
1565
1565
  _removeDockFavoriteInternal: (entry: DockEntry) => Promise<void>;
1566
1566
  _addDockFavoriteInternal: (entry: DockEntry) => Promise<void>;
1567
1567
  /**
@@ -1578,6 +1578,13 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1578
1578
  * @param payload
1579
1579
  */
1580
1580
  _handleDockWorkspacesMenuResponseInternal(payload: any): Promise<void>;
1581
+ /**
1582
+ *
1583
+ * Finds a browser window with only a single tab on the landing page, brings it forward, and
1584
+ * focuses and expands its search menu. If such a browser window doesn't exist, it will create one.
1585
+ * @param payload
1586
+ */
1587
+ _focusAndExpandSearchInternal(): Promise<void>;
1581
1588
  /**
1582
1589
  * The browser window factory for the Workspace Platform.
1583
1590
  */
@@ -2197,7 +2204,7 @@ export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<Workspa
2197
2204
  * @deprecated
2198
2205
  */
2199
2206
  export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
2200
- export type WorkspacePanelButton = Exclude<WorkspaceButton, 'store'> | 'contentMenu';
2207
+ export type DockCompanionButton = Exclude<WorkspaceButton, 'store'> | 'contentMenu' | 'bookmarks' | 'searchShortcut';
2201
2208
  /**
2202
2209
  * Configuration for initializing a Browser.
2203
2210
  */
@@ -35,7 +35,8 @@ declare enum GeneralBrowserChannelActions {
35
35
  ShowBrowserIndicator = "show-browser-indicator",
36
36
  SetSelectedLanguage = "set-selected-language",
37
37
  RefreshBookmarksInternal = "refresh-bookmarks",
38
- GetLayoutsWithSelectedViewsInternal = "get-layouts-with-selected-views"
38
+ GetLayoutsWithSelectedViewsInternal = "get-layouts-with-selected-views",
39
+ FocusAndExpandSearchInternal = "focus-and-expand-search"
39
40
  }
40
41
  /**
41
42
  * All of the remote procedures that can be called in the
@@ -86,6 +87,7 @@ export declare const BrowserChannelAction: {
86
87
  SetSelectedLanguage: GeneralBrowserChannelActions.SetSelectedLanguage;
87
88
  RefreshBookmarksInternal: GeneralBrowserChannelActions.RefreshBookmarksInternal;
88
89
  GetLayoutsWithSelectedViewsInternal: GeneralBrowserChannelActions.GetLayoutsWithSelectedViewsInternal;
90
+ FocusAndExpandSearchInternal: GeneralBrowserChannelActions.FocusAndExpandSearchInternal;
89
91
  };
90
92
  export type BrowserChannelAction = typeof BrowserChannelAction;
91
93
  export {};
@@ -82,11 +82,12 @@ export declare enum WorkspacePlatformChannelAction {
82
82
  LaunchDockEntryInternal = "launchDockEntryInternal",
83
83
  SetDockFavoritesOrderInternal = "setDockFavoritesOrderInternal",
84
84
  NavigateContentMenuInternal = "navigateContentMenuInternal",
85
- SetDockWorkspaceButtonsOrderInternal = "setDockWorkspaceButtonsOrderInternal",
85
+ SetDefaultDockButtonsOrderInternal = "setDefaultDockButtonsOrderInternal",
86
86
  GetDockWorkspacesContextMenuInternal = "getDockWorkspacesContextMenuInternal",
87
87
  HandleDockWorkspacesMenuResponseInternal = "handleDockWorkspacesMenuResponseInternal",
88
88
  RemoveDockFavoriteInternal = "removeDockFavoriteInternal",
89
- AddDockFavoriteInternal = "addDockFavoriteInternal"
89
+ AddDockFavoriteInternal = "addDockFavoriteInternal",
90
+ FocusAndExpandSearchInternal = "focusAndExpandSearchInternal"
90
91
  }
91
92
  export type PlatFormSupportedFeatures = boolean | {
92
93
  isWorkspacePlatform: boolean;
@@ -1,3 +1,3 @@
1
- export declare const DOCK_COMPANION_HEIGHT = 40;
1
+ export declare const DOCK_COMPANION_HEIGHT = 56;
2
2
  export declare const DOCK_COMPANION_WIDTH = 728;
3
3
  export declare const DOCK_COMPANION_TOP = 150;
@@ -1,7 +1,9 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { BrowserInitConfig } from '../../../client-api-platform/src/shapes';
3
+ export declare const DEFAULT_ENTERPRISE_WINDOW_HEIGHT = 600;
4
+ export declare const DEFAULT_ENTERPRISE_WINDOW_WIDTH = 900;
3
5
  export declare const isEnterpriseBrowser: (id?: OpenFin.Identity) => Promise<boolean>;
4
- export declare const isEnterpriseBrowserPlatform: (browserInitOptions?: BrowserInitConfig) => boolean;
6
+ export declare const isEnterpriseBrowserPlatform: (browserInitOptions: BrowserInitConfig) => boolean;
5
7
  export declare function formatUrl(url: string): string;
6
8
  export declare const getIsEnterpriseBrowser: (id?: OpenFin.Identity) => Promise<boolean>;
7
9
  export declare const getMenuWindowWidth: () => Promise<number>;
@@ -6,5 +6,11 @@ interface LandingPageUrls {
6
6
  export declare const getLandingPageUrls: (winIdentity?: OpenFin.Identity) => Promise<LandingPageUrls>;
7
7
  export declare const checkHasNewTabUrl: () => Promise<boolean>;
8
8
  export declare const getNewLandingTabViewOptions: (target: OpenFin.Identity) => Promise<OpenFin.PlatformViewCreationOptions>;
9
+ /**
10
+ * Makes a new landing page.
11
+ *
12
+ * If winIdentity is specified, it uses the newPageUrl defined by the browser window options.
13
+ * Otherwise, if the platform is Enterprise, it will use the landing page URL.
14
+ */
9
15
  export declare const makeNewLandingPage: (winIdentity?: OpenFin.Identity) => Promise<import("client-api-platform").PageWithUpdatableRuntimeAttribs>;
10
16
  export {};
@@ -53,3 +53,9 @@ export declare const getIsWindowMaximizedOnWindows10Or11: (window: OpenFin.Windo
53
53
  * @returns A promise that resolves to the current window bounds.
54
54
  */
55
55
  export declare const getCurrentBounds: (windowIdentity: OpenFin.Identity) => Promise<OpenFin.WindowBounds>;
56
+ export declare function getBoundsCenteredAndFitOnMonitor(height: number, width: number, monitorRect?: OpenFin.MonitorDetails): Promise<{
57
+ height: number;
58
+ width: number;
59
+ left: number;
60
+ top: number;
61
+ }>;
@@ -12,7 +12,7 @@ type SearchViewExpansionState = {
12
12
  shouldExpand: boolean;
13
13
  };
14
14
  export declare function showModalWin<T extends keyof UserMenuParams>(params: UserMenuParams[T], windowOpts: OptionalExceptFor<OpenFin.WindowOptions, 'x' | 'y' | 'defaultWidth' | 'url' | 'name'>): Promise<OpenFin.Window>;
15
- export type SearchMenuChannelUpdateState = {
15
+ export type SearchMenuChannelMessage = {
16
16
  selectedViews: OpenFin.Identity[];
17
17
  openViews: OpenFin.Identity[];
18
18
  windowId: OpenFin.Identity;
@@ -21,6 +21,8 @@ export type SearchMenuChannelUpdateState = {
21
21
  shouldExpandMenu?: SearchViewExpansionState;
22
22
  offsetLeft?: number;
23
23
  type: 'update-search-menu-state';
24
+ } | {
25
+ type: 'ready';
24
26
  };
25
27
  export type BrowserSearchMenuKeyboardEvent = {
26
28
  type: string;