@openfin/workspace 10.2.5 → 10.3.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/886.js +2 -0
- package/886.js.map +1 -0
- package/LICENSE.md +3 -0
- package/client-api/src/home.d.ts +2 -2
- package/client-api/src/notifications.d.ts +6 -0
- package/client-api/src/shapes/home.d.ts +50 -3
- package/client-api-platform/src/api/analytics.d.ts +13 -0
- package/client-api-platform/src/api/context-menu/index.d.ts +5 -5
- package/client-api-platform/src/api/context-menu/utils.d.ts +0 -1
- package/client-api-platform/src/api/pages/index.d.ts +0 -1
- package/client-api-platform/src/api/theming.d.ts +4 -4
- package/client-api-platform/src/api/workspaces/idb.d.ts +1 -1
- package/client-api-platform/src/init/dialogs.d.ts +1 -1
- package/client-api-platform/src/init/override-callback.d.ts +0 -1
- package/client-api-platform/src/init/utils.d.ts +2 -2
- package/client-api-platform/src/shapes.d.ts +98 -1
- package/common/src/api/overrides.d.ts +1 -0
- package/common/src/api/protocol/browser.d.ts +7 -2
- package/common/src/api/protocol/workspace-platform.d.ts +11 -3
- package/common/src/api/protocol/workspace.d.ts +3 -0
- package/common/src/api/theming.d.ts +29 -4
- package/common/src/utils/create-and-migrate-ibd-store.d.ts +2 -0
- package/common/src/utils/global-context-menu.d.ts +9 -1
- package/common/src/utils/landing-page.d.ts +1 -2
- package/common/src/utils/local-storage-key.d.ts +3 -1
- package/common/src/utils/modal-bounds.d.ts +2 -2
- package/common/src/utils/notifications.d.ts +14 -0
- package/common/src/utils/page-tab-context-menu.d.ts +0 -1
- package/common/src/utils/promise-with-timeout.d.ts +1 -0
- package/common/src/utils/theming.d.ts +2 -19
- package/common/src/utils/usage-register.d.ts +39 -0
- package/common/src/utils/window.d.ts +2 -3
- package/common/src/utils/workspace-modals.d.ts +0 -1
- package/home.js +722 -1
- package/home.js.LICENSE.txt +40 -0
- package/home.js.map +1 -1
- package/index.js +722 -1
- package/index.js.LICENSE.txt +40 -0
- package/index.js.map +1 -1
- package/notifications.js +71 -16
- package/notifications.js.LICENSE.txt +1 -1
- package/notifications.js.map +1 -1
- package/package.json +1 -1
- package/search-api/src/provider/remote/data.d.ts +1 -1
- package/store.js +722 -1
- package/store.js.LICENSE.txt +40 -0
- package/store.js.map +1 -1
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
import type { ThemePaletteSet } from '@openfin/ui-library';
|
|
2
|
+
import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
|
|
2
3
|
export interface ComputedThemes extends Array<ComputedTheme> {
|
|
3
4
|
}
|
|
4
5
|
export interface ComputedTheme {
|
|
5
6
|
label: string;
|
|
6
7
|
logoUrl?: string;
|
|
7
8
|
theme: ThemePaletteSet;
|
|
9
|
+
defaultScheme?: ColorSchemeOptionType;
|
|
8
10
|
}
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export interface CustomThemeOptions {
|
|
11
|
+
interface BaseThemeOptions {
|
|
12
12
|
label: string;
|
|
13
13
|
logoUrl?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CustomThemeOptions extends BaseThemeOptions {
|
|
14
16
|
palette: CustomPaletteSet;
|
|
15
17
|
}
|
|
18
|
+
export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
|
|
19
|
+
default?: 'light' | 'dark';
|
|
20
|
+
palettes: {
|
|
21
|
+
light: CustomPaletteSet;
|
|
22
|
+
dark: CustomPaletteSet;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface CustomThemes extends Array<CustomThemeOptions | CustomThemeOptionsWithScheme> {
|
|
26
|
+
}
|
|
16
27
|
export interface DefaultPaletteSet {
|
|
17
28
|
brandPrimary: string;
|
|
18
29
|
brandSecondary: string;
|
|
19
30
|
backgroundPrimary: string;
|
|
20
31
|
}
|
|
32
|
+
export interface BackgroundLayers {
|
|
33
|
+
background1: string;
|
|
34
|
+
background2: string;
|
|
35
|
+
background3: string;
|
|
36
|
+
background4: string;
|
|
37
|
+
background5: string;
|
|
38
|
+
background6: string;
|
|
39
|
+
}
|
|
40
|
+
export interface PaletteLayersBackgrounds {
|
|
41
|
+
light: Partial<BackgroundLayers>;
|
|
42
|
+
dark: Partial<BackgroundLayers>;
|
|
43
|
+
}
|
|
21
44
|
export interface CustomPaletteSet extends DefaultPaletteSet {
|
|
22
45
|
functional1?: string;
|
|
23
46
|
functional2?: string;
|
|
@@ -62,5 +85,7 @@ export interface CustomPaletteSet extends DefaultPaletteSet {
|
|
|
62
85
|
* @param customPalettes
|
|
63
86
|
* @returns theme object ready to be applied to the UI
|
|
64
87
|
*/
|
|
65
|
-
export declare const computeThemes: (customPalettes: CustomThemes) => ComputedThemes;
|
|
88
|
+
export declare const computeThemes: (customPalettes: CustomThemes, storedScheme?: ColorSchemeOptionType) => ComputedThemes;
|
|
66
89
|
export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<ComputedTheme>;
|
|
90
|
+
export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
|
|
91
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="@openfin/core" />
|
|
2
1
|
import { MenuItemType } from '../../../common/src/utils/context-menu';
|
|
3
2
|
import * as WP from '../../../client-api-platform/src/index';
|
|
4
3
|
import { GlobalContextMenuItemTemplate, GlobalContextMenuOptionType, Workspace } from '../../../client-api-platform/src/shapes';
|
|
@@ -40,4 +39,13 @@ export declare const getSavedWorkspaceContextMenuOptions: (activeWorkspace: Work
|
|
|
40
39
|
workspaceId: string;
|
|
41
40
|
};
|
|
42
41
|
}[];
|
|
42
|
+
export declare const getAppearanceContextMenuOptions: () => Promise<{
|
|
43
|
+
label: string;
|
|
44
|
+
type: MenuItemType;
|
|
45
|
+
checked: boolean;
|
|
46
|
+
data: {
|
|
47
|
+
type: WP.GlobalContextMenuOptionType;
|
|
48
|
+
scheme: WP.ColorSchemeOptionType;
|
|
49
|
+
};
|
|
50
|
+
}[]>;
|
|
43
51
|
export declare const getGlobalContextMenuTemplate: (winIdentity: OpenFin.Identity) => Promise<GlobalContextMenuItemTemplate[]>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="@openfin/core" />
|
|
2
1
|
interface LandingPageUrls {
|
|
3
2
|
newPageUrl: string | false;
|
|
4
3
|
newTabUrl: string | false;
|
|
@@ -6,5 +5,5 @@ interface LandingPageUrls {
|
|
|
6
5
|
export declare const getLandingPageUrls: (winIdentity?: OpenFin.Identity) => Promise<LandingPageUrls>;
|
|
7
6
|
export declare const checkHasNewTabUrl: () => Promise<boolean>;
|
|
8
7
|
export declare const getNewLandingTabViewOptions: (target: OpenFin.Identity) => Promise<OpenFin.PlatformViewCreationOptions>;
|
|
9
|
-
export declare const makeNewLandingPage: (winIdentity?: OpenFin.Identity) => Promise<import("@client-platform/").PageWithUpdatableRuntimeAttribs>;
|
|
8
|
+
export declare const makeNewLandingPage: (winIdentity?: OpenFin.Identity) => Promise<import("@client-platform/shapes").PageWithUpdatableRuntimeAttribs>;
|
|
10
9
|
export {};
|
|
@@ -4,6 +4,8 @@ declare enum LocalStorageKey {
|
|
|
4
4
|
MachineName = "machineName",
|
|
5
5
|
NewTabPageLayout = "NewTabPageLayout",
|
|
6
6
|
NewTabPageSort = "NewTabPageSort",
|
|
7
|
-
DockPosition = "DockPosition"
|
|
7
|
+
DockPosition = "DockPosition",
|
|
8
|
+
SelectedColorScheme = "SelectedColorScheme",
|
|
9
|
+
HasMovedStore = "HasMovedStore"
|
|
8
10
|
}
|
|
9
11
|
export default LocalStorageKey;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="@openfin/core" />
|
|
2
2
|
import { ResponseModalConfig } from './menu-config';
|
|
3
|
-
import { Point } from './window';
|
|
4
3
|
/**
|
|
5
4
|
* returns the correct bounds for the response modal to be displayed at
|
|
6
5
|
* this will return the correct bounds regardless of whether the window is maximized
|
|
@@ -10,7 +9,7 @@ import { Point } from './window';
|
|
|
10
9
|
* @param centerOnMonitor whether the modal should be centered on the monitor
|
|
11
10
|
* @returns a point (top/left) as to where the window should be placed
|
|
12
11
|
*/
|
|
13
|
-
export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean) => Promise<
|
|
12
|
+
export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean) => Promise<OpenFin.Bounds>;
|
|
14
13
|
/**
|
|
15
14
|
* calculates the percenage of the window that is present within the monitor (float in range 0-1)
|
|
16
15
|
*
|
|
@@ -19,3 +18,4 @@ export declare const getResponseModalBounds: (modalOptions: ResponseModalConfig[
|
|
|
19
18
|
*/
|
|
20
19
|
export declare function getPercentageOfBoundsInMonitor(bounds: OpenFin.Bounds, monitor: OpenFin.MonitorDetails): number;
|
|
21
20
|
export declare function getMonitorWindowMaximizedOn(parentWindowBounds: OpenFin.WindowBounds): Promise<OpenFin.MonitorDetails>;
|
|
21
|
+
export declare function getResponseModalBoundsAndCenterParentIfModalOffScreen(modalOptions: ResponseModalConfig['windowOptions'], parentWindowIdentity?: OpenFin.Identity, centerOnMonitor?: boolean): Promise<OpenFin.Bounds>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function getNotifications(): Promise<typeof import("@client/notifications")>;
|
|
2
|
+
/**
|
|
3
|
+
* Shows the Notification Center and navigates to "All" section.
|
|
4
|
+
*/
|
|
5
|
+
export declare function navigateToNotificationCenter(): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Toggles the Notification Center to Show/Hide it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function toggleNotificationCenter(): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Create a specific notification for the saving of Pages as they are being closed.
|
|
12
|
+
* TODO: Make a better abstraction for notifications and have this use that abstraction
|
|
13
|
+
*/
|
|
14
|
+
export declare const sendPageSaveNotification: () => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const awaitPromiseWithTimeout: (promise: Promise<any>, timeout: number, timoutErrorMessage: string) => Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomPaletteSet } from '../../../common/src/api/theming';
|
|
1
|
+
import { BackgroundLayers, CustomPaletteSet } from '../../../common/src/api/theming';
|
|
2
2
|
/**
|
|
3
3
|
* Get hue from a CSS color
|
|
4
4
|
*
|
|
@@ -25,24 +25,7 @@ import { CustomPaletteSet } from '../../../common/src/api/theming';
|
|
|
25
25
|
* @returns hue as string
|
|
26
26
|
*/
|
|
27
27
|
export declare const getHue: (colorInput: string) => string;
|
|
28
|
-
export declare const makeBackgroundLayers: (
|
|
29
|
-
light: {
|
|
30
|
-
background1: string;
|
|
31
|
-
background2: string;
|
|
32
|
-
background3: string;
|
|
33
|
-
background4: string;
|
|
34
|
-
background5: string;
|
|
35
|
-
background6: string;
|
|
36
|
-
};
|
|
37
|
-
dark: {
|
|
38
|
-
background1: string;
|
|
39
|
-
background2: string;
|
|
40
|
-
background3: string;
|
|
41
|
-
background4: string;
|
|
42
|
-
background5: string;
|
|
43
|
-
background6: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
28
|
+
export declare const makeBackgroundLayers: (backgroundPrimary: string, isLightBackground?: boolean) => BackgroundLayers;
|
|
46
29
|
/**
|
|
47
30
|
* makePalette() - generic - doesn't care about scheme
|
|
48
31
|
*
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
/// <reference types="@openfin/core" />
|
|
2
|
+
import { AttachedPage } from '../../../client-api-platform/src/shapes';
|
|
1
3
|
export interface RegisterUsageStatus {
|
|
2
4
|
apiVersion?: string;
|
|
3
5
|
componentVersion?: string;
|
|
4
6
|
allowed: boolean;
|
|
5
7
|
rejectionCode?: string;
|
|
6
8
|
}
|
|
9
|
+
export declare enum ComponentName {
|
|
10
|
+
Browser = "Browser",
|
|
11
|
+
Dock = "Dock",
|
|
12
|
+
Home = "Home",
|
|
13
|
+
Notification = "Notification",
|
|
14
|
+
Storefront = "Storefront",
|
|
15
|
+
Platform = "Platform",
|
|
16
|
+
Theming = "Theming"
|
|
17
|
+
}
|
|
7
18
|
export declare const registerBrowserUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
8
19
|
export declare const registerHomeUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
9
20
|
export declare const registerStorefrontUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
@@ -11,3 +22,31 @@ export declare const registerDockUsage: (status: RegisterUsageStatus) => Promise
|
|
|
11
22
|
export declare const registerNotificationUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
12
23
|
export declare const registerPlatformUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
13
24
|
export declare const registerThemingUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
25
|
+
export declare enum AnalyticsSource {
|
|
26
|
+
Browser = "Browser",
|
|
27
|
+
Dock = "Dock",
|
|
28
|
+
Home = "Home",
|
|
29
|
+
Notification = "Notification",
|
|
30
|
+
Storefront = "Storefront",
|
|
31
|
+
Platform = "Platform",
|
|
32
|
+
Theming = "Theming",
|
|
33
|
+
Interop = "Interop"
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Event for analytics
|
|
37
|
+
*/
|
|
38
|
+
export declare type AnalyticsEvent = {
|
|
39
|
+
source: AnalyticsSource;
|
|
40
|
+
type: string;
|
|
41
|
+
action: string;
|
|
42
|
+
value?: string;
|
|
43
|
+
entityId?: OpenFin.Identity;
|
|
44
|
+
data?: any;
|
|
45
|
+
};
|
|
46
|
+
export declare type AnalyticsEventInternal = Omit<AnalyticsEvent, 'source'>;
|
|
47
|
+
export declare const raiseBrowserAnalytics: (payload: AnalyticsEventInternal) => Promise<void>;
|
|
48
|
+
export declare const raiseBrowserPageAnalytics: (pages: AttachedPage[], action: string) => Promise<void>;
|
|
49
|
+
export declare const raiseHomeAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventInternal) => Promise<void>;
|
|
50
|
+
export declare const raiseDockAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventInternal) => Promise<void>;
|
|
51
|
+
export declare const raiseStorefrontAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventInternal) => Promise<void>;
|
|
52
|
+
export declare const raiseInteropAnalytics: (payload: AnalyticsEventInternal) => Promise<void>;
|
|
@@ -57,7 +57,7 @@ export declare const getCenterFromBounds: (bounds: OpenFin.WindowBounds) => Poin
|
|
|
57
57
|
* @param size height and width of the window
|
|
58
58
|
* @returns coords representing the left, top of window given the center point
|
|
59
59
|
*/
|
|
60
|
-
export declare const getBoundsFromCenter: (center: Point, size: Size) =>
|
|
60
|
+
export declare const getBoundsFromCenter: (center: Point, size: Size) => OpenFin.Bounds;
|
|
61
61
|
/**
|
|
62
62
|
* Get a wrapped OpenFin window.
|
|
63
63
|
*
|
|
@@ -82,7 +82,7 @@ export declare function getCurrentOFWindow(): import("@openfin/core/src/api/wind
|
|
|
82
82
|
export declare const homeOFIdentity: WindowIdentity;
|
|
83
83
|
export declare const dockOFIdentity: WindowIdentity;
|
|
84
84
|
export declare const notificationCenterOFIdentity: WindowIdentity;
|
|
85
|
-
export declare const
|
|
85
|
+
export declare const storefrontOFIdentity: WindowIdentity;
|
|
86
86
|
export declare const providerOFIdentity: WindowIdentity;
|
|
87
87
|
/**
|
|
88
88
|
* Get the Home OpenFin window.
|
|
@@ -153,7 +153,6 @@ export declare const isNotificationCenterRunning: () => Promise<boolean>;
|
|
|
153
153
|
export declare const isHomeWindowRunning: () => Promise<boolean>;
|
|
154
154
|
export declare const showAndFocusStorefront: () => Promise<void>;
|
|
155
155
|
export declare const showAndFocusDock: () => Promise<void>;
|
|
156
|
-
export declare const centerWindowIfOffScreen: (windowIdentity?: WindowIdentity) => Promise<void>;
|
|
157
156
|
export declare const getDisableMultiplePagesOption: (identity: WindowIdentity) => Promise<any>;
|
|
158
157
|
export declare const getIsLockedOption: (identity: WindowIdentity) => Promise<any>;
|
|
159
158
|
export declare const getPlatformWindowTitle: (identity: WindowIdentity) => Promise<any>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="@openfin/core" />
|
|
2
1
|
import { ResponseModalConfig } from '../../../common/src/utils/menu-config';
|
|
3
2
|
export declare const restoreChangesMenu: (windowIdentity: OpenFin.Identity) => Promise<ResponseModalConfig>;
|
|
4
3
|
export declare const showSwitchWorkspaceModal: (windowIdentity: OpenFin.Identity, workspaceTitle: string) => Promise<boolean>;
|