@openfin/workspace 23.0.1 → 23.0.3

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.
@@ -1,6 +1,6 @@
1
- import * as Notifications from 'openfin-notifications/dist/client/without-auto-launch';
1
+ import * as Notifications from '@here-io/notifications';
2
2
  import type { NotificationsPlatform, NotificationsRegisterOptions } from './shapes/notifications';
3
- export * from 'openfin-notifications/dist/client/without-auto-launch';
3
+ export * from '@here-io/notifications';
4
4
  export * from './shapes/notifications';
5
5
  /**
6
6
  * @deprecated Use `register` with {@link NotificationsRegisterOptions | options?: NotificationsRegisterOptions} argument instead.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * WARNING: Do not export from './notifications' here. Not unless we move 'openfin-notifications' here.
2
+ * WARNING: Do not export from './notifications' here. Not unless we move '@here-io/notifications' here.
3
3
  */
4
4
  export * from './common';
5
5
  export * from './home';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This module exports only notifications types that are not defined in 'openfin-notifications' npm package
2
+ * This module exports only notifications types that are not defined in '@here-io/notifications' npm package
3
3
  */
4
4
  import { NotificationsCustomManifestOptions } from '../../../common/src/api/shapes/notifications';
5
5
  /**
@@ -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.View | OpenFin.Identity | OpenFin.Platform | OpenFin.Application>;
10
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.Platform | OpenFin.View | OpenFin.Application>;
11
11
  export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
12
12
  export declare function getResults(payload: {
13
13
  req: SearchSitesRequest;
@@ -1,5 +1,18 @@
1
1
  import { GeneratedPalettes } from '../../../../common/src/api/theming';
2
2
  import { ThemeStorageController } from '../../../../client-api-platform/src/api/controllers/theme-storage-controller';
3
3
  import { CustomThemes } from '../../../../client-api-platform/src/shapes';
4
- export declare const initialiseStoragePalettes: (customThemes: CustomThemes | undefined, isWindows: boolean) => GeneratedPalettes;
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
+ };
5
18
  export declare const getThemeStorageController: () => ThemeStorageController;
@@ -1,3 +1,4 @@
1
+ import { GeneratedPalettes } from '../../../../common/src/api/theming';
1
2
  import { ColorSchemeOptionType, CustomPaletteSet } from '../../../../client-api-platform/src/shapes';
2
3
  /**
3
4
  * Palette extensions can be used to add new variables to the palette set.
@@ -40,8 +41,8 @@ export declare class ThemeStorageController {
40
41
  private lightPaletteVars?;
41
42
  private workspaceStorage?;
42
43
  private themePaletteSheet?;
44
+ private generatedPalettes?;
43
45
  constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem'>);
44
- private getVarsByScheme;
45
46
  /**
46
47
  * Set the current Storage Proxy to enable Workspace Storage properties to be populated.
47
48
  *
@@ -62,7 +63,7 @@ export declare class ThemeStorageController {
62
63
  * Synchronize the current palette and scheme with workspace's storage instance if
63
64
  * storage based theming is enabled. Only syncs when user has explicitly selected a scheme.
64
65
  */
65
- trySynchronizeWorkspaceStorage: () => void;
66
+ trySynchronizeWorkspaceStorage: () => Promise<void>;
66
67
  /**
67
68
  * Set the current Palette to be used by workspace. This palette will be converted into
68
69
  * css vars and combined into a single stylesheet. This stylesheet is exposed in localstorage
@@ -87,6 +88,7 @@ export declare class ThemeStorageController {
87
88
  * @param scheme The default scheme specified in the palette
88
89
  */
89
90
  setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
