@openfin/workspace 45.1.2 → 45.1.3-alpha.5060c47c
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 +1 -1
- package/client-api-platform/src/api/language.d.ts +3 -2
- package/client-api-platform/src/index.d.ts +2 -0
- package/client-api-platform/src/shapes.d.ts +77 -7
- package/common/src/api/home-search-host.d.ts +8 -0
- package/common/src/api/home-vpw-search-channel.d.ts +2 -0
- package/common/src/api/home-vpw-search-host.d.ts +4 -0
- package/common/src/api/i18next.d.ts +2 -2
- package/common/src/api/protocol/workspace.d.ts +1 -0
- package/common/src/api/workspace-events.d.ts +53 -0
- package/common/src/utils/env.d.ts +1 -1
- package/common/src/utils/navigate.d.ts +23 -0
- package/common/src/utils/route.d.ts +2 -0
- package/common/src/utils/usage-register.d.ts +5 -1
- package/common/src/utils/window.d.ts +3 -1
- package/externals.report.json +27 -27
- package/home-vpw/src/api/constants.d.ts +3 -0
- package/home-vpw/src/api/ensure-infrastructure.d.ts +6 -0
- package/home-vpw/src/api/index.d.ts +3 -0
- package/home-vpw/src/api/internal/channel-handlers.d.ts +23 -0
- package/home-vpw/src/api/internal/provider-registration.d.ts +8 -0
- package/home-vpw/src/api/internal/providers-map.d.ts +22 -0
- package/home-vpw/src/api/launch.d.ts +6 -0
- package/home-vpw/src/api/protocol.d.ts +44 -0
- package/home-vpw/src/api/provider.d.ts +19 -0
- package/home-vpw/src/api/register.d.ts +10 -0
- package/home-vpw/src/api/visibility.d.ts +3 -0
- package/home.js +1 -1
- package/home.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/notifications.js +1 -1
- package/notifications.js.map +1 -1
- package/package.json +2 -2
- package/store.js +1 -1
- package/store.js.map +1 -1
- package/storefront-vpw/src/api/constants.d.ts +2 -0
- package/storefront-vpw/src/api/ensure-infrastructure.d.ts +6 -0
- package/storefront-vpw/src/api/index.d.ts +5 -0
- package/storefront-vpw/src/api/internal/assert-provider-process.d.ts +2 -0
- package/storefront-vpw/src/api/internal/provider-registration.d.ts +7 -0
- package/storefront-vpw/src/api/internal/providers-map.d.ts +23 -0
- package/storefront-vpw/src/api/launch.d.ts +2 -0
- package/storefront-vpw/src/api/protocol.d.ts +67 -0
- package/storefront-vpw/src/api/provider.d.ts +23 -0
- package/storefront-vpw/src/api/register.d.ts +79 -0
- package/storefront-vpw/src/api/visibility.d.ts +43 -0
- package/storefront-vpw/src/shapes/index.d.ts +1 -0
- package/storefront-vpw/src/shapes/shapes.d.ts +4 -0
|
@@ -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.
|
|
10
|
+
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.View | OpenFin.Identity | OpenFin.Platform | OpenFin.Application>;
|
|
11
11
|
export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
|
|
12
12
|
export declare function getResults(payload: {
|
|
13
13
|
req: SearchSitesRequest;
|
|
@@ -3,11 +3,12 @@ export declare function getLanguage(): Locale;
|
|
|
3
3
|
export declare const dispatchLanguageToBrowserWindows: (language: Locale) => Promise<void[]>;
|
|
4
4
|
export declare const setLanguage: (locale: Locale) => Promise<void>;
|
|
5
5
|
export declare function getLanguageResourcesInternal(): {
|
|
6
|
-
currentLanguage:
|
|
6
|
+
currentLanguage: string;
|
|
7
7
|
resources: import("i18next").Resource;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* initLanguage()
|
|
11
|
-
* @param language - optional - ISO language code
|
|
11
|
+
* @param language - optional - ISO language code. Built-in languages are always accepted.
|
|
12
|
+
* Any language code defined in the external `translation-override.json` is also accepted.
|
|
12
13
|
*/
|
|
13
14
|
export default function initLanguage(language?: Locale): Promise<void>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './shapes';
|
|
2
2
|
export * as Dock from '../../dock3/src/api';
|
|
3
|
+
export * as HomeVpw from '../../home-vpw/src/api';
|
|
4
|
+
export * as StorefrontVpw from '../../storefront-vpw/src/api';
|
|
3
5
|
export { init } from './init';
|
|
4
6
|
export { getCurrentSync, wrapSync } from './api';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import type { IconProps, IconType
|
|
2
|
+
import type { IconProps, IconType } from '@openfin/ui-library';
|
|
3
3
|
import type { ModalResponseEvent } from '../../common/src/utils/menu-window-provider';
|
|
4
4
|
import type { WorkspaceIndicatorConfig } from '../../common/src/utils/indicators/workspace-indicators';
|
|
5
5
|
import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/utils/usage-register';
|
|
@@ -14,6 +14,7 @@ import type { WorkflowIntegration } from '../../client-api/src/shapes/integratio
|
|
|
14
14
|
import type { DockCompanionButton } from '../../dock3/src/shapes/index';
|
|
15
15
|
import type { AddPagesOptions, BasePageOpts, PageOpts } from '../../enterprise-api/src/shapes';
|
|
16
16
|
export * from '../../dock3/src/shapes';
|
|
17
|
+
export * from '../../storefront-vpw/src/shapes';
|
|
17
18
|
export { AppManifestType } from '../../client-api/src/shapes';
|
|
18
19
|
export type { App, AppIntent, Image } from '../../client-api/src/shapes';
|
|
19
20
|
export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
|
|
@@ -2084,9 +2085,9 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
|
|
|
2084
2085
|
*/
|
|
2085
2086
|
restoreLastSavedWorkspace(options?: ApplyWorkspaceOptions): Promise<RestoreLastSavedWorkspaceResult>;
|
|
2086
2087
|
/**
|
|
2087
|
-
* Returns ISO language code of
|
|
2088
|
+
* Returns the ISO language code of the currently active language.
|
|
2088
2089
|
*
|
|
2089
|
-
* @returns
|
|
2090
|
+
* @returns The active language code (e.g. `'en-US'`, `'es-ES'`).
|
|
2090
2091
|
*
|
|
2091
2092
|
* @example Example of how to get the current language on Browser
|
|
2092
2093
|
*
|
|
@@ -2641,8 +2642,73 @@ export interface AnalyticsConfig {
|
|
|
2641
2642
|
*/
|
|
2642
2643
|
sendToOpenFin: boolean;
|
|
2643
2644
|
}
|
|
2645
|
+
/**
|
|
2646
|
+
* The built-in language codes supported by the Workspace Platform out of the box.
|
|
2647
|
+
*
|
|
2648
|
+
* @deprecated No longer used for language validation. The platform now accepts any language
|
|
2649
|
+
* code that has a resource bundle registered in i18next, including codes defined in an
|
|
2650
|
+
* external `translation-override.json`. This export will be removed in a future major version.
|
|
2651
|
+
*/
|
|
2644
2652
|
export declare const SUPPORTED_LANGUAGES: string[];
|
|
2645
|
-
|
|
2653
|
+
/**
|
|
2654
|
+
* An ISO language code accepted by the Workspace Platform.
|
|
2655
|
+
*
|
|
2656
|
+
* **Built-in languages** (supported out of the box):
|
|
2657
|
+
* - `en-US` — English (default)
|
|
2658
|
+
* - `de-DE` — German
|
|
2659
|
+
* - `ja-JP` — Japanese
|
|
2660
|
+
* - `ko-KR` — Korean
|
|
2661
|
+
* - `ru-RU` — Russian
|
|
2662
|
+
* - `zh-CN` — Chinese (Simplified)
|
|
2663
|
+
* - `zh-Hant` — Chinese (Traditional)
|
|
2664
|
+
*
|
|
2665
|
+
* **Adding custom languages** via `translationOverridesUrl`:
|
|
2666
|
+
*
|
|
2667
|
+
* Supply a `translationOverridesUrl` in your Desktop Owner Settings (DOS) or application manifest
|
|
2668
|
+
* pointing to a `translation-override.json` file. Any language code defined in that file will be
|
|
2669
|
+
* accepted at runtime in addition to the built-in list above.
|
|
2670
|
+
*
|
|
2671
|
+
* Example `translation-override.json`:
|
|
2672
|
+
* ```json
|
|
2673
|
+
* {
|
|
2674
|
+
* "x.x.x": {
|
|
2675
|
+
* "es-ES": {
|
|
2676
|
+
* "global.save": "Guardar",
|
|
2677
|
+
* "contextMenu.newWindow": "Nueva ventana"
|
|
2678
|
+
* }
|
|
2679
|
+
* }
|
|
2680
|
+
* }
|
|
2681
|
+
* ```
|
|
2682
|
+
*
|
|
2683
|
+
* The `translationOverridesUrl` can be configured in two ways:
|
|
2684
|
+
*
|
|
2685
|
+
* _Via Desktop Owner Settings_ (`dos.json` on macOS, registry on Windows):
|
|
2686
|
+
* ```json
|
|
2687
|
+
* {
|
|
2688
|
+
* "desktopSettings": {
|
|
2689
|
+
* "systemApps": {
|
|
2690
|
+
* "workspace": {
|
|
2691
|
+
* "customConfig": {
|
|
2692
|
+
* "translationOverridesUrl": "https://example.com/translation-override.json"
|
|
2693
|
+
* }
|
|
2694
|
+
* }
|
|
2695
|
+
* }
|
|
2696
|
+
* }
|
|
2697
|
+
* }
|
|
2698
|
+
* ```
|
|
2699
|
+
*
|
|
2700
|
+
* _Via the application manifest_ (under `platform.workspace`):
|
|
2701
|
+
* ```json
|
|
2702
|
+
* {
|
|
2703
|
+
* "platform": {
|
|
2704
|
+
* "workspace": {
|
|
2705
|
+
* "translationOverridesUrl": "https://example.com/translation-override.json"
|
|
2706
|
+
* }
|
|
2707
|
+
* }
|
|
2708
|
+
* }
|
|
2709
|
+
* ```
|
|
2710
|
+
*/
|
|
2711
|
+
export type Locale = string;
|
|
2646
2712
|
/**
|
|
2647
2713
|
* Configures the workspace to self-host using an asar bundle at the
|
|
2648
2714
|
* specified path.
|
|
@@ -2730,8 +2796,12 @@ export interface WorkspacePlatformInitConfig {
|
|
|
2730
2796
|
*/
|
|
2731
2797
|
theme?: CustomThemes;
|
|
2732
2798
|
/**
|
|
2733
|
-
* Set
|
|
2734
|
-
*
|
|
2799
|
+
* Set the initial language for the Browser.
|
|
2800
|
+
*
|
|
2801
|
+
* The built-in ISO language codes are `'en-US'`, `'ja-JP'`, `'zh-CN'`, `'ko-KR'`,
|
|
2802
|
+
* `'ru-RU'`, `'de-DE'`, and `'zh-Hant'`. Any additional language code defined in an
|
|
2803
|
+
* external `translation-override.json` (configured via `translationOverridesUrl`) is
|
|
2804
|
+
* also accepted.
|
|
2735
2805
|
*
|
|
2736
2806
|
* @example
|
|
2737
2807
|
* ```ts
|
|
@@ -2744,7 +2814,7 @@ export interface WorkspacePlatformInitConfig {
|
|
|
2744
2814
|
* }
|
|
2745
2815
|
* });
|
|
2746
2816
|
* ```
|
|
2747
|
-
* @default 'en-
|
|
2817
|
+
* @default 'en-US'
|
|
2748
2818
|
*
|
|
2749
2819
|
*/
|
|
2750
2820
|
language?: {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SearchProviderInfo, SearchTopic } from '../../../search-api/src/shapes';
|
|
2
|
+
export type HomeSearchHostCallbacks = {
|
|
3
|
+
onRegister?: (searchProvider?: SearchProviderInfo) => void | Promise<void>;
|
|
4
|
+
onDeregister?: (searchProvider?: SearchProviderInfo) => void | Promise<void>;
|
|
5
|
+
onDisconnect?: () => void | Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
export declare const registerHomeSearchHost: (callbacks?: HomeSearchHostCallbacks) => Promise<SearchTopic | null>;
|
|
8
|
+
export declare const createVpwHomeSearchHostCallbacks: () => HomeSearchHostCallbacks;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SearchProviderInfo, SearchTopic } from '../../../search-api/src/shapes';
|
|
2
|
+
import type { HomeSearchHostCallbacks } from './home-search-host';
|
|
3
|
+
export declare const registerHomeVpwSearchHost: (callbacks?: HomeSearchHostCallbacks) => Promise<SearchTopic | null>;
|
|
4
|
+
export type { SearchProviderInfo };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import i18next, { type Resource } from 'i18next';
|
|
2
2
|
import { Locale } from '../../../client-api-platform/src/shapes';
|
|
3
|
-
declare function initI18next(language?: Locale): void
|
|
4
|
-
export declare const setLanguageInI18next: (locale: Locale) => void
|
|
3
|
+
declare function initI18next(language?: Locale): Promise<void>;
|
|
4
|
+
export declare const setLanguageInI18next: (locale: Locale) => Promise<void>;
|
|
5
5
|
declare const t: import("i18next").TFunction<["translation", ...string[]], undefined>;
|
|
6
6
|
export { initI18next, i18next, t, type Resource };
|
|
7
7
|
export { useTranslation } from 'react-i18next';
|
|
@@ -7,6 +7,7 @@ export declare const channelName: "__of_workspace_protocol__";
|
|
|
7
7
|
export declare const getChannelClient: () => Promise<WorkspaceComponentChannelClient>;
|
|
8
8
|
export declare const getClientAPIChannelClient: () => Promise<WorkspaceAPIClientChannelClient>;
|
|
9
9
|
export declare const getSearchClientAPIChannelClient: () => Promise<withDisconnectListener<SearchAPIClientChannelClient>>;
|
|
10
|
+
export declare const getHomeVpwSearchClientAPIChannelClient: () => Promise<withDisconnectListener<SearchAPIClientChannelClient>>;
|
|
10
11
|
/**
|
|
11
12
|
* Launches the Workspace Provider.
|
|
12
13
|
* If the Workspace Provider is already running, does nothing.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { NavigatePayload } from '../../../common/src/utils/navigate';
|
|
2
|
+
import { ProviderConnectionPayload, ProviderDisconnectionPayload, ProviderUpdatePayload } from './provider';
|
|
3
|
+
/**
|
|
4
|
+
* All Workspace related events that can be emitted or listened to
|
|
5
|
+
* by the Workspace Provider or any of the workspace components
|
|
6
|
+
*/
|
|
7
|
+
type EventTypeTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* Emitted when a search is invoked.
|
|
10
|
+
*/
|
|
11
|
+
'search-invoked': [string];
|
|
12
|
+
/**
|
|
13
|
+
* Emitted when a new provider is connected.
|
|
14
|
+
*
|
|
15
|
+
* For example, when a Dock Provider is successfully registered by the platform provider
|
|
16
|
+
*/
|
|
17
|
+
'provider-connected': [ProviderConnectionPayload];
|
|
18
|
+
/**
|
|
19
|
+
* Emitted when a provider is disconnected.
|
|
20
|
+
*
|
|
21
|
+
* For example, when a Dock Provider is deregistered by the platform provider
|
|
22
|
+
*/
|
|
23
|
+
'provider-disconnected': [ProviderDisconnectionPayload];
|
|
24
|
+
/**
|
|
25
|
+
* Emitted when a provider is updated.
|
|
26
|
+
*
|
|
27
|
+
* For example, when a Dock Provider is updated by the platform provider
|
|
28
|
+
*/
|
|
29
|
+
'provider-updated': [ProviderUpdatePayload];
|
|
30
|
+
/**
|
|
31
|
+
* Emmitted when notifications is created or destroyed.
|
|
32
|
+
*/
|
|
33
|
+
'update-notification-running-status': [];
|
|
34
|
+
/**
|
|
35
|
+
* Emitted when the list of search providers has been updated.
|
|
36
|
+
*/
|
|
37
|
+
'search-provider-list-updated': [];
|
|
38
|
+
/**
|
|
39
|
+
* Emitted when the list of Storefront VPW providers has been updated.
|
|
40
|
+
*/
|
|
41
|
+
'storefront-provider-list-updated': [];
|
|
42
|
+
/**
|
|
43
|
+
* Emmitted when a component is created or destroyed.
|
|
44
|
+
*/
|
|
45
|
+
'component-lifecycle-update': [];
|
|
46
|
+
/**
|
|
47
|
+
* Emitted when component should be navigated to.
|
|
48
|
+
* Contains the target provider ID and the component name.
|
|
49
|
+
*/
|
|
50
|
+
'component-navigation': [NavigatePayload];
|
|
51
|
+
};
|
|
52
|
+
export declare const addListener: <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, removeListener: <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, addListenerWithUUID: (uuid: string) => <EventKey extends keyof EventTypeTypes>(event: EventKey, listener: (...payload: EventTypeTypes[EventKey]) => void) => void, emit: <EventKey extends keyof EventTypeTypes>(event: EventKey, ...payload: EventTypeTypes[EventKey]) => Promise<void>;
|
|
53
|
+
export {};
|
|
@@ -11,7 +11,7 @@ export declare const isDocumentDefined: boolean;
|
|
|
11
11
|
export declare const isWindowDefinedWithIndexDB: boolean;
|
|
12
12
|
export declare const finUUID: string;
|
|
13
13
|
export declare const finName: string;
|
|
14
|
-
export declare const finEntityType: "" | "
|
|
14
|
+
export declare const finEntityType: "" | "window" | "view";
|
|
15
15
|
export declare const isEnvLocal: boolean;
|
|
16
16
|
export declare const isEnvDev: boolean;
|
|
17
17
|
export declare const isEnvStaging: boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { ComponentName } from '../../../common/src/utils/usage-register';
|
|
3
|
+
/**
|
|
4
|
+
* Constants for navigation source identifiers
|
|
5
|
+
*/
|
|
6
|
+
export declare const NavigationSource: {
|
|
7
|
+
readonly DOCK_SEARCH_BUTTON: "dock-search-button";
|
|
8
|
+
readonly DOCK_STORE_BUTTON: "dock-store-button";
|
|
9
|
+
readonly HOME_ESC: "home-esc";
|
|
10
|
+
readonly HOME_COMMAND: "home-command";
|
|
11
|
+
};
|
|
12
|
+
export type NavigationSourceType = (typeof NavigationSource)[keyof typeof NavigationSource];
|
|
13
|
+
export interface NavigatePayload {
|
|
14
|
+
componentName: ComponentName;
|
|
15
|
+
platformIdentity: OpenFin.Identity;
|
|
16
|
+
providerId?: string;
|
|
17
|
+
source?: NavigationSourceType | null;
|
|
18
|
+
}
|
|
19
|
+
export interface NavigateToOptions {
|
|
20
|
+
providerId?: string;
|
|
21
|
+
source?: NavigationSourceType | null;
|
|
22
|
+
}
|
|
23
|
+
export declare const navigateTo: (componentName: ComponentName, platformIdentity: OpenFin.Identity, options?: NavigateToOptions) => Promise<void>;
|
|
@@ -16,6 +16,7 @@ declare enum WorkspaceRoute {
|
|
|
16
16
|
}
|
|
17
17
|
declare enum BrowserRoute {
|
|
18
18
|
Browser = "/browser/",
|
|
19
|
+
BrowserHome = "/home/",
|
|
19
20
|
BrowserPopupMenu = "/popup-menu/",
|
|
20
21
|
BrowserPopupMenuSaveModal = "/popup-menu/save-modal/",
|
|
21
22
|
BrowserPopupMenuLayouts = "/popup-menu/layouts/layouts/",
|
|
@@ -40,6 +41,7 @@ declare enum BrowserRoute {
|
|
|
40
41
|
}
|
|
41
42
|
declare const PageRoute: {
|
|
42
43
|
Browser: BrowserRoute.Browser;
|
|
44
|
+
BrowserHome: BrowserRoute.BrowserHome;
|
|
43
45
|
BrowserPopupMenu: BrowserRoute.BrowserPopupMenu;
|
|
44
46
|
BrowserPopupMenuSaveModal: BrowserRoute.BrowserPopupMenuSaveModal;
|
|
45
47
|
BrowserPopupMenuLayouts: BrowserRoute.BrowserPopupMenuLayouts;
|
|
@@ -11,6 +11,7 @@ export declare enum ComponentName {
|
|
|
11
11
|
Dock = "Dock",
|
|
12
12
|
EnterpriseDock = "EnterpriseDock",
|
|
13
13
|
Home = "Home",
|
|
14
|
+
HomeVpw = "HomeVpw",
|
|
14
15
|
Notification = "Notification",
|
|
15
16
|
Storefront = "Storefront",
|
|
16
17
|
Platform = "Platform",
|
|
@@ -21,11 +22,13 @@ export declare enum ComponentName {
|
|
|
21
22
|
AllowDuplicatePageTitles = "AllowDuplicatePageTitles",
|
|
22
23
|
PagePinning = "PagePinning",
|
|
23
24
|
ViewTabNewTabShortcut = "ViewTabNewTabShortcut",
|
|
24
|
-
SupertabHideShowTabs = "PRODM-318: Supertab Hide/Show Tab Headers"
|
|
25
|
+
SupertabHideShowTabs = "PRODM-318: Supertab Hide/Show Tab Headers",
|
|
26
|
+
StorefrontVpw = "PRODM-171: VPW Storefront"
|
|
25
27
|
}
|
|
26
28
|
export declare const registerBrowserUsage: (status: RegisterUsageStatus) => void;
|
|
27
29
|
export declare const registerHomeUsage: (status: RegisterUsageStatus) => void;
|
|
28
30
|
export declare const registerStorefrontUsage: (status: RegisterUsageStatus) => void;
|
|
31
|
+
export declare const registerHomeVpwUsage: (status: RegisterUsageStatus) => void;
|
|
29
32
|
export declare const registerDockUsage: (status: RegisterUsageStatus) => void;
|
|
30
33
|
export declare const registerNotificationUsage: (status: RegisterUsageStatus) => void;
|
|
31
34
|
export declare const registerPlatformUsage: (status: RegisterUsageStatus) => void;
|
|
@@ -37,6 +40,7 @@ export declare const registerAllowDuplicatePageTitlesUsage: (status: RegisterUsa
|
|
|
37
40
|
export declare const registerPagePinningUsage: (status: RegisterUsageStatus) => void;
|
|
38
41
|
export declare const registerViewTabNewTabShortcutUsage: (status: RegisterUsageStatus) => void;
|
|
39
42
|
export declare const registerSupertabHideShowTabsUsage: () => void;
|
|
43
|
+
export declare const registerStorefrontVpwUsage: (status: RegisterUsageStatus) => void;
|
|
40
44
|
export type AnalyticsSource = 'Browser' | 'Dock' | 'Home' | 'Notification' | 'Store' | 'Platform' | 'Theming' | 'Interop';
|
|
41
45
|
/**
|
|
42
46
|
* Event for analytics
|
|
@@ -26,7 +26,9 @@ export declare enum WindowName {
|
|
|
26
26
|
ApplyAndPublishModal = "here-apply-and-publish-modal",
|
|
27
27
|
PublishOnCloseModal = "here-publish-on-close-modal",
|
|
28
28
|
DesktopSignalsModal = "here-desktop-signals-modal",
|
|
29
|
-
IntentsResolverModal = "here-intents-resolver-modal"
|
|
29
|
+
IntentsResolverModal = "here-intents-resolver-modal",
|
|
30
|
+
/** Browser-zone Home VPW window (platform child window). */
|
|
31
|
+
HomeVpw = "home-vpw"
|
|
30
32
|
}
|
|
31
33
|
export interface WindowIdentity {
|
|
32
34
|
uuid: ApplicationUUID | string;
|
package/externals.report.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"@openfin/notifications": [
|
|
3
3
|
{
|
|
4
4
|
"type": "explicit",
|
|
5
|
-
"version": "45.1.0-alpha-
|
|
5
|
+
"version": "45.1.0-alpha-4882",
|
|
6
6
|
"packageName": "client-api/package.json",
|
|
7
7
|
"issuer": "client-api/src/notifications.ts"
|
|
8
8
|
}
|
|
@@ -43,30 +43,20 @@
|
|
|
43
43
|
"issuer": "common/src/utils/layout.ts"
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
|
-
"
|
|
47
|
-
{
|
|
48
|
-
"type": "root-implicit",
|
|
49
|
-
"version": "^4.0.11",
|
|
50
|
-
"packageName": "dock3/package.json",
|
|
51
|
-
"issuer": "dock3/src/api/idb.ts"
|
|
52
|
-
},
|
|
46
|
+
"react-i18next": [
|
|
53
47
|
{
|
|
54
48
|
"type": "explicit",
|
|
55
|
-
"version": "
|
|
49
|
+
"version": "15.4.0",
|
|
56
50
|
"packageName": "common/package.json",
|
|
57
|
-
"issuer": "common/src/
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"version": "^4.0.11",
|
|
62
|
-
"packageName": "client-api-platform/package.json",
|
|
63
|
-
"issuer": "client-api-platform/src/api/dock/idb.ts"
|
|
64
|
-
},
|
|
51
|
+
"issuer": "common/src/api/i18next.ts"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"i18next": [
|
|
65
55
|
{
|
|
66
56
|
"type": "explicit",
|
|
67
|
-
"version": "^
|
|
57
|
+
"version": "^23.7.16",
|
|
68
58
|
"packageName": "common/package.json",
|
|
69
|
-
"issuer": "common/src/api/
|
|
59
|
+
"issuer": "common/src/api/i18next.ts"
|
|
70
60
|
}
|
|
71
61
|
],
|
|
72
62
|
"lodash.clonedeep": [
|
|
@@ -77,20 +67,30 @@
|
|
|
77
67
|
"issuer": "common/src/utils/layout.ts"
|
|
78
68
|
}
|
|
79
69
|
],
|
|
80
|
-
"
|
|
70
|
+
"dexie": [
|
|
71
|
+
{
|
|
72
|
+
"type": "root-implicit",
|
|
73
|
+
"version": "^4.0.11",
|
|
74
|
+
"packageName": "dock3/package.json",
|
|
75
|
+
"issuer": "dock3/src/api/idb.ts"
|
|
76
|
+
},
|
|
81
77
|
{
|
|
82
78
|
"type": "explicit",
|
|
83
|
-
"version": "
|
|
79
|
+
"version": "^4.0.11",
|
|
84
80
|
"packageName": "common/package.json",
|
|
85
|
-
"issuer": "common/src/api/
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
"i18next": [
|
|
81
|
+
"issuer": "common/src/api/pages/idb.ts"
|
|
82
|
+
},
|
|
89
83
|
{
|
|
90
84
|
"type": "explicit",
|
|
91
|
-
"version": "^
|
|
85
|
+
"version": "^4.0.11",
|
|
86
|
+
"packageName": "client-api-platform/package.json",
|
|
87
|
+
"issuer": "client-api-platform/src/api/dock/idb.ts"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "explicit",
|
|
91
|
+
"version": "^4.0.11",
|
|
92
92
|
"packageName": "common/package.json",
|
|
93
|
-
"issuer": "common/src/
|
|
93
|
+
"issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
|
|
94
94
|
}
|
|
95
95
|
]
|
|
96
96
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CLIProvider, HomeProvider } from '../../../client-api/src/shapes';
|
|
2
|
+
import { HomeVpwProvider } from './provider';
|
|
3
|
+
/** Creates the platform channel and {@link HomeVpwProvider} instance if not already running. */
|
|
4
|
+
export declare const ensureHomeVpwChannel: () => Promise<HomeVpwProvider>;
|
|
5
|
+
/** Launches the browser-zone Home VPW window and waits for the client `ready` handshake. */
|
|
6
|
+
export declare const launchHomeVpwWindow: (provider: Pick<HomeProvider | CLIProvider, "id" | "title" | "icon" | "subHeader">) => Promise<void>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
2
|
+
import { withDisconnectListener } from '../../../../common/src/utils/channels';
|
|
3
|
+
import { SearchAPIClientChannelClient } from '../../../../common/src/api/protocol/shapes/search';
|
|
4
|
+
import type { HomeClientApiDataRequest, HomeClientApiDispatchRequest, HomeClientApiSearchCloseRequest, HomeInternalDataResponse, HomeInternalErrorResponse, InternalSearchListenerRequest } from '../../../../common/src/api/shapes/home';
|
|
5
|
+
import { HomeVpwProvidersMap } from './providers-map';
|
|
6
|
+
import type { CLIProvider, HomeProvider } from '../../../../client-api/src/shapes';
|
|
7
|
+
export type HomeVpwChannelHandlersContext = {
|
|
8
|
+
providers: HomeVpwProvidersMap<HomeProvider | CLIProvider>;
|
|
9
|
+
searchRequests: Map<string, InternalSearchListenerRequest>;
|
|
10
|
+
getSearchClientAPIChannelClient: () => Promise<withDisconnectListener<SearchAPIClientChannelClient>>;
|
|
11
|
+
};
|
|
12
|
+
export type HomeVpwChannelHandlers = {
|
|
13
|
+
handleDataRequest: (req: HomeClientApiDataRequest) => Promise<HomeInternalDataResponse | HomeInternalErrorResponse>;
|
|
14
|
+
handleResultDispatch: (req: HomeClientApiDispatchRequest, identity: OpenFin.Identity) => Promise<void>;
|
|
15
|
+
handleSearchRequestClose: (req: HomeClientApiSearchCloseRequest) => void;
|
|
16
|
+
handleChannelDisconnection: () => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export declare const createHomeVpwChannelHandlers: (ctx: HomeVpwChannelHandlersContext) => HomeVpwChannelHandlers;
|
|
19
|
+
type HomeVpwSearchChannelClient = withDisconnectListener<SearchAPIClientChannelClient> & {
|
|
20
|
+
homeVpwChannelActionsRegistered?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare const registerHomeVpwChannelClientActions: (channel: HomeVpwSearchChannelClient, handlers: HomeVpwChannelHandlers) => void;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CLIProvider, HomeProvider, RegisterMetaInfoInternal } from '../../../../client-api/src/shapes';
|
|
2
|
+
import { HomeVpwProvidersMap } from './providers-map';
|
|
3
|
+
/** VPW search providers — separate from legacy Home provider registration in client-api. */
|
|
4
|
+
export declare const HomeVpwProviders: HomeVpwProvidersMap<HomeProvider | CLIProvider>;
|
|
5
|
+
export declare const registerHomeVpwProviderInternal: (provider: HomeProvider | CLIProvider) => Promise<RegisterMetaInfoInternal>;
|
|
6
|
+
export declare const registerHomeVpwBuiltinProviderInternal: (provider: HomeProvider | CLIProvider) => Promise<RegisterMetaInfoInternal | void>;
|
|
7
|
+
export declare const deregisterHomeVpwProviderInternal: (providerId: string) => Promise<void>;
|
|
8
|
+
export declare const hasRegisteredHomeVpwIntegrator: () => boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PlatformError } from '../../../../common/src/errors';
|
|
2
|
+
type HomeVpwProviderRecord = {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
export declare class HomeVpwProviderAlreadyRegisteredError extends PlatformError {
|
|
6
|
+
constructor(id: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* In-process registry for Home VPW search provider callbacks.
|
|
10
|
+
* VPW-only — not shared with legacy Home provider registration in client-api.
|
|
11
|
+
*/
|
|
12
|
+
export declare class HomeVpwProvidersMap<T extends HomeVpwProviderRecord> {
|
|
13
|
+
private readonly providersMap;
|
|
14
|
+
getProvider(id: string): T | undefined;
|
|
15
|
+
hasProvider(id: string): boolean;
|
|
16
|
+
assertNotAlreadyRegistered(id: string): void;
|
|
17
|
+
hasProviderMatching(predicate: (id: string) => boolean): boolean;
|
|
18
|
+
addProvider(provider: T): void;
|
|
19
|
+
deleteProvider(id: string): void;
|
|
20
|
+
getProviderOrFail(id: string): T;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CLIProvider, HomeProvider } from '../../../client-api/src/shapes';
|
|
2
|
+
/**
|
|
3
|
+
* Create the Home VPW window from the Workspace Platform (e.g. Studio).
|
|
4
|
+
* Uses fin.Window.create so creation runs in the platform process — same pattern as Dock3.
|
|
5
|
+
*/
|
|
6
|
+
export declare const launchHomeVpw: (provider: Pick<HomeProvider | CLIProvider, "subHeader">) => Promise<void>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { OpenFin } from '@openfin/core';
|
|
2
|
+
type ChannelActionMap = {
|
|
3
|
+
[action: string]: (...args: any[]) => any;
|
|
4
|
+
};
|
|
5
|
+
type TypedChannelClient<ProviderActions extends ChannelActionMap, ClientActions extends ChannelActionMap> = Omit<OpenFin.ChannelClient, 'dispatch' | 'register'> & {
|
|
6
|
+
dispatch: <T extends keyof ProviderActions>(action: T, payload: Parameters<ProviderActions[T]>[0]) => Promise<Awaited<ReturnType<ProviderActions[T]>>>;
|
|
7
|
+
register: <T extends keyof ClientActions>(action: T, handler: (payload: Parameters<ClientActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<Awaited<ReturnType<ClientActions[T]>>>) => boolean;
|
|
8
|
+
};
|
|
9
|
+
type TypedChannelProvider<ProviderActions extends ChannelActionMap, ClientActions extends ChannelActionMap> = Omit<OpenFin.ChannelProvider, 'dispatch' | 'register'> & {
|
|
10
|
+
dispatch: <T extends keyof ClientActions>(to: OpenFin.ClientIdentity, action: T, payload: Parameters<ClientActions[T]>[0]) => Promise<Awaited<ReturnType<ClientActions[T]>>>;
|
|
11
|
+
register: <T extends keyof ProviderActions>(action: T, handler: (payload: Parameters<ProviderActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<Awaited<ReturnType<ProviderActions[T]>>>) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export type SetSearchQueryPayload = {
|
|
14
|
+
query: string;
|
|
15
|
+
providerId?: string;
|
|
16
|
+
context?: Record<string, unknown>;
|
|
17
|
+
};
|
|
18
|
+
export type SearchInvokedPayload = {
|
|
19
|
+
query?: string;
|
|
20
|
+
providerId?: string;
|
|
21
|
+
context?: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Actions the VPW window dispatches TO the platform provider (provider handles these).
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export type HomeVpwChannelProviderChannelActions = {
|
|
28
|
+
ready: () => void;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Actions the platform provider dispatches TO the VPW window (client handles these).
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export type HomeVpwChannelClientChannelActions = {
|
|
35
|
+
'search-invoked': (payload: SearchInvokedPayload) => void;
|
|
36
|
+
'set-search-query': (payload: SetSearchQueryPayload) => void;
|
|
37
|
+
/** Immediate show — mirrors legacy `show-home` / `showAndFocus`. */
|
|
38
|
+
'show': () => void;
|
|
39
|
+
/** Deferred show after resize animation and theme sync — mirrors legacy `setSearchQuery` show path. */
|
|
40
|
+
'show-when-ready': () => void;
|
|
41
|
+
};
|
|
42
|
+
export type HomeVpwChannelProvider = TypedChannelProvider<HomeVpwChannelProviderChannelActions, HomeVpwChannelClientChannelActions>;
|
|
43
|
+
export type HomeVpwChannelClient = TypedChannelClient<HomeVpwChannelProviderChannelActions, HomeVpwChannelClientChannelActions>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { OpenFin } from '@openfin/core';
|
|
2
|
+
import type { HomeVpwChannelProvider } from './protocol';
|
|
3
|
+
export declare class HomeVpwProvider {
|
|
4
|
+
#private;
|
|
5
|
+
static getOverrideConstructor(channel: HomeVpwChannelProvider): new () => HomeVpwProvider;
|
|
6
|
+
static instance: HomeVpwProvider | null;
|
|
7
|
+
constructor(channel: HomeVpwChannelProvider);
|
|
8
|
+
get ready(): Promise<void>;
|
|
9
|
+
private ensureClientConnected;
|
|
10
|
+
show(): Promise<void>;
|
|
11
|
+
showWhenReady(): Promise<void>;
|
|
12
|
+
hide(): Promise<void>;
|
|
13
|
+
shutdown(): Promise<void>;
|
|
14
|
+
getWindowSync(): OpenFin.Window;
|
|
15
|
+
dispatchSearchInvoked(query?: string, providerId?: string, context?: Record<string, unknown>): Promise<void>;
|
|
16
|
+
dispatchSetSearchQuery(query: string, providerId?: string, context?: Record<string, unknown>): Promise<void>;
|
|
17
|
+
private registerChannelActions;
|
|
18
|
+
}
|
|
19
|
+
export type HomeVpwConstructorOverride = (Base: new () => HomeVpwProvider) => new () => HomeVpwProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CLIProvider, HomeProvider, HomeRegistration } from '../../../client-api/src/shapes';
|
|
2
|
+
export type { CLIProvider, HomeProvider, HomeRegistration, SetSearchQueryOptions } from '../../../client-api/src/shapes';
|
|
3
|
+
export { hide, show } from './visibility';
|
|
4
|
+
/**
|
|
5
|
+
* Register a Home VPW integrator — stands up channel, browser-zone window, and search topic registration.
|
|
6
|
+
* Mirrors legacy Home.register: window is created hidden; call show to display.
|
|
7
|
+
*/
|
|
8
|
+
export declare const register: (provider: HomeProvider | CLIProvider) => Promise<HomeRegistration>;
|
|
9
|
+
export declare const deregister: (providerId: string) => Promise<void>;
|
|
10
|
+
export declare const registerBuiltin: (provider: HomeProvider | CLIProvider) => Promise<void>;
|