@openfin/workspace 14.0.11 → 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/client-api/src/dock.d.ts +46 -10
- package/client-api/src/home.d.ts +76 -5
- package/client-api/src/index.d.ts +10 -10
- package/client-api/src/legacy.d.ts +4 -3
- package/client-api/src/shapes/common.d.ts +19 -2
- package/client-api/src/shapes/dock.d.ts +94 -82
- package/client-api/src/shapes/home.d.ts +32 -121
- package/client-api/src/shapes/store.d.ts +25 -8
- package/client-api/src/store.d.ts +31 -15
- package/client-api-platform/src/shapes.d.ts +31 -24
- package/common/src/api/search/common.d.ts +2 -0
- package/common/src/api/theming.d.ts +16 -4
- 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/package.json +2 -2
- package/search-api/src/internal-shapes.d.ts +2 -0
- package/search-api/src/shapes.d.ts +5 -0
- package/store.js +1 -1
- package/store.js.map +1 -1
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* up the packaged typing files. When writing code examples,
|
|
4
4
|
* for documentation, please use async/await syntax over .then()!
|
|
5
5
|
*/
|
|
6
|
-
import type { Page } from '../../../common/src/api/pages/shapes';
|
|
7
|
-
import type { Workspace } from '../../../common/src/api/workspaces';
|
|
8
6
|
import type { Action, DispatchedSearchResult, SearchListenerRequest, SearchListenerResponse, SearchProvider, SearchResult } from '../../../search-api/src/index';
|
|
9
7
|
import { RegistrationMetaInfo } from './common';
|
|
10
8
|
import { CustomTemplate, ListPairs } from './templates';
|
|
@@ -22,6 +20,8 @@ export interface HomeSearchListenerRequest extends CLISearchListenerRequest {
|
|
|
22
20
|
/**
|
|
23
21
|
* Denotes that this search request should return search results
|
|
24
22
|
* that represent content that a user has saved. (Workspaces, Pages)
|
|
23
|
+
*
|
|
24
|
+
* @deprecated This is no longer used.
|
|
25
25
|
*/
|
|
26
26
|
isSaved: boolean;
|
|
27
27
|
/**
|
|
@@ -29,12 +29,16 @@ export interface HomeSearchListenerRequest extends CLISearchListenerRequest {
|
|
|
29
29
|
* that represents content that is stored in the platform.
|
|
30
30
|
* This should exclude content that the user has saved.
|
|
31
31
|
* (Workspaces, Pages, Views, Apps)
|
|
32
|
+
*
|
|
33
|
+
* @deprecated This is no longer used.
|
|
32
34
|
*/
|
|
33
35
|
isStore: boolean;
|
|
34
36
|
/**
|
|
35
37
|
* Denotes that this search request should return search results
|
|
36
38
|
* that represent other Home search providers. If the user chooses to
|
|
37
39
|
* launch one of these apps, they should register a Home provider.
|
|
40
|
+
*
|
|
41
|
+
* @deprecated This is no longer used.
|
|
38
42
|
*/
|
|
39
43
|
isSearchEngines: boolean;
|
|
40
44
|
/**
|
|
@@ -57,6 +61,8 @@ export type CLISearchListenerResponse = SearchListenerResponse;
|
|
|
57
61
|
* Representation of a search response from a specific invocation of a {@link HomeProvider | HomeProvider's} `onUserInput` listener function.
|
|
58
62
|
* Can optionally be used to push search results to the Home UI.
|
|
59
63
|
*
|
|
64
|
+
* @example
|
|
65
|
+
*
|
|
60
66
|
* ```ts
|
|
61
67
|
* function onUserInput(req: HomeSearchListenerRequest, res: HomeSearchListenerResponse) {
|
|
62
68
|
* searchListenerResponse.open();
|
|
@@ -69,11 +75,18 @@ export type CLISearchListenerResponse = SearchListenerResponse;
|
|
|
69
75
|
* searchListenerRequest.onClose(() => {
|
|
70
76
|
* myLongRunningQuery.close();
|
|
71
77
|
* });
|
|
78
|
+
*
|
|
79
|
+
* // return any search results that are immediately available
|
|
80
|
+
* return quickQuery.getResults();
|
|
72
81
|
* }
|
|
73
82
|
* ```
|
|
74
83
|
*/
|
|
75
|
-
export type HomeSearchListenerResponse = Omit<CLISearchListenerResponse, 'respond'> & {
|
|
84
|
+
export type HomeSearchListenerResponse = Omit<CLISearchListenerResponse, 'respond' | 'updateContext'> & {
|
|
76
85
|
respond(results: HomeSearchResult[]): void;
|
|
86
|
+
/**
|
|
87
|
+
* Pushes a new context to the Home UI. This can be used to update the search filters
|
|
88
|
+
*/
|
|
89
|
+
updateContext(context: HomeSearchResponse['context']): void;
|
|
77
90
|
};
|
|
78
91
|
/**
|
|
79
92
|
* Enumerator for different types of actions that are built into the Home API.
|
|
@@ -390,9 +403,11 @@ export interface CLIProvider extends SearchProvider {
|
|
|
390
403
|
*
|
|
391
404
|
* <h3>Sample HomeProvider definition.</h3>
|
|
392
405
|
*
|
|
406
|
+
* @example **Sample HomeProvider definition.*
|
|
407
|
+
*
|
|
393
408
|
* Import required dependencies.
|
|
394
409
|
* ```ts
|
|
395
|
-
* import { Home, HomeProvider } from '@openfin/workspace';
|
|
410
|
+
* import { Home, type HomeProvider } from '@openfin/workspace';
|
|
396
411
|
* ```
|
|
397
412
|
*
|
|
398
413
|
* Create provider object to configure `Home`.
|
|
@@ -408,10 +423,11 @@ export interface CLIProvider extends SearchProvider {
|
|
|
408
423
|
* };
|
|
409
424
|
* ```
|
|
410
425
|
*
|
|
411
|
-
* Register home
|
|
426
|
+
* Register home `provider` object.
|
|
412
427
|
* ```ts
|
|
413
428
|
* await Home.register(provider);
|
|
414
429
|
* ```
|
|
430
|
+
*
|
|
415
431
|
* Show Home.
|
|
416
432
|
* ```ts
|
|
417
433
|
* await Home.show();
|
|
@@ -430,11 +446,19 @@ export type HomeDispatchedSearchResult = HomeSearchResult & DispatchedSearchResu
|
|
|
430
446
|
export interface HomeRegistration extends RegistrationMetaInfo {
|
|
431
447
|
/**
|
|
432
448
|
* Function to inject search string into home search
|
|
449
|
+
*
|
|
450
|
+
* @remarks Calling this will switch the active provider within Home to the provider that was registered with this HomeRegistration.
|
|
451
|
+
*
|
|
452
|
+
* @throws An error if the Home Provider is no longer registered.
|
|
453
|
+
*
|
|
433
454
|
* @param query search string
|
|
434
|
-
*
|
|
455
|
+
*
|
|
456
|
+
* @returns A promise that resolves when the search string has been injected into home search
|
|
457
|
+
*
|
|
458
|
+
* @example Injecting a search string into Home search
|
|
435
459
|
*
|
|
436
460
|
* ```ts
|
|
437
|
-
* import Home, CLIProvider from '@openfin/workspace';
|
|
461
|
+
* import { Home, type CLIProvider } from '@openfin/workspace';
|
|
438
462
|
*
|
|
439
463
|
* import { fetchMySearchResults } from "./my-fetch-implementation";
|
|
440
464
|
*
|
|
@@ -460,123 +484,10 @@ export interface HomeRegistration extends RegistrationMetaInfo {
|
|
|
460
484
|
* document.body.appendChild(searchButton);
|
|
461
485
|
*
|
|
462
486
|
* searchButton.addEventListener('click', () => {
|
|
463
|
-
* searchQueryMap.get('my-cli-provider')('my search string');
|
|
487
|
+
* searchQueryMap.get('my-cli-provider')?.('my search string');
|
|
464
488
|
* });
|
|
465
489
|
*
|
|
466
490
|
* ```
|
|
467
491
|
*/
|
|
468
492
|
setSearchQuery(query: string): Promise<void>;
|
|
469
493
|
}
|
|
470
|
-
/**
|
|
471
|
-
* Interface that contains functions for integrating with Home.
|
|
472
|
-
*/
|
|
473
|
-
export interface HomeAPI {
|
|
474
|
-
/**
|
|
475
|
-
* Register a provider that can return search results to Home.
|
|
476
|
-
*
|
|
477
|
-
* ```ts
|
|
478
|
-
* import { Home, CLIProvider } from "@openfin/workspace";
|
|
479
|
-
*
|
|
480
|
-
* import { fetchMySearchResults } from "./my-fetch-implementation";
|
|
481
|
-
*
|
|
482
|
-
* const myCLIProvider: CLIProvider = {
|
|
483
|
-
* id: "my-cli-provider",
|
|
484
|
-
* title: "My CLI Provider",
|
|
485
|
-
* icon: "https://google.com/favicon.ico",
|
|
486
|
-
* onUserInput: (req) => fetchMySearchResults(req.query)
|
|
487
|
-
* };
|
|
488
|
-
*
|
|
489
|
-
* const register = async () => {
|
|
490
|
-
* await Home.register(myCLIProvider);
|
|
491
|
-
* }
|
|
492
|
-
* ```
|
|
493
|
-
*
|
|
494
|
-
* @param provider the provider implementation.
|
|
495
|
-
*/
|
|
496
|
-
register(provider: HomeProvider | CLIProvider): Promise<HomeRegistration>;
|
|
497
|
-
/**
|
|
498
|
-
* Deregister a provider.
|
|
499
|
-
*
|
|
500
|
-
* ```ts
|
|
501
|
-
* import { Home , CLIProvider } from "@openfin/workspace";
|
|
502
|
-
*
|
|
503
|
-
* import { fetchMySearchResults } from "./my-fetch-implementation";
|
|
504
|
-
*
|
|
505
|
-
* const myCLIProvider: CLIProvider = {
|
|
506
|
-
* id: "my-cli-provider",
|
|
507
|
-
* title: "My CLI Provider",
|
|
508
|
-
* icon: "https://google.com/favicon.ico",
|
|
509
|
-
* onUserInput: (req) => fetchMySearchResults(req.query)
|
|
510
|
-
* };
|
|
511
|
-
*
|
|
512
|
-
* // Register and do some work with the provider
|
|
513
|
-
*
|
|
514
|
-
* const deregister = async () => {
|
|
515
|
-
* await Home.deregister("my-cli-provider");
|
|
516
|
-
* }
|
|
517
|
-
* ```
|
|
518
|
-
* @param providerId the name of the provider.
|
|
519
|
-
*/
|
|
520
|
-
deregister(providerId: string): Promise<void>;
|
|
521
|
-
/**
|
|
522
|
-
* Show the Home UI.
|
|
523
|
-
*
|
|
524
|
-
* ```ts
|
|
525
|
-
* import { Home } from './home'
|
|
526
|
-
*
|
|
527
|
-
* const show = async () => {
|
|
528
|
-
* await Home.show();
|
|
529
|
-
* // Do thing after show
|
|
530
|
-
* }
|
|
531
|
-
* ```
|
|
532
|
-
*/
|
|
533
|
-
show(): Promise<void>;
|
|
534
|
-
/**
|
|
535
|
-
* Hide the Home UI.
|
|
536
|
-
*
|
|
537
|
-
* ```ts
|
|
538
|
-
* import { Home } from './home'
|
|
539
|
-
*
|
|
540
|
-
* const hide = async () => {
|
|
541
|
-
* await Home.hide();
|
|
542
|
-
* // Do thing after hide
|
|
543
|
-
* }
|
|
544
|
-
* ```
|
|
545
|
-
*/
|
|
546
|
-
hide(): Promise<void>;
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Interface that contains functions that aid in recovering legacy features of Workspace.
|
|
550
|
-
*/
|
|
551
|
-
export interface LegacyAPI {
|
|
552
|
-
/**
|
|
553
|
-
* Get the pages that a user had saved in a legacy version of Workspace. (pre 5.0.0)
|
|
554
|
-
*
|
|
555
|
-
* ```ts
|
|
556
|
-
* import { Legacy } from "@openfin/workspace";
|
|
557
|
-
*
|
|
558
|
-
* async logPages() {
|
|
559
|
-
* const pages = await Legacy.getPages();
|
|
560
|
-
* console.log(pages);
|
|
561
|
-
* }
|
|
562
|
-
*
|
|
563
|
-
* logPages();
|
|
564
|
-
* ```
|
|
565
|
-
*/
|
|
566
|
-
getPages(): Promise<Page[]>;
|
|
567
|
-
/**
|
|
568
|
-
* Get the workspaces that a user had saved in a legacy version of Workspace. (pre 5.0.0)
|
|
569
|
-
*
|
|
570
|
-
* ```ts
|
|
571
|
-
* import { Legacy } from "@openfin/workspace";
|
|
572
|
-
*
|
|
573
|
-
* async logWorkspaces() {
|
|
574
|
-
* const workspaces = await Legacy.getWorkspaces();
|
|
575
|
-
* console.log(workspaces);
|
|
576
|
-
* }
|
|
577
|
-
*
|
|
578
|
-
* logWorkspaces();
|
|
579
|
-
* ```
|
|
580
|
-
*/
|
|
581
|
-
getWorkspaces(): Promise<Workspace[]>;
|
|
582
|
-
}
|
|
@@ -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
|
*
|
|
@@ -316,6 +318,8 @@ export type StorefrontDetailedNavigationItem = StorefrontNavigationItem & Storef
|
|
|
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 type StorefrontDetailedNavigationItem = StorefrontNavigationItem & Storef
|
|
|
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
|
}
|
|
@@ -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
|
* ```
|
|
@@ -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 = [{
|
|
@@ -5,6 +5,8 @@ export interface InternalSearchListenerResponse {
|
|
|
5
5
|
setResultBuffer(results: HomeSearchResult[]): void;
|
|
6
6
|
getRevokedBuffer(): string[];
|
|
7
7
|
setRevokedBuffer(resultIds: string[]): void;
|
|
8
|
+
getUpdatedContext(): any;
|
|
9
|
+
setUpdatedContext(context: any): void;
|
|
8
10
|
onChange(): void;
|
|
9
11
|
getStatus(): InternalSearchListenerResponseStatus;
|
|
10
12
|
res: HomeSearchListenerResponse;
|
|
@@ -6,8 +6,7 @@ export type WorkspaceComponentSetSelectedSchemePayload = {
|
|
|
6
6
|
identity: OpenFin.Identity;
|
|
7
7
|
};
|
|
8
8
|
export type BrowserSetSelectedSchemePayload = string;
|
|
9
|
-
export
|
|
10
|
-
}
|
|
9
|
+
export type ComputedThemes = ComputedTheme[];
|
|
11
10
|
export interface ComputedTheme {
|
|
12
11
|
label: string;
|
|
13
12
|
logoUrl?: string;
|
|
@@ -22,14 +21,27 @@ export interface CustomThemeOptions extends BaseThemeOptions {
|
|
|
22
21
|
palette: CustomPaletteSet;
|
|
23
22
|
}
|
|
24
23
|
export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
|
|
24
|
+
/**
|
|
25
|
+
* The default color scheme for this theme.
|
|
26
|
+
*
|
|
27
|
+
* This will be used as a fallback if the user has not yet selected a color scheme, or there was an error fetching the user's color scheme.
|
|
28
|
+
*
|
|
29
|
+
* @default 'dark'
|
|
30
|
+
*/
|
|
25
31
|
default?: 'light' | 'dark';
|
|
32
|
+
/**
|
|
33
|
+
* The palette for this theme.
|
|
34
|
+
*
|
|
35
|
+
* When a user selects a color scheme, the palette will be updated to match the selected scheme.
|
|
36
|
+
*
|
|
37
|
+
* If `system` is selected, the palette will be updated to match the user's system color scheme.
|
|
38
|
+
*/
|
|
26
39
|
palettes: {
|
|
27
40
|
light: CustomPaletteSet;
|
|
28
41
|
dark: CustomPaletteSet;
|
|
29
42
|
};
|
|
30
43
|
}
|
|
31
|
-
export
|
|
32
|
-
}
|
|
44
|
+
export type CustomThemes = (CustomThemeOptions | CustomThemeOptionsWithScheme)[];
|
|
33
45
|
export interface DefaultPaletteSet {
|
|
34
46
|
brandPrimary: string;
|
|
35
47
|
brandSecondary: string;
|