@xh/hoist 76.0.0-SNAPSHOT.1758150416326 → 76.0.0-SNAPSHOT.1758209096583

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 (57) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/admin/tabs/userData/roles/graph/RoleGraph.ts +1 -2
  3. package/build/types/core/XH.d.ts +0 -13
  4. package/build/types/utils/js/LangUtils.d.ts +2 -2
  5. package/build/types/utils/{log → js}/LogUtils.d.ts +2 -29
  6. package/build/types/utils/js/index.d.ts +1 -0
  7. package/cmp/ag-grid/AgGrid.ts +1 -1
  8. package/cmp/chart/Chart.ts +1 -2
  9. package/cmp/chart/impl/ChartContextMenuItems.ts +1 -1
  10. package/cmp/grid/columns/Column.ts +1 -2
  11. package/cmp/grid/helpers/GridCountLabel.ts +1 -2
  12. package/cmp/grid/impl/ColumnWidthCalculator.ts +1 -2
  13. package/cmp/grid/impl/Utils.ts +1 -2
  14. package/cmp/relativetimestamp/RelativeTimestamp.ts +1 -2
  15. package/cmp/treemap/TreeMap.ts +1 -2
  16. package/core/HoistBase.ts +3 -2
  17. package/core/HoistBaseDecorators.ts +1 -2
  18. package/core/HoistComponent.ts +6 -9
  19. package/core/XH.ts +0 -19
  20. package/core/exception/ExceptionHandler.ts +2 -3
  21. package/core/load/LoadSupport.ts +2 -3
  22. package/core/persist/PersistenceProvider.ts +1 -2
  23. package/data/filter/Utils.ts +1 -2
  24. package/data/impl/RecordSet.ts +1 -2
  25. package/desktop/cmp/button/grid/ColAutosizeButton.ts +1 -2
  26. package/desktop/cmp/button/grid/ColChooserButton.ts +1 -2
  27. package/desktop/cmp/button/grid/ExpandToLevelButton.ts +1 -2
  28. package/desktop/cmp/button/grid/ExportButton.ts +1 -2
  29. package/desktop/cmp/button/panel/ModalToggleButton.ts +1 -2
  30. package/desktop/cmp/button/zoneGrid/ZoneMapperButton.ts +1 -2
  31. package/desktop/cmp/dash/container/impl/DashContainerUtils.ts +3 -4
  32. package/desktop/cmp/form/FormField.ts +1 -2
  33. package/desktop/cmp/grid/editors/BooleanEditor.ts +1 -1
  34. package/desktop/cmp/panel/Panel.ts +1 -1
  35. package/desktop/hooks/UseContextMenu.ts +1 -1
  36. package/inspector/instances/InstancesModel.ts +2 -2
  37. package/kit/ag-grid/index.ts +1 -2
  38. package/kit/highcharts/index.ts +1 -2
  39. package/mobile/cmp/button/grid/ColAutosizeButton.ts +1 -2
  40. package/mobile/cmp/button/grid/ColChooserButton.ts +1 -2
  41. package/mobile/cmp/button/grid/ExpandCollapseButton.ts +1 -2
  42. package/mobile/cmp/button/grid/ExpandToLevelButton.ts +1 -2
  43. package/mobile/cmp/button/zoneGrid/ZoneMapperButton.ts +1 -2
  44. package/mobile/cmp/panel/Panel.ts +1 -1
  45. package/mobx/overrides.ts +1 -1
  46. package/package.json +1 -1
  47. package/security/BaseOAuthClient.ts +1 -2
  48. package/security/msal/MsalClient.ts +1 -2
  49. package/svc/FetchService.ts +1 -1
  50. package/tsconfig.tsbuildinfo +1 -1
  51. package/utils/async/Timer.ts +1 -2
  52. package/utils/js/Decorators.ts +1 -1
  53. package/utils/js/LangUtils.ts +3 -3
  54. package/utils/{log → js}/LogUtils.ts +12 -74
  55. package/utils/js/index.ts +1 -0
  56. package/build/types/utils/log/index.d.ts +0 -1
  57. package/utils/log/index.ts +0 -8
package/CHANGELOG.md CHANGED
@@ -36,10 +36,6 @@
36
36
 
37
37
  ### ⚙️ Technical
38
38
 
39
- * Added `XH.logLevel` to define a minimum logging severity threshold for Hoist's client-side logging
40
- utilities. Defaulted to 'info' to prevent possible memory and performance impacts of verbose
41
- logging on 'debug'. Change at runtime via new `XH.setLogLevel()` when troubleshooting. See
42
- `LogUtils.ts` for more info.
43
39
  * Added control to trigger browser GC from app footer. Useful for troubleshooting memory issues.
