@openfin/workspace-platform 5.4.0 → 5.7.1

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 (33) hide show
  1. package/README.md +1 -1
  2. package/client-api/src/shapes.d.ts +279 -3
  3. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  4. package/client-api-platform/src/api/browser/browser-module.d.ts +3 -0
  5. package/client-api-platform/src/api/browser/index.d.ts +3 -2
  6. package/client-api-platform/src/api/context-menu/browser-logo-handler.d.ts +4 -0
  7. package/client-api-platform/src/api/context-menu/browser-viewtab-handler.d.ts +4 -0
  8. package/client-api-platform/src/api/context-menu/index.d.ts +10 -0
  9. package/client-api-platform/src/api/index.d.ts +4 -0
  10. package/client-api-platform/src/api/protocol.d.ts +5 -3
  11. package/client-api-platform/src/api/workspace-module.d.ts +1 -1
  12. package/client-api-platform/src/index.d.ts +2 -40
  13. package/client-api-platform/src/init/custom-actions.d.ts +3 -0
  14. package/client-api-platform/src/init/index.d.ts +35 -3
  15. package/client-api-platform/src/init/override-callback.d.ts +2 -1
  16. package/client-api-platform/src/init/utils.d.ts +5 -3
  17. package/client-api-platform/src/shapes.d.ts +233 -3
  18. package/common/src/api/browser-protocol.d.ts +21 -0
  19. package/common/src/api/pages/attached.d.ts +0 -1
  20. package/common/src/api/pages/legacy.d.ts +1 -1
  21. package/common/src/api/pages/shapes.d.ts +9 -0
  22. package/common/src/utils/context-menu.d.ts +12 -0
  23. package/common/src/utils/env.d.ts +6 -7
  24. package/common/src/utils/global-context-menu.d.ts +3 -0
  25. package/common/src/utils/landing-page.d.ts +11 -0
  26. package/common/src/utils/layout.d.ts +2 -1
  27. package/common/src/utils/merge-deep.d.ts +6 -0
  28. package/common/src/utils/strings.d.ts +0 -2
  29. package/common/src/utils/window.d.ts +1 -0
  30. package/index.js +1 -1
  31. package/index.js.map +1 -1
  32. package/package.json +1 -1
  33. package/search-api/src/shapes.d.ts +42 -0
package/README.md CHANGED
@@ -11,7 +11,7 @@ Run `npm i -E @openfin/workspace-platform`.
11
11
  ## Workspace Platform API documentation
12
12
 
