@openfin/workspace-platform 23.0.18 → 23.1.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.
@@ -1,5 +1,5 @@
1
1
  import type { ContentMenuEntry } from '@openfin/ui-library';
2
- import { DockCompanionButton, DockEntry, LaunchDockEntryPayload, Collection } from '../../../client-api-platform/src/shapes';
2
+ import { Collection, DockCompanionButton, DockEntry, LaunchDockEntryPayload } from '../../../client-api-platform/src/shapes';
3
3
  export declare const DockCompanionUpdatesPrefix = "dock-companion-updates";
4
4
  export declare const refreshDockBookmarksPanel: () => Promise<void>;
5
5
  export declare const updateDockFavoriteEntries: (favorites: DockEntry[]) => Promise<void>;
@@ -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>): Promise<any>;
7
+ export declare function applyViewDefaults(options: Partial<OpenFin.ViewOptions>, initViewOptions?: Partial<OpenFin.ViewOptions>): any;
8
8
  export {};
@@ -23,10 +23,3 @@ 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,13 +61,6 @@ 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>;
71
64
  /**
72
65
  * Copies the componentState and generates a name if it's not there
73
66
  * @param componentState view's componentState in the layout object, corresponds to View options
@@ -87,9 +80,9 @@ export declare const generateViewNameAndIdentifierNameIfNotExists: <T extends {
87
80
  /**
88
81
  * Deep clones a layout and converts view options (add names if necessary, apply defaults).
89
82
  * @param layout The Layout to be cloned
90
- * @returns A Promise resolving to a copy of the layout with view options converted
83
+ * @returns A copy of the layout with view options converted
91
84
  */
92
- export declare const cloneLayoutAndConvertViewOptions: (layout: PageLayout, initViewOptions?: Partial<OpenFin.ViewOptions>) => Promise<PageLayout>;
85
+ export declare const cloneLayoutAndConvertViewOptions: (layout: PageLayout, initViewOptions?: Partial<OpenFin.ViewOptions>) => any;
93
86
  export declare const cloneViewComponentWithoutName: (componentState: any) => any;
94
87
  /**
95
88
  * Deep clones a layout and removes view names.
@@ -1,6 +1,80 @@
1
+ /**
2
+ * Logger Utility for OpenFin Workspace Monorepo
3
+ *
4
+ * Provides structured, contextual logging with consistent formatting
5
+ * across all workspaces and modules.
6
+ */
7
+ export interface LogData {
8
+ [key: string]: any;
9
+ }
10
+ export interface Logger {
11
+ debug: (method: string, message: string, data?: LogData | (() => LogData)) => void;
12
+ info: (method: string, message: string, data?: LogData | (() => LogData)) => void;
13
+ warn: (method: string, message: string, data?: LogData | (() => LogData)) => void;
14
+ error: (method: string, message: string, data?: LogData | (() => LogData)) => void;
15
+ }
16
+ /**
17
+ * Configuration for the logger
18
+ */
19
+ export interface LoggerConfig {
20
+ /** Include timestamp in logs (default: true) */
21
+ includeTimestamp?: boolean;
22
+ /** Custom prefix for logs */
23
+ customPrefix?: string;
24
+ }
25
+ /**
26
+ * Create a structured logger for a specific context
27
+ *
28
+ * @param context - The context identifier (workspace, module, or component name)
29
+ * @param config - Optional configuration for the logger
30
+ * @returns Enhanced logger instance
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * const logger = createLogger('browser.TabList');
35
+ *
36
+ * logger.info('addTab', 'Adding new tab', { pageId: '123' });
37
+ * logger.error('addTab', 'Failed to add tab', { error: err.message });
38
+ * ```
39
+ */
40
+ export declare const createLogger: (context: string, config?: LoggerConfig) => Logger;
41
+ /**
42
+ * Create a logger with performance monitoring capabilities
43
+ * Useful for tracking execution times and performance metrics
44
+ */
45
+ export declare const createPerformanceLogger: (context: string, config?: LoggerConfig) => {
46
+ /**
47
+ * Start a performance timer
48
+ */
49
+ startTimer: (timerId: string, method: string, message: string, data?: LogData) => void;
50
+ /**
51
+ * Clear a specific timer without logging
52
+ */
53
+ clearTimer: (timerId: string) => void;
54
+ /**
55
+ * End a performance timer and log the duration
56
+ */
57
+ endTimer: (timerId: string, method: string, message: string, data?: LogData) => void;
58
+ debug: (method: string, message: string, data?: LogData | (() => LogData)) => void;
59
+ info: (method: string, message: string, data?: LogData | (() => LogData)) => void;
60
+ warn: (method: string, message: string, data?: LogData | (() => LogData)) => void;
61
+ error: (method: string, message: string, data?: LogData | (() => LogData)) => void;
62
+ };
63
+ export type EnhancedLogger = ReturnType<typeof createPerformanceLogger>;
64
+ /**
65
+ * Middleware function for wrapping async operations with logging
66
+ */
67
+ export declare const withLogging: <T extends any[], R>(logger: Logger, method: string, operation: (...args: T) => Promise<R> | R) => (...args: T) => Promise<R>;
68
+ /**
69
+ * Legacy logger instance for backwards compatibility.
70
+ * Use `createLogger` for new code to get structured, contextual logging.
71
+ *
72
+ * @deprecated Use createLogger() instead for new code
73
+ */
1
74
  export declare const log: {
2
75
  /**
3
- * Calls console.debug with provided parameters and stringifies JS objects prior to logging
76
+ * Calls console.debug with provided parameters and stringifies JS objects prior to logging.
77
+ * Only logs when LOG_DEBUG is enabled.
4
78
  */
5
79
  debug: (...args: unknown[]) => void;
6
80
  /**
@@ -7,6 +7,8 @@ type MenuEventTypes = {
7
7
  'update': [string, Partial<OpenFin.Bounds>, string];
8
8
  'modal-opened': [string];
9
9
  'modal-closed': [string];
10
+ 'search-menu-opening': [string];
11
+ 'search-menu-closed': [string];
10
12
  };
11
13
  export interface ModalResponseEvent {
12
14
  data: {
@@ -38,18 +38,18 @@
38
38
  }
39
39
  ],
40
40
  "dexie": [
41
- {
42
- "type": "explicit",
43
- "version": "^4.0.11",
44
- "packageName": "client-api-platform/package.json",
45
- "issuer": "client-api-platform/src/api/dock/idb.ts"
46
- },
47
41
  {
48
42
  "type": "root-implicit",
49
43
  "version": "^4.0.11",
50
44
  "packageName": "dock3/package.json",
51
45
  "issuer": "dock3/src/api/idb.ts"
52
46
  },
47
+ {
48
+ "type": "explicit",
49
+ "version": "^4.0.11",
50
+ "packageName": "client-api-platform/package.json",
51
+ "issuer": "client-api-platform/src/api/dock/idb.ts"
52
+ },
53
53
  {
54
54
  "type": "root-implicit",
55
55
  "version": "^4.0.11",