@openfin/workspace-platform 13.1.5 → 14.0.11

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.
Files changed (53) hide show
  1. package/client-api/src/internal/home/handlers/data.d.ts +3 -0
  2. package/client-api/src/internal/home/handlers/disconnect.d.ts +1 -0
  3. package/client-api/src/internal/home/handlers/index.d.ts +6 -0
  4. package/client-api/src/internal/home/handlers/result-dispatch.d.ts +3 -0
  5. package/client-api/src/internal/home/handlers/search-close.d.ts +5 -0
  6. package/client-api/src/internal/home/index.d.ts +4 -0
  7. package/client-api/src/internal/home/requests.d.ts +5 -0
  8. package/client-api/src/internal/providers.d.ts +63 -0
  9. package/client-api/src/internal/storefront/handlers.d.ts +9 -0
  10. package/client-api/src/internal/storefront/index.d.ts +4 -0
  11. package/client-api/src/{internal.d.ts → internal/try-dispatch.d.ts} +1 -1
  12. package/client-api/src/shapes/common.d.ts +1 -1
  13. package/client-api/src/shapes/dock.d.ts +3 -3
  14. package/client-api/src/shapes/home.d.ts +18 -18
  15. package/client-api/src/shapes/store.d.ts +6 -6
  16. package/client-api/src/shapes/templates.d.ts +11 -11
  17. package/client-api-platform/src/init/browser-defaults.test.d.ts +1 -1
  18. package/client-api-platform/src/init/page-defaults.test.d.ts +1 -1
  19. package/client-api-platform/src/init/panels.test.d.ts +1 -1
  20. package/client-api-platform/src/init/utils.d.ts +2 -2
  21. package/client-api-platform/src/init/utils.test.d.ts +1 -1
  22. package/client-api-platform/src/shapes.d.ts +15 -15
  23. package/common/src/api/action.d.ts +1 -1
  24. package/common/src/api/home.d.ts +25 -0
  25. package/common/src/api/pages/shapes.d.ts +6 -6
  26. package/common/src/api/protocol/browser.d.ts +1 -1
  27. package/common/src/api/protocol/shapes/search.d.ts +96 -0
  28. package/common/src/api/protocol/shapes/workspace.d.ts +13 -13
  29. package/common/src/api/protocol/workspace-platform.d.ts +1 -1
  30. package/common/src/api/protocol/workspace.d.ts +2 -0
  31. package/common/src/api/provider.d.ts +24 -9
  32. package/common/src/api/search/aggregate-search-results.d.ts +10 -0
  33. package/common/src/api/search/common.d.ts +13 -0
  34. package/common/src/api/shapes/home.d.ts +186 -0
  35. package/common/src/api/theming.d.ts +2 -2
  36. package/common/src/test/crypto-mocks.d.ts +1 -0
  37. package/common/src/utils/a11y/search.a11y.d.ts +10 -10
  38. package/common/src/utils/application.d.ts +2 -2
  39. package/common/src/utils/context-menu.d.ts +1 -1
  40. package/common/src/utils/layout.d.ts +3 -3
  41. package/common/src/utils/menu-window-provider.d.ts +2 -2
  42. package/common/src/utils/route.d.ts +0 -1
  43. package/common/src/utils/snapshot.d.ts +3 -3
  44. package/common/src/utils/types.d.ts +7 -7
  45. package/common/src/utils/usage-register.d.ts +2 -2
  46. package/index.js +124 -19
  47. package/index.js.map +1 -1
  48. package/package.json +3 -3
  49. package/search-api/src/fin/shapes.d.ts +2 -2
  50. package/search-api/src/provider/remote/deregistration.d.ts +2 -1
  51. package/search-api/src/provider/remote/registration.d.ts +1 -1
  52. package/search-api/src/shapes.d.ts +11 -21
  53. package/common/src/api/search.d.ts +0 -18
