@openfin/workspace-platform 46.0.3 → 46.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.
@@ -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.Identity | OpenFin.Platform | OpenFin.Application | OpenFin.View>;
10
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.View | 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 +1,2 @@
1
1
  import '@common/test/fin-mocks';
2
+ import '@common/test/logger-mock';
@@ -1,2 +1,3 @@
1
1
  import { OpenFin } from '@openfin/core';
2
+ export declare const INTERNAL_VIEW_PROCESS_AFFINITY = "eb-internal-ui";
2
3
  export declare const createNonLayoutViewComponents: (isEnterprise: boolean, overrideOptions: OpenFin.PlatformWindowCreationOptions) => Promise<void[]>;
@@ -0,0 +1 @@
1
+ import '@common/test/fin-mocks';
@@ -0,0 +1,37 @@
1
+ export declare enum Flag {
2
+ WorkspaceStorefrontEnabled = "WorkspaceStorefrontEnabled",
3
+ SentryEnabled = "SentryEnabled",
4
+ WorkspaceDockEnabled = "WorkspaceDockEnabled",
5
+ WorkspaceHomeEnabled = "WorkspaceHomeEnabled",
6
+ DevDebug = "DevDebug",
7
+ HttpLanguagePacksEnabled = "HttpLanguagePacksEnabled"
8
+ }
9
+ export type WorkspaceFlags = Record<Flag, boolean>;
10
+ export declare const flags: Partial<WorkspaceFlags>;
11
+ /**
12
+ * Initialize flags from overrides. This should be called early in the application lifecycle.
13
+ * This is a no-op if flags have already been initialized.
14
+ */
15
+ export declare const initializeFlags: () => Promise<void>;
16
+ /**
17
+ * Flag Interface --
18
+ *
19
+ * @example Enabled / Disabled Closures
20
+ * flag(
21
+ * 'feature',
22
+ * () => 'Enabled Feature',
23
+ * () => 'Disabled Feature'
24
+ * );
25
+ *
26
+ * @example Enabled only
27
+ * flag('feature', myFeatureFunc);
28
+ *
29
+ * @example Boolean
30
+ * flag('feature');
31
+ */
32
+ export declare function flag<EnabledReturn, DisabledReturn>(flagName: Flag, cbEnabled?: () => EnabledReturn, cbDisabled?: () => DisabledReturn): EnabledReturn | DisabledReturn | boolean;
33
+ declare global {
34
+ interface Window {
35
+ __WORKSPACE_FLAGS__: typeof flags;
36
+ }
37
+ }
@@ -0,0 +1,7 @@
1
+ import { type Resource } from 'i18next';
2
+ /**
3
+ * All seven statically bundled locale dictionaries. Loaded only on the flag-off
4
+ * (legacy) path so the http regime does not pull non-English packs into the
5
+ * main common chunk.
6
+ */
7
+ export declare const bundledResources: Resource;
@@ -1,5 +1,17 @@
1
1
  import i18next, { type Resource } from 'i18next';
2
2
  import { Locale } from '../../../client-api-platform/src/shapes';
3
+ export type LanguagePacksRegime = 'http' | 'legacy';
4
+ export declare const HTTP_BACKEND_REQUEST_OPTIONS: RequestInit;
5
+ export declare const resolveLanguagePacksRegime: (httpFlagEnabled: boolean, languagePacksApiUrl?: string) => LanguagePacksRegime;
6
+ export declare const getHttpBackendOptions: (loadPath: string) => {
7
+ loadPath: string;
8
+ requestOptions: RequestInit;
9
+ };
10
+ /**
11
+ * Overlay OFD's canonical en-US pack on the bootstrap stub.
12
+ * Fire-and-forget: first paint and the logo menu must not wait on this GET.
13
+ */
14
+ export declare const overlayEnglishFromHttpBackend: () => void;
3
15
  declare function initI18next(language?: Locale): Promise<void>;
4
16
  export declare const setLanguageInI18next: (locale: Locale) => Promise<void>;
5
17
  declare const t: import("i18next").TFunction<["translation", ...string[]], undefined>;
