@openfin/workspace 13.1.5 → 14.0.14
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/README.md +14 -14
- package/client-api/src/dock.d.ts +46 -10
- package/client-api/src/home.d.ts +76 -5
- package/client-api/src/home.test.d.ts +1 -1
- package/client-api/src/index.d.ts +10 -10
- package/client-api/src/integrations/microsoft.shapes.d.ts +9 -9
- package/client-api/src/internal/home/handlers/data.d.ts +3 -0
- package/client-api/src/internal/home/handlers/data.test.d.ts +1 -0
- package/client-api/src/internal/home/handlers/disconnect.d.ts +1 -0
- package/client-api/src/internal/home/handlers/disconnect.test.d.ts +1 -0
- package/client-api/src/internal/home/handlers/index.d.ts +6 -0
- package/client-api/src/internal/home/handlers/index.test.d.ts +1 -0
- package/client-api/src/internal/home/handlers/result-dispatch.d.ts +3 -0
- package/client-api/src/internal/home/handlers/result-dispatch.test.d.ts +1 -0
- package/client-api/src/internal/home/handlers/search-close.d.ts +5 -0
- package/client-api/src/internal/home/handlers/search-close.test.d.ts +1 -0
- package/client-api/src/internal/home/index.d.ts +4 -0
- package/client-api/src/internal/home/requests.d.ts +5 -0
- package/client-api/src/internal/providers.d.ts +63 -0
- package/client-api/src/internal/providers.test.d.ts +1 -0
- package/client-api/src/internal/storefront/handlers.d.ts +9 -0
- package/client-api/src/internal/storefront/index.d.ts +4 -0
- package/client-api/src/{internal.d.ts → internal/try-dispatch.d.ts} +1 -1
- package/client-api/src/legacy.d.ts +4 -3
- package/client-api/src/shapes/common.d.ts +20 -3
- package/client-api/src/shapes/dock.d.ts +97 -85
- package/client-api/src/shapes/home.d.ts +49 -138
- package/client-api/src/shapes/notifications.d.ts +2 -2
- package/client-api/src/shapes/store.d.ts +31 -14
- package/client-api/src/shapes/templates.d.ts +11 -11
- package/client-api/src/store.d.ts +31 -15
- package/client-api-platform/src/init/utils.d.ts +2 -2
- package/client-api-platform/src/shapes.d.ts +46 -39
- package/common/src/api/action.d.ts +1 -1
- package/common/src/api/home.d.ts +25 -0
- package/common/src/api/pages/shapes.d.ts +6 -6
- package/common/src/api/protocol/browser.d.ts +1 -1
- package/common/src/api/protocol/shapes/search.d.ts +96 -0
- package/common/src/api/protocol/shapes/workspace.d.ts +13 -13
- package/common/src/api/protocol/workspace-platform.d.ts +1 -1
- package/common/src/api/protocol/workspace.d.ts +2 -0
- package/common/src/api/provider.d.ts +24 -9
- package/common/src/api/search/aggregate-search-results.d.ts +10 -0
- package/common/src/api/search/common.d.ts +15 -0
- package/common/src/api/shapes/home.d.ts +186 -0
- package/common/src/api/theming.d.ts +18 -6
- package/common/src/utils/a11y/search.a11y.d.ts +10 -10
- package/common/src/utils/application.d.ts +2 -2
- package/common/src/utils/context-menu.d.ts +1 -1
- package/common/src/utils/layout.d.ts +3 -3
- package/common/src/utils/menu-window-provider.d.ts +2 -2
- package/common/src/utils/route.d.ts +0 -1
- package/common/src/utils/snapshot.d.ts +3 -3
- package/common/src/utils/types.d.ts +7 -7
- package/common/src/utils/usage-register.d.ts +2 -2
- package/home.js +128 -23
- package/home.js.map +1 -1
- package/index.js +127 -22
- package/index.js.map +1 -1
- package/notifications.js +124 -19
- package/notifications.js.map +1 -1
- package/package.json +3 -3
- package/search-api/src/fin/shapes.d.ts +2 -2
- package/search-api/src/internal-shapes.d.ts +2 -0
- package/search-api/src/provider/remote/deregistration.d.ts +2 -1
- package/search-api/src/provider/remote/info.d.ts +1 -1
- package/search-api/src/provider/remote/registration.d.ts +1 -1
- package/search-api/src/shapes.d.ts +16 -21
- package/store.js +130 -25
- package/store.js.map +1 -1
- package/common/src/api/search.d.ts +0 -18
|
@@ -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
|
|
155
|
-
export
|
|
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
|
|
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
|
|
169
|
+
export type StorefrontLandingPageBottomRow = [
|
|
170
170
|
StorefrontLandingPageItem?,
|
|
171
171
|
StorefrontLandingPageItem?,
|
|
172
172
|
StorefrontLandingPageItem?
|
|
@@ -240,6 +240,8 @@ export interface StoreRegistration extends RegistrationMetaInfo {
|
|
|
240
240
|
* @param request object that contains primary button and secondary buttons configs that will be
|
|
241
241
|
* used to update button configuration returned by provider for an app.
|
|
242
242
|
*
|
|
243
|
+
* @example Updating primary button title and disabled flag.
|
|
244
|
+
*
|
|
243
245
|
* ```ts
|
|
244
246
|
* let storeRegistration: StoreRegistration | undefined;
|
|
245
247
|
*
|
|
@@ -305,17 +307,19 @@ export interface StorefrontNavigationItemLandingPage extends StorefrontNavigatio
|
|
|
305
307
|
/**
|
|
306
308
|
* Render an item in the navigation bar of Storefront.
|
|
307
309
|
*/
|
|
308
|
-
export
|
|
310
|
+
export type StorefrontNavigationItem = StorefrontNavigationItemAppGrid | StorefrontNavigationItemLandingPage;
|
|
309
311
|
/**
|
|
310
312
|
* Render an item in the navigation bar of Storefront with a description and image.
|
|
311
313
|
*/
|
|
312
|
-
export
|
|
314
|
+
export type StorefrontDetailedNavigationItem = StorefrontNavigationItem & StorefrontNavigationItemDetails;
|
|
313
315
|
/**
|
|
314
316
|
* Describes a Storefront provided by a platform.
|
|
315
317
|
* A platform must provide an object that satisfies this interface in order to register with the Storefront.
|
|
316
318
|
*
|
|
317
319
|
* <h3>Sample StorefrontProvider definition.</h3>
|
|
318
320
|
*
|
|
321
|
+
* @example **Registering a StorefrontProvider**
|
|
322
|
+
*
|
|
319
323
|
* Import required dependencies.
|
|
320
324
|
* ```ts
|
|
321
325
|
* import { Storefront, StorefrontProvider } from '@openfin/workspace';
|
|
@@ -329,7 +333,7 @@ export declare type StorefrontDetailedNavigationItem = StorefrontNavigationItem
|
|
|
329
333
|
* title: 'Sample Storefront',
|
|
330
334
|
* icon: 'https://www.openfin.co/favicon-32x32.png',
|
|
331
335
|
* getApps: () => { }, // Get apps to populate the platform's storefront
|
|
332
|
-
* getNavigation: () => {...}, // Get navigation selections for the left
|
|
336
|
+
* getNavigation: () => {...}, // Get navigation selections for the left navigation bar
|
|
333
337
|
* getLandingPage: () => {...}, // Get main landing page for platform's storefront
|
|
334
338
|
* getFooter: () => {...}, // Get footer for the platform's storefront
|
|
335
339
|
* launchApp: () => {...}, // Launch an app provided by the platform's storefront
|
|
@@ -345,8 +349,9 @@ export interface StorefrontProvider extends ProviderInfo {
|
|
|
345
349
|
/**
|
|
346
350
|
* Get a list of apps to populate the platform's Storefront with.
|
|
347
351
|
*
|
|
348
|
-
*
|
|
352
|
+
* @example An example of a `getApps` implementation that returns a single app.
|
|
349
353
|
*
|
|
354
|
+
* ```ts
|
|
350
355
|
* const app : App = {
|
|
351
356
|
* appId: 'uid'
|
|
352
357
|
* title: 'My App'
|
|
@@ -373,8 +378,9 @@ export interface StorefrontProvider extends ProviderInfo {
|
|
|
373
378
|
/**
|
|
374
379
|
* Get the main landing page for the platform's Storefront.
|
|
375
380
|
*
|
|
376
|
-
*
|
|
381
|
+
* @example Landing page with hero, top row, middle row, and bottom row.
|
|
377
382
|
*
|
|
383
|
+
* ```ts
|
|
378
384
|
* const landingPage : StorefrontLandingPage = {
|
|
379
385
|
* hero: {
|
|
380
386
|
* title: 'My Landing Page',
|
|
@@ -386,15 +392,15 @@ export interface StorefrontProvider extends ProviderInfo {
|
|
|
386
392
|
* },
|
|
387
393
|
* topRow: {
|
|
388
394
|
* title: 'Top Row Title',
|
|
389
|
-
* items:
|
|
395
|
+
* items: [ /* array of StorefrontNavigationItem *\/ ]
|
|
390
396
|
* },
|
|
391
397
|
* middleRow: {
|
|
392
398
|
* title: 'Middle Row Title',
|
|
393
|
-
*
|
|
399
|
+
* items: [ /* array of Apps *\/ ]
|
|
394
400
|
* },
|
|
395
401
|
* bottomRow: {
|
|
396
402
|
* title: 'Bottom Row Title',
|
|
397
|
-
* items:
|
|
403
|
+
* items: [ /* array of StorefrontNavigationItem *\/ ]
|
|
398
404
|
* }
|
|
399
405
|
* }
|
|
400
406
|
*
|
|
@@ -407,17 +413,19 @@ export interface StorefrontProvider extends ProviderInfo {
|
|
|
407
413
|
/**
|
|
408
414
|
* Get the Storefront navigation sections for the left nav bar.
|
|
409
415
|
*
|
|
416
|
+
* @example An example of a navigation section with a title and navigation items.
|
|
417
|
+
*
|
|
410
418
|
* ```ts
|
|
411
419
|
* const navigationSections: [StorefrontNavigationSection, StorefrontNavigationSection] = [
|
|
412
420
|
* {
|
|
413
421
|
* id: 'first id',
|
|
414
422
|
* title: 'title',
|
|
415
|
-
* items:
|
|
423
|
+
* items: [ /* array of navigation items *\/ ]
|
|
416
424
|
* },
|
|
417
425
|
* {
|
|
418
426
|
* id: 'second id'
|
|
419
427
|
* title: 'title',
|
|
420
|
-
* items:
|
|
428
|
+
* items: [ /* array of navigation items *\/ ]
|
|
421
429
|
* }
|
|
422
430
|
* ]
|
|
423
431
|
*
|
|
@@ -434,6 +442,11 @@ export interface StorefrontProvider extends ProviderInfo {
|
|
|
434
442
|
/**
|
|
435
443
|
* Get the footer for the platform's Storefront.
|
|
436
444
|
*
|
|
445
|
+
* The footer is a section displayed at the bottom of the Storefront. It can contain a logo, text, and links.
|
|
446
|
+
*
|
|
447
|
+
*
|
|
448
|
+
* @example An example implementation of `getFooter`:
|
|
449
|
+
*
|
|
437
450
|
* ```ts
|
|
438
451
|
* const footer: StorefrontFooter = {
|
|
439
452
|
* logo: { src: './images/image', size: '32' },
|
|
@@ -453,6 +466,8 @@ export interface StorefrontProvider extends ProviderInfo {
|
|
|
453
466
|
/**
|
|
454
467
|
* Launch an app provided by the platform's Storefront.
|
|
455
468
|
*
|
|
469
|
+
*
|
|
470
|
+
* @example An example implementation of `launchApp`:
|
|
456
471
|
* ```ts
|
|
457
472
|
* import { getStorefrontProvider } from "./my-provider";
|
|
458
473
|
*
|
|
@@ -481,6 +496,8 @@ export interface StorefrontProvider extends ProviderInfo {
|
|
|
481
496
|
* }
|
|
482
497
|
* ```
|
|
483
498
|
* @param app the app to launch.
|
|
499
|
+
*
|
|
500
|
+
* @returns a promise that resolves when the app has been launched.
|
|
484
501
|
*/
|
|
485
502
|
launchApp(app: App): Promise<void>;
|
|
486
503
|
}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module Templates
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
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
|
|
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
|
|
112
|
-
export
|
|
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
|
|
119
|
-
export
|
|
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
|
|
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,15 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry points for the OpenFin Workspace Store API.
|
|
3
|
+
*
|
|
4
|
+
* The Store API allows you to register a Store provider with the Workspace Platform.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
1
8
|
import type { StorefrontProvider, StoreRegistration } from './shapes/store';
|
|
2
9
|
export * from './shapes/store';
|
|
3
10
|
/**
|
|
4
11
|
* Registers a {@link StorefrontProvider}.
|
|
5
12
|
*
|
|
6
|
-
*
|
|
13
|
+
* @throws Error if a provider with the same `id` already exists.
|
|
14
|
+
* @throws Error if Workspace Platform is not initialized.
|
|
7
15
|
*
|
|
8
16
|
* @param provider the implementation of a Storefront provider.
|
|
9
17
|
*
|
|
10
18
|
* @example
|
|
11
19
|
* ```ts
|
|
12
|
-
* import { Storefront, StorefrontProvider } from "@openfin/workspace";
|
|
20
|
+
* import { Storefront, type StorefrontProvider } from "@openfin/workspace";
|
|
13
21
|
*
|
|
14
22
|
* const myStorefrontProvider: StorefrontProvider = {
|
|
15
23
|
* id: "my-storefront-id"
|
|
@@ -23,19 +31,20 @@ export * from './shapes/store';
|
|
|
23
31
|
* };
|
|
24
32
|
*
|
|
25
33
|
* await Storefront.register(myStorefrontProvider);
|
|
26
|
-
*
|
|
27
34
|
* ```
|
|
28
35
|
*/
|
|
29
36
|
export declare const register: (provider: StorefrontProvider) => Promise<StoreRegistration>;
|
|
30
37
|
/**
|
|
31
38
|
* API function to deregister a Storefront provider.
|
|
32
39
|
*
|
|
33
|
-
* @param
|
|
34
|
-
* @returns promise
|
|
40
|
+
* @param providerId the id of the provider to deregister.
|
|
41
|
+
* @returns promise that resolves once the provider is deregistered.
|
|
35
42
|
*
|
|
43
|
+
* @throws an error if the provider is not currently registered.
|
|
36
44
|
* @example
|
|
45
|
+
*
|
|
37
46
|
* ```ts
|
|
38
|
-
* import { Storefront, StorefrontProvider } from "@openfin/workspace";
|
|
47
|
+
* import { Storefront, type StorefrontProvider } from "@openfin/workspace";
|
|
39
48
|
*
|
|
40
49
|
* const myStorefrontProvider: StorefrontProvider = {
|
|
41
50
|
* id: "my-storefront-id"
|
|
@@ -51,29 +60,36 @@ export declare const register: (provider: StorefrontProvider) => Promise<StoreRe
|
|
|
51
60
|
* await Storefront.register(myStorefrontProvider);
|
|
52
61
|
*
|
|
53
62
|
* await Storefront.deregister("my-storefront-id");
|
|
54
|
-
*
|
|
55
63
|
* ```
|
|
56
64
|
*/
|
|
57
65
|
export declare const deregister: (providerId: string) => Promise<void>;
|
|
58
66
|
/**
|
|
59
|
-
* API function to hide the
|
|
60
|
-
*
|
|
67
|
+
* API function to hide the Store UI.
|
|
68
|
+
*
|
|
69
|
+
* @remarks At least one Store provider must be registered for this function to take effect.
|
|
70
|
+
*
|
|
71
|
+
* @returns a promise that resolves once the Store UI is hidden.
|
|
72
|
+
*
|
|
73
|
+
* @example Hide a Store provider.
|
|
61
74
|
*
|
|
62
|
-
* @example
|
|
63
75
|
* ```ts
|
|
64
|
-
* import { Storefront } from
|
|
76
|
+
* import { Storefront } from '@openfin/workspace';
|
|
65
77
|
*
|
|
66
78
|
* await Storefront.hide();
|
|
67
79
|
* ```
|
|
68
80
|
*/
|
|
69
81
|
export declare const hide: () => Promise<void>;
|
|
70
82
|
/**
|
|
71
|
-
* API function to show the
|
|
72
|
-
*
|
|
83
|
+
* API function to show the Store UI.
|
|
84
|
+
*
|
|
85
|
+
* @remarks At least one Store provider must be registered for this function to take effect.
|
|
86
|
+
*
|
|
87
|
+
* @returns a promise that resolves once the Store UI is shown
|
|
88
|
+
*
|
|
89
|
+
* @example Show a Store provider.
|
|
73
90
|
*
|
|
74
|
-
* @example
|
|
75
91
|
* ```ts
|
|
76
|
-
* import { Storefront } from
|
|
92
|
+
* import { Storefront } from '@openfin/workspace';
|
|
77
93
|
*
|
|
78
94
|
* await Storefront.show();
|
|
79
95
|
* ```
|
|
@@ -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
|
-
|
|
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
|
|
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.
|
|
@@ -138,7 +138,7 @@ export interface PageTabContextMenuOptionActionPayload {
|
|
|
138
138
|
/**
|
|
139
139
|
* Payload received by the openGlobalContextMenu provider override.
|
|
140
140
|
*/
|
|
141
|
-
export
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
510
|
+
export type BrowserSnapshotWindow = OpenFin.WindowCreationOptions & BrowserCreateWindowRequest;
|
|
511
511
|
/**
|
|
512
512
|
* A browser snapshot.
|
|
513
513
|
*/
|
|
@@ -1403,7 +1403,7 @@ export declare enum CustomActionCallerType {
|
|
|
1403
1403
|
/**The payload received by a Custom Action.
|
|
1404
1404
|
* The `callerType` property can be used to determine what data is available in the payload and cast accordingly.
|
|
1405
1405
|
* When `callerType == CustomActionCallerType.API`, the payload is defined by the code directly invoking the action.*/
|
|
1406
|
-
export
|
|
1406
|
+
export type CustomActionPayload = {
|
|
1407
1407
|
callerType: CustomActionCallerType.API;
|
|
1408
1408
|
} | CustomButtonActionPayload | StoreCustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
|
|
1409
1409
|
/**
|
|
@@ -1447,7 +1447,7 @@ export interface ApplyWorkspaceOptions {
|
|
|
1447
1447
|
/**
|
|
1448
1448
|
* Options used within the {@link WorkspacePlatformModule.applyWorkspace applyWorkspace} method.
|
|
1449
1449
|
*
|
|
1450
|
-
* @
|
|
1450
|
+
* @inheritDoc OpenFin.ApplySnapshotOptions
|
|
1451
1451
|
*/
|
|
1452
1452
|
export interface ApplySnapshotOptions extends OpenFin.ApplySnapshotOptions {
|
|
1453
1453
|
/**
|
|
@@ -1461,7 +1461,7 @@ export interface ApplySnapshotOptions extends OpenFin.ApplySnapshotOptions {
|
|
|
1461
1461
|
/**
|
|
1462
1462
|
* Payload received by applyWorkspace platform provider method
|
|
1463
1463
|
*/
|
|
1464
|
-
export
|
|
1464
|
+
export type ApplyWorkspacePayload = Workspace & {
|
|
1465
1465
|
options?: ApplyWorkspaceOptions;
|
|
1466
1466
|
};
|
|
1467
1467
|
/**
|
|
@@ -1481,38 +1481,45 @@ export interface AnalyticsConfig {
|
|
|
1481
1481
|
*/
|
|
1482
1482
|
export interface WorkspacePlatformInitConfig {
|
|
1483
1483
|
customActions?: CustomActionsMap;
|
|
1484
|
-
/**
|
|
1485
|
-
*
|
|
1484
|
+
/**
|
|
1485
|
+
* Config for overriding browser options and behavior.
|
|
1486
|
+
* Set to null to initialize the platform without the browser
|
|
1486
1487
|
*/
|
|
1487
1488
|
browser?: BrowserInitConfig | null;
|
|
1488
|
-
/**
|
|
1489
|
+
/**
|
|
1490
|
+
* Customize the Looks and Feel of the Workspace Platform by providing a custom palette.
|
|
1491
|
+
*
|
|
1492
|
+
* Two palettes are provided by default: `light` and `dark`.
|
|
1493
|
+
* The `dark` palette is used by default.
|
|
1494
|
+
*
|
|
1495
|
+
* @example
|
|
1489
1496
|
*
|
|
1490
1497
|
* ```ts
|
|
1491
1498
|
* import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
1492
1499
|
*
|
|
1493
1500
|
* // This is the palette used to create the OpenFin dark theme
|
|
1494
1501
|
* const customPalette: WorkspacePlatform.CustomPaletteSet = {
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
*
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
*
|
|
1508
|
-
*
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1514
|
-
*
|
|
1515
|
-
*
|
|
1502
|
+
* brandPrimary: '#504CFF',
|
|
1503
|
+
* brandSecondary: '#383A40',
|
|
1504
|
+
* backgroundPrimary: '#000',
|
|
1505
|
+
* background1: '#111214',
|
|
1506
|
+
* background2: '#1E1F23',
|
|
1507
|
+
* background3: '#24262B',
|
|
1508
|
+
* background4: '#2F3136',
|
|
1509
|
+
* background5: '#383A40',
|
|
1510
|
+
* background6: '#53565F',
|
|
1511
|
+
* statusSuccess: '#35C759',
|
|
1512
|
+
* statusWarning: '#C93400',
|
|
1513
|
+
* statusCritical: '#000',
|
|
1514
|
+
* statusActive: '#0879C4',
|
|
1515
|
+
* inputBackground: '#53565F',
|
|
1516
|
+
* inputColor: '#FFFFFF',
|
|
1517
|
+
* inputPlaceholder: '#C9CBD2',
|
|
1518
|
+
* inputDisabled: '#7D808A',
|
|
1519
|
+
* inputFocused: '#C9CBD2',
|
|
1520
|
+
* textDefault: '#FFFFFF',
|
|
1521
|
+
* textHelp: '#C9CBD2',
|
|
1522
|
+
* textInactive: '#7D808A',
|
|
1516
1523
|
* };
|
|
1517
1524
|
*
|
|
1518
1525
|
* const customTheme: WorkspacePlatform.CustomThemes = [{
|
|
@@ -1697,11 +1704,11 @@ export interface WorkspacePlatformInitConfig {
|
|
|
1697
1704
|
* });
|
|
1698
1705
|
* ```
|
|
1699
1706
|
*/
|
|
1700
|
-
export
|
|
1707
|
+
export type WorkspacePlatformOverrideCallback = OpenFin.OverrideCallback<WorkspacePlatformProvider>;
|
|
1701
1708
|
/**
|
|
1702
1709
|
* @deprecated
|
|
1703
1710
|
*/
|
|
1704
|
-
export
|
|
1711
|
+
export type BrowserOverrideCallback = WorkspacePlatformOverrideCallback;
|
|
1705
1712
|
/**
|
|
1706
1713
|
* Configuration for initializing a Browser.
|
|
1707
1714
|
*/
|
|
@@ -1772,7 +1779,7 @@ export declare enum SaveModalType {
|
|
|
1772
1779
|
* Request to create a save modal.
|
|
1773
1780
|
* @private
|
|
1774
1781
|
*/
|
|
1775
|
-
export
|
|
1782
|
+
export type OpenSaveMenuRequest = {
|
|
1776
1783
|
menuType: SaveModalType.SAVE_PAGE | SaveModalType.SAVE_PAGE_AS | SaveModalType.RENAME_PAGE;
|
|
1777
1784
|
id: string;
|
|
1778
1785
|
} | {
|
|
@@ -24,7 +24,7 @@ export interface BaseCustomDropdownItem extends BaseCustomButtonConfig {
|
|
|
24
24
|
/** icon URL for icon image */
|
|
25
25
|
action?: any;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
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
|
|
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
|
-
|
|
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
|
|
84
|
-
export
|
|
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
|
|
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
|
|
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
|
|
72
|
+
export type BrowserChannelAction = typeof BrowserChannelAction;
|
|
73
73
|
export {};
|