44
40
  Requires running chromium-based browser via e.g. `start chrome --js-flags="--expose-gc`.
45
41
 
@@ -14,8 +14,7 @@ import {panel} from '@xh/hoist/desktop/cmp/panel';
14
14
  import {toolbar} from '@xh/hoist/desktop/cmp/toolbar';
15
15
  import {Icon} from '@xh/hoist/icon';
16
16
  import {Highcharts} from '@xh/hoist/kit/highcharts';
17
- import {pluralize} from '@xh/hoist/utils/js';
18
- import {logError} from '@xh/hoist/utils/log';
17
+ import {logError, pluralize} from '@xh/hoist/utils/js';
19
18
  import {isEmpty} from 'lodash';
20
19
  import {RoleModel} from '../RoleModel';
21
20
  import {RoleGraphModel} from './RoleGraphModel';
@@ -2,7 +2,6 @@ import { RouterModel } from '@xh/hoist/appcontainer/RouterModel';
2
2
  import { HoistAuthModel } from '@xh/hoist/core/HoistAuthModel';
3
3
  import { Store } from '@xh/hoist/data';
4
4
  import { AlertBannerService, AutoRefreshService, ChangelogService, ConfigService, EnvironmentService, FetchOptions, FetchService, GridAutosizeService, GridExportService, IdentityService, IdleService, InspectorService, JsonBlobService, LocalStorageService, PrefService, SessionStorageService, TrackService, WebSocketService, ClientHealthService } from '@xh/hoist/svc';
5
- import { type LogLevel } from '@xh/hoist/utils/log';
6
5
  import { Router, State } from 'router5';
7
6
  import { CancelFn } from 'router5/types/types/base';
8
7
  import { SetOptional } from 'type-fest';
@@ -178,18 +177,6 @@ export declare class XHApi {
178
177
  * @see HoistAuthModel.logoutAsync
179
178
  */
180
179
  logoutAsync(): Promise<void>;
181
- /**
182
- * Current minimum severity for Hoist log utils (default 'info').
183
- * Messages logged via managed Hoist log utils with lower severity will be ignored.
184
- */
185
- get logLevel(): LogLevel;
186
- /**
187
- * Set the minimum severity for Hoist log utils until the page is refreshed. Optionally persist
188
- * this adjustment to sessionStorage to maintain for the lifetime of the browser tab.
189
- *
190
- * Hint: call this method from the console to adjust your app's log level while troubleshooting.
191
- */
192
- setLogLevel(level: LogLevel, persistInSessionStorage?: boolean): void;
193
180
  /**
194
181
  * Main entry point to start the client app - initializes and renders application code.
195
182
  * Call from the app's entry-point file within your project's `/client-app/src/apps/` folder.
@@ -1,5 +1,5 @@
1
1
  import { Thunkable } from '@xh/hoist/core';
2
- import { type LogSource } from '@xh/hoist/utils/log';
2
+ import { LogSource } from '@xh/hoist/utils/js/LogUtils';
3
3
  /**
4
4
  * Get a cached value on an object, creating it if it does not yet exist.
5
5
  *
@@ -65,7 +65,7 @@ export interface APIWarnOptions {
65
65
  v?: string;
66
66
  /** An additional message. Can contain suggestions for alternatives. */
67
67
  msg?: string;
68
- /** Source of message for labeling log message. */
68
+ /** Source of message for labelling log message. */
69
69
  source?: LogSource;
70
70
  }
71
71
  /**
@@ -1,19 +1,4 @@
1
1
  import { Some } from '@xh/hoist/core';
2
- /**
3
- * Utility functions providing managed, structured logging to Hoist apps.
4
- *
5
- * Essentially a wrapper around the browser console supporting logging levels, timing, and
6
- * miscellaneous Hoist display conventions.
7
- *
8
- * Objects extending `HoistBase` need not import these functions directly, as they are available
9
- * via delegates on `HoistBase`.
10
- *
11
- * Hoist sets its minimum severity level to 'info' by default. This prevents performance or
12
- * memory impacts that might result from verbose debug logging. This can be adjusted by calling
13
- * XH.logLevel from the console.
14
- */
15
- /** Severity Level for log statement */
16
- export type LogLevel = 'error' | 'warn' | 'info' | 'debug';
17
2
  /** Object identifying the source of log statement. Typically, a javascript class */
18
3
  export type LogSource = string | {
19
4
  displayName: string;
@@ -22,20 +7,6 @@ export type LogSource = string | {
22
7
  name: string;
23
8
  };
24
9
  };