@@ -16,6 +16,16 @@ export interface Overrides {
16
16
  disableOpenFinAnalytics: boolean;
17
17
  analyticsEndpoint: string;
18
18
  translationOverridesUrl: string;
19
+ /**
20
+ * i18next-http-backend loadPath injected when org `languagePacks.enabled` is on
21
+ * (e.g. `${base}/platform/api/localization/{{lng}}/{{ns}}.json`).
22
+ */
23
+ languagePacksApiUrl: string;
24
+ /**
25
+ * BCP-47 tags shown in the Language submenu. This is the org Active set
26
+ * (HERE defaults and/or admin-uploaded packs), not only bundled client languages.
27
+ */
28
+ activeLanguages: string[];
19
29
  /**
20
30
  * WRK-4846
21
31
  * This property is internal but is being temporarily exposed for Wells Fargo.
@@ -307,7 +307,7 @@ export declare const constructThemePaletteSheet: (themes: GeneratedPalettes, leg
307
307
  dark: string;
308
308
  }) => string;
309
309
  export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<{
310
- theme: CustomThemes | GeneratedPalettes;
310
+ theme: GeneratedPalettes | CustomThemes;
311
311
  defaultScheme: ColorSchemeOptionType;
312
312
  themePaletteSheet: string;
313
313
  }>;
@@ -0,0 +1,5 @@
1
+ export type EnabledLocale = {
2
+ tag: string;
3
+ displayName: string;
4
+ };
5
+ export declare const getEnabledLocales: () => Promise<EnabledLocale[]>;
@@ -100,6 +100,9 @@ export declare const downloads: () => {
100
100
  export declare const appearance: () => {
101
101
  label: string;
102
102
  };
103
+ export declare const language: () => {
104
+ label: string;
105
+ };
103
106
  export declare const getSavedWorkspaceContextMenuOptions: (activeWorkspace: Workspace, savedWorkspaces: Pick<Workspace, "workspaceId" | "title">[], contextMenuOptionType: GlobalContextMenuOptionType) => {
104
107
  label: string;
105
108
  type: MenuItemType;
@@ -119,4 +122,13 @@ export declare const getAppearanceContextMenuOptions: () => Promise<{
119
122
  scheme: WP.ColorSchemeOptionType;
120
123
  };
121
124
  }[]>;
125
+ export declare const getLanguageContextMenuOptions: () => Promise<{
126
+ label: string;
127
+ type: MenuItemType;
128
+ checked: boolean;
129
+ data: {
130
+ type: WP.EnterpriseMainContextMenuOptionType;
131
+ locale: string;
132
+ };
133
+ }[]>;
122
134
  export declare const getGlobalContextMenuTemplate: (winIdentity: OpenFin.Identity, selectedViews?: OpenFin.Identity[]) => Promise<GlobalContextMenuItemTemplate[]>;
@@ -6,6 +6,7 @@ declare enum LocalStorageKey {
6
6
  NewTabPageSort = "NewTabPageSort",
7
7
  DockPosition = "DockPosition",
8
8
  SelectedColorScheme = "SelectedColorScheme",
9
+ SelectedLanguage = "SelectedLanguage",
9
10
  ThemePaletteSheet = "ThemePaletteSheet",
10
11
  HasMovedStore = "HasMovedStore",
11
12
  PageDragState = "BrowserPageDragState",
@@ -13,30 +13,38 @@
13
13
  "issuer": "common/src/utils/layout.ts"
14
14
  }
15
15
  ],
16
- "lodash.clonedeep": [
16
+ "react-i18next": [
17
17
  {
18
18
  "type": "explicit",
19
- "version": "4.5.0",
19
+ "version": "^17.0.11",
20
20
  "packageName": "common/package.json",
21
- "issuer": "common/src/utils/layout.ts"
21
+ "issuer": "common/src/api/i18next.ts"
22
22
  }
23
23
  ],
24
- "react-i18next": [
24
+ "i18next": [
25
25
  {
26
26
  "type": "explicit",
27
- "version": "^17.0.11",
27
+ "version": "^26.3.6",
28
28
  "packageName": "common/package.json",
29
29
  "issuer": "common/src/api/i18next.ts"
30
30
  }
31
31
  ],
32
- "i18next": [
32
+ "i18next-http-backend": [
33
33
  {
34
34
  "type": "explicit",
35
- "version": "^26.3.6",
35
+ "version": "^4.0.0",
36
36
  "packageName": "common/package.json",
37
37
  "issuer": "common/src/api/i18next.ts"
38
38
  }
39
39
  ],
40
+ "lodash.clonedeep": [
41
+ {
42
+ "type": "explicit",
43
+ "version": "4.5.0",
44
+ "packageName": "common/package.json",
45
+ "issuer": "common/src/utils/layout.ts"
46
+ }
47
+ ],
40
48
  "title-case": [
41
49
  {
42
50
  "type": "explicit",
@@ -46,12 +54,6 @@
46
54
  }
47
55
  ],
48
56
  "dexie": [
49
- {
50
- "type": "explicit",
51
- "version": "^4.0.11",
52
- "packageName": "client-api-platform/package.json",
53
- "issuer": "client-api-platform/src/api/dock/idb.ts"
54
- },
55
57
  {
56
58
  "type": "root-implicit",
57
59
  "version": "^4.0.11",
@@ -64,6 +66,12 @@
64
66
  "packageName": "common/package.json",
65
67
  "issuer": "common/src/api/pages/idb.ts"
66
68
  },
69
+ {
70
+ "type": "explicit",
71
+ "version": "^4.0.11",
72
+ "packageName": "client-api-platform/package.json",
73
+ "issuer": "client-api-platform/src/api/dock/idb.ts"
74
+ },
67
75
  {
68
76
  "type": "explicit",
69
77
  "version": "^4.0.11",