13
13
  - [Overview](https://developers.openfin.co/of-docs/docs/workspace-sdk)
14
- - [API Reference](https://cdn.openfin.co/workspace/api/platform/docs/latest/index.html)
14
+ - [API Reference](https://cdn.openfin.co/workspace/docs/platform/latest/index.html)
15
15
  - [Example projects using Workspace Platform](https://github.com/built-on-openfin/workspace-starter)
16
16
 
17
17
  ## Code examples
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Use relative paths here rather than aliases which mess
3
- * up the packaged typing files
3
+ * up the packaged typing files. When writing code examples,
4
+ * for documentation, please use async/await syntax over .then()!
4
5
  */
5
6
  import type { Page } from '../../common/src/api/pages/shapes';
6
7
  import type { Workspace } from '../../common/src/api/workspaces';
@@ -9,7 +10,7 @@ export type { Action, DispatchedSearchResult, SearchListenerRequest, SearchListe
9
10
  export type { Workspace } from '../../common/src/api/workspaces';
10
11
  export type { LayoutExtended, LayoutContentExtended, LayoutSettingsExtended, LayoutContentItemExtended, LayoutComponentExtended, LayoutComponentStateExtended, LayoutStack } from '../../common/src/utils/layout';
11
12
  export type { Page, PageLayout, PageLayoutDetails } from '../../common/src/api/pages/shapes';
12
- export { SearchTagBackground } from '../../search-api/src/index';
13
+ export { SearchTagBackground } from '../../search-api/src/shapes';
13
14
  /**
14
15
  * Describes the type of the app directory entry `manifest` attributes.
15
16
  * Launch mechanics are determined by the manifest type.
@@ -241,22 +242,138 @@ export interface StorefrontProviderInfo {
241
242
  export interface StorefrontProvider extends StorefrontProviderInfo {
242
243
  /**
243
244
  * Get a list of apps to populate the platform's Storefront with.
245
+ *
246
+ * ```ts
247
+ *
248
+ * const app : App = {
249
+ * appId: 'uid'
250
+ * title: 'My App'
251
+ * manifest: `https://openfin-iex.experolabs.com/openfin/manifests/cash-flow.json`,
252
+ * icons: [
253
+ * {
254
+ * src: '/icon.png'
255
+ * }
256
+ * ],
257
+ * contactEmail: contact@email.com,
258
+ * supportEmail: support@email.com,
259
+ * publisher: 'My Publisher',
260
+ * tags: [],
261
+ * images: [],
262
+ * intents: []
263
+ * }
264
+ *
265
+ * const getApps = async (): Promise<App[]> => {
266
+ * return [app];
267
+ * }
268
+ * ```
244
269
  */
245
270
  getApps(): Promise<App[]>;
246
271
  /**
247
272
  * Get the main landing page for the platform's Storefront.
273
+ *
274
+ * ```ts
275
+ *
276
+ * const landingPage : StorefrontLandingPage = {
277
+ * hero: {
278
+ * title: 'My Landing Page',
279
+ * description: 'description',
280
+ * cta: navigationItems[0],
281
+ * image: {
282
+ * src: './images/image.png'
283
+ * }
284
+ * },
285
+ * topRow: {
286
+ * title: 'Top Row Title',
287
+ * items: //array of StorefrontNavigationItem
288
+ * },
289
+ * middleRow: {
290
+ * title: 'Middle Row Title',
291
+ * apps: //array of apps
292
+ * },
293
+ * bottomRow: {
294
+ * title: 'Bottom Row Title',
295
+ * items: //array of StorefrontNavigationItem
296
+ * }
297
+ * }
298
+ *
299
+ * const getLandingPage = async (): Promise<StorefrontLandingPage> => {
300
+ * return landingPage;
301
+ * }
302
+ *```
248
303
  */
249
304
  getLandingPage(): Promise<StorefrontLandingPage>;
250
305
  /**
251
306
  * Get the Storefront navigation sections for the left nav bar.
307
+ * ```ts
308
+ * const navigationSections: [StorefrontNavigationSection, StorefrontNavigationSection] = [
309
+ * {
310
+ * id: 'first id',
311
+ * title: 'title',
312
+ * items: //array of navigation items
313
+ * },
314
+ * {
315
+ * id: 'second id'
316
+ * title: 'title',
317
+ * items: //array of navigation items
318
+ * }
319
+ * ]
320
+ *
321
+ * const getNavigation = async (): Promise<[StorefrontNavigationSection, StorefrontNavigationSection]> => {
322
+ * return navigationSections;
323
+ * }
324
+ *```
252
325
  */
253
326
  getNavigation(): Promise<[StorefrontNavigationSection?, StorefrontNavigationSection?]>;
254
327
  /**
255
328
  * Get the footer for the platform's Storefront.
329
+ *
330
+ * ```ts
331
+ * const footer: StorefrontFooter = {
332
+ * logo: { src: './images/image', size: '32' },
333
+ * text: 'footer text',
334
+ * links: [
335
+ * { title:'title', url: 'https://openfin.co' },
336
+ * { title: 'title', url: 'https://openfin.co'}
337
+ * ]
338
+ * }
339
+ *
340
+ * const getFooter = async (): Promise<StorefrontFooter> => {
341
+ * return footer;
342
+ * }
343
+ * ```
256
344
  */
257
345
  getFooter(): Promise<StorefrontFooter>;
258
346
  /**
259
347
  * Launch an app provided by the platform's Storefront.
348
+ *
349
+ * ```ts
350
+ * import { getStorefrontProvider } from "./my-provider";
351
+ *
352
+ * //Grab your provider
353
+ * const myStoreFrontProvider: StorefrontProvider = getStorefrontProvider();
354
+ *
355
+ * const app : App = {
356
+ * appId: 'uid'
357
+ * title: 'My App'
358
+ * manifest: `https://openfin-iex.experolabs.com/openfin/manifests/cash-flow.json`,
359
+ * icons: [
360
+ * {
361
+ * src: './image.png'
362
+ * }
363
+ * ],
364
+ * contactEmail: contact@email.com,
365
+ * supportEmail: support@email.com,
366
+ * publisher: 'My Publisher',
367
+ * tags: [],
368
+ * images: [],
369
+ * intents: []
370
+ * }
371
+ *
372
+ * const launch = async () => {
373
+ * await myStorefrontProvider.launchApp(app);
374
+ * }
375
+ * ```
376
+ * @param app the app to launch.
260
377
  */
261
378
  launchApp(app: App): Promise<void>;
262
379
  }
@@ -270,12 +387,58 @@ export interface StorefrontAPI {
270
387
  * When a user selects your Storefront, the methods on the provider
271
388
  * object are called to populate the UI. Throws an error if a provider with
272
389
  * the same `id` already exists.
390
+ *
391
+ * ```ts
392
+ * import { Storefront, StorefrontProvider } from "@openfin/workspace";
393
+ *
394
+ * //Declare a provider
395
+ * const myStorefrontProvider: StorefrontProvider = {
396
+ * id: "my-storefront-id"
397
+ * title: "My StorefrontProvider"
398
+ * icon: "https://cdn.openfin.co/demos/notifications/generator/images/icon-blue.png",
399
+ * getApps: () => {...},
400
+ * getNavigation: () => {...},
401
+ * getLandingPage: () => {...},
402
+ * getFooter: () => {...},
403
+ * launchApp: () => {...}
404
+ * };
405
+ *
406
+ * const registerProvider = async () => {
407
+ * await Storefront.register(myStorefrontProvider);
408
+ * }
409
+ * ```
273
410
  * @param provider the implementation of a Storefront provider.
274
411
 
275
412
  */
276
413
  register(provider: StorefrontProvider): Promise<void>;
277
414
  /**
278
415
  * Deregister a provider.
416
+ *
417
+ * ```ts
418
+ * import { Storefront, StorefrontProvider } from "@openfin/workspace";
419
+ *
420
+ * //Instantiate a StorefrontProvider
421
+ * const myStorefrontProvider: StorefrontProvider = {
422
+ * id: "my-storefront-id"
423
+ * title: "My StoreFrontProvider"
424
+ * icon: "https://cdn.openfin.co/demos/notifications/generator/images/icon-blue.png",
425
+ * getApps: () => {...},
426
+ * getNavigation: () => {...},
427
+ * getLandingPage: () => {...},
428
+ * getFooter: () => {...},
429
+ * launchApp: () => {...}
430
+ * };
431
+ *
432
+ * const register = async () => {
433
+ * await Storefront.register(myStorefrontProvider);
434
+ * }
435
+ *
436
+ * //Do work with myStorefrontProvider
437
+ *
438
+ * const deregister = async () => {
439
+ * await Storefront.deregister("my-storefront-id");
440
+ * }
441
+ * ```
279
442
  * @param id the id of the provider.
280
443
  */
281
444
  deregister(id: string): Promise<void>;
@@ -283,12 +446,30 @@ export interface StorefrontAPI {
283
446
  * Shows the Storefront window. Awaits for the latest [[`Storefront.register()`]]
284
447
  * internally, so you don't have to. Throws an error if a [[StorefrontProvider]]
285
448
  * doesn't exist (i.e., because `register()` not called previously).
449
+ *
450
+ * ```ts
451
+ * import { Storefront } from "@openfin/workspace";
452
+ *
453
+ * const show = async () => {
454
+ * await Storefront.show();
455
+ * //Do thing after show
456
+ * }
457
+ * ```
286
458
  */
287
459
  show(): Promise<void>;
288
460
  /**
289
461
  * Hides the Storefront window. Awaits for the latest [[`Storefront.register()`]]
290
462
  * internally, so you don't have to. Throws an error if a [[StorefrontProvider]]
291
463
  * doesn't exist (i.e., because `register()` was not called previously).
464
+ *
465
+ * ```ts
466
+ * import { Storefront } from "@openfin/workspace";
467
+ *
468
+ * const hide = async () => {
469
+ * await Storefront.hidef();
470
+ * //Do thing after show
471
+ * }
472
+ * ```
292
473
  */
293
474
  hide(): Promise<void>;
294
475
  }
@@ -524,6 +705,20 @@ export declare type CLIDispatchedSearchResult = DispatchedSearchResult;
524
705
  export interface CLIProvider extends SearchProvider {
525
706
  /**
526
707
  * Function that is called when a search request is triggered due to user input.
708
+ *
709
+ * ```ts
710
+ *
711
+ * import { getAllData, getResultsByQuery } from './get-all-data';
712
+ *
713
+ * const onUserInput = async({ query }): Promise<CLISearchResponse> => {
714
+ * if (!query) {
715
+ * return getAllData();
716
+ * }
717
+ *
718
+ * // Provide an implmentation to fetch query-filtered search results
719
+ * return getResultsByQuery(query);
720
+ * }
721
+ * ```
527
722
  * @param req describes search request.
528
723
  * @param res can be used to stream search results back to the requesting Workspace component.
529
724
  * @returns an object that contains the search results to render in the requesting Workspace component.
@@ -532,6 +727,26 @@ export interface CLIProvider extends SearchProvider {
532
727
  /**
533
728
  * Callback that is invoked when ever a search result returned by this provider
534
729
  * is interacted with from a Workspace component. (clicked, pressed enter, hotkey pressed, etc.)
730
+ *
731
+ *
732
+ * ```ts
733
+ * import { getAvailableCommands } from './my-commands';
734
+ *
735
+ * const onResultDispatch = async(result: CLIDispatchedSearchResult): Promise<void> => {
736
+ * try {
737
+ * //Grab the command corresponding to the result
738
+ * const availableCommands = await getAvailableCommands();
739
+ * const commandToExecute = availableCommands.find((command) => command.key === result.key);
740
+ *
741
+ * if (commantToExecute != undefined) {
742
+ * await commandToExecute.action();
743
+ * }
744
+ * } catch (err) {
745
+ * //Handle the error
746
+ * log.error('Error trying to action show command %s', err, result.key);
747
+ * }
748
+ * }
749
+ *```
535
750
  * @param result the search result with the action that was selected by the user.
536
751
  */
537
752
  onResultDispatch?(result: CLIDispatchedSearchResult): Promise<void>;
@@ -562,7 +777,9 @@ export interface HomeAPI {
562
777
  * onUserInput: (req) => fetchMySearchResults(req.query)
563
778
  * };
564
779
  *
565
- * Home.register(myCLIProvider);
780
+ * const register = async () => {
781
+ * await Home.register(myCLIProvider);
782
+ * }
566
783
  * ```
567
784
  *
568
785
  * @param provider the provider implementation.
@@ -570,15 +787,52 @@ export interface HomeAPI {
570
787
  register(provider: HomeProvider | CLIProvider): Promise<void>;
571
788
  /**
572
789
  * Deregister a provider.
790
+ *
791
+ * ```ts
792
+ * import { Home , CLIProvider } from "@openfin/workspace";
793
+ *
794
+ * import { fetchMySearchResults } from "./my-fetch-implementation";
795
+ *
796
+ * const myCLIProvider: CLIProvider = {
797
+ * name: "my-cli-provider",
798
+ * title: "My CLI Provider",
799
+ * icon: "https://google.com/favicon.ico",
800
+ * onUserInput: (req) => fetchMySearchResults(req.query)
801
+ * };
802
+ *
803
+ * // Register and do some work with the provider
804
+ *
805
+ * const deregister = async () => {
806
+ * await Home.deregister("my-cli-provider");
807
+ * }
808
+ * ```
573
809
  * @param providerId the name of the provider.
574
810
  */
575
811
  deregister(providerId: string): Promise<void>;
576
812
  /**
577
813
  * Show the Home UI.
814
+ *
815
+ * ```ts
816
+ * import { Home } from './home'
817
+ *
818
+ * const show = async () => {
819
+ * await Home.show();
820
+ * // Do thing after show
821
+ * }
822
+ * ```
578
823
  */
579
824
  show(): Promise<void>;
580
825
  /**
581
826
  * Hide the Home UI.
827
+ *
828
+ * ```ts
829
+ * import { Home } from './home'
830
+ *
831
+ * const hide = async () => {
832
+ * await Home.hide();
833
+ * // Do thing after hide
834
+ * }
835
+ * ```
582
836
  */
583
837
  hide(): Promise<void>;
584
838
  }
@@ -588,10 +842,32 @@ export interface HomeAPI {
588
842
  export interface LegacyAPI {
589
843
  /**
590
844
  * Get the pages that a user had saved in a legacy version of Workspace. (pre 5.0.0)
845
+ *
846
+ * ```ts
847
+ * import { Legacy } from "@openfin/workspace";
848
+ *
849
+ * async logPages() {
850
+ * const pages = await Legacy.getPages();
851
+ * console.log(pages);
852
+ * }
853
+ *
854
+ * logPages();
855
+ * ```
591
856
  */
592
857
  getPages(): Promise<Page[]>;
593
858
  /**
594
859
  * Get the workspaces that a user had saved in a legacy version of Workspace. (pre 5.0.0)
860
+ *
861
+ * ```ts
862
+ * import { Legacy } from "@openfin/workspace";
863
+ *
864
+ * async logWorkspaces() {
865
+ * const workspaces = await Legacy.getWorkspaces();
866
+ * console.log(workspaces);
867
+ * }
868
+ *
869
+ * logWorkspaces();
870
+ * ```
595
871
  */
596
872
  getWorkspaces(): Promise<Workspace[]>;
597
873
  }
@@ -4,4 +4,4 @@ import type { LaunchAppRequest } from '../shapes';
4
4
  * @param app the app directory entry.
5
5
  * @param opts launch options.
6
6
  */
7
- export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | import("openfin-adapter").View | import("openfin-adapter").Application | import("openfin-adapter/src/api/platform").Platform | import("openfin-adapter").Identity>;
7
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | import("openfin-adapter/src/api/platform").Platform | import("openfin-adapter").View | import("openfin-adapter").Application | import("openfin-adapter").Identity>;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="openfin-adapter/fin" />
2
2
  import type { AttachedPage, Page, PageWithUpdatableRuntimeAttribs } from '../../../../common/src/api/pages/shapes';
3
+ import { OpenGlobalContextMenuRequest, OpenViewTabContextMenuRequest } from '../../../../client-api-platform/src/shapes';
3
4
  export declare const getBrowserModule: (identity: OpenFin.Identity) => {
4
5
  identity: OpenFin.Identity;
5
6
  openfinWindow: import("openfin-adapter").Window;
@@ -10,4 +11,6 @@ export declare const getBrowserModule: (identity: OpenFin.Identity) => {
10
11
  setActivePage: (id: Page['pageId']) => Promise<void>;
11
12
  updatePage: (req: any) => Promise<any>;
12
13
  reorderPages: (req: any) => Promise<any>;
14
+ _openGlobalContextMenu: (req: OpenGlobalContextMenuRequest) => Promise<any>;
15
+ _openViewTabContextMenu: (req: OpenViewTabContextMenuRequest) => Promise<any>;
13
16
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="openfin-adapter/fin" />
2
- import type { AttachedPage, Page } from '../../../../common/src/api/pages/shapes';
2
+ import type { AttachedPage } from '../../../../common/src/api/pages/shapes';
3
3
  import type { BrowserCreateWindowRequest, BrowserWindowModule } from '../../shapes';
4
4
  export declare const getBrowserApi: (identity: OpenFin.ApplicationIdentity) => {
5
5
  wrapSync: (windowIdentity: OpenFin.Identity) => {
@@ -12,11 +12,12 @@ export declare const getBrowserApi: (identity: OpenFin.ApplicationIdentity) => {
12
12
  setActivePage: (id: string) => Promise<void>;
13
13
  updatePage: (req: any) => Promise<any>;
14
14
  reorderPages: (req: any) => Promise<any>;
15
+ _openGlobalContextMenu: (req: import("../../shapes").OpenGlobalContextMenuRequest) => Promise<any>;
16
+ _openViewTabContextMenu: (req: import("../../shapes").OpenViewTabContextMenuRequest) => Promise<any>;
15
17
  };
16
18
  createWindow: (options: BrowserCreateWindowRequest) => Promise<BrowserWindowModule>;
17
19
  getAllAttachedPages: () => Promise<AttachedPage[]>;
18
20
  getAllWindows: () => Promise<BrowserWindowModule[]>;
19
- launchPage: (page: Page) => Promise<BrowserWindowModule>;
20
21
  getUniquePageTitle: (title?: string) => Promise<any>;
21
22
  getLastFocusedWindow: () => Promise<any>;
22
23
  };
@@ -0,0 +1,4 @@
1
+ import { NamedIdentity } from 'openfin-adapter/src/identity';
2
+ import { GlobalContextMenuItemData } from '../../shapes';
3
+ declare const handler: (winIdentity: NamedIdentity, data: GlobalContextMenuItemData) => Promise<void>;
4
+ export default handler;
@@ -0,0 +1,4 @@
1
+ import { NamedIdentity } from 'openfin-adapter/src/identity';
2
+ import { OpenViewTabContextMenuPayload, ViewTabMenuData } from '../../../../client-api-platform/src/index';
3
+ declare const handler: (winIdentity: NamedIdentity, data: ViewTabMenuData, payload: OpenViewTabContextMenuPayload) => Promise<void>;
4
+ export default handler;
@@ -0,0 +1,10 @@
1
+ import { NamedIdentity } from 'openfin-adapter/src/identity';
2
+ import { OpenGlobalContextMenuPayload, OpenGlobalContextMenuRequest, OpenViewTabContextMenuPayload, OpenViewTabContextMenuRequest } from '../../../../client-api-platform/src/shapes';
3
+ export declare function openGlobalContextMenuInternal(payload: OpenGlobalContextMenuRequest & {
4
+ identity: NamedIdentity;
5
+ }, callerIdentity: any): Promise<void>;
6
+ export declare const openGlobalContextMenu: (payload: OpenGlobalContextMenuPayload, callerIdentity: any) => Promise<void>;
7
+ export declare function openViewTabContextMenuInternal(payload: OpenViewTabContextMenuRequest & {
8
+ identity: NamedIdentity;
9
+ }, callerIdentity: any): Promise<void>;
10
+ export declare const openViewTabContextMenu: (payload: OpenViewTabContextMenuPayload, callerIdentity: any) => Promise<void>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="openfin-adapter/fin" />
2
+ import { WorkspacePlatformModule } from '../shapes';
3
+ export declare const wrapSync: (identity: OpenFin.ApplicationIdentity) => WorkspacePlatformModule;
4
+ export declare const getCurrentSync: () => WorkspacePlatformModule;
@@ -4,7 +4,7 @@
4
4
  * a Workspace Platform's address space.
5
5
  *
6
6
  * When adding a new channel action make sure to add a function that's name matches
7
- * the value of the enum for the remote procedure in the Workspace Platform overrides.
7
+ * the value of the enum for the remote procedure in the Workspace Platform overrides and the override-callback.
8
8
  * All of the registered channel action handlers can be found here in the platform's overrides:
9
9
  * @see link: [Provider Protocol Handlers](https://github.com/openfin/workspace/client-api-platform/src/init/override-callback.ts)
10
10
  */
@@ -20,7 +20,6 @@ export declare enum ChannelAction {
20
20
  UpdateSavedPageInternal = "updateSavedPageInternal",
21
21
  DeleteSavedPageInternal = "deleteSavedPageInternal",
22
22
  SharePage = "sharePage",
23
- LaunchPage = "launchPage",
24
23
  UpdatePageForWindow = "updatePageForWindow",
25
24
  AttachPagesToWindow = "attachPagesToWindow",
26
25
  DetachPagesFromWindow = "detachPagesFromWindow",
@@ -33,7 +32,10 @@ export declare enum ChannelAction {
33
32
  GetSavedPageMetadata = "getSavedPageMetadata",
34
33
  GetUniquePageTitle = "getUniquePageTitle",
35
34
  GetLastFocusedBrowserWindow = "getLastFocusedBrowserWindow",
36
- GetThemes = "getThemes"
35
+ GetThemes = "getThemes",
36
+ OpenGlobalContextMenuInternal = "openGlobalContextMenuInternal",
37
+ InvokeCustomActionInternal = "invokeCustomActionInternal",
38
+ OpenViewTabContextMenuInternal = "openViewTabContextMenuInternal"
37
39
  }
38
40
  /**
39
41
  * Get a channel client for a specific Workspace platform.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="openfin-adapter/fin" />
2
- import type { WorkspacePlatformModule } from '../shapes';
2
+ import { WorkspacePlatformModule } from '../shapes';
3
3
  export declare const getWorkspacePlatformModule: (identity: OpenFin.ApplicationIdentity) => WorkspacePlatformModule;
@@ -1,41 +1,3 @@
1
- /// <reference types="openfin-adapter/fin" />
2
- import type { WorkspacePlatformInitConfig, WorkspacePlatformModule } from './shapes';
3
1
  export * from './shapes';
4
- /**
5
- * Initilaize a Workspace Platform.
6
- *
7
- * ```ts
8
- * import * as WorkspacePlatform from '@openfin/workspace-platform';
9
- *
10
- * const customThemes: WorkspacePlatform.CustomThemes = [{
11
- * label: "OpenFin's Custom Theme",
12
- * palette: {
13
- * // Required color options
14
- * brandPrimary: '#F51F63',
15
- * brandSecondary: '#1FF58A',
16
- * backgroundPrimary: '#F8E71C', // hex, rgb/rgba, hsl/hsla only - no string colors: 'red'
17
- * }
18
- * }
19
- *
20
- * const overrideCallback: WorkspacePlatform.BrowserOverrideCallback = async (
21
- * WorkspacePlatformProvider
22
- * ) => {
23
- * class Override extends WorkspacePlatformProvider {
24
- * async quit(payload, callerIdentity) {
25
- * return super.quit(payload, callerIdentity);
26
- * }
27
- * }
28
- * return new Override();
29
- * };
30
- *
31
- *
32
- * await WorkspacePlatform.init({
33
- * browser: { overrideCallback },
34
- * theme: customThemes
35
- * });
36
- * ```
37
- * @param options options for configuring the platform.
38
- */
39
- export declare const init: (options: WorkspacePlatformInitConfig) => Promise<void>;
40
- export declare const wrapSync: (identity: OpenFin.ApplicationIdentity) => WorkspacePlatformModule;
41
- export declare const getCurrentSync: () => WorkspacePlatformModule;
2
+ export { init } from './init';
3
+ export { getCurrentSync, wrapSync } from './api';
@@ -0,0 +1,3 @@
1
+ import { CustomActionsMap, InvokeCustomActionRequest } from '..';
2
+ export declare const initCustomActions: (actions: CustomActionsMap) => void;
3
+ export declare const invokeCustomActionInternal: ({ actionId, payload }: InvokeCustomActionRequest) => any;
@@ -1,5 +1,37 @@
1
- import { BrowserInitConfig } from '../shapes';
1
+ import type { WorkspacePlatformInitConfig } from '../shapes';
2
2
  /**
3
- * Initializing the Workspace Platform.
3
+ * Initilaize a Workspace Platform.
4
+ *
5
+ * ```ts
6
+ * import * as WorkspacePlatform from '@openfin/workspace-platform';
7
+ *
8
+ * const customThemes: WorkspacePlatform.CustomThemes = [{
9
+ * label: "OpenFin's Custom Theme",
10
+ * palette: {
11
+ * // Required color options
12
+ * brandPrimary: '#F51F63',
13
+ * brandSecondary: '#1FF58A',
14
+ * backgroundPrimary: '#F8E71C', // hex, rgb/rgba, hsl/hsla only - no string colors: 'red'
15
+ * }
16
+ * }
17
+ *
18
+ * const overrideCallback: WorkspacePlatform.BrowserOverrideCallback = async (
19
+ * WorkspacePlatformProvider
20
+ * ) => {
21
+ * class Override extends WorkspacePlatformProvider {
22
+ * async quit(payload, callerIdentity) {
23
+ * return super.quit(payload, callerIdentity);
24
+ * }
25
+ * }
26
+ * return new Override();
27
+ * };
28
+ *
29
+ *
30
+ * await WorkspacePlatform.init({
31
+ * browser: { overrideCallback },
32
+ * theme: customThemes
33
+ * });
34
+ * ```
35
+ * @param options options for configuring the platform.
4
36
  */
5
- export default function init(options: BrowserInitConfig): Promise<void>;
37
+ export declare const init: (options: WorkspacePlatformInitConfig) => Promise<void>;
@@ -1,3 +1,4 @@
1
1
  /// <reference types="openfin-adapter/fin" />
2
2
  import type { BrowserInitConfig } from '../../../client-api-platform/src/shapes';
3
- export declare const getOverrideCallback: (initOptions: BrowserInitConfig) => OpenFin.OverrideCallback<OpenFin.PlatformProvider>;
3
+ import { WorkspacePlatformProvider } from '..';
4
+ export declare const getOverrideCallback: (initOptions: BrowserInitConfig) => OpenFin.OverrideCallback<WorkspacePlatformProvider>;
@@ -1,7 +1,8 @@
1
1
  /// <reference types="openfin-adapter/fin" />
2
2
  import { Identity } from 'openfin-adapter';
3
- import { BrowserCreateWindowRequest } from '..';
4
- export declare function overrideViewOptions(options: Partial<OpenFin.ViewOptions>, initOptions: OpenFin.ViewOptions): OpenFin.ViewOptions & Partial<OpenFin.ViewOptions>;
3
+ import type { CustomThemeOptions } from '../../../common/src/api/theming';
4
+ import { BrowserCreateWindowRequest, BrowserInitConfig } from '..';
5
+ export declare function overrideViewOptions(options: Partial<OpenFin.ViewOptions>, initOptions: OpenFin.ViewOptions): any;
5
6
  export declare function preserveInteropIfManifestConflict(opts: Partial<OpenFin.ViewOptions>, fetchManifest: ({ manifestUrl: string }: {
6
7
  manifestUrl: any;
7
8
  }, callerIdentity: Identity) => any, callerIdentity: Identity): Promise<any>;
@@ -40,5 +41,6 @@ export declare const initWorkspacePlatformOptions: (options: LegacyWindowOptions
40
41
  * @param options - options used to handle layout settings
41
42
  * @returns processed or unprocesseed options
42
43
  */
43
- export declare const applyBrowserDefaults: (options: OpenFin.PlatformWindowCreationOptions, initOptions: BrowserCreateWindowRequest) => OpenFin.PlatformWindowCreationOptions;
44
+ export declare const applyBrowserDefaults: (options: OpenFin.PlatformWindowCreationOptions, initOptions: BrowserCreateWindowRequest, theme: CustomThemeOptions) => OpenFin.PlatformWindowCreationOptions;
45
+ export declare const applyPageDefaults: (pages: OpenFin.Page[], defaultPageOptions?: BrowserInitConfig['defaultPageOptions']) => OpenFin.Page[];
44
46
  export {};