@openfin/workspace 17.2.8 → 17.2.10

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.
@@ -3,7 +3,7 @@ export declare const getThemes: () => CustomThemes;
3
3
  /**
4
4
  * initTheming()
5
5
  * Accepts an array of CustomThemes objects and stores it
6
- * @param customPaletteOptions - optional - array of custom color pallettes
6
+ * @param customThemes array of theme objects
7
7
  * @returns array of custom theme objects
8
8
  */
9
- export default function initTheming(customPalettes: CustomThemes): void;
9
+ export default function initTheming(customThemes: CustomThemes): void;
@@ -1,5 +1,5 @@
1
1
  import type OpenFin from '@openfin/core';
2
- import { IconProps } from '@openfin/ui-library';
2
+ import { IconProps, Languages } from '@openfin/ui-library';
3
3
  import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/utils/usage-register';
4
4
  import { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
5
5
  import { Resource } from '../../common/src/api/i18next';
@@ -14,7 +14,7 @@ export type { App, AppIntent, Image } from '../../client-api/src/shapes';
14
14
  export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
15
15
  export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs, PanelConfigHorizontal, PanelConfigVertical, PanelConfig, ExtendedPanelConfig, CopyPagePayload, HandleSaveModalOnPageClosePayload, SaveModalOnPageCloseResult, SetActivePageForWindowPayload } from '../../common/src/api/pages/shapes';
16
16
  export { PanelPosition } from '../../common/src/api/pages/shapes';
17
- export type { CustomThemes, CustomThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemePaletteSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
17
+ export type { CustomThemes, CustomThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemeSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
18
18
  export type { AnalyticsEvent } from '../../common/src/utils/usage-register';
19
19
  export type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
20
20
  /**
@@ -1609,6 +1609,16 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1609
1609
  * the original page will remain after 'Save As' is performed.
1610
1610
  */
1611
1611
  copyPage(payload: CopyPagePayload): Promise<Page>;
1612
+ /**
1613
+ * Implementation for getting current selected language
1614
+ * @returns language in ISO language code
1615
+ */
1616
+ getLanguage(): Promise<Locale>;
1617
+ /**
1618
+ * Implementation for setting a language
1619
+ * @param locale in ISO language code format
1620
+ */
1621
+ setLanguage(locale: Locale): Promise<void>;
1612
1622
  }
1613
1623
  /**
1614
1624
  * The origins from which a custom action can be invoked
@@ -1718,8 +1728,8 @@ export interface AnalyticsConfig {
1718
1728
  */
1719
1729
  sendToOpenFin: boolean;
1720
1730
  }
1721
- export declare const SUPPORTED_LANGUAGES: readonly ["en-US", "ja-JP", "zh-CN", "ko-KR", "ru-RU", "de-DE", "zh-Hant"];
1722
- export type Locale = (typeof SUPPORTED_LANGUAGES)[number];
1731
+ export { SUPPORTED_LANGUAGES } from '@openfin/ui-library';
1732
+ export type Locale = Languages;
1723
1733
  /**
1724
1734
  * Configuration for initializing a Workspace platform.
1725
1735
  */
@@ -1,6 +1,6 @@
1
1
  import type { DefaultTheme } from 'styled-components';
2
2
  import type OpenFin from '@openfin/core';
3
- import type { ThemePaletteSet } from '@openfin/ui-library';
3
+ import { ColorSchemeType, ThemeSet } from '@openfin/ui-library';
4
4
  import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
5
5
  export type WorkspaceComponentSetSelectedSchemePayload = {
6
6
  newScheme: ColorSchemeOptionType;
@@ -10,10 +10,10 @@ export type ComputedThemes = ComputedTheme[];
10
10
  export interface ComputedTheme {
11
11
  label: string;
12
12
  logoUrl?: string;
13
- theme: WorkspaceThemePaletteSet;
13
+ theme: WorkspaceThemeSet;
14
14
  defaultScheme?: ColorSchemeOptionType;
15
15
  }
16
- export interface WorkspaceThemePaletteSet extends ThemePaletteSet {
16
+ export interface WorkspaceThemeSet extends ThemeSet {
17
17
  light: ThemeExtension;
18
18
  dark: ThemeExtension;
19
19
  }
@@ -74,7 +74,7 @@ export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
74
74
  *
75
75
  * @default 'dark'
76
76
  */
77
- default?: 'light' | 'dark';
77
+ default?: Omit<ColorSchemeType, 'system'>;
78
78
  /**
79
79
  * The palette for this theme.
80
80
  *