@openfin/workspace 21.0.2 → 21.0.4
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/src/shapes/dock.d.ts +6 -0
- package/client-api-platform/src/api/dock.d.ts +4 -2
- package/client-api-platform/src/init/browser-window-focus.d.ts +10 -7
- package/client-api-platform/src/init/override-callback/browser-defaults.d.ts +1 -1
- package/client-api-platform/src/shapes.d.ts +26 -5
- package/common/src/api/protocol/browser.d.ts +3 -1
- package/common/src/api/protocol/workspace-platform.d.ts +3 -2
- package/common/src/utils/enterprise-dock.d.ts +1 -1
- package/common/src/utils/enterpriseBrowser.d.ts +3 -1
- package/common/src/utils/landing-page.d.ts +6 -0
- package/common/src/utils/modal-bounds.d.ts +6 -0
- package/common/src/utils/popup-window.d.ts +3 -1
- 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 +2 -2
- package/store.js +1 -1
- package/store.js.map +1 -1
|
@@ -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 {
|
|
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
|
|
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
|
-
*
|
|
4
|
-
* @returns
|
|
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
|
-
*
|
|
9
|
-
*
|
|
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
|
|
12
|
+
export declare function getLastFocusedUnminimizedBrowserWindow(): Promise<OpenFin.Identity | undefined>;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
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
|
|
18
|
+
export declare function listenForBrowserWindowFocus(): Promise<void>;
|
|
@@ -9,4 +9,4 @@ export declare const searchMenuIdentityBase: {
|
|
|
9
9
|
/**
|
|
10
10
|
* Applies default options to the creation of browser windows.
|
|
11
11
|
*/
|
|
12
|
-
export declare function applyBrowserDefaults(options: OpenFin.PlatformWindowCreationOptions, initOptions: Pick<BrowserInitConfig, 'defaultWindowOptions' | 'defaultPageOptions' | 'defaultViewOptions'> | undefined, themeData?: PreloadedThemeData): Promise<OpenFin.PlatformWindowCreationOptions>;
|
|
12
|
+
export declare function applyBrowserDefaults(options: OpenFin.PlatformWindowCreationOptions, initOptions: Pick<BrowserInitConfig, 'defaultWindowOptions' | 'defaultPageOptions' | 'defaultViewOptions' | 'browserIconSize'> | undefined, themeData?: PreloadedThemeData): Promise<OpenFin.PlatformWindowCreationOptions>;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
@@ -2621,6 +2631,10 @@ export type DockEntry = {
|
|
|
2621
2631
|
label: string;
|
|
2622
2632
|
itemData?: any;
|
|
2623
2633
|
};
|
|
2634
|
+
/**
|
|
2635
|
+
* Configuration options for Browser window's icons.
|
|
2636
|
+
*/
|
|
2637
|
+
export type IconSize = 'large' | 'default';
|
|
2624
2638
|
/**
|
|
2625
2639
|
* Configuration for initializing a Browser.
|
|
2626
2640
|
*/
|
|
@@ -2640,6 +2654,13 @@ export interface BrowserInitConfig {
|
|
|
2640
2654
|
* The platform title. UI friendly title for the platform in browser.
|
|
2641
2655
|
*/
|
|
2642
2656
|
title?: string;
|
|
2657
|
+
/**
|
|
2658
|
+
* By default, the icons in the browser are displayed at the default size. If you
|
|
2659
|
+
* want to display the icons at a larger size, set this property to 'large'. This
|
|
2660
|
+
* will increase the size of the icons in the browser. If you have custom icons
|
|
2661
|
+
* that are PNGs you will need to update these assets for best results.
|
|
2662
|
+
*/
|
|
2663
|
+
browserIconSize?: IconSize;
|
|
2643
2664
|
/**
|
|
2644
2665
|
* Override workspace platform behavior
|
|
2645
2666
|
*
|
|
@@ -2726,7 +2747,7 @@ export interface LaunchBookmarkPayload {
|
|
|
2726
2747
|
type EnterpriseDockChannelProviderChannelActions = {
|
|
2727
2748
|
'launch-entry': (entry: DockEntry) => void;
|
|
2728
2749
|
'set-dock-favorites-order': (newFavorites: DockEntry[]) => void;
|
|
2729
|
-
'set-dock-
|
|
2750
|
+
'set-default-dock-buttons-order': (newFavorites: DockCompanionButton[]) => void;
|
|
2730
2751
|
'get-dock-workspaces-context-menu': () => BaseCustomDropdownItem[];
|
|
2731
2752
|
'handle-dock-workspaces-menu-response': (payload: any) => void;
|
|
2732
2753
|
'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
|
-
|
|
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,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
|
|
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-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
|
|
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;
|