@openfin/workspace 22.4.1 → 22.5.0
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-platform/src/api/context-menu/utils.d.ts +10 -0
- package/client-api-platform/src/shapes.d.ts +17 -6
- package/common/src/components/IndicatorContainer/bounds.d.ts +14 -0
- package/common/src/components/IndicatorContainer/types.d.ts +35 -0
- package/common/src/utils/indicators/showIndicator.d.ts +55 -0
- package/common/src/utils/positioning.d.ts +4 -0
- package/common/src/utils/save-button-context-menu.d.ts +1 -1
- package/common/src/utils/types.d.ts +1 -1
- package/common/src/utils/window.d.ts +2 -1
- package/common/src/utils/workspace-modals.d.ts +5 -1
- package/dock3/src/shapes/shapes.d.ts +7 -1
- package/externals.report.json +10 -10
- 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 +3 -3
- package/store.js +1 -1
- package/store.js.map +1 -1
- package/common/src/components/IndicatorContainer/helper.d.ts +0 -30
- package/common/src/utils/indicators/browser.d.ts +0 -32
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { PositioningType } from '../../../../common/src/utils/positioning';
|
|
2
3
|
import { WorkspaceContextMenuItemData } from '../../../../client-api-platform/src/shapes';
|
|
4
|
+
export declare const saveWorkspaceHandlerWithInjectables: ({ showModal, afterSuccessSave }: {
|
|
5
|
+
showModal?: () => Promise<void>;
|
|
6
|
+
afterSuccessSave?: () => Promise<void>;
|
|
7
|
+
}) => Promise<void>;
|
|
3
8
|
export declare const saveWorkspaceHandler: (identity: OpenFin.Identity) => Promise<void>;
|
|
4
9
|
export declare const saveWorkspaceAsHandler: (identity: OpenFin.Identity) => void;
|
|
5
10
|
/**
|
|
@@ -17,6 +22,11 @@ export declare const savePageHandler: (identity: OpenFin.Identity, pageId?: stri
|
|
|
17
22
|
*/
|
|
18
23
|
export declare const savePageAsHandler: (identity: OpenFin.Identity, pageId?: string) => Promise<void>;
|
|
19
24
|
export declare const switchWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
|
|
25
|
+
export declare const deleteWorkspaceHandlerWithPayload: ({ workspaceItemData, winIdentity, positioning }: {
|
|
26
|
+
workspaceItemData: WorkspaceContextMenuItemData;
|
|
27
|
+
winIdentity?: OpenFin.Identity;
|
|
28
|
+
positioning?: PositioningType;
|
|
29
|
+
}) => Promise<void>;
|
|
20
30
|
export declare const deleteWorkspaceHandler: (winIdentity: OpenFin.Identity, workspaceItemData: WorkspaceContextMenuItemData) => Promise<void>;
|
|
21
31
|
export declare const downloadsHandler: (identity: OpenFin.Identity) => Promise<void>;
|
|
22
32
|
/**
|
|
@@ -2719,7 +2719,10 @@ export type ContentMenuEntry = {
|
|
|
2719
2719
|
} | {
|
|
2720
2720
|
type: 'item';
|
|
2721
2721
|
id: string;
|
|
2722
|
-
icon: string
|
|
2722
|
+
icon: string | {
|
|
2723
|
+
dark: string;
|
|
2724
|
+
light: string;
|
|
2725
|
+
};
|
|
2723
2726
|
label: string;
|
|
2724
2727
|
itemData: any;
|
|
2725
2728
|
});
|
|
@@ -2738,10 +2741,17 @@ export type DockEntry = {
|
|
|
2738
2741
|
type: 'folder';
|
|
2739
2742
|
id: string;
|
|
2740
2743
|
label: string;
|
|
2744
|
+
icon?: string | {
|
|
2745
|
+
dark: string;
|
|
2746
|
+
light: string;
|
|
2747
|
+
};
|
|
2741
2748
|
} | {
|
|
2742
2749
|
type: 'item';
|
|
2743
2750
|
id: string;
|
|
2744
|
-
icon: string
|
|
2751
|
+
icon: string | {
|
|
2752
|
+
dark: string;
|
|
2753
|
+
light: string;
|
|
2754
|
+
};
|
|
2745
2755
|
label: string;
|
|
2746
2756
|
itemData?: any;
|
|
2747
2757
|
};
|
|
@@ -2842,6 +2852,10 @@ export declare enum SaveModalType {
|
|
|
2842
2852
|
RENAME_PAGE = "RENAME_PAGE",
|
|
2843
2853
|
RENAME_WORKSPACE = "RENAME_WORKSPACE"
|
|
2844
2854
|
}
|
|
2855
|
+
export type OpenSaveWorkspaceMenuRequest = {
|
|
2856
|
+
menuType: SaveModalType.SAVE_WORKSPACE | SaveModalType.SAVE_WORKSPACE_AS | SaveModalType.RENAME_WORKSPACE;
|
|
2857
|
+
id?: never;
|
|
2858
|
+
};
|
|
2845
2859
|
/**
|
|
2846
2860
|
* Request to create a save modal.
|
|
2847
2861
|
* @private
|
|
@@ -2849,10 +2863,7 @@ export declare enum SaveModalType {
|
|
|
2849
2863
|
export type OpenSaveMenuRequest = {
|
|
2850
2864
|
menuType: SaveModalType.SAVE_PAGE | SaveModalType.SAVE_PAGE_AS | SaveModalType.RENAME_PAGE;
|
|
2851
2865
|
id: string;
|
|
2852
|
-
} |
|
|
2853
|
-
menuType: SaveModalType.SAVE_WORKSPACE | SaveModalType.SAVE_WORKSPACE_AS | SaveModalType.RENAME_WORKSPACE;
|
|
2854
|
-
id?: never;
|
|
2855
|
-
};
|
|
2866
|
+
} | OpenSaveWorkspaceMenuRequest;
|
|
2856
2867
|
export type TaskbarIcon = {
|
|
2857
2868
|
dark: string;
|
|
2858
2869
|
light: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { IndicatorBounds, IndicatorOptions, WindowSize } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the bounds of the parent window, with fallback to provided bounds.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getParentWindowBounds: (parentWindow: OpenFin.Window | false, parentWindowBounds?: OpenFin.WindowBounds) => Promise<OpenFin.WindowBounds | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Checks if a window is maximized.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isWindowMaximized: (parentWindow: OpenFin.Window | false) => Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Pure function – returns the final indicator rectangle, nothing else.
|
|
13
|
+
*/
|
|
14
|
+
export declare function computeIndicatorBounds(identity: OpenFin.Identity | null | undefined, mySize: WindowSize, opts: IndicatorOptions): Promise<IndicatorBounds>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { PositioningType } from '../../../../common/src/utils/positioning';
|
|
3
|
+
export declare enum ShowAtType {
|
|
4
|
+
Top = "top",
|
|
5
|
+
Below = "below"
|
|
6
|
+
}
|
|
7
|
+
export interface IndicatorOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Where to place the indicator relative to its parent.
|
|
10
|
+
*/
|
|
11
|
+
showAt: ShowAtType;
|
|
12
|
+
/**
|
|
13
|
+
* When `true`, we use the "enterprise" timing + vertical offset rules.
|
|
14
|
+
*/
|
|
15
|
+
isEnterprise: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The bounds of the parent window if the parent is not available at
|
|
18
|
+
* runtime (e.g. the browser window launched the indicator and closed).
|
|
19
|
+
*/
|
|
20
|
+
fallbackParentBounds?: OpenFin.WindowBounds;
|
|
21
|
+
/**
|
|
22
|
+
* Determines whether to position relative to parent window or monitor.
|
|
23
|
+
*/
|
|
24
|
+
positioning?: PositioningType;
|
|
25
|
+
}
|
|
26
|
+
export interface IndicatorBounds {
|
|
27
|
+
left: number;
|
|
28
|
+
top: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
}
|
|
32
|
+
export interface WindowSize {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { IconType } from '@openfin/ui-library';
|
|
2
|
+
import { PositioningType } from '../../../../common/src/utils/positioning';
|
|
3
|
+
import { IndicatorType } from '../../../../common/src/components/Indicator/Indicator.constants';
|
|
4
|
+
export type IndicatorIcon = Extract<IconType, 'LockClosedIcon' | 'LockOpen1Icon' | 'PageIcon' | 'BlockedIcon' | 'SupertabIcon' | 'BookmarkFilled'>;
|
|
5
|
+
export interface ShowIndicatorPayload {
|
|
6
|
+
type: IndicatorType;
|
|
7
|
+
message: string;
|
|
8
|
+
parentBrowserName?: string;
|
|
9
|
+
secondaryMessage?: string;
|
|
10
|
+
icon?: IndicatorIcon;
|
|
11
|
+
isEnterprise?: boolean;
|
|
12
|
+
positioning?: PositioningType;
|
|
13
|
+
}
|
|
14
|
+
export interface ShowErrorPayload {
|
|
15
|
+
message: string;
|
|
16
|
+
parentBrowserName?: string;
|
|
17
|
+
icon?: IndicatorIcon;
|
|
18
|
+
isEnterprise?: boolean;
|
|
19
|
+
positioning?: PositioningType;
|
|
20
|
+
}
|
|
21
|
+
export interface ShowSuccessPayload {
|
|
22
|
+
message: string;
|
|
23
|
+
parentBrowserName?: string;
|
|
24
|
+
secondaryMessage?: string;
|
|
25
|
+
icon?: IndicatorIcon;
|
|
26
|
+
isEnterprise?: boolean;
|
|
27
|
+
positioning?: PositioningType;
|
|
28
|
+
}
|
|
29
|
+
export interface ShowInfoPayload {
|
|
30
|
+
message: string;
|
|
31
|
+
parentBrowserName?: string;
|
|
32
|
+
icon?: IndicatorIcon;
|
|
33
|
+
isEnterprise?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates a window containing a visual indicator contained in a Browser Window
|
|
37
|
+
* This function decides whether to call browser function or direct function
|
|
38
|
+
*/
|
|
39
|
+
export declare function showIndicator(payload: ShowIndicatorPayload): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a window containing an error indicator
|
|
42
|
+
*/
|
|
43
|
+
export declare function showError(payload: ShowErrorPayload): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Creates a window containing a success indicator
|
|
46
|
+
*/
|
|
47
|
+
export declare function showSuccess(payload: ShowSuccessPayload): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates a window containing an info indicator
|
|
50
|
+
*/
|
|
51
|
+
export declare function showInfo(payload: ShowInfoPayload): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a window centered on monitor containing a success indicator for switching workspaces
|
|
54
|
+
*/
|
|
55
|
+
export declare function showSwitchWorkspaceSuccess(): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SaveButtonContextMenuItemTemplate } from '../../../client-api-platform/src/shapes';
|
|
2
|
-
export declare const getSaveButtonMenuTemplate: () => Promise<SaveButtonContextMenuItemTemplate[]>;
|
|
2
|
+
export declare const getSaveButtonMenuTemplate: (pageId: string) => Promise<SaveButtonContextMenuItemTemplate[]>;
|
|
@@ -54,5 +54,5 @@ type MissingKeys<T, U> = Exclude<keyof T, U>;
|
|
|
54
54
|
* fooChecker(['bar', 'qux', 'baz']); // 'baz' is not assignable to type keyof Foo;
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
export declare const makeKeyChecker: <T extends object>() => <
|
|
57
|
+
export declare const makeKeyChecker: <T extends object>() => <K extends (keyof T)[]>(arr: K & (Exclude<keyof T, K[number]> extends never ? unknown : `Error: Missing keys: ${string & Exclude<keyof T, K[number]>}`)) => K;
|
|
58
58
|
export {};
|
|
@@ -7,6 +7,7 @@ export declare enum WindowName {
|
|
|
7
7
|
HomeInternal = "openfin-home-internal",
|
|
8
8
|
BrowserMenu = "openfin-browser-menu",
|
|
9
9
|
BrowserSaveMenu = "openfin-browser-save-menu",
|
|
10
|
+
DockSaveWorkspaceMenu = "openfin-dock3-save-workspace-menu",
|
|
10
11
|
BrowserIndicator = "openfin-browser-indicator",
|
|
11
12
|
BrowserWindow = "internal-generated-window",
|
|
12
13
|
ClassicWindow = "internal-generated-classic-window",
|
|
@@ -179,5 +180,5 @@ export declare const getWindowBounds: (window: OpenFin.Window) => Promise<OpenFi
|
|
|
179
180
|
* @param monitor the monitor to check against
|
|
180
181
|
*/
|
|
181
182
|
export declare function getPercentageOfBoundsInMonitor(bounds: OpenFin.Bounds, monitor: OpenFin.MonitorDetails): number;
|
|
182
|
-
export declare function
|
|
183
|
+
export declare function getMonitorWindowMostOn(parentWindowBounds: OpenFin.Bounds): Promise<OpenFin.MonitorDetails>;
|
|
183
184
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { ResponseModalConfig } from '../../../common/src/utils/menu-config';
|
|
3
3
|
import { ModalResponseEvent } from './menu-window-provider';
|
|
4
|
+
export type DeleteWorkspaceMenuPayload = {
|
|
5
|
+
workspaceTitle: string;
|
|
6
|
+
windowIdentity?: OpenFin.Identity;
|
|
7
|
+
};
|
|
4
8
|
export declare const restoreChangesMenu: (windowIdentity: OpenFin.Identity) => Promise<ResponseModalConfig>;
|
|
5
9
|
export declare const deletePageMenu: (windowIdentity: OpenFin.Identity, pageTitle: string) => Promise<ResponseModalConfig>;
|
|
6
10
|
/**
|
|
@@ -11,7 +15,7 @@ export declare const deletePageMenu: (windowIdentity: OpenFin.Identity, pageTitl
|
|
|
11
15
|
* @returns Boolean - Affirmative or Negative response from user
|
|
12
16
|
*/
|
|
13
17
|
export declare const showSwitchWorkspaceModal: (targetWindowIdentity: OpenFin.Identity | undefined, workspaceTitle: string, shouldCenterOnMonitor?: boolean) => Promise<boolean>;
|
|
14
|
-
export declare const showDeleteWorkspaceModal: (
|
|
18
|
+
export declare const showDeleteWorkspaceModal: ({ workspaceTitle, windowIdentity }: DeleteWorkspaceMenuPayload) => Promise<boolean>;
|
|
15
19
|
/**
|
|
16
20
|
*
|
|
17
21
|
* @param windowIdentity Parent or Current OpenFin Window Identity
|
|
@@ -2,7 +2,7 @@ import type { OpenFin } from '@openfin/core';
|
|
|
2
2
|
import { WorkspaceButton } from '../../../client-api/src/dock';
|
|
3
3
|
import { ContentMenuEntry, DockEntry, TaskbarIcon } from '../../../client-api-platform/src/shapes';
|
|
4
4
|
export type { Dock3Provider, Dock3ConstructorOverride } from '../api/provider';
|
|
5
|
-
export type Dock3Button = WorkspaceButton | 'contentMenu';
|
|
5
|
+
export type Dock3Button = WorkspaceButton | 'contentMenu' | 'manageWorkspaces';
|
|
6
6
|
/**
|
|
7
7
|
* Configuration for the Dock 3.0 provider.
|
|
8
8
|
*/
|
|
@@ -58,6 +58,12 @@ export interface Dock3Config {
|
|
|
58
58
|
skipDialog?: boolean;
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
|
+
manageWorkspaces?: {
|
|
62
|
+
newWindow?: {
|
|
63
|
+
behavior: 'view';
|
|
64
|
+
viewOptions: OpenFin.PlatformViewCreationOptions;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
61
67
|
};
|
|
62
68
|
}
|
|
63
69
|
export type DockAllowedWindowOptions = Partial<Pick<OpenFin.PlatformWindowOptions, 'defaultCentered' | 'saveWindowState' | 'taskbarIconGroup' | 'defaultTop' | 'defaultLeft'>>;
|
package/externals.report.json
CHANGED
|
@@ -5,14 +5,6 @@
|
|
|
5
5
|
"issuer": "client-api/src/notifications.ts"
|
|
6
6
|
}
|
|
7
7
|
],
|
|
8
|
-
"@openfin/microsoft365": [
|
|
9
|
-
{
|
|
10
|
-
"type": "explicit",
|
|
11
|
-
"version": "^1.0.1",
|
|
12
|
-
"packageName": "client-api/package.json",
|
|
13
|
-
"issuer": "client-api/src/integrations/microsoft.ts"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
8
|
"title-case": [
|
|
17
9
|
{
|
|
18
10
|
"type": "explicit",
|
|
@@ -27,6 +19,14 @@
|
|
|
27
19
|
"issuer": "common/src/utils/color-linking.ts"
|
|
28
20
|
}
|
|
29
21
|
],
|
|
22
|
+
"@openfin/microsoft365": [
|
|
23
|
+
{
|
|
24
|
+
"type": "explicit",
|
|
25
|
+
"version": "^1.0.1",
|
|
26
|
+
"packageName": "client-api/package.json",
|
|
27
|
+
"issuer": "client-api/src/integrations/microsoft.ts"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
30
|
"lodash.debounce": [
|
|
31
31
|
{
|
|
32
32
|
"type": "explicit",
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
"type": "root-implicit",
|
|
75
75
|
"version": "^4.0.11",
|
|
76
76
|
"packageName": "common/package.json",
|
|
77
|
-
"issuer": "common/src/
|
|
77
|
+
"issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"type": "root-implicit",
|
|
81
81
|
"version": "^4.0.11",
|
|
82
82
|
"packageName": "common/package.json",
|
|
83
|
-
"issuer": "common/src/
|
|
83
|
+
"issuer": "common/src/api/pages/idb.ts"
|
|
84
84
|
}
|
|
85
85
|
]
|
|
86
86
|
}
|