@openfin/workspace 45.1.0-alpha.3530b083 → 45.1.0-alpha.4ee5fa31

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,3 +1,4 @@
1
+ import type { PlatformCapabilities } from '../../../client-api-platform/src/shapes';
1
2
  import { Locale } from '../../../client-api-platform/src/shapes';
2
3
  export declare function getLanguage(): Locale;
3
4
  export declare const dispatchLanguageToBrowserWindows: (language: Locale) => Promise<void[]>;
@@ -6,6 +7,14 @@ export declare function getLanguageResourcesInternal(): {
6
7
  currentLanguage: string;
7
8
  resources: import("i18next").Resource;
8
9
  };
10
+ /**
11
+ * This API returns what functionality is supported by the platform.
12
+ * This is useful when Home/Dock/NC is of a higher version
13
+ * and may depend on functionality that is not available
14
+ * in the current Workspace Platform version.
15
+ * @internal
16
+ */
17
+ export declare function getCapabilitiesInternal(): PlatformCapabilities;
9
18
  /**
10
19
  * initLanguage()
11
20
  * @param language - optional - ISO language code. Built-in languages are always accepted.
@@ -1,7 +1,7 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import type { IconProps, IconType } from '@openfin/ui-library';
3
- import type { ModalResponseEvent } from '../../common/src/utils/menu-window-provider';
4
3
  import type { WorkspaceIndicatorConfig } from '../../common/src/utils/indicators/workspace-indicators';
4
+ import type { ModalResponseEvent } from '../../common/src/utils/menu-window-provider';
5
5
  import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/utils/usage-register';
6
6
  import type { BaseCustomDropdownItem, CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
7
7
  import type { Resource } from '../../common/src/api/i18next';
@@ -23,6 +23,17 @@ export { PanelPosition } from '../../common/src/api/pages/shapes';
23
23
  export type { CustomThemes, CustomThemeOptions, ThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemeSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
24
24
  export type { AnalyticsEvent } from '../../common/src/utils/usage-register';
25
25
  export type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
26
+ /**
27
+ * Platform capabilities for feature detection by workspace components (Home, Dock).
28
+ * @internal
29
+ */
30
+ export interface PlatformCapabilities {
31
+ languageBroadcast?: {
32
+ home?: boolean;
33
+ dock?: boolean;
34
+ notifications?: boolean;
35
+ };
36
+ }
26
37
  /**
27
38
  * Request for creating a saved page in persistent storage.
28
39
  */
@@ -2105,6 +2116,11 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
2105
2116
  currentLanguage: Locale;
2106
2117
  resources: Resource;
2107
2118
  }>;
2119
+ /**
2120
+ * Returns platform capabilities for feature detection by workspace components.
2121
+ * @internal
2122
+ */
2123
+ _getCapabilities(): Promise<PlatformCapabilities>;
2108
2124
  /**
2109
2125
  * Sets the language to ISO language code passed in
2110
2126
  * @param locale the ISO language code
@@ -33,11 +33,16 @@ type HomeAPIClientChannelActions = Record<string, never>;
33
33
  type WorkspaceAPIClientChannelActions = StoreAPIClientChannelActions | DockAPIClientChannelActions | HomeAPIClientChannelActions;
34
34
  /****** End of API Client Channel Actions ******/
35
35
  /****** Workspace Component Channel Actions ******/
36
+ export type WorkspaceComponentSetSelectedLanguagePayload = {
37
+ locale: string;
38
+ identity: OpenFin.Identity;
39
+ };
36
40
  /**
37
41
  * Channel Actions **registered** by all workspace components.
38
42
  */
39
43
  type SharedChannelActions = {
40
44
  'set-selected-scheme': (ctx: WorkspaceComponentSetSelectedSchemePayload) => Promise<void>;
45
+ 'set-selected-language': (payload: WorkspaceComponentSetSelectedLanguagePayload) => Promise<void>;
41
46
  };
