@openfin/workspace-platform 9.1.4 → 9.1.7

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.
@@ -7,7 +7,7 @@ export declare function getLastFocusedBrowserWindow(): Promise<OpenFin.Identity
7
7
  /**
8
8
  * Set the OpenFin identity of the last focused browser window.
9
9
  */
10
- export declare function setLastFocusedBrowserWindow(identity?: OpenFin.Identity): void;
10
+ export declare function setLastFocusedBrowserWindow(identity?: OpenFin.Identity): Promise<void>;
11
11
  /**
12
12
  * Listen for a browser window to be focused.
13
13
  * When a browser window is focused, store it in local storage as the last focused browser window.
@@ -1,5 +1,6 @@
1
1
  /// <reference types="@openfin/core" />
2
2
  import { AttachedPage, PageLayout } from '../../../client-api-platform/src/shapes';
3
+ import { WindowIdentity } from './window';
3
4
  export declare type LayoutComponentStateExtended = OpenFin.LayoutComponent['componentState'] & {
4
5
  name: string;
5
6
  uuid: string;
@@ -38,6 +39,10 @@ export interface LayoutDOMEvent {
38
39
  isInitialized: boolean;
39
40
  }
40
41
  export declare type LayoutDOMEventListener = (ev: LayoutDOMEvent) => void;
42
+ export declare const getFirstViewFromLayout: (identity?: WindowIdentity) => Promise<{
43
+ name: any;
44
+ uuid: any;
45
+ }>;
41
46
  /**
42
47
  * Deep clones a layout and adds view names if they don't exist.
43
48
  * @param layout The Layout to be cloned
@@ -1,5 +1,5 @@
1
1
  /// <reference types="@openfin/core" />
2
- import { ModalResponseContent, ResponseModalConfig } from '../../../common/src/utils/menu-config';
2
+ import { ModalResponseContent } from '../../../common/src/utils/menu-config';
3
3
  import { Listener } from '../../../common/src/utils/shared-emitter';
4
4
  import type { OptionalExceptFor } from '../../../common/src/utils/types';
5
5
  import { _Window } from '@openfin/core/src/api/window';
@@ -37,9 +37,8 @@ export declare function createMenuPosition(windowOptions: OptionalExceptFor<Open
37
37
  top: number;
38
38
  left: number;
39
39
  }>;
40
- export declare function showChildWindow({ options, parameters }: ShowChildOptions, shouldCenterOnMonitor?: boolean): Promise<_Window>;
41
- export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, shouldCenterOnMonitor?: boolean) => Promise<import("@common/utils/window").Point>;
42
- export declare const waitForModalResponse: ({ options, content }: ResponseModalOptions, shouldCenterOnMonitor?: boolean) => Promise<{
40
+ export declare function showChildWindow({ options, parameters }: ShowChildOptions): Promise<_Window>;
41
+ export declare const waitForModalResponse: ({ options, content }: ResponseModalOptions) => Promise<{
43
42
  data: ModalResponse;
44
43
  }>;
45
44
  export {};
@@ -0,0 +1,20 @@
1
+ /// <reference types="@openfin/core" />
2
+ import { ResponseModalConfig } from './menu-config';
3
+ import { Point } from './window';
4
+ /**
5
+ * returns the correct bounds for the response modal to be displayed at
6
+ * this will return the correct bounds regardless of whether the window is maximized
7
+ *
8
+ * @param modalOptions window options including height/width so that we can calculate the correct bounds
9
+ * @param parentWindowIdentity the window to get the bounds from
10
+ * @param centerOnMonitor whether the modal should be centered on the monitor
11
+ * @returns a point (top/left) as to where the window should be placed
12
+ */
13
+ export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean) => Promise<Point>;
14
+ /**
15
+ * calculates the percenage of the window that is present within the monitor (float in range 0-1)
16
+ *
17
+ * @param bounds the bounds of the window
18
+ * @param monitor the monitor to check against
19
+ */
20
+ export declare function getPercentageOfBoundsInMonitor(bounds: OpenFin.Bounds, monitor: OpenFin.MonitorDetails): number;
@@ -54,6 +54,9 @@ export declare function getOriginWithPath(origin: string, path: string): string;
54
54
  * @returns the query parameters.
55
55
  */
56
56
  export declare function getQuery(): URLSearchParams;
57
+ export declare const getUrlParams: (path: string) => {
58
+ [k: string]: string;
59
+ };
57
60
  export declare function getPathnameWithBasePath(pathname: string): string;
58
61
  /**
59
62
  * Get the current route.
@@ -7,7 +7,8 @@ export declare enum WindowName {
7
7
  HomeInternal = "openfin-home-internal",
8
8
  BrowserMenu = "openfin-browser-menu",
9
9
  BrowserIndicator = "openfin-browser-indicator",
10
- BrowserWindow = "internal-generated-window"
10
+ BrowserWindow = "internal-generated-window",
11
+ ClassicWindow = "internal-generated-classic-window"
11
12
  }
12
13
  export declare enum WindowEvent {
13
14
  Shown = "shown",
@@ -121,11 +122,11 @@ export declare function restoreWindowSize(): Promise<void>;
121
122
  export declare function setSize(width: number, height: number): Promise<void>;
122
123
  export declare function animateSize(width: number, height: number): Promise<void>;
123
124
  /**
124
- * Returns true if the window name is that of a browser window.
125
- * @param name the window name.
126
- * @returns true if the name is that of a browser window's.
125
+ * Returns true if the window identity is that of a browser window.
126
+ * @param identity the window identity
127
+ * @returns boolean
127
128
  */
128
- export declare const isBrowserWindow: (name: string) => boolean;
129
+ export declare const isBrowserWindow: (identity: OpenFin.Identity) => Promise<boolean>;
129
130
  /**
130
131
  * Force document body size. Called when resizing or on scaling changes.
131
132
  */