@openfin/workspace 46.0.4 → 46.0.6

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,7 +1,7 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { App } from '../../../client-api/src/shapes';
3
3
  import { SearchProvider } from '../../../client-api-platform/src/shapes';
4
- import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site } from '../shapes';
4
+ import type { ContentSortRequest, LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site } from '../shapes';
5
5
  /**
6
6
  * Launch the app described by an App Directory entry.
7
7
  * @param app the app directory entry.
@@ -19,7 +19,8 @@ export declare function getSearchProviders(payload: {
19
19
  }): Promise<SearchProvider[]>;
20
20
  export declare function getCuratedContent(payload: {
21
21
  identity: OpenFin.Identity;
22
+ req?: ContentSortRequest;
22
23
  }): Promise<Site[]>;
23
- export declare function getRecentlyVisited(payload: {
24
- identity: OpenFin.Identity;
24
+ export declare function getRecentlyVisited(payload: ContentSortRequest & {
25
+ identity?: OpenFin.Identity;
25
26
  }): Promise<App[]>;
@@ -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[]>;
@@ -33,6 +33,12 @@ export interface PlatformCapabilities {
33
33
  dock?: boolean;
34
34
  notifications?: boolean;
35
35
  };
36
+ /**
37
+ * When true, co-bundled windows load locale JSON via i18next-http-backend
38
+ * instead of the `_getLanguageResources` IPC bulk transfer.
39
+ * @internal
40
+ */
41
+ httpLanguagePacks?: boolean;
36
42
  }
37
43
  /**
38
44
  * Request for creating a saved page in persistent storage.
@@ -200,7 +206,8 @@ export declare enum EnterpriseMainContextMenuOptionType {
200
206
  ManageDesktopSignals = "ManageDesktopSignals",// Enterprise
201
207
  FindInPage = "FindInPage",// Enterprise
202
208
  Print = "Print",
203
- Pin = "Pin"
209
+ Pin = "Pin",
210
+ SetLanguage = "SetLanguage"
204
211
  }
205
212
  /** @internal */
206
213
  export declare enum BookmarkItemContextMenuOptionType {
@@ -216,6 +223,7 @@ export interface GlobalContextMenuItemData extends ContextMenuItemData {
216
223
  export interface EnterpriseMainContextMenuItemData extends ContextMenuItemData {
217
224
  type: GlobalContextMenuOptionType | EnterpriseMainContextMenuOptionType | ViewTabMenuOptionType;
218
225
  option?: string;
226
+ locale?: string;
219
227
  }
220
228
  export interface AddToChanel extends GlobalContextMenuItemData {
221
229
  workspaceId: string;
@@ -1290,13 +1298,13 @@ export interface BrowserWindowModule {
1290
1298
  /** @internal */
1291
1299
  _trackVisitedSite(req: any): Promise<void>;
1292
1300
  /** @internal */
1293
- _getRecentlyVisitedSites(req?: number): Promise<any[]>;
1301
+ _getRecentlyVisitedSites(req?: ContentSortRequest): Promise<any[]>;
1294
1302
  /** @internal */
1295
1303
  _getFrequentlyVisitedSites(req?: any): Promise<any[]>;
1296
1304
  /** @internal */
1297
1305
  _searchSites(req: SearchSitesRequest): Promise<SearchSitesResponse>;
1298
1306
  /** @internal */
1299
- _getCuratedContent(req?: any): Promise<Site[]>;
1307
+ _getCuratedContent(req?: ContentSortRequest): Promise<Site[]>;
1300
1308
  /** @internal */
1301
1309
  _handleRequestNavigation(args: NavigationRequest): Promise<void>;
1302
1310
  /** @internal */
@@ -1347,6 +1355,7 @@ export type NavigationRequest = {
1347
1355
  action: 'result-selected';
1348
1356
  trigger?: SiteAction;
1349
1357
  site: Site;
1358
+ openMode?: 'replace' | 'new-tab' | 'new-window';
1350
1359
  } | (SearchSitesRequest & {
1351
1360
  action: 'search-input';
1352
1361
  }));
@@ -1458,6 +1467,13 @@ export type CollectionSite = SiteInfo & {
1458
1467
  * @internal
1459
1468
  */
1460
1469
  export type Site = AppSite | WorkspaceSite;
1470
+ /**
1471
+ * @internal
1472
+ */
1473
+ export type ContentSortRequest = {
1474
+ sortBy?: 'title' | 'timestamp' | 'createdAt';
1475
+ sortOrder?: 'asc' | 'desc';
1476
+ };
1461
1477
  /**
1462
1478
  * @internal
1463
1479
  * action is undefined when the site is actioned with the default action.
@@ -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.
@@ -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",
@@ -43,44 +43,26 @@
43
43
  "issuer": "common/src/utils/layout.ts"
44
44
  }
45
45
  ],
46
- "dexie": [
47
- {
48
- "type": "root-implicit",
49
- "version": "^4.0.11",
50
- "packageName": "dock3/package.json",
51
- "issuer": "dock3/src/api/idb.ts"
52
- },
53
- {
54
- "type": "explicit",
55
- "version": "^4.0.11",
56
- "packageName": "client-api-platform/package.json",
57
- "issuer": "client-api-platform/src/api/dock/idb.ts"
58
- },
59
- {
60
- "type": "explicit",
61
- "version": "^4.0.11",
62
- "packageName": "common/package.json",
63
- "issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
64
- },
46
+ "react-i18next": [
65
47
  {
66
48
  "type": "explicit",
67
- "version": "^4.0.11",
49
+ "version": "^17.0.11",
68
50
  "packageName": "common/package.json",
69
- "issuer": "common/src/api/pages/idb.ts"
51
+ "issuer": "common/src/api/i18next.ts"
70
52
  }
71
53
  ],
72
- "react-i18next": [
54
+ "i18next": [
73
55
  {
74
56
  "type": "explicit",
75
- "version": "^17.0.11",
57
+ "version": "^26.3.6",
76
58
  "packageName": "common/package.json",
77
59
  "issuer": "common/src/api/i18next.ts"
78
60
  }
79
61
  ],
80
- "i18next": [
62
+ "i18next-http-backend": [
81
63
  {
82
64
  "type": "explicit",
83
- "version": "^26.3.6",
65
+ "version": "^4.0.0",
84
66
  "packageName": "common/package.json",
85
67
  "issuer": "common/src/api/i18next.ts"
86
68
  }
@@ -92,5 +74,31 @@
92
74
  "packageName": "common/package.json",
93
75
  "issuer": "common/src/utils/layout.ts"
94
76
  }
77
+ ],
78
+ "dexie": [
79
+ {
80
+ "type": "explicit",
81
+ "version": "^4.0.11",
82
+ "packageName": "common/package.json",
83
+ "issuer": "common/src/api/pages/idb.ts"
84
+ },
85
+ {
86
+ "type": "explicit",
87
+ "version": "^4.0.11",
88
+ "packageName": "client-api-platform/package.json",
89
+ "issuer": "client-api-platform/src/api/dock/idb.ts"
90
+ },
91
+ {
92
+ "type": "root-implicit",
93
+ "version": "^4.0.11",
94
+ "packageName": "dock3/package.json",
95
+ "issuer": "dock3/src/api/idb.ts"
96
+ },
97
+ {
98
+ "type": "explicit",
99
+ "version": "^4.0.11",
100
+ "packageName": "common/package.json",
101
+ "issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
102
+ }
95
103
  ]
96
104
  }