42
47
  /**
43
48
  * Channel Actions **registered** by the Home workspace component.
@@ -93,6 +98,7 @@ type WorkspaceChannelTypes = {
93
98
  dark: string;
94
99
  };
95
100
  }) => Promise<void>;
101
+ 'set-selected-language': (locale: string) => Promise<void>;
96
102
  'get-legacy-pages': () => Promise<Page[]>;
97
103
  'get-legacy-workspaces': (payload: undefined) => Promise<LegacyWorkspace[]>;
98
104
  'register-storefront-provider': () => Promise<void>;
@@ -61,6 +61,7 @@ export declare enum WorkspacePlatformChannelAction {
61
61
  GetLanguage = "getLanguage",
62
62
  GetLanguageResourcesInternal = "getLanguageResourcesInternal",
63
63
  SetLanguage = "setLanguage",
64
+ GetCapabilitiesInternal = "getCapabilitiesInternal",
64
65
  GetDockProviderConfig = "getDockProviderConfig",
65
66
  SaveDockProviderConfig = "saveDockProviderConfig",
66
67
  HandleSaveModalOnPageClose = "handleSaveModalOnPageClose",
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Kept in a standalone module with type-only imports so consumers can pull it in
3
+ * via the `@openfin/enterprise-api/color-channels` subpath without bundling the SDK.
4
+ *
5
+ * TODO: https://openfin.jira.com/browse/WRK-5704 - need to rewrite this to use color tokens
6
+ */
7
+ export declare const ENTERPRISE_COLOR_CHANNELS: {
8
+ readonly blue: {
9
+ readonly name: "Blue";
10
+ readonly color: "#0091EB";
11
+ };
12
+ readonly indigo: {
13
+ readonly name: "Indigo";
14
+ readonly color: "#6450FF";
15
+ };
16
+ readonly pink: {
17
+ readonly name: "Pink";
18
+ readonly color: "#E878CF";
19
+ };
20
+ readonly teal: {
21
+ readonly name: "Teal";
22
+ readonly color: "#24D1D1";
23
+ };
24
+ readonly green: {
25
+ readonly name: "Green";
26
+ readonly color: "#00AF78";
27
+ };
28
+ readonly orange: {
29
+ readonly name: "Orange";
30
+ readonly color: "#FF7D37";
31
+ };
32
+ readonly red: {
33
+ readonly name: "Red";
34
+ readonly color: "#F94144";
35
+ };
36
+ readonly yellow: {
37
+ readonly name: "Yellow";
38
+ readonly color: "#F9C74F";
39
+ };
40
+ readonly gray: {
41
+ readonly name: "Gray";
42
+ readonly color: "#828788";
43
+ };
44
+ };
@@ -1,41 +1,4 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { ViewTabContextMenuTemplate } from '../../../client-api-platform/src/shapes';
3
3
  export declare const getChannelsMenuOptions: (channelsForViews: string[], colorGroups: OpenFin.ContextGroupInfo[]) => Promise<ViewTabContextMenuTemplate[]>;
4
- export declare const ENTERPRISE_COLOR_CHANNELS: {
5
- readonly blue: {
6
- readonly name: "Blue";
7
- readonly color: "#0091EB";
8
- };
9
- readonly indigo: {
10
- readonly name: "Indigo";
11
- readonly color: "#6450FF";
12
- };
13
- readonly pink: {
14
- readonly name: "Pink";
15
- readonly color: "#E878CF";
16
- };
17
- readonly teal: {
18
- readonly name: "Teal";
19
- readonly color: "#24D1D1";
20
- };
21
- readonly green: {
22
- readonly name: "Green";
23
- readonly color: "#00AF78";
24
- };
25
- readonly orange: {
26
- readonly name: "Orange";
27
- readonly color: "#FF7D37";
28
- };
29
- readonly red: {
30
- readonly name: "Red";
31
- readonly color: "#F94144";
32
- };
33
- readonly yellow: {
34
- readonly name: "Yellow";
35
- readonly color: "#F9C74F";
36
- };
37
- readonly gray: {
38
- readonly name: "Gray";
39
- readonly color: "#828788";
40
- };
41
- };
4
+ export { ENTERPRISE_COLOR_CHANNELS } from './color-channels';
@@ -15,7 +15,7 @@ export type ShowContextMenuResponse = OpenFin.MenuResult & {
15
15
  export declare function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window): Promise<ShowContextMenuResponse>;
16
16
  export declare const showEnterpriseContextMenu: (opts: OpenFin.ShowPopupMenuOptions, type: PopupWindowMenuType, anchorBehavior: AnchorBehavior, win?: OpenFin.Window) => Promise<ShowContextMenuResponse>;
17
17
  export declare const Separator: OpenFin.MenuItemTemplate;
