@openfin/workspace-platform 20.2.1 → 20.2.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.
- package/browser/src/components/ControlBar/SearchMenu/useSelectedAndOpenViewsBroadcastChannel.d.ts +2 -2
- package/browser/src/hooks/EnterpriseSearchMenu/AdjustSearchMenuDimensions/useAdjustSearchMenuViewDimensions.d.ts +2 -6
- package/client-api-platform/src/api/context-menu/index.d.ts +13 -3
- package/common/src/utils/context-menu.d.ts +7 -0
- package/common/src/utils/modal-bounds.d.ts +16 -0
- package/common/src/utils/popup-window.d.ts +0 -6
- package/common/src/utils/router/base.d.ts +1 -1
- package/common/src/utils/window.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/workspace_platform.zip +0 -0
package/browser/src/components/ControlBar/SearchMenu/useSelectedAndOpenViewsBroadcastChannel.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
2
|
import type OpenFin from '@openfin/core';
|
|
3
|
-
import {
|
|
4
|
-
export declare const useSelectedAndOpenViewsBroadcastChannel: (additionalCallBack?: (ev: MessageEvent<
|
|
3
|
+
import { SearchMenuChannelUpdateState } from '../../../../../common/src/utils/popup-window';
|
|
4
|
+
export declare const useSelectedAndOpenViewsBroadcastChannel: (additionalCallBack?: (ev: MessageEvent<SearchMenuChannelUpdateState>) => void) => {
|
|
5
5
|
selectedViews: OpenFin.Identity[];
|
|
6
6
|
openViews: OpenFin.Identity[];
|
|
7
7
|
searchMenuChannel: MutableRefObject<BroadcastChannel>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SearchSitesResponse, Site } from '../../../../../client-api-platform/src/index';
|
|
2
1
|
export declare const MENU_BOUNDS: {
|
|
3
2
|
expanded: {
|
|
4
3
|
minWidth: number;
|
|
@@ -20,10 +19,7 @@ export declare const MENU_BOUNDS: {
|
|
|
20
19
|
* @param {React.RefObject<HTMLElement>} containerRef - Ref object pointing to the container element of the search menu.
|
|
21
20
|
* @param {boolean} shouldExpand - Boolean indicating if the search results view should expand.
|
|
22
21
|
* @param {React.RefObject<BroadcastChannel>} searchMenuChannel - Ref object for the broadcast channel used to communicate with the browser window.
|
|
23
|
-
* @param {
|
|
24
|
-
* @param {string} searchText - String representing the current text in the address input.
|
|
25
|
-
* @param {Site[]} recentlyVisited - Array of recently visited sites. (Displayed in the EmptySearchInputContainer)
|
|
26
|
-
* @param {Site[]} curatedContent - Array of curated content sites. (Displayed in the EmptySearchInputContainer)
|
|
22
|
+
* @param {boolean} shouldShowEmptySearchContainer - Boolean indicating if the emptySearchInputContainer container should be shown.
|
|
27
23
|
*/
|
|
28
|
-
declare const useAdjustSearchMenuViewDimensions: (containerRef: React.RefObject<HTMLElement>, shouldExpand: boolean, searchMenuChannel: React.RefObject<BroadcastChannel>,
|
|
24
|
+
declare const useAdjustSearchMenuViewDimensions: (containerRef: React.RefObject<HTMLElement>, shouldExpand: boolean, searchMenuChannel: React.RefObject<BroadcastChannel>, shouldShowEmptySearchContainer: boolean) => void;
|
|
29
25
|
export default useAdjustSearchMenuViewDimensions;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { ContextMenuType } from '../../../../common/src/utils/popup-window';
|
|
3
3
|
import { InternalOpenGlobalContextMenuRequest, InternalOpenPageTabContextMenuRequest, OpenGlobalContextMenuPayload, OpenPageTabContextMenuPayload, OpenSaveButtonContextMenuPayload, OpenSaveButtonContextMenuRequest, OpenViewTabContextMenuPayload, OpenViewTabContextMenuRequest, WorkspacePlatformProvider } from '../../../../client-api-platform/src/shapes';
|
|
4
|
+
/**
|
|
5
|
+
* Enum representing the possible anchor behaviors for positioning context menus.
|
|
6
|
+
* These are relative to an element/cursor position (as opposed to a corner of the context menu window).
|
|
7
|
+
*
|
|
8
|
+
* e.g. AnchorBehavior.BottomRight implies a context menu will expand aligned with the bottom and right edge of an element.
|
|
9
|
+
*
|
|
10
|
+
* @enum {number}
|
|
11
|
+
*/
|
|
4
12
|
export declare enum AnchorBehavior {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
13
|
+
TopLeft = 0,
|
|
14
|
+
TopRight = 1,
|
|
15
|
+
BottomLeft = 2,
|
|
16
|
+
BottomRight = 3,
|
|
17
|
+
Center = 4
|
|
8
18
|
}
|
|
9
19
|
type ContextMenuPayload = OpenGlobalContextMenuPayload | OpenViewTabContextMenuPayload | OpenPageTabContextMenuPayload | OpenSaveButtonContextMenuPayload;
|
|
10
20
|
export declare const openCommonContextMenu: (payload: ContextMenuPayload, _callerIdentity: OpenFin.Identity, type?: ContextMenuType, anchorBehavior?: AnchorBehavior) => Promise<void>;
|
|
@@ -18,3 +18,10 @@ export declare const DefaultSaveMenuBounds: {
|
|
|
18
18
|
width: number;
|
|
19
19
|
height: number;
|
|
20
20
|
};
|
|
21
|
+
export declare const getBoundsBasedOnAnchorBehavior: (bounds: OpenFin.Bounds, anchorBehavior: AnchorBehavior) => OpenFin.Bounds | {
|
|
22
|
+
bottom: number;
|
|
23
|
+
top: number;
|
|
24
|
+
left: number;
|
|
25
|
+
height: number;
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
@@ -18,3 +18,19 @@ export declare const getCenterOfParentWindowMonitor: (parentWindowIdentity?: Ope
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean) => Promise<OpenFin.Bounds>;
|
|
20
20
|
export declare function getResponseModalBoundsAndCenterParentIfModalOffScreen(modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean): Promise<OpenFin.Bounds>;
|
|
21
|
+
/**
|
|
22
|
+
* Adjusts the given bounds to be within the closest monitor's available bounds if they are offscreen.
|
|
23
|
+
*
|
|
24
|
+
* @param {OpenFin.Bounds} bounds - The bounds to be adjusted.
|
|
25
|
+
* @returns {Promise<OpenFin.Bounds>} - The adjusted bounds that are within the closest monitor's available bounds.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getClosestBoundsIfModalBoundsOffscreen(bounds: OpenFin.Bounds): Promise<OpenFin.Bounds>;
|
|
28
|
+
/**
|
|
29
|
+
* Adjusts the given bounds if they are offscreen to be within the closest monitor's available bounds.
|
|
30
|
+
* Returns bounds relative to the parent window's bounds (as opposed to bounds relative to the monitor).
|
|
31
|
+
*
|
|
32
|
+
* @param {OpenFin.WindowBounds} parentWindowBounds - The bounds of the parent window.
|
|
33
|
+
* @param {OpenFin.Bounds} bounds - The bounds to be adjusted.
|
|
34
|
+
* @returns {Promise<OpenFin.Bounds>} - The adjusted bounds that are within the closest monitor's available bounds relative to the parent window's bounds.
|
|
35
|
+
*/
|
|
36
|
+
export declare const getClosestRelativeBoundsIfModalBoundsOffscreen: (parentWindowBounds: OpenFin.WindowBounds, bounds: OpenFin.Bounds) => Promise<OpenFin.Bounds>;
|
|
@@ -9,11 +9,6 @@ export declare enum SaveMenuType {
|
|
|
9
9
|
SaveAs = "SaveAs"
|
|
10
10
|
}
|
|
11
11
|
export declare function showModalWin<T extends keyof UserMenuParams>(params: UserMenuParams[T], windowOpts: OptionalExceptFor<OpenFin.WindowOptions, 'x' | 'y' | 'defaultWidth' | 'url' | 'name'>): Promise<OpenFin.Window>;
|
|
12
|
-
export type SearchMenuChannelViewResized = {
|
|
13
|
-
type: 'view-resized';
|
|
14
|
-
height: number;
|
|
15
|
-
width: number;
|
|
16
|
-
};
|
|
17
12
|
export type SearchMenuChannelUpdateState = {
|
|
18
13
|
selectedViews: OpenFin.Identity[];
|
|
19
14
|
openViews: OpenFin.Identity[];
|
|
@@ -32,7 +27,6 @@ export type BrowserSearchMenuKeyboardEvent = {
|
|
|
32
27
|
altKey?: boolean;
|
|
33
28
|
};
|
|
34
29
|
};
|
|
35
|
-
export type SearchMenuChannelRequest = SearchMenuChannelViewResized | SearchMenuChannelUpdateState;
|
|
36
30
|
export declare enum ContextMenuType {
|
|
37
31
|
GlobalMenu = "global-menu",
|
|
38
32
|
ContextMenu = "context-menu",
|
|
@@ -37,7 +37,7 @@ export declare function getAbsoluteRoutePath(route: PageRoute | string): string;
|
|
|
37
37
|
* The base path of the router contains the router's zone as a postfix.
|
|
38
38
|
*/
|
|
39
39
|
export declare function getBasePath(): string;
|
|
40
|
-
export declare function resolveAbsolutePath(path: string): string;
|
|
40
|
+
export declare function resolveAbsolutePath(path: string, baseUrl?: URL): string;
|
|
41
41
|
/**
|
|
42
42
|
* Gets the path to the route with the router's base path.
|
|
43
43
|
* @param route the route.
|
|
@@ -174,5 +174,5 @@ export declare const getWindowBounds: (window: OpenFin.Window) => Promise<OpenFi
|
|
|
174
174
|
* @param monitor the monitor to check against
|
|
175
175
|
*/
|
|
176
176
|
export declare function getPercentageOfBoundsInMonitor(bounds: OpenFin.Bounds, monitor: OpenFin.MonitorDetails): number;
|
|
177
|
-
export declare function getMonitorWindowMaximizedOn(parentWindowBounds: OpenFin.
|
|
177
|
+
export declare function getMonitorWindowMaximizedOn(parentWindowBounds: OpenFin.Bounds): Promise<OpenFin.MonitorDetails>;
|
|
178
178
|
export {};
|