@@ -0,0 +1,3 @@
1
+ import { HomeClientApiDataRequest, HomeInternalDataResponse, HomeInternalErrorResponse, InternalDataResponse } from '../../../../../common/src/api/shapes/home';
2
+ export declare function pushDataResponse(res: InternalDataResponse): Promise<void>;
3
+ export declare function handleDataRequest(req: HomeClientApiDataRequest): Promise<HomeInternalDataResponse | HomeInternalErrorResponse>;
@@ -0,0 +1 @@
1
+ export declare function handleChannelDisconnection(): Promise<void>;
@@ -0,0 +1,6 @@
1
+ import { SearchAPIClientChannelClient } from '../../../../../common/src/api/protocol/shapes/search';
2
+ type HomeWorkspaceAPIClientChannelClient = SearchAPIClientChannelClient & {
3
+ homeChannelActionsRegistered?: boolean;
4
+ };
5
+ export declare function registerHomeChannelClientActions(channel: HomeWorkspaceAPIClientChannelClient): void;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import type OpenFin from '@openfin/core';
2
+ import type { HomeClientApiDispatchRequest } from '../../../../../common/src/api/shapes/home';
3
+ export declare function handleResultDispatch(req: HomeClientApiDispatchRequest, identity: OpenFin.Identity): Promise<void>;
@@ -0,0 +1,5 @@
1
+ import type { HomeClientApiSearchCloseRequest } from '../../../../../common/src/api/shapes/home';
2
+ /**
3
+ * Listens for search requests that have been closed.
4
+ */
5
+ export declare function handleSearchRequestClose(req: HomeClientApiSearchCloseRequest): void;
@@ -0,0 +1,4 @@
1
+ import { ProvidersMap } from '../../../../client-api/src/internal/providers';
2
+ import { CLIProvider, HomeProvider, RegisterMetaInfoInternal } from '../..';
3
+ export declare const HomeProviders: ProvidersMap<CLIProvider | HomeProvider>;
4
+ export declare const registerHomeProviderInternal: (provider: HomeProvider | CLIProvider) => Promise<RegisterMetaInfoInternal>;
@@ -0,0 +1,5 @@
1
+ import type { InternalSearchListenerRequest } from '../../../../common/src/api/shapes/home';
2
+ /**
3
+ * Map of search requests.
4
+ */
5
+ export declare const searchRequests: Map<string, InternalSearchListenerRequest>;
@@ -0,0 +1,63 @@
1
+ import { ProviderType } from '../../../common/src/api/provider';
2
+ export declare class ProviderNotRegisteredError extends Error {
3
+ constructor(providerType: ProviderType, id?: string);
4
+ }
5
+ export declare class ProviderAlreadyRegisteredError extends Error {
6
+ constructor(providerType: ProviderType, id?: string);
7
+ }
8
+ export declare class FailedToGetProviderError extends Error {
9
+ constructor(providerType: ProviderType, id?: string);
10
+ }
11
+ /**
12
+ * Utility class for managing providers.
13
+ */
14
+ export declare class ProvidersMap<T extends {
15
+ id: string;
16
+ }> {
17
+ private readonly providersMap;
18
+ private readonly providerType;
19
+ constructor(providerType: ProviderType);
20
+ /**
21
+ * Asserts that a provider is not already registered.
22
+ * @param provider The provider to check.
23
+ * @throws ProviderAlreadyRegisteredError if the provider already exists.
24
+ */
25
+ assertNotAlreadyRegistered(id: string): void;
26
+ /**
27
+ * Asserts that a provider is registered.
28
+ * @param provider The provider to check.
29
+ * @throws ProviderAlreadyRegisteredError if the provider already exists.
30
+ */
31
+ assertRegistered(id: string): void;
32
+ /**
33
+ * Gets a provider by id.
34
+ * @param id The id of the provider to get.
35
+ * @returns The provider if it exists, otherwise undefined.
36
+ */
37
+ getProvider(id: string): T | undefined;
38
+ /**
39
+ * Checks if a provider exists.
40
+ * @param id The id of the provider to check.
41
+ * @returns True if the provider exists, otherwise false.
42
+ */
43
+ hasProvider(id: string): boolean;
44
+ /**
45
+ * Sets a provider.
46
+ * @param provider The provider to set.
47
+ */
48
+ setProvider(provider: T): void;
49
+ /**
50
+ * Deletes a provider.
51
+ * @param id The id of the provider to delete.
52
+ */
53
+ deleteProvider(id: string): void;
54
+ /**
55
+ * Gets a provider by id or throws an error if it does not exist.
56
+ * @param id The id of the provider to get.
57
+ * @returns The provider if it exists.
58
+ * @throws An error if the provider does not exist.
59
+ * @see {@link ProviderNotRegisteredError}
60
+ */
61
+ getProviderOrFail(id: string): T;
62
+ clearProviders(): void;
63
+ }
@@ -0,0 +1,9 @@
1
+ import { WorkspaceAPIClientChannelClient } from '../../../../common/src/api/protocol/workspace';
2
+ type StorefrontWorkspaceAPIClientChannelClient = WorkspaceAPIClientChannelClient & {
3
+ storefrontChannelActionsRegistered?: boolean;
4
+ };
5
+ /**
6
+ * Registers a channel action for each function in the Storefront provider.
7
+ */
8
+ export declare const registerStorefrontChannelClientActions: (channel: StorefrontWorkspaceAPIClientChannelClient) => void;
9
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ProvidersMap } from '../../../../client-api/src/internal/providers';
2
+ import { RegisterMetaInfoInternal, StorefrontProvider } from '../../../../client-api/src/shapes';
3
+ export declare const StorefrontProviders: ProvidersMap<StorefrontProvider>;
4
+ export declare const registerStorefrontProviderInternal: (provider: StorefrontProvider) => Promise<RegisterMetaInfoInternal>;
@@ -1,4 +1,4 @@
1
- import { WorkspaceChannelAction } from '../../common/src/api/protocol/shapes/workspace';
1
+ import { WorkspaceChannelAction } from '../../../common/src/api/protocol/shapes/workspace';
2
2
  export interface ChannelDispatch {
3
3
  action: WorkspaceChannelAction;
4
4
  payload?: any;
@@ -11,4 +11,4 @@ export interface RegistrationMetaInfo {
11
11
  clientAPIVersion: string;
12
12
  workspaceVersion: string;
13
13
  }
14
- export declare type RegisterMetaInfoInternal = Pick<RegistrationMetaInfo, 'workspaceVersion'>;
14
+ export type RegisterMetaInfoInternal = Pick<RegistrationMetaInfo, 'workspaceVersion'>;
@@ -101,7 +101,7 @@ export interface DockDropdownConfig extends CustomDropdownConfig {
101
101
  /**
102
102
  * Dock button types
103
103
  */
104
- export declare type DockButton = {
104
+ export type DockButton = {
105
105
  /** Optional button identifier, if not provided will be automatically generated by the provider */ id?: string;
106
106
  } & (DockButtonConfig | DockDropdownConfig);
107
107
  /**
@@ -109,7 +109,7 @@ export declare type DockButton = {
109
109
  *
110
110
  * Used in {@link WorkspaceButtonsConfig}.
111
111
  */
112
- export declare type WorkspaceButton = 'switchWorkspace' | 'home' | 'notifications' | 'store';
112
+ export type WorkspaceButton = 'switchWorkspace' | 'home' | 'notifications' | 'store';
113
113
  /**
114
114
  * Controls the visibility as well as the order of buttons for workspace components on the Dock.
115
115
  *
@@ -132,7 +132,7 @@ export declare type WorkspaceButton = 'switchWorkspace' | 'home' | 'notification
132
132
  * const workspaceButtonsConfig: WorkspaceButtonsConfig = [];
133
133
  * ```
134
134
  */
135
- export declare type WorkspaceButtonsConfig = WorkspaceButton[];
135
+ export type WorkspaceButtonsConfig = WorkspaceButton[];
136
136
  /**
137
137
  * Configuration for the Dock provider.
138
138
  */
@@ -8,7 +8,7 @@ import type { Workspace } from '../../../common/src/api/workspaces';
8
8
  import type { Action, DispatchedSearchResult, SearchListenerRequest, SearchListenerResponse, SearchProvider, SearchResult } from '../../../search-api/src/index';
9
9
  import { RegistrationMetaInfo } from './common';
10
10
  import { CustomTemplate, ListPairs } from './templates';
11
- export declare type CLISearchListenerRequest = SearchListenerRequest;
11
+ export type CLISearchListenerRequest = SearchListenerRequest;
12
12
  /**
13
13
  * Representation of a search request from a specific invocation of a {@link HomeProvider | HomeProvider's} `onUserInput` listener function.
14
14
  */
@@ -39,16 +39,20 @@ export interface HomeSearchListenerRequest extends CLISearchListenerRequest {
39
39
  isSearchEngines: boolean;
40
40
  /**
41
41
  * any user-selected filters will be populated here
42
- * e.g [{
43
- * title: 'Currency Pairs',
44
- * type: FilterOptionType.MultiSelect,
45
- * options: [{ value: 'GBPUSD', isSelected: true}]
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * [{
46
+ * title: 'Currency Pairs',
47
+ * type: FilterOptionType.MultiSelect,
48
+ * options: [{ value: 'GBPUSD', isSelected: true}]
46
49
  * }]
50
+ * ```
47
51
  */
48
52
  selectedFilters?: CLIFilter[];
49
53
  };
50
54
  }
51
- export declare type CLISearchListenerResponse = SearchListenerResponse;
55
+ export type CLISearchListenerResponse = SearchListenerResponse;
52
56
  /**
53
57
  * Representation of a search response from a specific invocation of a {@link HomeProvider | HomeProvider's} `onUserInput` listener function.
54
58
  * Can optionally be used to push search results to the Home UI.
@@ -68,7 +72,7 @@ export declare type CLISearchListenerResponse = SearchListenerResponse;
68
72
  * }
69
73
  * ```
70
74
  */
71
- export declare type HomeSearchListenerResponse = Omit<CLISearchListenerResponse, 'respond'> & {
75
+ export type HomeSearchListenerResponse = Omit<CLISearchListenerResponse, 'respond'> & {
72
76
  respond(results: HomeSearchResult[]): void;
73
77
  };
74
78
  /**
@@ -95,11 +99,11 @@ export interface CLISuggestion extends CLIBuiltInAction<CLIAction.Suggestion> {
95
99
  /**
96
100
  * Union type that includes Home's built in search result actions.
97
101
  */
98
- export declare type HomeAction = CLISuggestion | Action;
102
+ export type HomeAction = CLISuggestion | Action;
99
103
  /**
100
104
  * A search result that can be rendered by a Workspace component.
101
105
  */
102
- export declare type CLISearchResult<A extends Action> = SearchResult<A>;
106
+ export type CLISearchResult<A extends Action> = SearchResult<A>;
103
107
  /**
104
108
  * A list of template types that determine how a search result is rendered.
105
109
  */
@@ -173,7 +177,7 @@ export interface ContactInfo {
173
177
  */
174
178
  buttons?: ContactInfoButtons[];
175
179
  }
176
- export declare type ButtonIcon =
180
+ export type ButtonIcon =
177
181
  /**
178
182
  * The icon used for the button.
179
183
  */
@@ -187,7 +191,7 @@ string | {
187
191
  */
188
192
  dark: string;
189
193
  };
190
- export declare type ContactInfoButtons = {
194
+ export type ContactInfoButtons = {
191
195
  type: 'button';
192
196
  /**
193
197
  * The icon to display on the button.
@@ -271,7 +275,7 @@ export interface CLISearchResultError<A extends Action = Action> extends CLISear
271
275
  /**
272
276
  * A search result that can be rendered by Home UI.
273
277
  */
274
- export declare type HomeSearchResult = CLISearchResultContact<HomeAction> | CLISearchResultSimpleText<HomeAction> | CLISearchResultList<HomeAction> | CLISearchResultPlain<HomeAction> | CLISearchResultCustom<HomeAction> | CLISearchResultLoading<HomeAction> | CLISearchResultError<HomeAction>;
278
+ export type HomeSearchResult = CLISearchResultContact<HomeAction> | CLISearchResultSimpleText<HomeAction> | CLISearchResultList<HomeAction> | CLISearchResultPlain<HomeAction> | CLISearchResultCustom<HomeAction> | CLISearchResultLoading<HomeAction> | CLISearchResultError<HomeAction>;
275
279
  export declare enum CLIFilterOptionType {
276
280
  /**
277
281
  * Display a multi-select drop down for the options
@@ -325,7 +329,7 @@ export interface HomeSearchResponse extends CLISearchResponse {
325
329
  /**
326
330
  * A rendered search result that has been actioned by a user.
327
331
  */
328
- export declare type CLIDispatchedSearchResult = DispatchedSearchResult;
332
+ export type CLIDispatchedSearchResult = DispatchedSearchResult;
329
333
  /**
330
334
  * A CLI provider responds to search requests from Workspace components.
331
335
  * Upon receiving a search request, a CLI provider can return search results that can be rendered and interacted with
@@ -419,11 +423,7 @@ export interface HomeProvider extends CLIProvider {
419
423
  /**
420
424
  * A rendered Home search result that has been actioned by a user.
421
425
  */
422
- export declare type HomeDispatchedSearchResult = HomeSearchResult & DispatchedSearchResult;
423
- export interface SearchQueryWithProviderID {
424
- providerID: string;
425
- query: string;
426
- }
426
+ export type HomeDispatchedSearchResult = HomeSearchResult & DispatchedSearchResult;
427
427
  /**
428
428
  * Response from home registration which includes metadata and a function to inject search string into home search
429
429
  */
@@ -151,14 +151,14 @@ export interface StorefrontNavigationSection {
151
151
  * Represents the existing StorefrontDetailedNavigationItem and existing App interfaces
152
152
  * Used by StorefrontLandingPage to represent items in the bottom, middle and top rows.
153
153
  */
154
- export declare type StorefrontLandingPageItem = StorefrontDetailedNavigationItem | App;
155
- export declare type StorefrontLandingPageTopRow = [
154
+ export type StorefrontLandingPageItem = StorefrontDetailedNavigationItem | App;
155
+ export type StorefrontLandingPageTopRow = [
156
156
  StorefrontLandingPageItem?,
157
157
  StorefrontLandingPageItem?,
158
158
  StorefrontLandingPageItem?,
159
159
  StorefrontLandingPageItem?
160
160
  ];
161
- export declare type StorefrontLandingPageMiddleRow = [
161
+ export type StorefrontLandingPageMiddleRow = [
162
162
  StorefrontLandingPageItem?,
163
163
  StorefrontLandingPageItem?,
164
164
  StorefrontLandingPageItem?,
@@ -166,7 +166,7 @@ export declare type StorefrontLandingPageMiddleRow = [
166
166
  StorefrontLandingPageItem?,
167
167
  StorefrontLandingPageItem?
168
168
  ];
169
- export declare type StorefrontLandingPageBottomRow = [
169
+ export type StorefrontLandingPageBottomRow = [
170
170
  StorefrontLandingPageItem?,
171
171
  StorefrontLandingPageItem?,
172
172
  StorefrontLandingPageItem?
@@ -305,11 +305,11 @@ export interface StorefrontNavigationItemLandingPage extends StorefrontNavigatio
305
305
  /**
306
306
  * Render an item in the navigation bar of Storefront.
307
307
  */
308
- export declare type StorefrontNavigationItem = StorefrontNavigationItemAppGrid | StorefrontNavigationItemLandingPage;
308
+ export type StorefrontNavigationItem = StorefrontNavigationItemAppGrid | StorefrontNavigationItemLandingPage;
309
309
  /**
310
310
  * Render an item in the navigation bar of Storefront with a description and image.
311
311
  */
312
- export declare type StorefrontDetailedNavigationItem = StorefrontNavigationItem & StorefrontNavigationItemDetails;
312
+ export type StorefrontDetailedNavigationItem = StorefrontNavigationItem & StorefrontNavigationItemDetails;
313
313
  /**
314
314
  * Describes a Storefront provided by a platform.
315
315
  * A platform must provide an object that satisfies this interface in order to register with the Storefront.
@@ -3,15 +3,15 @@
3
3
  *
4
4
  * @module Templates
5
5
  */
6
- export declare type ListPairs = [string, string][];
7
- export declare type CustomTemplateData = Record<string, string | ListPairs>;
8
- export declare type ContainerFragmentTypes = PlainContainerTemplateFragment | ButtonTemplateFragment;
9
- export declare type PresentationFragmentTypes = TextTemplateFragment | ImageTemplateFragment | ListTemplateFragment;
10
- export declare type InteractiveFragmentTypes = ButtonTemplateFragment | TextTemplateFragment | ImageTemplateFragment;
6
+ export type ListPairs = [string, string][];
7
+ export type CustomTemplateData = Record<string, string | ListPairs>;
8
+ export type ContainerFragmentTypes = PlainContainerTemplateFragment | ButtonTemplateFragment;
9
+ export type PresentationFragmentTypes = TextTemplateFragment | ImageTemplateFragment | ListTemplateFragment;
10
+ export type InteractiveFragmentTypes = ButtonTemplateFragment | TextTemplateFragment | ImageTemplateFragment;
11
11
  /**
12
12
  * The options to build your custom template composition layout.
13
13
  */
14
- export declare type TemplateFragment = PlainContainerTemplateFragment | ButtonTemplateFragment | TextTemplateFragment | ListTemplateFragment | ImageTemplateFragment;
14
+ export type TemplateFragment = PlainContainerTemplateFragment | ButtonTemplateFragment | TextTemplateFragment | ListTemplateFragment | ImageTemplateFragment;
15
15
  export declare const ContainerTemplateFragmentNames: {
16
16
  readonly Container: "Container";
17
17
  readonly Button: "Button";
@@ -108,21 +108,21 @@ export declare enum ButtonStyle {
108
108
  Secondary = "secondary",
109
109
  TextOnly = "textOnly"
110
110
  }
111
- export declare type PlainContainerTemplateFragment = ContainerTemplateFragment<'Container'>;
112
- export declare type ButtonTemplateFragment = ContainerTemplateFragment<'Button'> & FragmentAction & {
111
+ export type PlainContainerTemplateFragment = ContainerTemplateFragment<'Container'>;
112
+ export type ButtonTemplateFragment = ContainerTemplateFragment<'Button'> & FragmentAction & {
113
113
  /**
114
114
  * Style of the button emitted by this fragment.
115
115
  */
116
116
  buttonStyle?: ButtonStyle;
117
117
  };
118
- export declare type TextTemplateFragment = PresentationTemplateFragment<'Text'> & FragmentAction;
119
- export declare type ImageTemplateFragment = PresentationTemplateFragment<'Image'> & FragmentAction & {
118
+ export type TextTemplateFragment = PresentationTemplateFragment<'Text'> & FragmentAction;
119
+ export type ImageTemplateFragment = PresentationTemplateFragment<'Image'> & FragmentAction & {
120
120
  /**
121
121
  * Alternative (accessibility) text for the image.
122
122
  */
123
123
  alternativeText: string;
124
124
  };
125
- export declare type ListTemplateFragment = PresentationTemplateFragment<'List'>;
125
+ export type ListTemplateFragment = PresentationTemplateFragment<'List'>;
126
126
  export interface CustomTemplate {
127
127
  /**
128
128
  * Root of the template composition tree. See {@link ContainerTemplateFragment} for nesting.
@@ -1 +1 @@
1
- export {};
1
+ import '@common/test/crypto-mocks';
@@ -1 +1 @@
1
- export {};
1
+ import '@common/test/crypto-mocks';
@@ -1 +1 @@
1
- export {};
1
+ import '@common/test/crypto-mocks';
@@ -22,12 +22,12 @@ export declare const filterSnapshotWindows: (win: OpenFin.WindowOptions) => bool
22
22
  * @returns unprocessed or processed options object
23
23
  */
24
24
  export declare const fitToMonitor: (options: OpenFin.PlatformWindowCreationOptions) => Promise<OpenFin.PlatformWindowCreationOptions>;
25
- declare type LegacyWindowOptions = Omit<OpenFin.PlatformWindowCreationOptions, 'workspacePlatform'> & {
25
+ type LegacyWindowOptions = Omit<OpenFin.PlatformWindowCreationOptions, 'workspacePlatform'> & {
26
26
  pages?: Page[];
27
27
  workstacks?: Page[];
28
28
  };
29
29
  export declare const initWorkspacePlatformOptions: (options: LegacyWindowOptions | OpenFin.PlatformWindowCreationOptions) => OpenFin.PlatformWindowCreationOptions;
30
- export declare type WindowType = 'browser' | 'platform' | 'classic' | 'mixed';
30
+ export type WindowType = 'browser' | 'platform' | 'classic' | 'mixed';
31
31
  /**
32
32
  * checkSnapshotWindowTypes
33
33
  * Determines what type of windows are contained within a snapshot.
@@ -1 +1 @@
1
- export {};
1
+ import '@common/test/crypto-mocks';
@@ -138,7 +138,7 @@ export interface PageTabContextMenuOptionActionPayload {
138
138
  /**
139
139
  * Payload received by the openGlobalContextMenu provider override.
140
140
  */
141
- export declare type OpenGlobalContextMenuPayload = OpenGlobalContextMenuRequest & {
141
+ export type OpenGlobalContextMenuPayload = OpenGlobalContextMenuRequest & {
142
142
  /** Template defining the options to show in the context menu. */
143
143
  template: GlobalContextMenuItemTemplate[];
144
144
  /** Identity of the Browser window where context menu should be shown. */
@@ -249,7 +249,7 @@ export interface ViewTabCustomActionPayload {
249
249
  /**
250
250
  * Payload received by the openViewTabContextMenu provider override.
251
251
  */
252
- export declare type OpenViewTabContextMenuPayload = OpenViewTabContextMenuRequest & {
252
+ export type OpenViewTabContextMenuPayload = OpenViewTabContextMenuRequest & {
253
253
  /** Identity of the Browser window where context menu should be shown. */
254
254
  identity: OpenFin.Identity;
255
255
  /** Default function that handles stock context menu options. */
@@ -258,7 +258,7 @@ export declare type OpenViewTabContextMenuPayload = OpenViewTabContextMenuReques
258
258
  /**
259
259
  * Payload received by the openViewTabContextMenu provider override.
260
260
  */
261
- export declare type OpenPageTabContextMenuPayload = OpenPageTabContextMenuRequest & {
261
+ export type OpenPageTabContextMenuPayload = OpenPageTabContextMenuRequest & {
262
262
  /** Identity of the Browser window where context menu should be shown. */
263
263
  identity: OpenFin.Identity;
264
264
  /** Template defining the options to show in the context menu. */
@@ -361,7 +361,7 @@ export interface PreDefinedButtonConfig {
361
361
  * };
362
362
  * ```
363
363
  */
364
- export declare type ShowHideTabsConfig = {
364
+ export type ShowHideTabsConfig = {
365
365
  type: BrowserButtonType.ShowHideTabs;
366
366
  disabled?: boolean;
367
367
  };
@@ -376,21 +376,21 @@ export declare type ShowHideTabsConfig = {
376
376
  * };
377
377
  * ```
378
378
  */
379
- export declare type LockUnlockPageConfig = {
379
+ export type LockUnlockPageConfig = {
380
380
  type: BrowserButtonType.LockUnlockPage;
381
381
  disabled?: boolean;
382
382
  };
383
383
  /**
384
384
  * Buttons on the left of WindowStateButtonOptions
385
385
  */
386
- export declare type ToolbarButton = ShowHideTabsConfig | LockUnlockPageConfig | CustomBrowserButtonConfig | PreDefinedButtonConfig;
386
+ export type ToolbarButton = ShowHideTabsConfig | LockUnlockPageConfig | CustomBrowserButtonConfig | PreDefinedButtonConfig;
387
387
  export interface ToolbarOptions {
388
388
  buttons: ToolbarButton[];
389
389
  }
390
390
  /**
391
391
  * Buttons to the top far right of Browser
392
392
  */
393
- export declare type WindowStateButton = CustomBrowserButtonConfig | PreDefinedButtonConfig;
393
+ export type WindowStateButton = CustomBrowserButtonConfig | PreDefinedButtonConfig;
394
394
  export interface WindowStateButtonOptions {
395
395
  buttons: WindowStateButton[];
396
396
  }
@@ -431,7 +431,7 @@ export interface OpenSaveButtonContextMenuRequest {
431
431
  /**
432
432
  * Payload received by the openSaveButtonContextMenu provider override.
433
433
  */
434
- export declare type OpenSaveButtonContextMenuPayload = OpenSaveButtonContextMenuRequest & {
434
+ export type OpenSaveButtonContextMenuPayload = OpenSaveButtonContextMenuRequest & {
435
435
  /** Identity of the Browser window where context menu should be shown. */
436
436
  identity: OpenFin.Identity;
437
437
  /** Template defining the options to show in the context menu. */
@@ -507,7 +507,7 @@ export interface BrowserCreateWindowRequest extends Omit<OpenFin.PlatformWindowC
507
507
  /**
508
508
  * A window that is part of a browser snapshot.
509
509
  */
510
- export declare type BrowserSnapshotWindow = OpenFin.WindowCreationOptions & BrowserCreateWindowRequest;
510
+ export type BrowserSnapshotWindow = OpenFin.WindowCreationOptions & BrowserCreateWindowRequest;
511
511
  /**
512
512
  * A browser snapshot.
513
513
  */
@@ -1351,7 +1351,7 @@ export declare enum CustomActionCallerType {
1351
1351
  /**The payload received by a Custom Action.
1352
1352
  * The `callerType` property can be used to determine what data is available in the payload and cast accordingly.
1353
1353
  * When `callerType == CustomActionCallerType.API`, the payload is defined by the code directly invoking the action.*/
1354
- export declare type CustomActionPayload = {
1354
+ export type CustomActionPayload = {
1355
1355
  callerType: CustomActionCallerType.API;
1356
1356
  } | CustomButtonActionPayload | StoreCustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
1357
1357
  /**
@@ -1377,7 +1377,7 @@ export interface ApplyWorkspaceOptions {
1377
1377
  /**
1378
1378
  * Options used within the {@link WorkspacePlatformModule.applyWorkspace applyWorkspace} method.
1379
1379
  *
1380
- * @inheritdoc OpenFin.ApplySnapshotOptions
1380
+ * @inheritDoc OpenFin.ApplySnapshotOptions
1381
1381
  */
1382
1382
  export interface ApplySnapshotOptions extends OpenFin.ApplySnapshotOptions {
1383
1383
  /**
@@ -1391,7 +1391,7 @@ export interface ApplySnapshotOptions extends OpenFin.ApplySnapshotOptions {
1391
1391
  /**
1392
1392
  * Payload received by applyWorkspace platform provider method
1393
1393
  */
1394
- export declare type ApplyWorkspacePayload = Workspace & {
1394
+ export type ApplyWorkspacePayload = Workspace & {
1395
1395
  options?: ApplyWorkspaceOptions;
1396
1396
  };
1397
1397
  /**
@@ -1627,11 +1627,11 @@ export interface WorkspacePlatformInitConfig {
1627
1627
  * });
1628
1628
  * ```
1629
1629
  */
1630
- export declare type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<WorkspacePlatformProvider>;
1630
+ export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<WorkspacePlatformProvider>;
1631
1631
  /**
1632
1632
  * @deprecated
1633
1633
  */
1634
- export declare type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
1634
+ export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
1635
1635
  /**
1636
1636
  * Configuration for initializing a Browser.
1637
1637
  */
@@ -1691,7 +1691,7 @@ export interface UpdateSavedWorkspaceRequest {
1691
1691
  * Request to create a save modal.
1692
1692
  * @private
1693
1693
  */
1694
- export declare type OpenSaveMenuRequest = {
1694
+ export type OpenSaveMenuRequest = {
1695
1695
  menuType: SaveModalType.SAVE_PAGE | SaveModalType.SAVE_PAGE_AS | SaveModalType.RENAME_PAGE;
1696
1696
  id: string;
1697
1697
  } | {
@@ -24,7 +24,7 @@ export interface BaseCustomDropdownItem extends BaseCustomButtonConfig {
24
24
  /** icon URL for icon image */
25
25
  action?: any;
26
26
  }
27
- export declare type BaseCustomDropdownItems = BaseCustomDropdownItem[] | (() => Promise<BaseCustomDropdownItem[]>);
27
+ export type BaseCustomDropdownItems = BaseCustomDropdownItem[] | (() => Promise<BaseCustomDropdownItem[]>);
28
28
  /**
29
29
  * Base Configuration for a custom dropdown
30
30
  */
@@ -0,0 +1,25 @@
1
+ import type OpenFin from '@openfin/core';
2
+ import { HomeSearchListenerRequest } from '../../../client-api/src/shapes';
3
+ export interface SearchQueryWithProviderID {
4
+ providerID: string;
5
+ query: string;
6
+ }
7
+ export interface SearchQueryWithProviderIdentity {
8
+ providerID: string;
9
+ platformIdentity: OpenFin.Identity;
10
+ query: string;
11
+ }
12
+ /**
13
+ * The ids of home providers that are built into Home.
14
+ */
15
+ export declare enum HomeBuiltInProviderID {
16
+ /**
17
+ * Built in Home provider that provides commands.
18
+ */
19
+ Commands = "home-commands"
20
+ }
21
+ /**
22
+ * Assign a search context to Home.
23
+ * @param ctx the search context to assign.
24
+ */
25
+ export declare function assignHomeSearchContext(ctx: Partial<HomeSearchListenerRequest['context']>): Promise<void>;
@@ -9,7 +9,7 @@ export interface PageLayoutDetails {
9
9
  */
10
10
  machineName?: string;
11
11
  }
12
- export declare type PageLayout = OpenFin.LayoutOptions & {
12
+ export type PageLayout = OpenFin.LayoutOptions & {
13
13
  layoutDetails?: PageLayoutDetails;
14
14
  };
15
15
  /**
@@ -70,7 +70,7 @@ export interface Page {
70
70
  /** Optional property to attach custom metadata to the page object, such as version or timestamp. Must be serializable. */
71
71
  customData?: any;
72
72
  }
73
- declare type AttachedPageMetadata = {
73
+ type AttachedPageMetadata = {
74
74
  /** The window the page is currently attached to. */
75
75
  parentIdentity?: OpenFin.Identity;
76
76
  /** True if the page is the currently active page for its parent window. */
@@ -80,8 +80,8 @@ declare type AttachedPageMetadata = {
80
80
  /** Panel config with all view identities in place */
81
81
  panels?: ExtendedPanelConfig[];
82
82
  };
83
- export declare type AttachedPage = Page & AttachedPageMetadata;
84
- export declare type PageWithUpdatableRuntimeAttribs = Page & Pick<AttachedPage, 'hasUnsavedChanges'>;
83
+ export type AttachedPage = Page & AttachedPageMetadata;
84
+ export type PageWithUpdatableRuntimeAttribs = Page & Pick<AttachedPage, 'hasUnsavedChanges'>;
85
85
  export interface DetachPagesFromWindowPayload {
86
86
  /** The OF window identity to detach the pages from. */
87
87
  identity: OpenFin.Identity;
@@ -176,11 +176,11 @@ export interface PanelConfigVertical {
176
176
  * }
177
177
  * ```
178
178
  */
179
- export declare type PanelConfig = (PanelConfigHorizontal | PanelConfigVertical) & {
179
+ export type PanelConfig = (PanelConfigHorizontal | PanelConfigVertical) & {
180
180
  /** The options with which to initialize the panel view.*/
181
181
  viewOptions: Omit<OpenFin.PlatformViewCreationOptions, 'bounds' | 'target'>;
182
182
  };
183
- export declare type ExtendedPanelConfig = PanelConfig & {
183
+ export type ExtendedPanelConfig = PanelConfig & {
184
184
  viewOptions: PanelConfig['viewOptions'] & OpenFin.Identity;
185
185
  };
186
186
  export {};
@@ -69,5 +69,5 @@ export declare const BrowserChannelAction: {
69
69
  DuplicatePage: GeneralBrowserChannelActions.DuplicatePage;
70
70
  SetSelectedScheme: GeneralBrowserChannelActions.SetSelectedScheme;
71
71
  };
72
- export declare type BrowserChannelAction = typeof BrowserChannelAction;
72
+ export type BrowserChannelAction = typeof BrowserChannelAction;
73
73
  export {};