18
- export declare const EmptyContextMenuItem: OpenFin.MenuItemTemplate;
18
+ export declare const getEmptyContextMenuItem: () => OpenFin.MenuItemTemplate;
19
19
  export declare const DefaultSaveMenuBounds: {
20
20
  width: number;
21
21
  height: number;
@@ -153,6 +153,19 @@ 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>;
158
171
  /**
@@ -6,6 +6,8 @@ import { ComponentName } from '../../../common/src/utils/usage-register';
6
6
  export declare const NavigationSource: {
7
7
  readonly DOCK_SEARCH_BUTTON: "dock-search-button";
8
8
  readonly DOCK_STORE_BUTTON: "dock-store-button";
9
+ readonly DOCK3_SEARCH_BUTTON: "dock3-search-button";
10
+ readonly DOCK3_STORE_BUTTON: "dock3-store-button";
9
11
  readonly HOME_ESC: "home-esc";
10
12
  readonly HOME_COMMAND: "home-command";
11
13
  };
@@ -21,3 +23,10 @@ export interface NavigateToOptions {
21
23
  source?: NavigationSourceType | null;
22
24
  }
23
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>;
@@ -171,5 +171,8 @@ export type SearchMenuChannelResponse = {
171
171
  } | {
172
172
  type: 'single-provider-results-announcement';
173
173
  message: string;
174
+ } | {
175
+ /** Landing page was clicked. Chrome collapses search if view-focused never arrived. */
176
+ type: 'page-clicked';
174
177
  };
175
178
  export {};
@@ -28,7 +28,11 @@ export declare enum WindowName {
28
28
  DesktopSignalsModal = "here-desktop-signals-modal",
29
29
  IntentsResolverModal = "here-intents-resolver-modal",
30
30
  /** Browser-zone Home VPW window (platform child window). */
31
- HomeVpw = "home-vpw"
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"
32
36
  }
33
37
  export interface WindowIdentity {
34
38
  uuid: ApplicationUUID | string;
@@ -105,6 +109,12 @@ export declare const providerOFIdentity: {
105
109
  readonly name: ApplicationUUID.Workspace;
106
110
  readonly uuid: ApplicationUUID.Workspace;
107
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;
108
118
  /**
109
119
  * Get the Home OpenFin window.
110
120
  */
@@ -170,12 +180,32 @@ export declare const isStorefrontWindowRunning: () => Promise<boolean>;
170
180
  export declare const isDockWindowRunning: () => Promise<boolean>;
171
181
  export declare const isHomeWindowRunning: () => Promise<boolean>;
172
182
  export declare const isNotificationCenterRunning: () => Promise<boolean>;
183
+ export declare const isProviderWindowRunning: () => Promise<boolean>;
173
184
  export declare const showAndFocusStorefront: () => Promise<void>;
174
185
  export declare const showAndFocusDock: () => Promise<void>;
175
186
  export declare const getDisableMultiplePagesOption: (identity: WindowIdentity) => Promise<any>;
176
187
  export declare const getIsLockedOption: (identity: WindowIdentity) => Promise<any>;
177
188
  export declare const getPlatformWindowTitle: (identity: WindowIdentity) => Promise<any>;
178
- export declare const getComponentWindowStatus: () => Promise<{
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<{
179
209
  storefrontRunning: boolean;
180
210
  homeRunning: boolean;
181
211
  }>;
@@ -2,7 +2,7 @@
2
2
  "@openfin/notifications": [
3
3
  {
4
4
  "type": "explicit",
5
- "version": "45.1.0-alpha-4945",
5
+ "version": "45.1.0-alpha-5002",
6
6
  "packageName": "client-api/package.json",
7
7
  "issuer": "client-api/src/notifications.ts"
8
8
  }
@@ -43,30 +43,12 @@
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
+ "lodash.clonedeep": [
65
47
  {
66
48
  "type": "explicit",
67
- "version": "^4.0.11",
49
+ "version": "4.5.0",
68
50
  "packageName": "common/package.json",
69
- "issuer": "common/src/api/pages/idb.ts"
51
+ "issuer": "common/src/utils/layout.ts"
70
52
  }
71
53
  ],
72
54
  "react-i18next": [
@@ -85,12 +67,30 @@
85
67
  "issuer": "common/src/api/i18next.ts"
86
68
  }
87
69
  ],
88
- "lodash.clonedeep": [
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
+ },
89
77
  {
90
78
  "type": "explicit",
91
- "version": "4.5.0",
79
+ "version": "^4.0.11",
80
+ "packageName": "client-api-platform/package.json",
81
+ "issuer": "client-api-platform/src/api/dock/idb.ts"
82
+ },
83
+ {
84
+ "type": "explicit",
85
+ "version": "^4.0.11",
92
86
  "packageName": "common/package.json",
93
- "issuer": "common/src/utils/layout.ts"
87
+ "issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
88
+ },
89
+ {
90
+ "type": "explicit",
91
+ "version": "^4.0.11",
92
+ "packageName": "common/package.json",
93
+ "issuer": "common/src/api/pages/idb.ts"
94
94
  }
95
95
  ]
96
96
  }