@openfin/workspace 23.0.3 → 23.0.5
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/app-directory.d.ts +1 -1
- package/client-api-platform/src/api/controllers/theme-storage-controller-store.d.ts +1 -15
- package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +3 -19
- package/client-api-platform/src/api/theming.d.ts +0 -11
- package/client-api-platform/src/init/theming.d.ts +1 -4
- package/client-api-platform/src/shapes.d.ts +5 -26
- package/common/src/api/protocol/notifications.d.ts +1 -0
- package/common/src/api/protocol/shapes/workspace.d.ts +0 -8
- package/common/src/api/protocol/workspace-platform.d.ts +0 -2
- package/common/src/api/protocol/workspace.d.ts +2 -2
- package/common/src/api/theming.d.ts +13 -23
- package/common/src/utils/enterprise-menu.d.ts +1 -1
- package/externals.report.json +8 -8
- package/home.js +1 -2
- package/home.js.map +1 -1
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/notifications.js +1 -2
- package/notifications.js.map +1 -1
- package/package.json +1 -1
- package/store.js +1 -2
- package/store.js.map +1 -1
- package/home.js.LICENSE.txt +0 -1
- package/index.js.LICENSE.txt +0 -1
- package/notifications.js.LICENSE.txt +0 -1
- package/store.js.LICENSE.txt +0 -1
|
@@ -7,7 +7,7 @@ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site }
|
|
|
7
7
|
* @param app the app directory entry.
|
|
8
8
|
* @param opts launch options.
|
|
9
9
|
*/
|
|
10
|
-
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.
|
|
10
|
+
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.View | OpenFin.Identity | OpenFin.Platform | OpenFin.Application>;
|
|
11
11
|
export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
|
|
12
12
|
export declare function getResults(payload: {
|
|
13
13
|
req: SearchSitesRequest;
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
import { GeneratedPalettes } from '../../../../common/src/api/theming';
|
|
2
1
|
import { ThemeStorageController } from '../../../../client-api-platform/src/api/controllers/theme-storage-controller';
|
|
3
2
|
import { CustomThemes } from '../../../../client-api-platform/src/shapes';
|
|
4
|
-
|
|
5
|
-
* Initialises the storage palettes from the custom themes. This function is called on platform init.
|
|
6
|
-
* This function takes both the legacy themes and the new theme system tokens and
|
|
7
|
-
* passes them into the theme engine to generate the css variables.
|
|
8
|
-
*
|
|
9
|
-
* @param customThemes the custom themes to initialise the storage palettes from.
|
|
10
|
-
* @param isWindows whether the operating system is Windows.
|
|
11
|
-
* @returns the generated palettes fromt the theme engine, theme palette sheet which is injected into the DOM, and legacy theme object if it exists.
|
|
12
|
-
*/
|
|
13
|
-
export declare const initialiseStoragePalettes: (customThemes: CustomThemes | undefined, isWindows: boolean) => {
|
|
14
|
-
generatedPalettes: GeneratedPalettes;
|
|
15
|
-
themePaletteSheet: string;
|
|
16
|
-
legacyTheme: CustomThemes | null;
|
|
17
|
-
};
|
|
3
|
+
export declare const initialiseStoragePalettes: (customThemes: CustomThemes | undefined, isWindows: boolean) => CustomThemes;
|
|
18
4
|
export declare const getThemeStorageController: () => ThemeStorageController;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { GeneratedPalettes } from '../../../../common/src/api/theming';
|
|
2
1
|
import { ColorSchemeOptionType, CustomPaletteSet } from '../../../../client-api-platform/src/shapes';
|
|
3
2
|
/**
|
|
4
3
|
* Palette extensions can be used to add new variables to the palette set.
|
|
@@ -27,22 +26,17 @@ export declare const getPaletteExtensions: (palette: CustomPaletteSet, paletteSc
|
|
|
27
26
|
'scrollbar-track-rgb': string;
|
|
28
27
|
selectedTab: string;
|
|
29
28
|
};
|
|
30
|
-
export type
|
|
29
|
+
export type Palettes = {
|
|
31
30
|
dark: CustomPaletteSet;
|
|
32
31
|
light: CustomPaletteSet;
|
|
33
32
|
};
|
|
34
|
-
export type Palettes = {
|
|
35
|
-
light: string;
|
|
36
|
-
dark: string;
|
|
37
|
-
};
|
|
38
33
|
export declare class ThemeStorageController {
|
|
39
34
|
private providerStorage;
|
|
40
35
|
private darkPaletteVars?;
|
|
41
36
|
private lightPaletteVars?;
|
|
42
37
|
private workspaceStorage?;
|
|
43
|
-
private themePaletteSheet?;
|
|
44
|
-
private generatedPalettes?;
|
|
45
38
|
constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem'>);
|
|
39
|
+
private getVarsByScheme;
|
|
46
40
|
/**
|
|
47
41
|
* Set the current Storage Proxy to enable Workspace Storage properties to be populated.
|
|
48
42
|
*
|
|
@@ -70,11 +64,7 @@ export declare class ThemeStorageController {
|
|
|
70
64
|
* to allow workspace UI elements to load the palette before their first paint.
|
|
71
65
|
* @param palettes Light and Dark Palette constants
|
|
72
66
|
*/
|
|
73
|
-
|
|
74
|
-
setPalettes: ({ light, dark }: {
|
|
75
|
-
light: string;
|
|
76
|
-
dark: string;
|
|
77
|
-
}) => Promise<void>;
|
|
67
|
+
setPalettes: ({ light, dark }: Palettes, isWindows: boolean) => Promise<void>;
|
|
78
68
|
/**
|
|
79
69
|
* Set the current scheme of workspace. Specifically setting light or dark
|
|
80
70
|
* will ignore the OS scheme, whereas 'system' will always respect it.
|
|
@@ -88,15 +78,9 @@ export declare class ThemeStorageController {
|
|
|
88
78
|
* @param scheme The default scheme specified in the palette
|
|
89
79
|
*/
|
|
90
80
|
setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
|
|
91
|
-
setGeneratedPalettes(generatedPalettes: GeneratedPalettes): void;
|
|
92
81
|
/**
|
|
93
82
|
* Returns the current scheme
|
|
94
83
|
* @returns 'light' | 'system' | 'dark'
|
|
95
84
|
*/
|
|
96
85
|
getScheme(): ColorSchemeOptionType;
|
|
97
|
-
getThemePaletteSheet(): string | undefined;
|
|
98
|
-
getThemePalette(): {
|
|
99
|
-
light: string;
|
|
100
|
-
dark: string;
|
|
101
|
-
};
|
|
102
86
|
}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import type { GenerateThemeParams, LegacyPalettes } from '../../../common/src/api/theming';
|
|
3
2
|
import { ColorSchemeOptionType, ThemeApi } from '../../../client-api-platform/src/shapes';
|
|
4
3
|
export declare const getThemingApi: (identity: OpenFin.ApplicationIdentity) => ThemeApi;
|
|
5
|
-
export declare const dispatchThemeToWorkspaceProvider: (themeData: {
|
|
6
|
-
themePaletteSheet: string;
|
|
7
|
-
selectedScheme: ColorSchemeOptionType;
|
|
8
|
-
themePalette: {
|
|
9
|
-
light: string;
|
|
10
|
-
dark: string;
|
|
11
|
-
};
|
|
12
|
-
}) => Promise<void>;
|
|
13
4
|
export declare const setSelectedScheme: (schemeType: ColorSchemeOptionType) => Promise<void>;
|
|
14
5
|
export declare const getSelectedScheme: () => ColorSchemeOptionType | null | undefined;
|
|
15
|
-
export declare const getThemePaletteSheet: () => string | undefined;
|
|
16
|
-
export declare const mapLegacyThemeToCustomTheme: (legacyTheme: LegacyPalettes) => GenerateThemeParams;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { GeneratedPalettes } from '../../../common/src/api/theming';
|
|
2
1
|
import { CustomThemes } from '../shapes';
|
|
3
|
-
export declare const getThemes: () => CustomThemes
|
|
4
|
-
export declare const getGeneratedPalettes: () => GeneratedPalettes;
|
|
5
|
-
export declare const getThemePaletteSheet: () => string;
|
|
2
|
+
export declare const getThemes: () => CustomThemes;
|
|
6
3
|
/**
|
|
7
4
|
* initTheming()
|
|
8
5
|
* @param customThemes array of theme objects
|
|
@@ -7,7 +7,7 @@ import type { Resource } from '../../common/src/api/i18next';
|
|
|
7
7
|
import type { TrackedSite } from '../../common/src/api/pages/idb';
|
|
8
8
|
import type { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, CreateBookmarkNodeRequest, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageLayoutsWithSelectedViews, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, UpdateBookmarkNodeRequest, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
|
|
9
9
|
import type { NotificationsCustomManifestOptions } from '../../common/src/api/shapes/notifications';
|
|
10
|
-
import type { CustomThemes
|
|
10
|
+
import type { CustomThemes } from '../../common/src/api/theming';
|
|
11
11
|
import type { App, DockProviderConfigWithIdentity, StoreButtonConfig } from '../../client-api/src/shapes';
|
|
12
12
|
import type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
|
|
13
13
|
import type { DockCompanionButton } from '../../dock3/src/shapes/index';
|
|
@@ -1721,33 +1721,12 @@ export interface LaunchAppRequest {
|
|
|
1721
1721
|
target?: OpenFin.EntityInfo;
|
|
1722
1722
|
app: App;
|
|
1723
1723
|
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Get Themes from API
|
|
1726
|
+
*/
|
|
1724
1727
|
export interface ThemeApi {
|
|
1725
|
-
|
|
1726
|
-
* @deprecated This method is deprecated. It is recommended to use {@link getGeneratedPalettes} instead.
|
|
1727
|
-
* Get the legacy themes from the platform provider.
|
|
1728
|
-
* @returns the legacy themes or null if the platform provider is using the new theme system.
|
|
1729
|
-
*/
|
|
1730
|
-
getThemes(): Promise<CustomThemes | null>;
|
|
1731
|
-
/**
|
|
1732
|
-
* Get the generated palettes from the platform provider.
|
|
1733
|
-
* @returns the generated palettes.
|
|
1734
|
-
*/
|
|
1735
|
-
getGeneratedPalettes(): Promise<GeneratedPalettes>;
|
|
1736
|
-
/**
|
|
1737
|
-
* @internal
|
|
1738
|
-
* Get the theme palette sheet from the platform provider.
|
|
1739
|
-
* @returns the theme palette sheet.
|
|
1740
|
-
*/
|
|
1741
|
-
getThemePaletteSheet(): Promise<string>;
|
|
1742
|
-
/**
|
|
1743
|
-
* Set the selected scheme for the platform provider.
|
|
1744
|
-
* @param newScheme the new scheme to set.
|
|
1745
|
-
*/
|
|
1728
|
+
getThemes(): Promise<CustomThemes>;
|
|
1746
1729
|
setSelectedScheme(newScheme: ColorSchemeOptionType): Promise<void>;
|
|
1747
|
-
/**
|
|
1748
|
-
* Get the selected scheme from the platform provider.
|
|
1749
|
-
* @returns the selected scheme.
|
|
1750
|
-
*/
|
|
1751
1730
|
getSelectedScheme(): Promise<ColorSchemeOptionType>;
|
|
1752
1731
|
}
|
|
1753
1732
|
/**
|
|
@@ -17,5 +17,6 @@ export type ManifestNotificationsConfig = {
|
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
export declare function getNotificationCenterUuid(): Promise<string>;
|
|
20
|
+
export declare function getSyncChannelName(): Promise<string>;
|
|
20
21
|
export declare const getNotificationsSyncChannelClient: () => Promise<NotificationsSyncChannelClient>;
|
|
21
22
|
export {};
|
|
@@ -85,14 +85,6 @@ type WorkspaceChannelTypes = {
|
|
|
85
85
|
'set-search-query': (payload: SearchQueryWithProviderID) => Promise<void>;
|
|
86
86
|
'assign-home-search-context': (payload: Partial<HomeSearchListenerRequest['context']>) => Promise<void>;
|
|
87
87
|
'set-selected-scheme': (ctx: ColorSchemeOptionType) => Promise<void>;
|
|
88
|
-
'initialize-theme': (themeData: {
|
|
89
|
-
themePaletteSheet: string;
|
|
90
|
-
selectedScheme: ColorSchemeOptionType;
|
|
91
|
-
themePalette: {
|
|
92
|
-
light: string;
|
|
93
|
-
dark: string;
|
|
94
|
-
};
|
|
95
|
-
}) => Promise<void>;
|
|
96
88
|
'get-legacy-pages': () => Promise<Page[]>;
|
|
97
89
|
'get-legacy-workspaces': (payload: undefined) => Promise<LegacyWorkspace[]>;
|
|
98
90
|
'register-storefront-provider': () => Promise<void>;
|
|
@@ -35,8 +35,6 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
35
35
|
GetLastFocusedBrowserWindow = "getLastFocusedBrowserWindow",
|
|
36
36
|
GetPageByViewIdentity = "getPageByViewIdentity",
|
|
37
37
|
GetThemes = "getThemes",
|
|
38
|
-
GetGeneratedPalettes = "getGeneratedPalettes",
|
|
39
|
-
GetThemePaletteSheet = "getThemePaletteSheet",
|
|
40
38
|
GetSelectedScheme = "getSelectedScheme",
|
|
41
39
|
SetSelectedScheme = "setSelectedScheme",
|
|
42
40
|
OpenGlobalContextMenuInternal = "openGlobalContextMenuInternal",
|
|
@@ -19,8 +19,8 @@ export declare const launchProvider: () => Promise<void>;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const getChannelClientAndLaunchProvider: () => Promise<WorkspaceComponentChannelClient>;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Launches the Workspace provider if it is not running.
|
|
23
23
|
* Then gets a Channel Client that is connected to the Workspace Provider.
|
|
24
24
|
* @returns the Channel Client that is connected to the Workspace Provider.
|
|
25
25
|
*/
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const getClientAPIChannelClientAndLaunchProvider: () => Promise<WorkspaceAPIClientChannelClient>;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type { DefaultTheme } from 'styled-components';
|
|
2
2
|
import type OpenFin from '@openfin/core';
|
|
3
3
|
import type { ColorSchemeType, ThemeSet } from '@openfin/ui-library';
|
|
4
|
+
import { Palette } from '@openfin/ui-library/dist/theme';
|
|
4
5
|
import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
|
|
5
|
-
import type { generateTheme } from '@openfin/theme-engine';
|
|
6
|
-
export declare const ColorScheme: {
|
|
7
|
-
light: string;
|
|
8
|
-
dark: string;
|
|
9
|
-
system: string;
|
|
10
|
-
};
|
|
11
6
|
export type WorkspaceComponentSetSelectedSchemePayload = {
|
|
12
7
|
newScheme: ColorSchemeOptionType;
|
|
13
8
|
identity: OpenFin.Identity;
|
|
@@ -150,19 +145,10 @@ export type CustomThemeOptionsWithScheme = BaseThemeOptions & {
|
|
|
150
145
|
*/
|
|
151
146
|
notificationIndicatorColors?: NotificationIndicatorColorsWithScheme;
|
|
152
147
|
};
|
|
153
|
-
export type
|
|
154
|
-
seed: Parameters<typeof generateTheme>[0];
|
|
155
|
-
overrides?: Parameters<typeof generateTheme>[1];
|
|
156
|
-
};
|
|
157
|
-
type GenerateThemeReturn = ReturnType<typeof generateTheme>;
|
|
158
|
-
export type GeneratedPalettes = Pick<GenerateThemeReturn, 'dark' | 'light'>;
|
|
159
|
-
export type LegacyPalettes = CustomThemeOptions | CustomThemeOptionsWithScheme;
|
|
160
|
-
export type GenerateThemeParams = Parameters<typeof generateTheme>;
|
|
161
|
-
export type CustomThemes = (CustomThemeOptions | CustomThemeOptionsWithScheme | ThemeOptions)[];
|
|
148
|
+
export type CustomThemes = (CustomThemeOptions | CustomThemeOptionsWithScheme)[];
|
|
162
149
|
export interface PreloadedThemeData {
|
|
163
|
-
themes: CustomThemes
|
|
150
|
+
themes: CustomThemes;
|
|
164
151
|
selectedScheme: ColorSchemeOptionType;
|
|
165
|
-
themePaletteSheet?: string;
|
|
166
152
|
}
|
|
167
153
|
export interface DefaultPaletteSet {
|
|
168
154
|
brandPrimary: string;
|
|
@@ -304,12 +290,16 @@ export declare const OpenFinDarkTheme: {
|
|
|
304
290
|
};
|
|
305
291
|
export declare const DefaultOpenFinTheme: CustomThemes;
|
|
306
292
|
export declare const getComputedPaletteSets: (customTheme: CustomThemeOptions | CustomThemeOptionsWithScheme) => WorkspaceThemeSet;
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
293
|
+
/**
|
|
294
|
+
* Transforms input {@link CustomThemes} to {@link ComputedThemes} used by Workspace Platform / Notifications Platform.
|
|
295
|
+
*
|
|
296
|
+
* @param customThemes array of themes to transform
|
|
297
|
+
* @param storedScheme sets the default scheme if provided
|
|
298
|
+
* @returns array of {@link ComputedThemes | computed themes}
|
|
299
|
+
*/
|
|
300
|
+
export declare const computeThemes: (customThemes: CustomThemes, storedScheme?: ColorSchemeOptionType) => ComputedThemes;
|
|
301
|
+
export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<ComputedTheme>;
|
|
311
302
|
export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
|
|
312
303
|
export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType, "system">>;
|
|
313
|
-
export declare const getComputedBackgroundColor: (
|
|
314
|
-
export declare const constructThemePaletteSheet: (themes: GeneratedPalettes) => string;
|
|
304
|
+
export declare const getComputedBackgroundColor: (paletteKey: keyof typeof Palette, defaultColor?: string) => Promise<string>;
|
|
315
305
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { EnterpriseMainContextMenuItemData, EnterpriseMainContextMenuItemTemplate, OpenGlobalContextMenuPayload } from '../../../client-api-platform/src/shapes';
|
|
3
|
-
export declare const getEnterpriseContextMenuTemplate: ({ identity }: {
|
|
3
|
+
export declare const getEnterpriseContextMenuTemplate: ({ identity, selectedViews }: {
|
|
4
4
|
identity: OpenFin.Identity;
|
|
5
5
|
selectedViews: OpenFin.Identity[];
|
|
6
6
|
}) => Promise<EnterpriseMainContextMenuItemTemplate[]>;
|
package/externals.report.json
CHANGED
|
@@ -7,14 +7,6 @@
|
|
|
7
7
|
"issuer": "client-api/src/notifications.ts"
|
|
8
8
|
}
|
|
9
9
|
],
|
|
10
|
-
"@openfin/microsoft365": [
|
|
11
|
-
{
|
|
12
|
-
"type": "explicit",
|
|
13
|
-
"version": "^1.0.1",
|
|
14
|
-
"packageName": "client-api/package.json",
|
|
15
|
-
"issuer": "client-api/src/integrations/microsoft.ts"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
10
|
"title-case": [
|
|
19
11
|
{
|
|
20
12
|
"type": "explicit",
|
|
@@ -29,6 +21,14 @@
|
|
|
29
21
|
"issuer": "common/src/utils/color-linking.ts"
|
|
30
22
|
}
|
|
31
23
|
],
|
|
24
|
+
"@openfin/microsoft365": [
|
|
25
|
+
{
|
|
26
|
+
"type": "explicit",
|
|
27
|
+
"version": "^1.0.1",
|
|
28
|
+
"packageName": "client-api/package.json",
|
|
29
|
+
"issuer": "client-api/src/integrations/microsoft.ts"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
32
|
"lodash.debounce": [
|
|
33
33
|
{
|
|
34
34
|
"type": "explicit",
|