@openfin/workspace-platform 23.0.16 → 23.0.18

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.
@@ -7,7 +7,7 @@ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site }
7
7
  * @param app the app directory entry.
8
8
  * @param opts launch options.
9
9
  */
10
- export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.Application | OpenFin.View | OpenFin.Platform>;
10
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.View | OpenFin.Platform | OpenFin.Application>;
11
11
  export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
12
12
  export declare function getResults(payload: {
13
13
  req: SearchSitesRequest;
@@ -4,5 +4,5 @@ type DefaultViewOptions = Partial<OpenFin.MutableViewOptions> & {
4
4
  hotkeys?: OpenFin.ViewOptions['hotkeys'];
5
5
  };
6
6
  export declare const DEFAULT_VIEW_OPTIONS: DefaultViewOptions;
7
- export declare function applyViewDefaults(options: Partial<OpenFin.ViewOptions>, initViewOptions?: Partial<OpenFin.ViewOptions>): any;
7
+ export declare function applyViewDefaults(options: Partial<OpenFin.ViewOptions>, initViewOptions?: Partial<OpenFin.ViewOptions>): Promise<any>;
8
8
  export {};
@@ -23,3 +23,10 @@ export type ApplicationInfoExtended = OpenFin.ApplicationInfo & {
23
23
  };
24
24
  export declare const getCurrentOFApplication: () => OpenFin.Application;
25
25
  export declare const getWorkspaceOFApplication: () => OpenFin.Application;
26
+ /**
27
+ * Gets the application manifest, caching the result after the first call.
28
+ * The manifest never changes during the application lifecycle, so this avoids redundant async calls.
29
+ * Uses promise-based caching to prevent race conditions when multiple calls occur before the first completes.
30
+ * @returns A Promise resolving to the application manifest
31
+ */
32
+ export declare const getCachedManifest: () => Promise<OpenFin.Manifest>;
@@ -61,6 +61,13 @@ export declare const getFirstActiveViewFromLayout: (identity: OpenFin.LayoutIden
61
61
  * @returns A mapped copy of the layout
62
62
  */
63
63
  export declare const mapLayoutViewComponents: (node: any, callback: (arg0: any) => any) => any;
64
+ /**
65
+ * Recursively clones a layout object, calling a passed async callback on each `componentState` in the tree.
66
+ * @param node Either the layout object itself, or one of the items in its tree.
67
+ * @param callback Async callback to be called on each component's `componentState`
68
+ * @returns A Promise resolving to a mapped copy of the layout
69
+ */
70
+ export declare const mapLayoutViewComponentsAsync: (node: any, callback: (arg0: any) => Promise<any>) => Promise<any>;
64
71
  /**
65
72
  * Copies the componentState and generates a name if it's not there
66
73
  * @param componentState view's componentState in the layout object, corresponds to View options
@@ -80,9 +87,9 @@ export declare const generateViewNameAndIdentifierNameIfNotExists: <T extends {
80
87
  /**
81
88
  * Deep clones a layout and converts view options (add names if necessary, apply defaults).
82
89
  * @param layout The Layout to be cloned
83
- * @returns A copy of the layout with view options converted
90
+ * @returns A Promise resolving to a copy of the layout with view options converted
84
91
  */
85
- export declare const cloneLayoutAndConvertViewOptions: (layout: PageLayout, initViewOptions?: Partial<OpenFin.ViewOptions>) => any;
92
+ export declare const cloneLayoutAndConvertViewOptions: (layout: PageLayout, initViewOptions?: Partial<OpenFin.ViewOptions>) => Promise<PageLayout>;
86
93
  export declare const cloneViewComponentWithoutName: (componentState: any) => any;
87
94
  /**
88
95
  * Deep clones a layout and removes view names.