25
- /**
26
- * Current minimum severity for Hoist log utils (default 'info').
27
- * Messages logged via managed Hoist log utils with lower severity will be ignored.
28
- *
29
- * @internal - use public `XH.logLevel`.
30
- */
31
- export declare function getLogLevel(): LogLevel;
32
- /**
33
- * Set the minimum severity for Hoist log utils until the page is refreshed. Optionally persist
34
- * this adjustment to sessionStorage to maintain for the lifetime of the browser tab.
35
- *
36
- * @internal - use public `XH.setLogLevel()`.
37
- */
38
- export declare function setLogLevel(level: LogLevel, persistInSessionStorage?: boolean): void;
39
10
  /**
40
11
  * Time and log execution of a function to `console.info()`.
41
12
  *
@@ -80,3 +51,5 @@ export declare function logError(msgs: Some<unknown>, source?: LogSource): unkno
80
51
  * @param source - class, function or string to label the source of the message
81
52
  */
82
53
  export declare function logWarn(msgs: Some<unknown>, source?: LogSource): unknown;
54
+ /** Parse a LogSource in to a canonical string label. */
55
+ export declare function parseSource(source: LogSource): string;
@@ -1,6 +1,7 @@
1
1
  export * from './HtmlUtils';
2
2
  export * from './LangUtils';
3
3
  export * from './Decorators';
4
+ export * from './LogUtils';
4
5
  export * from './DomUtils';
5
6
  export * from './TestUtils';
6
7
  export * from './VersionUtils';
@@ -18,7 +18,7 @@ import {
18
18
  XH
19
19
  } from '@xh/hoist/core';
20
20
  import {AgGridReact, GridOptions} from '@xh/hoist/kit/ag-grid';
21
- import {logError} from '@xh/hoist/utils/log';
21
+ import {logError} from '@xh/hoist/utils/js';
22
22
  import {splitLayoutProps} from '@xh/hoist/utils/react';
23
23
  import classNames from 'classnames';
24
24
  import {isNil} from 'lodash';
