@openfin/workspace-platform 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.
- package/client-api-platform/src/api/app-directory.d.ts +4 -3
- package/client-api-platform/src/api/language.test.d.ts +1 -0
- package/client-api-platform/src/init/override-callback/view-components.d.ts +1 -0
- package/client-api-platform/src/init/override-callback/view-components.test.d.ts +1 -0
- package/common/src/api/flags/index.d.ts +37 -0
- package/common/src/api/i18next-bundled-resources.d.ts +7 -0
- package/common/src/api/i18next.d.ts +12 -0
- package/common/src/api/overrides.d.ts +10 -0
- package/common/src/utils/enabled-locales.d.ts +5 -0
- package/common/src/utils/global-context-menu.d.ts +12 -0
- package/common/src/utils/local-storage-key.d.ts +1 -0
- package/externals.report.json +14 -6
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -1
- package/workspace_platform.zip +0 -0
|
@@ -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
|
|
24
|
+
export declare function getRecentlyVisited(payload: ContentSortRequest & {
|
|
25
|
+
identity?: OpenFin.Identity;
|
|
25
26
|
}): Promise<App[]>;
|
|
@@ -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.
|
|
@@ -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",
|
package/externals.report.json
CHANGED
|
@@ -29,6 +29,14 @@
|
|
|
29
29
|
"issuer": "common/src/api/i18next.ts"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
|
+
"i18next-http-backend": [
|
|
33
|
+
{
|
|
34
|
+
"type": "explicit",
|
|
35
|
+
"version": "^4.0.0",
|
|
36
|
+
"packageName": "common/package.json",
|
|
37
|
+
"issuer": "common/src/api/i18next.ts"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
32
40
|
"lodash.clonedeep": [
|
|
33
41
|
{
|
|
34
42
|
"type": "explicit",
|
|
@@ -38,6 +46,12 @@
|
|
|
38
46
|
}
|
|
39
47
|
],
|
|
40
48
|
"dexie": [
|
|
49
|
+
{
|
|
50
|
+
"type": "explicit",
|
|
51
|
+
"version": "^4.0.11",
|
|
52
|
+
"packageName": "common/package.json",
|
|
53
|
+
"issuer": "common/src/api/pages/idb.ts"
|
|
54
|
+
},
|
|
41
55
|
{
|
|
42
56
|
"type": "root-implicit",
|
|
43
57
|
"version": "^4.0.11",
|
|
@@ -50,12 +64,6 @@
|
|
|
50
64
|
"packageName": "client-api-platform/package.json",
|
|
51
65
|
"issuer": "client-api-platform/src/api/dock/idb.ts"
|
|
52
66
|
},
|
|
53
|
-
{
|
|
54
|
-
"type": "explicit",
|
|
55
|
-
"version": "^4.0.11",
|
|
56
|
-
"packageName": "common/package.json",
|
|
57
|
-
"issuer": "common/src/api/pages/idb.ts"
|
|
58
|
-
},
|
|
59
67
|
{
|
|
60
68
|
"type": "explicit",
|
|
61
69
|
"version": "^4.0.11",
|