@openfin/workspace 45.0.15 → 45.1.0-alpha.2539edb0
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/src/internal/providers.d.ts +4 -3
- package/client-api-platform/src/api/app-directory.d.ts +1 -1
- package/client-api-platform/src/api/language.d.ts +12 -2
- package/client-api-platform/src/index.d.ts +2 -0
- package/client-api-platform/src/init/override-callback/view-defaults.d.ts +2 -1
- package/client-api-platform/src/init/view-tab-new-tab-shortcut-usage.d.ts +4 -0
- package/client-api-platform/src/shapes.d.ts +123 -10
- 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/shapes/workspace.d.ts +6 -0
- package/common/src/api/protocol/workspace-platform.d.ts +1 -0
- package/common/src/api/protocol/workspace.d.ts +1 -0
- package/common/src/api/workspace-events.d.ts +53 -0
- package/common/src/errors/AppError.d.ts +37 -0
- package/common/src/errors/errors.d.ts +23 -0
- package/common/src/errors/index.d.ts +6 -0
- package/common/src/errors/result.d.ts +23 -0
- package/common/src/errors/toAppError.d.ts +14 -0
- package/common/src/utils/color-channels.d.ts +42 -0
- package/common/src/utils/color-linking.d.ts +1 -1
- package/common/src/utils/context-menu.d.ts +2 -1
- package/common/src/utils/env.d.ts +1 -1
- package/common/src/utils/layout.d.ts +22 -3
- package/common/src/utils/navigate.d.ts +32 -0
- package/common/src/utils/popup-window.d.ts +9 -0
- package/common/src/utils/route.d.ts +6 -0
- package/common/src/utils/usage-register.d.ts +15 -1
- package/common/src/utils/window.d.ts +34 -2
- package/externals.report.json +25 -25
- 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 +3 -3
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import type { PagePinnedState } from '../../../common/src/api/pages/shapes';
|
|
3
2
|
import { WindowIdentity } from '../../../common/src/utils/window';
|
|
4
|
-
import {
|
|
3
|
+
import type { PagePinnedState } from '../../../common/src/api/pages/shapes';
|
|
4
|
+
import { AttachedPage, BrowserCreateViewRequest, PageLayout } from '../../../client-api-platform/src/shapes';
|
|
5
5
|
export type LayoutDOMEventType =
|
|
6
6
|
/**
|
|
7
7
|
* Fired when a tab is created in a container. (Emmitted by ??)
|
|
@@ -90,7 +90,7 @@ export declare const generateViewNameAndIdentifierNameIfNotExists: <T extends {
|
|
|
90
90
|
* @param layout The Layout to be cloned
|
|
91
91
|
* @returns A Promise resolving to a copy of the layout with view options converted
|
|
92
92
|
*/
|
|
93
|
-
export declare const cloneLayoutAndConvertViewOptions: (layout: PageLayout, initViewOptions?: Partial<
|
|
93
|
+
export declare const cloneLayoutAndConvertViewOptions: (layout: PageLayout, initViewOptions?: Partial<BrowserCreateViewRequest>) => Promise<PageLayout>;
|
|
94
94
|
export declare const cloneViewComponentWithoutName: (componentState: any) => any;
|
|
95
95
|
/**
|
|
96
96
|
* Deep clones a layout and removes generated view names.
|
|
@@ -153,8 +153,27 @@ export declare const findViewInLayout: (node: any, viewId: OpenFin.Identity) =>
|
|
|
153
153
|
* @returns The total number of views in the layout configuration.
|
|
154
154
|
*/
|
|
155
155
|
export declare const countViews: (node: OpenFin.LayoutContent) => number;
|
|
156
|
+
/**
|
|
157
|
+
* Returns the sole view component when a page layout contains exactly one view.
|
|
158
|
+
* Used to decide whether a page-tab drag should emit a single-view merge payload.
|
|
159
|
+
*
|
|
160
|
+
* Importantly this counts views recursively across the layout tree, not just
|
|
161
|
+
* top-level sections — a one-section/tab-strip supertab with multiple views
|
|
162
|
+
* must not be treated as a single-view page.
|
|
163
|
+
*
|
|
164
|
+
* Also requires a non-empty `componentState.name`. Core types mark
|
|
165
|
+
* `componentState` / `name` as optional, and a merge payload without a name
|
|
166
|
+
* is invalid — treat those layouts as non-mergeable page drags instead.
|
|
167
|
+
*/
|
|
168
|
+
export declare const getSingleViewComponent: (content: OpenFin.LayoutContent | undefined) => OpenFin.LayoutComponent | null;
|
|
156
169
|
export declare const getLayoutConfig: (layoutContainerKey: string) => Promise<any>;
|
|
157
170
|
export declare const findPageForView: (viewName: string, browserWindowIdentity?: WindowIdentity) => Promise<AttachedPage | undefined>;
|
|
171
|
+
/**
|
|
172
|
+
* Waits for a specific view to receive focus on the current window, resolving
|
|
173
|
+
* either when the matching `view-focused` event fires or after a timeout (default 150ms).
|
|
174
|
+
* Useful for ensuring focus is stable before opening popups that would auto-close on focus shift.
|
|
175
|
+
*/
|
|
176
|
+
export declare const waitForViewFocus: (viewName: string, timeoutMs?: number) => Promise<void>;
|
|
158
177
|
/**
|
|
159
178
|
* Only show the view tab icon when not on the landing page
|
|
160
179
|
*/
|
|
@@ -0,0 +1,32 @@
|
|
|
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 DOCK3_SEARCH_BUTTON: "dock3-search-button";
|
|
10
|
+
readonly DOCK3_STORE_BUTTON: "dock3-store-button";
|
|
11
|
+
readonly HOME_ESC: "home-esc";
|
|
12
|
+
readonly HOME_COMMAND: "home-command";
|
|
13
|
+
};
|
|
14
|
+
export type NavigationSourceType = (typeof NavigationSource)[keyof typeof NavigationSource];
|
|
15
|
+
export interface NavigatePayload {
|
|
16
|
+
componentName: ComponentName;
|
|
17
|
+
platformIdentity: OpenFin.Identity;
|
|
18
|
+
providerId?: string;
|
|
19
|
+
source?: NavigationSourceType | null;
|
|
20
|
+
}
|
|
21
|
+
export interface NavigateToOptions {
|
|
22
|
+
providerId?: string;
|
|
23
|
+
source?: NavigationSourceType | null;
|
|
24
|
+
}
|
|
25
|
+
export declare const navigateTo: (componentName: ComponentName, platformIdentity: OpenFin.Identity, options?: NavigateToOptions) => Promise<void>;
|
|
26
|
+
/** True when Home/Storefront was opened from classic Dock or Dock3. */
|
|
27
|
+
export declare const wasOpenedFromDock: (source: string | null | undefined) => boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Show/focus the dock that opened Home or Storefront (classic vs Dock3).
|
|
30
|
+
* @returns true if the source was a dock opener (whether or not that dock was running).
|
|
31
|
+
*/
|
|
32
|
+
export declare const showOpenerDockForNavigationSource: (source: string | null | undefined, platformUuid: string) => Promise<boolean>;
|
|
@@ -29,6 +29,10 @@ export type SearchMenuChannelMessage = {
|
|
|
29
29
|
type: 'update-search-menu-state';
|
|
30
30
|
} | {
|
|
31
31
|
type: 'ready';
|
|
32
|
+
} | {
|
|
33
|
+
/** Browser window asks the search view whether its webContents owns focus. */
|
|
34
|
+
type: 'focus-query';
|
|
35
|
+
requestId: string;
|
|
32
36
|
};
|
|
33
37
|
export type BrowserSearchMenuKeyboardEvent = {
|
|
34
38
|
type: string;
|
|
@@ -171,5 +175,10 @@ export type SearchMenuChannelResponse = {
|
|
|
171
175
|
} | {
|
|
172
176
|
type: 'single-provider-results-announcement';
|
|
173
177
|
message: string;
|
|
178
|
+
} | {
|
|
179
|
+
/** Answer to a 'focus-query' message: whether the search view's webContents owns focus. */
|
|
180
|
+
type: 'focus-state';
|
|
181
|
+
requestId: string;
|
|
182
|
+
hasFocus: boolean;
|
|
174
183
|
};
|
|
175
184
|
export {};
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* All routes that serve HTML pages for the app.
|
|
3
3
|
* Routes should include the zone that the HTML page is a part of.
|
|
4
4
|
* Make sure to include trailing slash, as it is essential for deployed version to route correctly.
|
|
5
|
+
*
|
|
6
|
+
* Offline: zone `pages/` HTML is auto-precached at build time via
|
|
7
|
+
* `common/scripts/offline-document-routes.js` (used by createWorkspaceNextConfig).
|
|
8
|
+
* Adding a new page under `pages/` is enough — no manual SW list update.
|
|
5
9
|
*/
|
|
6
10
|
declare enum WorkspaceRoute {
|
|
7
11
|
Home = "/home/",
|
|
@@ -16,6 +20,7 @@ declare enum WorkspaceRoute {
|
|
|
16
20
|
}
|
|
17
21
|
declare enum BrowserRoute {
|
|
18
22
|
Browser = "/browser/",
|
|
23
|
+
BrowserHome = "/home/",
|
|
19
24
|
BrowserPopupMenu = "/popup-menu/",
|
|
20
25
|
BrowserPopupMenuSaveModal = "/popup-menu/save-modal/",
|
|
21
26
|
BrowserPopupMenuLayouts = "/popup-menu/layouts/layouts/",
|
|
@@ -40,6 +45,7 @@ declare enum BrowserRoute {
|
|
|
40
45
|
}
|
|
41
46
|
declare const PageRoute: {
|
|
42
47
|
Browser: BrowserRoute.Browser;
|
|
48
|
+
BrowserHome: BrowserRoute.BrowserHome;
|
|
43
49
|
BrowserPopupMenu: BrowserRoute.BrowserPopupMenu;
|
|
44
50
|
BrowserPopupMenuSaveModal: BrowserRoute.BrowserPopupMenuSaveModal;
|
|
45
51
|
BrowserPopupMenuLayouts: BrowserRoute.BrowserPopupMenuLayouts;
|
|
@@ -11,22 +11,36 @@ 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",
|
|
17
18
|
Theming = "Theming",
|
|
18
19
|
Microflow = "Microflow",
|
|
19
|
-
|
|
20
|
+
SuppressWorkspaceSwitched = "SuppressWorkspaceSwitched",
|
|
21
|
+
SuppressWorkspaceSaved = "SuppressWorkspaceSaved",
|
|
22
|
+
AllowDuplicatePageTitles = "AllowDuplicatePageTitles",
|
|
23
|
+
PagePinning = "PagePinning",
|
|
24
|
+
ViewTabNewTabShortcut = "ViewTabNewTabShortcut",
|
|
25
|
+
SupertabHideShowTabs = "PRODM-318: Supertab Hide/Show Tab Headers",
|
|
26
|
+
StorefrontVpw = "PRODM-171: VPW Storefront"
|
|
20
27
|
}
|
|
21
28
|
export declare const registerBrowserUsage: (status: RegisterUsageStatus) => void;
|
|
22
29
|
export declare const registerHomeUsage: (status: RegisterUsageStatus) => void;
|
|
23
30
|
export declare const registerStorefrontUsage: (status: RegisterUsageStatus) => void;
|
|
31
|
+
export declare const registerHomeVpwUsage: (status: RegisterUsageStatus) => void;
|
|
24
32
|
export declare const registerDockUsage: (status: RegisterUsageStatus) => void;
|
|
25
33
|
export declare const registerNotificationUsage: (status: RegisterUsageStatus) => void;
|
|
26
34
|
export declare const registerPlatformUsage: (status: RegisterUsageStatus) => void;
|
|
27
35
|
export declare const registerThemingUsage: (status: RegisterUsageStatus) => void;
|
|
28
36
|
export declare const registerMicroflowUsage: (microflowName: string, status: RegisterUsageStatus) => void;
|
|
37
|
+
export declare const registerSuppressWorkspaceSwitchedUsage: (status: RegisterUsageStatus) => void;
|
|
38
|
+
export declare const registerSuppressWorkspaceSavedUsage: (status: RegisterUsageStatus) => void;
|
|
39
|
+
export declare const registerAllowDuplicatePageTitlesUsage: (status: RegisterUsageStatus) => void;
|
|
40
|
+
export declare const registerPagePinningUsage: (status: RegisterUsageStatus) => void;
|
|
41
|
+
export declare const registerViewTabNewTabShortcutUsage: (status: RegisterUsageStatus) => void;
|
|
29
42
|
export declare const registerSupertabHideShowTabsUsage: () => void;
|
|
43
|
+
export declare const registerStorefrontVpwUsage: (status: RegisterUsageStatus) => void;
|
|
30
44
|
export type AnalyticsSource = 'Browser' | 'Dock' | 'Home' | 'Notification' | 'Store' | 'Platform' | 'Theming' | 'Interop';
|
|
31
45
|
/**
|
|
32
46
|
* Event for analytics
|
|
@@ -26,7 +26,13 @@ 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",
|
|
32
|
+
/** Browser-zone Storefront VPW window (platform child window). */
|
|
33
|
+
StorefrontVpw = "storefront-vpw",
|
|
34
|
+
/** Dock3 window (platform child window). */
|
|
35
|
+
Dock3 = "dock3"
|
|
30
36
|
}
|
|
31
37
|
export interface WindowIdentity {
|
|
32
38
|
uuid: ApplicationUUID | string;
|
|
@@ -103,6 +109,12 @@ export declare const providerOFIdentity: {
|
|
|
103
109
|
readonly name: ApplicationUUID.Workspace;
|
|
104
110
|
readonly uuid: ApplicationUUID.Workspace;
|
|
105
111
|
};
|
|
112
|
+
/** Home VPW window identity under a platform UUID. */
|
|
113
|
+
export declare const getHomeVpwOFIdentity: (platformUuid: string) => WindowIdentity;
|
|
114
|
+
/** Storefront VPW window identity under a platform UUID. */
|
|
115
|
+
export declare const getStorefrontVpwOFIdentity: (platformUuid: string) => WindowIdentity;
|
|
116
|
+
/** Dock3 window identity under a platform UUID. */
|
|
117
|
+
export declare const getDock3OFIdentity: (platformUuid: string) => WindowIdentity;
|
|
106
118
|
/**
|
|
107
119
|
* Get the Home OpenFin window.
|
|
108
120
|
*/
|
|
@@ -168,12 +180,32 @@ export declare const isStorefrontWindowRunning: () => Promise<boolean>;
|
|
|
168
180
|
export declare const isDockWindowRunning: () => Promise<boolean>;
|
|
169
181
|
export declare const isHomeWindowRunning: () => Promise<boolean>;
|
|
170
182
|
export declare const isNotificationCenterRunning: () => Promise<boolean>;
|
|
183
|
+
export declare const isProviderWindowRunning: () => Promise<boolean>;
|
|
171
184
|
export declare const showAndFocusStorefront: () => Promise<void>;
|
|
172
185
|
export declare const showAndFocusDock: () => Promise<void>;
|
|
173
186
|
export declare const getDisableMultiplePagesOption: (identity: WindowIdentity) => Promise<any>;
|
|
174
187
|
export declare const getIsLockedOption: (identity: WindowIdentity) => Promise<any>;
|
|
175
188
|
export declare const getPlatformWindowTitle: (identity: WindowIdentity) => Promise<any>;
|
|
176
|
-
|
|
189
|
+
/**
|
|
190
|
+
* Prefer a running Home VPW window for the platform; fall back to classic Home.
|
|
191
|
+
*/
|
|
192
|
+
export declare const resolvePreferredHomeIdentity: (platformUuid: string) => Promise<WindowIdentity | null>;
|
|
193
|
+
/**
|
|
194
|
+
* Prefer a running Storefront VPW window for the platform; fall back to classic Storefront.
|
|
195
|
+
*/
|
|
196
|
+
export declare const resolvePreferredStorefrontIdentity: (platformUuid: string) => Promise<WindowIdentity | null>;
|
|
197
|
+
export declare const showPreferredHomeWindow: (platformUuid: string) => Promise<void>;
|
|
198
|
+
export declare const showPreferredStorefrontWindow: (platformUuid: string) => Promise<void>;
|
|
199
|
+
/**
|
|
200
|
+
* Prefer a running Dock3 window for the platform; fall back to classic Dock.
|
|
201
|
+
*/
|
|
202
|
+
export declare const resolvePreferredDockIdentity: (platformUuid: string) => Promise<WindowIdentity | null>;
|
|
203
|
+
export declare const showPreferredDockWindow: (platformUuid: string) => Promise<void>;
|
|
204
|
+
/**
|
|
205
|
+
* Whether classic and/or VPW Home/Storefront windows are running.
|
|
206
|
+
* When `platformUuid` is provided, VPW windows under that platform count as running.
|
|
207
|
+
*/
|
|
208
|
+
export declare const getComponentWindowStatus: (platformUuid?: string) => Promise<{
|
|
177
209
|
storefrontRunning: boolean;
|
|
178
210
|
homeRunning: boolean;
|
|
179
211
|
}>;
|
package/externals.report.json
CHANGED
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
"@openfin/notifications": [
|
|
3
3
|
{
|
|
4
4
|
"type": "explicit",
|
|
5
|
-
"version": "45.
|
|
5
|
+
"version": "45.1.0-alpha-4967",
|
|
6
6
|
"packageName": "client-api/package.json",
|
|
7
7
|
"issuer": "client-api/src/notifications.ts"
|
|
8
8
|
}
|
|
9
9
|
],
|
|
10
|
+
"@openfin/microsoft365": [
|
|
11
|
+
{
|
|
12
|
+
"type": "explicit",
|
|
13
|
+
"version": "^1.1.0",
|
|
14
|
+
"packageName": "client-api/package.json",
|
|
15
|
+
"issuer": "client-api/src/integrations/microsoft.ts"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
10
18
|
"title-case": [
|
|
11
19
|
{
|
|
12
20
|
"type": "explicit",
|
|
@@ -21,14 +29,6 @@
|
|
|
21
29
|
"issuer": "common/src/utils/color-linking.ts"
|
|
22
30
|
}
|
|
23
31
|
],
|
|
24
|
-
"@openfin/microsoft365": [
|
|
25
|
-
{
|
|
26
|
-
"type": "explicit",
|
|
27
|
-
"version": "^1.1.0",
|
|
28
|
-
"packageName": "client-api/package.json",
|
|
29
|
-
"issuer": "client-api/src/integrations/microsoft.ts"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
32
|
"lodash.debounce": [
|
|
33
33
|
{
|
|
34
34
|
"type": "explicit",
|
|
@@ -43,12 +43,20 @@
|
|
|
43
43
|
"issuer": "common/src/utils/layout.ts"
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
|
-
"
|
|
46
|
+
"react-i18next": [
|
|
47
47
|
{
|
|
48
48
|
"type": "explicit",
|
|
49
|
-
"version": "4.
|
|
49
|
+
"version": "15.4.0",
|
|
50
50
|
"packageName": "common/package.json",
|
|
51
|
-
"issuer": "common/src/
|
|
51
|
+
"issuer": "common/src/api/i18next.ts"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"i18next": [
|
|
55
|
+
{
|
|
56
|
+
"type": "explicit",
|
|
57
|
+
"version": "^23.7.16",
|
|
58
|
+
"packageName": "common/package.json",
|
|
59
|
+
"issuer": "common/src/api/i18next.ts"
|
|
52
60
|
}
|
|
53
61
|
],
|
|
54
62
|
"dexie": [
|
|
@@ -68,29 +76,21 @@
|
|
|
68
76
|
"type": "explicit",
|
|
69
77
|
"version": "^4.0.11",
|
|
70
78
|
"packageName": "common/package.json",
|
|
71
|
-
"issuer": "common/src/
|
|
79
|
+
"issuer": "common/src/api/pages/idb.ts"
|
|
72
80
|
},
|
|
73
81
|
{
|
|
74
82
|
"type": "explicit",
|
|
75
83
|
"version": "^4.0.11",
|
|
76
84
|
"packageName": "common/package.json",
|
|
77
|
-
"issuer": "common/src/
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"react-i18next": [
|
|
81
|
-
{
|
|
82
|
-
"type": "explicit",
|
|
83
|
-
"version": "15.4.0",
|
|
84
|
-
"packageName": "common/package.json",
|
|
85
|
-
"issuer": "common/src/api/i18next.ts"
|
|
85
|
+
"issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
|
|
86
86
|
}
|
|
87
87
|
],
|
|
88
|
-
"
|
|
88
|
+
"lodash.clonedeep": [
|
|
89
89
|
{
|
|
90
90
|
"type": "explicit",
|
|
91
|
-
"version": "
|
|
91
|
+
"version": "4.5.0",
|
|
92
92
|
"packageName": "common/package.json",
|
|
93
|
-
"issuer": "common/src/
|
|
93
|
+
"issuer": "common/src/utils/layout.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>;
|