@@ -21,8 +21,7 @@ import {
21
21
  import {useContextMenu} from '@xh/hoist/dynamics/desktop';
22
22
  import {Highcharts} from '@xh/hoist/kit/highcharts';
23
23
  import {runInAction} from '@xh/hoist/mobx';
24
- import {mergeDeep} from '@xh/hoist/utils/js';
25
- import {logError} from '@xh/hoist/utils/log';
24
+ import {logError, mergeDeep} from '@xh/hoist/utils/js';
26
25
  import {
27
26
  createObservableRef,
28
27
  getLayoutProps,
@@ -5,7 +5,7 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
  import type {ChartMenuContext, ChartMenuToken} from '@xh/hoist/cmp/chart/Types';
8
- import {logWarn} from '@xh/hoist/utils/log';
8
+ import {logWarn} from '@xh/hoist/utils/js';
9
9
  import {cloneDeep, isEmpty, isString} from 'lodash';
10
10
  import {ChartModel} from '@xh/hoist/cmp/chart';
11
11
  import {isMenuItem, type MenuItem, type MenuItemLike} from '@xh/hoist/core';
@@ -15,8 +15,7 @@ import {
15
15
  RecordActionSpec,
16
16
  StoreRecord
17
17
  } from '@xh/hoist/data';
18
- import {logDebug, logWarn} from '@xh/hoist/utils/log';
19
- import {throwIf, warnIf, withDefault} from '@xh/hoist/utils/js';
18
+ import {logDebug, logWarn, throwIf, warnIf, withDefault} from '@xh/hoist/utils/js';
20
19
  import classNames from 'classnames';
21
20
  import {
22
21
  castArray,
@@ -7,8 +7,7 @@
7
7
  import {box} from '@xh/hoist/cmp/layout';
8
8
  import {BoxProps, hoistCmp, HoistProps, useContextModel} from '@xh/hoist/core';
9
9
  import {fmtNumber} from '@xh/hoist/format';
10
- import {pluralize, singularize, withDefault} from '@xh/hoist/utils/js';
11
- import {logError} from '@xh/hoist/utils/log';
10
+ import {logError, pluralize, singularize, withDefault} from '@xh/hoist/utils/js';
12
11
  import {GridModel} from '../GridModel';
13
12
 
14
13
  export interface GridCountLabelProps extends HoistProps, BoxProps {
@@ -9,8 +9,7 @@ import {GridAutosizeOptions} from '@xh/hoist/cmp/grid/GridAutosizeOptions';
9
9
  import {XH} from '@xh/hoist/core';
10
10
  import {CompoundFilter, FieldFilter, Filter, StoreRecord} from '@xh/hoist/data';
11
11
  import {forEachAsync} from '@xh/hoist/utils/async';
12
- import {logWarn} from '@xh/hoist/utils/log';
13
- import {stripTags} from '@xh/hoist/utils/js';
12
+ import {logWarn, stripTags} from '@xh/hoist/utils/js';
14
13
  import {
15
14
  forOwn,
16
15
  groupBy,
@@ -6,7 +6,6 @@
6
6
  */
7
7
  import {Column, ColumnGroup, ColumnRenderer, GroupRowRenderer} from '@xh/hoist/cmp/grid';
8
8
  import {HeaderClassParams} from '@xh/hoist/kit/ag-grid';
9
- import {logWarn} from '@xh/hoist/utils/log';
10
9
  import {castArray, isFunction} from 'lodash';
11
10
 
12
11
  /** @internal */
@@ -19,7 +18,7 @@ export function managedRenderer<T extends ColumnRenderer | GroupRowRenderer>(
19
18
  try {
20
19
  return fn.apply(null, arguments);
21
20
  } catch (e) {
22
- logWarn([`Renderer for '${identifier}' has thrown an error`, e]);
21
+ console.warn(`Renderer for '${identifier}' has thrown an error`, e);
23
22
  return '#ERROR';
24
23
  }
25
24
  } as unknown as T;
@@ -21,8 +21,7 @@ import {fmtCompactDate, fmtDateTime} from '@xh/hoist/format';
21
21
  import {action, computed, makeObservable, observable} from '@xh/hoist/mobx';
22
22
  import {Timer} from '@xh/hoist/utils/async';
23
23
  import {DAYS, HOURS, LocalDate, SECONDS} from '@xh/hoist/utils/datetime';
24
- import {logWarn} from '@xh/hoist/utils/log';
25
- import {apiDeprecated, withDefault} from '@xh/hoist/utils/js';
24
+ import {apiDeprecated, logWarn, withDefault} from '@xh/hoist/utils/js';
26
25
 
27
26
  interface RelativeTimestampProps extends HoistProps, BoxProps, RelativeTimestampOptions {
28
27
  /**
@@ -21,8 +21,7 @@ import {errorMessage} from '@xh/hoist/cmp/error';
21
21
  import {mask} from '@xh/hoist/cmp/mask';
22
22
  import {Highcharts} from '@xh/hoist/kit/highcharts';
23
23
  import {wait} from '@xh/hoist/promise';
24
- import {logWithDebug} from '@xh/hoist/utils/js';
25
- import {logError} from '@xh/hoist/utils/log';
24
+ import {logError, logWithDebug} from '@xh/hoist/utils/js';
26
25
  import {
27
26
  createObservableRef,
28
27
  getLayoutProps,
package/core/HoistBase.ts CHANGED
@@ -13,15 +13,16 @@ import {
13
13
  runInAction,
14
14
  when as mobxWhen
15
15
  } from '@xh/hoist/mobx';
16
- import {getOrCreate, throwIf} from '@xh/hoist/utils/js';
17
16
  import {
17
+ getOrCreate,
18
18
  logDebug,
19
19
  logError,
20
20
  logInfo,
21
21
  logWarn,
22
+ throwIf,
22
23
  withDebug,
23
24
  withInfo
24
- } from '@xh/hoist/utils/log/LogUtils';
25
+ } from '@xh/hoist/utils/js';
25
26
  import {
26
27
  debounce as lodashDebounce,
27
28
  isFunction,
@@ -6,8 +6,7 @@
6
6
  */
7
7
  import {wait} from '@xh/hoist/promise';
8
8
  import {observable} from 'mobx';
9
- import {logError} from '@xh/hoist/utils/log';
10
- import {throwIf} from '../utils/js';
9
+ import {logError, throwIf} from '../utils/js';
11
10
  import {HoistBaseClass, PersistableState, PersistenceProvider, PersistOptions} from './';
12
11
 
13
12
  /**
@@ -26,7 +26,6 @@ import {
26
26
  HoistModel
27
27
  } from './model';
28
28
  import {throwIf, warnIf, withDefault} from '@xh/hoist/utils/js';
29
- import {logError} from '@xh/hoist/utils/log';
30
29
  import {getLayoutProps, useOnMount, useOnUnmount} from '@xh/hoist/utils/react';
31
30
  import classNames from 'classnames';
32
31
  import {isFunction, isPlainObject, isObject} from 'lodash';
@@ -286,10 +285,9 @@ function wrapWithModel(render: RenderFn, cfg: Config): RenderFn {
286
285
 
287
286
  // 2) Validate
288
287
  if (!model && !spec.optional && spec instanceof UsesSpec) {
289
- logError(
290
- `Failed to find model with selector '${formatSelector(spec.selector)}'. Ensure the
291
- proper model is available via context, or specify using the 'model' prop.`,
292
- cfg.displayName
288
+ console.error(
289
+ `Failed to find model with selector '${formatSelector(spec.selector)} for component ${cfg.displayName}'. Ensure the
290
+ proper model is available via context, or specify using the 'model' prop.`
293
291
  );
294
292
  return cmpErrDisplay({...getLayoutProps(props), item: 'No model found'});
295
293
  }
@@ -409,11 +407,10 @@ function lookupModel(props: HoistProps, modelLookup: ModelLookup, cfg: Config):
409
407
  // 2) props - instance
410
408
  if (model) {
411
409
  if (!model.isHoistModel || !model.matchesSelector(selector, true)) {
412
- logError(
413
- `Incorrect model passed.
410
+ console.error(
411
+ `Incorrect model passed to '${cfg.displayName}'.
414
412
  Expected: ${formatSelector(selector)}
415
- Received: ${model.constructor.name}`,
416
- cfg.displayName
413
+ Received: ${model.constructor.name}`
417
414
  );
418
415
  model = null;
419
416
  }
package/core/XH.ts CHANGED
@@ -31,7 +31,6 @@ import {
31
31
  WebSocketService,
32
32
  ClientHealthService
33
33
  } from '@xh/hoist/svc';
34
- import {getLogLevel, setLogLevel, type LogLevel} from '@xh/hoist/utils/log';
35
34
  import {camelCase, flatten, isString, uniqueId} from 'lodash';
36
35
  import {Router, State} from 'router5';
37
36
  import {CancelFn} from 'router5/types/types/base';
@@ -361,24 +360,6 @@ export class XHApi {
361
360
  this.reloadApp();
362
361
  }
363
362
 
364
- /**
365
- * Current minimum severity for Hoist log utils (default 'info').
366
- * Messages logged via managed Hoist log utils with lower severity will be ignored.
367
- */
368
- get logLevel(): LogLevel {
369
- return getLogLevel();
370
- }
371
-
372
- /**
373
- * Set the minimum severity for Hoist log utils until the page is refreshed. Optionally persist
374
- * this adjustment to sessionStorage to maintain for the lifetime of the browser tab.
375
- *
376
- * Hint: call this method from the console to adjust your app's log level while troubleshooting.
377
- */
378
- setLogLevel(level: LogLevel, persistInSessionStorage: boolean = false) {
379
- setLogLevel(level, persistInSessionStorage);
380
- }
381
-
382
363
  //----------------------
383
364
  // App lifecycle support
384
365
  //----------------------
@@ -6,8 +6,7 @@
6
6
  */
7
7
  import {Exception} from './Exception';
8
8
  import {fragment, span} from '@xh/hoist/cmp/layout';
9
- import {stripTags} from '@xh/hoist/utils/js';
10
- import {logDebug, logError, logWarn} from '@xh/hoist/utils/log';
9
+ import {logDebug, logError, logWarn, stripTags} from '@xh/hoist/utils/js';
11
10
  import {Icon} from '@xh/hoist/icon';
12
11
  import {forOwn, has, isArray, isNil, isObject, omitBy, pick, set} from 'lodash';
13
12
  import {HoistException, PlainObject, XH} from '../';
@@ -313,7 +312,7 @@ export class ExceptionHandler {
313
312
  }
314
313
 
315
314
  private logException(e: HoistException, opts: ExceptionHandlerOptions) {
316
- return opts.showAsError ? logError([opts.message, e], this) : logDebug(opts.message, this);
315
+ return opts.showAsError ? console.error(opts.message, e) : console.debug(opts.message);
317
316
  }
318
317
 
319
318
  private parseOptions(
@@ -14,8 +14,7 @@ import {
14
14
  } from '../';
15
15
  import {LoadSpec, Loadable} from './';
16
16
  import {makeObservable, observable, runInAction} from '@xh/hoist/mobx';
17
- import {throwIf} from '@xh/hoist/utils/js';
18
- import {logDebug, logError} from '@xh/hoist/utils/log';
17
+ import {logDebug, logError, throwIf} from '@xh/hoist/utils/js';
19
18
  import {isPlainObject, pull} from 'lodash';
20
19
 
21
20
  /**
@@ -136,7 +135,7 @@ export async function loadAllAsync(objs: Loadable[], loadSpec?: LoadSpec | any)
136
135
  ret = await Promise.allSettled(promises);
137
136
 
138
137
  ret.filter(it => it.status === 'rejected').forEach((err: any) =>
139
- logError(['Failed to Load Object', err.reason])
138
+ console.error('Failed to Load Object', err.reason)
140
139
  );
141
140
 
142
141
  return ret;
@@ -6,8 +6,7 @@
6
6
  */
7
7
 
8
8
  import {olderThan} from '@xh/hoist/utils/datetime';
9
- import {logDebug, logError} from '@xh/hoist/utils/log';
10
- import {throwIf} from '@xh/hoist/utils/js';
9
+ import {logDebug, logError, throwIf} from '@xh/hoist/utils/js';
11
10
  import {
12
11
  cloneDeep,
13
12
  compact,
@@ -7,7 +7,6 @@
7
7
 
8
8
  import {Some} from '@xh/hoist/core';
9
9
  import {CompoundFilter, FunctionFilter} from '@xh/hoist/data';
10
- import {logError} from '@xh/hoist/utils/log';
11
10
  import {castArray, flatMap, groupBy, isArray, isFunction} from 'lodash';
12
11
  import {FieldFilter} from './FieldFilter';
13
12
  import {Filter} from './Filter';
@@ -56,7 +55,7 @@ export function parseFilter(spec: FilterLike): Filter {
56
55
  }
57
56
  }
58
57
 
59
- logError(['Unable to identify filter type:', s]);
58
+ console.error('Unable to identify filter type:', s);
60
59
  return null;
61
60
  }
62
61
 
@@ -6,8 +6,7 @@
6
6
  */
7
7
 
8
8
  import equal from 'fast-deep-equal';
9
- import {logWarn} from '@xh/hoist/utils/log';
10
- import {throwIf} from '@xh/hoist/utils/js';
9
+ import {logWarn, throwIf} from '@xh/hoist/utils/js';
11
10
  import {maxBy, isNil} from 'lodash';
12
11
  import {StoreRecord, StoreRecordId} from '../StoreRecord';
13
12
  import {Store} from '../Store';
@@ -8,8 +8,7 @@ import {GridAutosizeOptions, GridModel} from '@xh/hoist/cmp/grid';
8
8
  import {hoistCmp, useContextModel} from '@xh/hoist/core';
9
9
  import '@xh/hoist/desktop/register';
10
10
  import {Icon} from '@xh/hoist/icon';
11
- import {logError} from '@xh/hoist/utils/log';
12
- import {withDefault} from '@xh/hoist/utils/js';
11
+ import {logError, withDefault} from '@xh/hoist/utils/js';
13
12
  import {button, ButtonProps} from '../Button';
14
13
 
15
14
  export interface ColAutosizeButtonProps extends ButtonProps {
@@ -12,8 +12,7 @@ import {ColChooserModel} from '@xh/hoist/desktop/cmp/grid/impl/colchooser/ColCho
12
12
  import '@xh/hoist/desktop/register';
13
13
  import {Icon} from '@xh/hoist/icon';
14
14
  import {popover, Position} from '@xh/hoist/kit/blueprint';
15
- import {logError} from '@xh/hoist/utils/log';
16
- import {stopPropagation, withDefault} from '@xh/hoist/utils/js';
15
+ import {logError, stopPropagation, withDefault} from '@xh/hoist/utils/js';
17
16
  import {button, ButtonProps} from '../Button';
18
17
 
19
18
  export interface ColChooserButtonProps extends ButtonProps {
@@ -11,8 +11,7 @@ import '@xh/hoist/desktop/register';
11
11
  import {Icon} from '@xh/hoist/icon';
12
12
  import {menu, popover, Position} from '@xh/hoist/kit/blueprint';
13
13
  import {parseMenuItems} from '@xh/hoist/utils/impl';
14
- import {logError} from '@xh/hoist/utils/log';
15
- import {withDefault} from '@xh/hoist/utils/js';
14
+ import {logError, withDefault} from '@xh/hoist/utils/js';
16
15
  import {ReactNode} from 'react';
17
16
  import {button, ButtonProps} from '../Button';
18
17
 
@@ -9,8 +9,7 @@ import {hoistCmp, useContextModel} from '@xh/hoist/core';
9
9
  import '@xh/hoist/desktop/register';
10
10
  import {Icon} from '@xh/hoist/icon';
11
11
  import {ExportOptions} from '@xh/hoist/svc';
12
- import {logError} from '@xh/hoist/utils/log';
13
- import {withDefault} from '@xh/hoist/utils/js';
12
+ import {logError, withDefault} from '@xh/hoist/utils/js';
14
13
  import {button, ButtonProps} from '../Button';
15
14
 
16
15
  export interface ExportButtonProps extends ButtonProps {
@@ -9,8 +9,7 @@ import {button, ButtonProps} from '@xh/hoist/desktop/cmp/button/Button';
9
9
  import {PanelModel} from '@xh/hoist/desktop/cmp/panel';
10
10
  import '@xh/hoist/desktop/register';
11
11
  import {Icon} from '@xh/hoist/icon';
12
- import {logError} from '@xh/hoist/utils/log';
13
- import {withDefault} from '@xh/hoist/utils/js';
12
+ import {logError, withDefault} from '@xh/hoist/utils/js';
14
13
 
15
14
  export interface ModalToggleButtonProps extends ButtonProps {
16
15
  panelModel?: PanelModel;
@@ -12,8 +12,7 @@ import {ZoneMapperModel} from '@xh/hoist/cmp/zoneGrid/impl/ZoneMapperModel';
12
12
  import {zoneMapper} from '@xh/hoist/desktop/cmp/zoneGrid/impl/ZoneMapper';
13
13
  import {Icon} from '@xh/hoist/icon';
14
14
  import {popover, Position} from '@xh/hoist/kit/blueprint';
15
- import {logError} from '@xh/hoist/utils/log';
16
- import {stopPropagation, withDefault} from '@xh/hoist/utils/js';
15
+ import {logError, stopPropagation, withDefault} from '@xh/hoist/utils/js';
17
16
  import {button, ButtonProps} from '../Button';
18
17
 
19
18
  export interface ZoneMapperButtonProps extends ButtonProps {
@@ -7,7 +7,6 @@
7
7
  import {PlainObject} from '@xh/hoist/core';
8
8
  import {DashContainerModel} from '@xh/hoist/desktop/cmp/dash';
9
9
  import {serializeIcon} from '@xh/hoist/icon';
10
- import {logDebug} from '@xh/hoist/utils/log';
11
10
  import {throwIf} from '@xh/hoist/utils/js';
12
11
  import {isArray, isEmpty, isFinite, isNil, isPlainObject, isString, round} from 'lodash';
13
12
  import {DashContainerViewSpec} from '../DashContainerViewSpec';
@@ -120,9 +119,9 @@ function convertStateToGLInner(items = [], viewSpecs = [], containerSize, contai
120
119
  const viewSpec = viewSpecs.find(v => v.id === item.id);
121
120
 
122
121
  if (!viewSpec) {
123
- logDebug(
124
- `Attempted to load non-existent or omitted view from state: ${item.id}`,
125
- 'DashContainer'
122
+ console.debug(
123
+ 'DashContainer:',
124
+ `Attempted to load non-existent or omitted view from state: ${item.id}`
126
125
  );
127
126
  return null;
128
127
  }
@@ -23,8 +23,7 @@ import {fmtDate, fmtDateTime, fmtJson, fmtNumber} from '@xh/hoist/format';
23
23
  import {Icon} from '@xh/hoist/icon';
24
24
  import {tooltip} from '@xh/hoist/kit/blueprint';
25
25
  import {isLocalDate} from '@xh/hoist/utils/datetime';
26
- import {logWarn} from '@xh/hoist/utils/log';
27
- import {errorIf, getTestId, TEST_ID, throwIf, withDefault} from '@xh/hoist/utils/js';
26
+ import {errorIf, getTestId, logWarn, TEST_ID, throwIf, withDefault} from '@xh/hoist/utils/js';
28
27
  import {getLayoutProps, getReactElementName, useOnMount, useOnUnmount} from '@xh/hoist/utils/react';
29
28
  import classNames from 'classnames';
30
29
  import {isBoolean, isDate, isEmpty, isFinite, isNil, isUndefined, kebabCase} from 'lodash';
@@ -12,7 +12,7 @@ import '@xh/hoist/desktop/register';
12
12
  import {EditorProps} from './EditorProps';
13
13
  import './Editors.scss';
14
14
  import {useInlineEditorModel} from './impl/InlineEditorModel';
15
- import {logWarn} from '@xh/hoist/utils/log';
15
+ import {logWarn} from '@xh/hoist/utils/js';
16
16
 
17
17
  export interface BooleanEditorProps extends EditorProps<CheckboxProps> {
18
18
  /**
@@ -24,7 +24,7 @@ import {toolbar} from '@xh/hoist/desktop/cmp/toolbar';
24
24
  import {useContextMenu, useHotkeys} from '@xh/hoist/desktop/hooks';
25
25
  import '@xh/hoist/desktop/register';
26
26
  import {HotkeyConfig} from '@xh/hoist/kit/blueprint';
27
- import {logWarn} from '@xh/hoist/utils/log';
27
+ import {logWarn} from '@xh/hoist/utils/js';
28
28
  import {splitLayoutProps} from '@xh/hoist/utils/react';
29
29
  import {castArray, omitBy} from 'lodash';
30
30
  import {Children, isValidElement, ReactElement, ReactNode, useLayoutEffect, useRef} from 'react';
@@ -7,7 +7,7 @@
7
7
  import type {ContextMenuSpec} from '@xh/hoist/core';
8
8
  import {contextMenu} from '@xh/hoist/desktop/cmp/contextmenu/ContextMenu';
9
9
  import {showContextMenu} from '@xh/hoist/kit/blueprint';
10
- import {logError} from '@xh/hoist/utils/log';
10
+ import {logError} from '@xh/hoist/utils/js';
11
11
  import {isArray, isEmpty, isFunction, isUndefined} from 'lodash';
12
12
  import {cloneElement, isValidElement, MouseEvent, ReactElement} from 'react';
13
13
 
@@ -130,7 +130,7 @@ export class InstancesModel extends HoistModel {
130
130
  instance = this.getInstance(xhId);
131
131
 
132
132
  if (!instance) {
133
- this.logWarn(`Instance with xhId ${xhId} no longer alive - cannot be logged`);
133
+ console.warn(`Instance with xhId ${xhId} no longer alive - cannot be logged`);
134
134
  } else {
135
135
  console.log(`[${xhId}]`, instance);
136
136
  XH.toast({
@@ -147,7 +147,7 @@ export class InstancesModel extends HoistModel {
147
147
  instance = this.getInstance(instanceXhId);
148
148
 
149
149
  if (!instance) {
150
- this.logWarn(`Instance ${instanceDisplayName} no longer alive - cannot be logged`);
150
+ console.warn(`Instance ${instanceDisplayName} no longer alive - cannot be logged`);
151
151
  } else {
152
152
  console.log(`[${instanceDisplayName}].${property}`, instance[property]);
153
153
  XH.toast({
@@ -5,7 +5,6 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
 
8
- import {logError} from '@xh/hoist/utils/log';
9
8
  import {checkVersion} from '@xh/hoist/utils/js';
10
9
 
11
10
  /**
@@ -58,7 +57,7 @@ const MAX_VERSION = '31.*.*';
58
57
  */
59
58
  export function installAgGrid(ComponentReactWrapper, version: string) {
60
59
  if (!checkVersion(version, MIN_VERSION, MAX_VERSION)) {
61
- logError(
60
+ console.error(
62
61
  `This version of Hoist requires an ag-Grid version between ${MIN_VERSION} and ` +
63
62
  `${MAX_VERSION}. Version ${version} detected. ag-Grid will be unavailable.`
64
63
  );
@@ -5,7 +5,6 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
 
8
- import {logError} from '@xh/hoist/utils/log';
9
8
  import {checkVersion} from '@xh/hoist/utils/js';
10
9
 
11
10
  export let Highcharts = null;
@@ -20,7 +19,7 @@ const MAX_VERSION = '11.*.*';
20
19
  export function installHighcharts(HighchartsImpl) {
21
20
  const {version} = HighchartsImpl;
22
21
  if (!checkVersion(version, MIN_VERSION, MAX_VERSION)) {
23
- logError(
22
+ console.error(
24
23
  `This version of Hoist requires a Highcharts version between ${MIN_VERSION} and ` +
25
24
  `${MAX_VERSION}. Version ${version} detected. Highcharts will be unavailable.`
26
25
  );
@@ -10,8 +10,7 @@ import {hoistCmp, useContextModel} from '@xh/hoist/core';
10
10
  import {Icon} from '@xh/hoist/icon';
11
11
  import {button, ButtonProps} from '@xh/hoist/mobile/cmp/button';
12
12
  import '@xh/hoist/mobile/register';
13
- import {logError} from '@xh/hoist/utils/log';
14
- import {withDefault} from '@xh/hoist/utils/js';
13
+ import {logError, withDefault} from '@xh/hoist/utils/js';
15
14
 
16
15
  export interface ColAutosizeButtonProps extends ButtonProps {
17
16
  /** GridModel to which this button should bind. Will find nearest in context if not provided. */
@@ -9,8 +9,7 @@ import {hoistCmp, useContextModel} from '@xh/hoist/core';
9
9
  import {Icon} from '@xh/hoist/icon';
10
10
  import {button, ButtonProps} from '@xh/hoist/mobile/cmp/button';
11
11
  import '@xh/hoist/mobile/register';
12
- import {logError} from '@xh/hoist/utils/log';
13
- import {withDefault} from '@xh/hoist/utils/js';
12
+ import {logError, withDefault} from '@xh/hoist/utils/js';
14
13
 
15
14
  export interface ColChooserButtonProps extends ButtonProps {
16
15
  /** GridModel to which this button should bind. Will find nearest in context if not provided. */
@@ -9,8 +9,7 @@ import {hoistCmp, useContextModel} from '@xh/hoist/core';
9
9
  import {Icon} from '@xh/hoist/icon';
10
10
  import {button, ButtonProps} from '@xh/hoist/mobile/cmp/button';
11
11
  import '@xh/hoist/mobile/register';
12
- import {logError} from '@xh/hoist/utils/log';
13
- import {withDefault} from '@xh/hoist/utils/js';
12
+ import {logError, withDefault} from '@xh/hoist/utils/js';
14
13
  import {isEmpty} from 'lodash';
15
14
 
16
15
  export interface ExpandCollapseButtonProps extends ButtonProps {