91
+ setGeneratedPalettes(generatedPalettes: GeneratedPalettes): void;
90
92
  /**
91
93
  * Returns the current scheme
92
94
  * @returns 'light' | 'system' | 'dark'
@@ -1,6 +1,8 @@
1
1
  import { GeneratedPalettes } from '../../../common/src/api/theming';
2
2
  import { CustomThemes } from '../shapes';
3
- export declare const getThemes: () => GeneratedPalettes;
3
+ export declare const getThemes: () => CustomThemes | null;
4
+ export declare const getGeneratedPalettes: () => GeneratedPalettes;
5
+ export declare const getThemePaletteSheet: () => string;
4
6
  /**
5
7
  * initTheming()
6
8
  * @param customThemes array of theme objects
@@ -415,6 +415,7 @@ export declare enum BrowserButtonType {
415
415
  LockUnlockPage = "LockUnlockPage",
416
416
  SaveMenu = "SaveMenu",
417
417
  SavePage = "SavePage",
418
+ Download = "Download",
418
419
  Minimise = "Minimise",
419
420
  Maximise = "Maximise",
420
421
  Close = "Close",
@@ -1720,12 +1721,33 @@ export interface LaunchAppRequest {
1720
1721
  target?: OpenFin.EntityInfo;
1721
1722
  app: App;
1722
1723
  }
1723
- /**
1724
- * Get Themes from API
1725
- */
1726
1724
  export interface ThemeApi {
1727
- getThemes(): Promise<CustomThemes | GeneratedPalettes>;
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
1746
  setSelectedScheme(newScheme: ColorSchemeOptionType): Promise<void>;
1747
+ /**
1748
+ * Get the selected scheme from the platform provider.
1749
+ * @returns the selected scheme.
1750
+ */
1729
1751
  getSelectedScheme(): Promise<ColorSchemeOptionType>;
1730
1752
  }
1731
1753
  /**
@@ -1916,6 +1938,7 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1916
1938
  setLanguage(locale: Locale): Promise<void>;
1917
1939
  /**
1918
1940
  * Implementation for getting the notifications workspace platform configuration.
1941
+ * @deprecated Notifications config is now part of the platform manifest and is automatically resolved by the notifications API. Do not use this method as it will not return the correct configuration.
1919
1942
  */
1920
1943
  getNotificationsConfig(): Promise<NotificationsCustomManifestOptions | undefined>;
1921
1944
  /**
@@ -2581,6 +2604,7 @@ export interface WorkspacePlatformInitConfig {
2581
2604
  /**
2582
2605
  * Config for overriding default notifications behaviour.
2583
2606
  * Leave undefined to use OpenFin hosted Notification Center.
2607
+ * @deprecated Notifications config is now part of the platform manifest and is automatically resolved by the notifications API. Do not use this property as it will not have any effect.
2584
2608
  */
2585
2609
  notifications?: NotificationsCustomManifestOptions;
2586
2610
  /**
@@ -1,5 +1,6 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { ColorSchemeOptionType } from '../../../../client-api-platform/src/shapes';
3
+ import { NotificationsCustomManifestOptions } from '../shapes/notifications';
3
4
  export declare const NOTIFICATIONS_SYNC_CHANNEL = "of-workspace-notifications-sync";
4
5
  export declare enum NotificationsChannelAction {
5
6
  UpdatePlatformThemeScheme = "update-platform-theme-scheme"
@@ -10,5 +11,11 @@ export interface UpdatePlatformSchemePayload {
10
11
  interface NotificationsSyncChannelClient extends OpenFin.ChannelClient {
11
12
  dispatch(action: NotificationsChannelAction.UpdatePlatformThemeScheme, payload: UpdatePlatformSchemePayload): Promise<void>;
12
13
  }
14
+ export type ManifestNotificationsConfig = {
15
+ notifications?: {
16
+ customManifest?: NotificationsCustomManifestOptions;
17
+ };
18
+ };
19
+ export declare function getNotificationCenterUuid(): Promise<string>;
13
20
  export declare const getNotificationsSyncChannelClient: () => Promise<NotificationsSyncChannelClient>;
14
21
  export {};
@@ -35,6 +35,8 @@ export declare enum WorkspacePlatformChannelAction {
35
35
  GetLastFocusedBrowserWindow = "getLastFocusedBrowserWindow",
36
36
  GetPageByViewIdentity = "getPageByViewIdentity",
37
37
  GetThemes = "getThemes",
38
+ GetGeneratedPalettes = "getGeneratedPalettes",
39
+ GetThemePaletteSheet = "getThemePaletteSheet",
38
40
  GetSelectedScheme = "getSelectedScheme",
39
41
  SetSelectedScheme = "setSelectedScheme",
40
42
  OpenGlobalContextMenuInternal = "openGlobalContextMenuInternal",
@@ -78,7 +80,7 @@ export declare enum WorkspacePlatformChannelAction {
78
80
  HandleRequestNavigationInternal = "handleRequestNavigationInternal",// Enterprise
79
81
  RefreshBookmarksInternal = "refreshBookmarksInternal",// Enterprise
80
82
  LaunchBookmarkInternal = "launchBookmarkInternal",// Enterprise
81
- GetNotificationsConfig = "getNotificationsConfig",
83
+ GetNotificationsConfig = "getNotificationsConfig",// Deprecated
82
84
  UpdateDockFavoritesInternal = "updateDockFavoritesInternal",// Enterprise
83
85
  UpdateContentMenuInternal = "updateContentMenuInternal",// Enterprise
84
86
  LaunchDockEntryInternal = "launchDockEntryInternal",// Enterprise
@@ -19,8 +19,8 @@ export declare const launchProvider: () => Promise<void>;
19
19
  */
