@openfin/workspace 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.
@@ -7,7 +7,7 @@ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site }
7
7
  * @param app the app directory entry.
8
8
  * @param opts launch options.
9
9
  */
10
- export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.View | OpenFin.Identity | OpenFin.Platform | OpenFin.Application>;
10
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.Platform | OpenFin.View | OpenFin.Application>;
11
11
  export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
12
12
  export declare function getResults(payload: {
13
13
  req: SearchSitesRequest;
@@ -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("@common/api/action").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>;
@@ -1874,7 +1874,7 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1874
1874
  */
1875
1875
  _launchDockEntryInternal: (entry: DockEntry) => Promise<void>;
1876
1876
  _setDockFavoritesInternal: (favorites: DockEntry[]) => Promise<void>;
1877
- _setDockWorkspaceButtonsOrderInternal: (favorites: WorkspacePanelButton[]) => Promise<void>;
1877
+ _setDefaultDockButtonsOrderInternal: (favorites: DockCompanionButton[]) => Promise<void>;
1878
1878
  _removeDockFavoriteInternal: (entry: DockEntry) => Promise<void>;
1879
1879
  _addDockFavoriteInternal: (entry: DockEntry) => Promise<void>;
1880
1880
  /**
@@ -1891,6 +1891,13 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1891
1891
  * @param payload
1892
1892
  */
1893
1893
  _handleDockWorkspacesMenuResponseInternal(payload: any): Promise<void>;
1894
+ /**
1895
+ *
1896
+ * Finds a browser window with only a single tab on the landing page, brings it forward, and
1897
+ * focuses and expands its search menu. If such a browser window doesn't exist, it will create one.
1898
+ * @param payload
1899
+ */
1900
+ _focusAndExpandSearchInternal(): Promise<void>;
1894
1901
  /**
1895
1902
  * The browser window factory for the Workspace Platform.
1896
1903
  */
@@ -2154,7 +2161,7 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
2154
2161
  /** @internal */
2155
2162
  launchDockEntryInternal(entry: DockEntry): Promise<void>;
2156
2163
  /** @internal */
2157
- setDockWorkspaceButtonsOrderInternal(workspaceButtons: WorkspacePanelButton[]): Promise<void>;
2164
+ setDefaultDockButtonsOrderInternal(workspaceButtons: DockCompanionButton[]): Promise<void>;
2158
2165
  /** @internal */
2159
2166
  setDockFavoritesOrderInternal(favorites: DockEntry[]): Promise<void>;
2160
2167
  /** @internal */
@@ -2163,6 +2170,8 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
2163
2170
  getDockWorkspacesContextMenuInternal(): Promise<BaseCustomDropdownItem[]>;
2164
2171
  /** @internal */
2165
2172
  handleDockWorkspacesMenuResponseInternal(payload: any): Promise<void>;
2173
+ /** @internal */
2174
+ focusAndExpandSearchInternal(): Promise<void>;
2166
2175
  }
2167
2176
  /**
2168
2177
  * The origins from which a custom action can be invoked
@@ -2445,12 +2454,13 @@ export interface CompanionDockConfig {
2445
2454
  * Favorites to be displayed in the dock
2446
2455
  */
2447
2456
  contentMenu?: ContentMenuEntry[];
2448
- workspacePanelButtons?: WorkspacePanelButton[];
2457
+ defaultDockButtons?: DockCompanionButton[];
2449
2458
  /**
2450
2459
  * Taskbar Icon for the Browser Window. If light and dark icon are defined, then the taskbar icon will change when the scheme changes.
2451
2460
  */
2452
2461
  icon?: string | TaskbarIcon;
2453
2462
  title?: string;
2463
+ windowType: 'enterprise' | undefined;
2454
2464
  }
2455
2465
  /**
2456
2466
  * Extend or replace default functionality in order to customize behavior of a Workspace Platform Provider.
@@ -2587,7 +2597,7 @@ export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<Workspa
2587
2597
  * @deprecated
2588
2598
  */
2589
2599
  export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
2590
- export type WorkspacePanelButton = Exclude<WorkspaceButton, 'store'> | 'contentMenu';
2600
+ export type DockCompanionButton = Exclude<WorkspaceButton, 'store'> | 'contentMenu' | 'bookmarks' | 'searchShortcut';
2591
2601
  /**
2592
2602
  * Content menu entry shape cloned and re-exported from UI Library.
2593
2603
  * @internal
@@ -2726,7 +2736,7 @@ export interface LaunchBookmarkPayload {
2726
2736
  type EnterpriseDockChannelProviderChannelActions = {
2727
2737
  'launch-entry': (entry: DockEntry) => void;
2728
2738
  'set-dock-favorites-order': (newFavorites: DockEntry[]) => void;
2729
- 'set-dock-workspace-buttons-order': (newFavorites: WorkspacePanelButton[]) => void;
2739
+ 'set-default-dock-buttons-order': (newFavorites: DockCompanionButton[]) => void;
2730
2740
  'get-dock-workspaces-context-menu': () => BaseCustomDropdownItem[];
2731
2741
  'handle-dock-workspaces-menu-response': (payload: any) => void;
2732
2742
  'remove-favorite-entry': (entry: DockEntry) => void;
@@ -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
@@ -105,6 +106,7 @@ export declare const BrowserChannelAction: {
105
106
  SetSelectedLanguage: GeneralBrowserChannelActions.SetSelectedLanguage;
106
107
  RefreshBookmarksInternal: GeneralBrowserChannelActions.RefreshBookmarksInternal;
107
108
  GetLayoutsWithSelectedViewsInternal: GeneralBrowserChannelActions.GetLayoutsWithSelectedViewsInternal;
109
+ FocusAndExpandSearchInternal: GeneralBrowserChannelActions.FocusAndExpandSearchInternal;
108
110
  };
109
111
  export type BrowserChannelAction = typeof BrowserChannelAction;
110
112
  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>;
@@ -11,7 +11,7 @@ export declare const isDocumentDefined: boolean;
11
11
  export declare const isWindowDefinedWithIndexDB: boolean;
12
12
  export declare const finUUID: string;
13
13
  export declare const finName: string;
14
- export declare const finEntityType: "" | "window" | "view";
14
+ export declare const finEntityType: "" | "view" | "window";
15
15
  export declare const isEnvLocal: boolean;
16
16
  export declare const isEnvDev: boolean;
17
17
  export declare const isEnvStaging: boolean;
@@ -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-platform/shapes").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;