20
20
  export declare const getChannelClientAndLaunchProvider: () => Promise<WorkspaceComponentChannelClient>;
21
21
  /**
22
- * Launches the Workspace provider if it is not running.
22
+ * Gets the theme data from the Platform provider, then launches the Workspace provider if it is not running, and then dispatches the theme data to the Workspace provider.
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 getClientAPIChannelClientAndLaunchProvider: () => Promise<WorkspaceAPIClientChannelClient>;
26
+ export declare const getChannelClientAndInitializeWorkspaceProvider: () => Promise<WorkspaceAPIClientChannelClient>;
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Options for using privately hosted notification service.
3
+ * @deprecated Custom manifest is now part of the platform manifest and is automatically resolved by the notifications API. Do not use this type as it will be ignored.
3
4
  */
4
5
  export type NotificationsCustomManifestOptions = {
5
6
  /**
@@ -310,5 +310,6 @@ export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identi
310
310
  }>;
311
311
  export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
312
312
  export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType, "system">>;
313
- export declare const getComputedBackgroundColor: () => Promise<string>;
313
+ export declare const getComputedBackgroundColor: (platformIdentity: OpenFin.Identity) => Promise<string>;
314
+ export declare const constructThemePaletteSheet: (themes: GeneratedPalettes) => string;
314
315
  export {};
@@ -1,10 +1,20 @@
1
1
  {
2
- "openfin-notifications/dist/client/without-auto-launch": [
2
+ "@here-io/notifications": [
3
3
  {
4
+ "type": "explicit",
5
+ "version": "npm:@openfin/notifications@2.13.0-alpha-4323",
4
6
  "packageName": "client-api/package.json",
5
7
  "issuer": "client-api/src/notifications.ts"
6
8
  }
7
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
+ ],
8
18
  "title-case": [
9
19
  {
10
20
  "type": "explicit",
@@ -19,14 +29,6 @@
19
29
  "issuer": "common/src/utils/color-linking.ts"
20
30
  }
21
31
  ],
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
32
  "lodash.debounce": [
31
33
  {
32
34
  "type": "explicit",
@@ -58,12 +60,6 @@
58
60
  }
59
61
  ],
60
62
  "dexie": [
61
- {
62
- "type": "root-implicit",
63
- "version": "^4.0.11",
64
- "packageName": "common/package.json",
65
- "issuer": "common/src/api/pages/idb.ts"
66
- },
67
63
  {
68
64
  "type": "root-implicit",
69
65
  "version": "^4.0.11",
@@ -76,6 +72,12 @@
76
72
  "packageName": "client-api-platform/package.json",
77
73
  "issuer": "client-api-platform/src/api/dock/idb.ts"
78
74
  },
75
+ {
76
+ "type": "root-implicit",
77
+ "version": "^4.0.11",
78
+ "packageName": "common/package.json",
79
+ "issuer": "common/src/api/pages/idb.ts"
80
+ },
79
81
  {
80
82
  "type": "root-implicit",
81
83
  "version": "^4.0.11",