@xh/hoist 76.0.0-SNAPSHOT.1758215282397 → 76.0.0-SNAPSHOT.1758297294348

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 (84) hide show
  1. package/CHANGELOG.md +1 -3
  2. package/admin/tabs/userData/roles/graph/RoleGraph.ts +1 -2
  3. package/appcontainer/AppContainerModel.ts +1 -2
  4. package/appcontainer/ExceptionDialogModel.ts +2 -1
  5. package/build/types/appcontainer/ExceptionDialogModel.d.ts +2 -1
  6. package/build/types/cmp/grid/Grid.d.ts +3 -3
  7. package/build/types/core/{exception/ExceptionHandler.d.ts → ExceptionHandler.d.ts} +2 -1
  8. package/build/types/core/XH.d.ts +3 -2
  9. package/build/types/core/index.d.ts +1 -3
  10. package/build/types/core/types/Types.d.ts +0 -10
  11. package/build/types/desktop/cmp/appOption/AutoRefreshAppOption.d.ts +5 -5
  12. package/build/types/desktop/cmp/appOption/ThemeAppOption.d.ts +5 -5
  13. package/build/types/desktop/cmp/rest/impl/RestFormModel.d.ts +1 -1
  14. package/build/types/exception/Exception.d.ts +24 -0
  15. package/build/types/{core/exception → exception}/Types.d.ts +1 -18
  16. package/build/types/exception/index.d.ts +2 -0
  17. package/build/types/kit/swiper/index.d.ts +1 -1
  18. package/build/types/svc/FetchService.d.ts +55 -0
  19. package/build/types/utils/js/LangUtils.d.ts +1 -27
  20. package/build/types/utils/{log → js}/LogUtils.d.ts +37 -1
  21. package/build/types/utils/js/index.d.ts +2 -0
  22. package/cmp/ag-grid/AgGrid.ts +1 -1
  23. package/cmp/chart/Chart.ts +1 -2
  24. package/cmp/chart/impl/ChartContextMenuItems.ts +1 -1
  25. package/cmp/grid/columns/Column.ts +1 -2
  26. package/cmp/grid/helpers/GridCountLabel.ts +1 -2
  27. package/cmp/grid/impl/ColumnWidthCalculator.ts +1 -2
  28. package/cmp/grid/impl/Utils.ts +1 -1
  29. package/cmp/relativetimestamp/RelativeTimestamp.ts +1 -2
  30. package/cmp/treemap/TreeMap.ts +1 -2
  31. package/core/{exception/ExceptionHandler.ts → ExceptionHandler.ts} +3 -4
  32. package/core/HoistBase.ts +3 -2
  33. package/core/HoistBaseDecorators.ts +1 -2
  34. package/core/HoistComponent.ts +1 -2
  35. package/core/XH.ts +3 -4
  36. package/core/index.ts +1 -3
  37. package/core/load/LoadSupport.ts +1 -2
  38. package/core/persist/PersistenceProvider.ts +1 -2
  39. package/core/types/Types.ts +0 -6
  40. package/data/filter/Utils.ts +1 -1
  41. package/data/impl/RecordSet.ts +1 -2
  42. package/desktop/cmp/button/grid/ColAutosizeButton.ts +1 -2
  43. package/desktop/cmp/button/grid/ColChooserButton.ts +1 -2
  44. package/desktop/cmp/button/grid/ExpandToLevelButton.ts +1 -2
  45. package/desktop/cmp/button/grid/ExportButton.ts +1 -2
  46. package/desktop/cmp/button/panel/ModalToggleButton.ts +1 -2
  47. package/desktop/cmp/button/zoneGrid/ZoneMapperButton.ts +1 -2
  48. package/desktop/cmp/dash/container/impl/DashContainerUtils.ts +1 -2
  49. package/desktop/cmp/form/FormField.ts +1 -2
  50. package/desktop/cmp/grid/editors/BooleanEditor.ts +1 -1
  51. package/desktop/cmp/panel/Panel.ts +1 -1
  52. package/desktop/hooks/UseContextMenu.ts +1 -1
  53. package/exception/Exception.ts +81 -0
  54. package/{core/exception → exception}/Types.ts +1 -22
  55. package/{utils/log → exception}/index.ts +2 -2
  56. package/kit/ag-grid/index.ts +1 -2
  57. package/kit/highcharts/index.ts +1 -2
  58. package/mobile/cmp/button/grid/ColAutosizeButton.ts +1 -2
  59. package/mobile/cmp/button/grid/ColChooserButton.ts +1 -2
  60. package/mobile/cmp/button/grid/ExpandCollapseButton.ts +1 -2
  61. package/mobile/cmp/button/grid/ExpandToLevelButton.ts +1 -2
  62. package/mobile/cmp/button/zoneGrid/ZoneMapperButton.ts +1 -2
  63. package/mobile/cmp/panel/Panel.ts +1 -1
  64. package/mobx/overrides.ts +1 -1
  65. package/package.json +1 -1
  66. package/promise/Promise.ts +3 -3
  67. package/security/BaseOAuthClient.ts +3 -3
  68. package/security/msal/MsalClient.ts +1 -2
  69. package/svc/ChangelogService.ts +1 -1
  70. package/svc/EnvironmentService.ts +1 -2
  71. package/svc/FetchService.ts +208 -16
  72. package/tsconfig.tsbuildinfo +1 -1
  73. package/utils/async/Timer.ts +1 -2
  74. package/utils/js/Decorators.ts +4 -4
  75. package/utils/js/LangUtils.ts +2 -66
  76. package/utils/{log → js}/LogUtils.ts +77 -19
  77. package/utils/js/index.ts +2 -0
  78. package/build/types/core/exception/Exception.d.ts +0 -61
  79. package/build/types/utils/log/index.d.ts +0 -1
  80. package/build/types/utils/version/index.d.ts +0 -1
  81. package/core/exception/Exception.ts +0 -256
  82. package/utils/version/index.ts +0 -8
  83. /package/build/types/utils/{version → js}/VersionUtils.d.ts +0 -0
  84. /package/utils/{version → js}/VersionUtils.ts +0 -0
@@ -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
  /**
@@ -25,8 +25,7 @@ import {
25
25
  formatSelector,
26
26
  HoistModel
27
27
  } from './model';
28
- import {throwIf, warnIf, withDefault} from '@xh/hoist/utils/js';
29
- import {logError} from '@xh/hoist/utils/log';
28
+ import {logError, throwIf, warnIf, withDefault} from '@xh/hoist/utils/js';
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';
package/core/XH.ts CHANGED
@@ -31,8 +31,7 @@ import {
31
31
  WebSocketService,
32
32
  ClientHealthService
33
33
  } from '@xh/hoist/svc';
34
- import type {LogLevel} from './types/Types';
35
- import {getLogLevel, setLogLevel} from '@xh/hoist/utils/log';
34
+ import {getLogLevel, setLogLevel, LogLevel} from '@xh/hoist/utils/js';
36
35
  import {camelCase, flatten, isString, uniqueId} from 'lodash';
37
36
  import {Router, State} from 'router5';
38
37
  import {CancelFn} from 'router5/types/types/base';
@@ -41,16 +40,16 @@ import {AppContainerModel} from '../appcontainer/AppContainerModel';
41
40
  import {BannerModel} from '../appcontainer/BannerModel';
42
41
  import {ToastModel} from '../appcontainer/ToastModel';
43
42
  import '../styles/XH.scss';
43
+ import {Exception, HoistException} from '../exception';
44
+
44
45
  import {
45
46
  AppSpec,
46
47
  AppState,
47
48
  AppSuspendData,
48
49
  BannerSpec,
49
- Exception,
50
50
  ExceptionHandler,
51
51
  ExceptionHandlerOptions,
52
52
  HoistAppModel,
53
- HoistException,
54
53
  HoistService,
55
54
  HoistServiceClass,
56
55
  HoistUser,
package/core/index.ts CHANGED
@@ -21,9 +21,7 @@ export * from './RefreshContextView';
21
21
  export * from './HoistAppModel';
22
22
  export * from './HoistAuthModel';
23
23
 
24
- export * from './exception/ExceptionHandler';
25
- export * from './exception/Exception';
26
- export * from './exception/Types';
24
+ export * from './ExceptionHandler';
27
25
 
28
26
  // Explicitly exporting `XH` helps IntelliJ suggest the correct import from this core package.
29
27
  export {XH, XHApi} from './XH';
@@ -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
  /**
@@ -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,
@@ -86,9 +86,3 @@ export type PageState =
86
86
  * The page is in the process of being unloaded by the browser (this is a terminal state x_x).
87
87
  */
88
88
  | 'terminated';
89
-
90
- /** Severity Level for log statement */
91
- export type LogLevel = 'error' | 'warn' | 'info' | 'debug';
92
-
93
- /** Object identifying the source of log statement. Typically, a javascript class */
94
- export type LogSource = string | {displayName: string} | {constructor: {name: string}};
@@ -7,7 +7,7 @@
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';
10
+ import {logError} from '@xh/hoist/utils/js';
11
11
  import {castArray, flatMap, groupBy, isArray, isFunction} from 'lodash';
12
12
  import {FieldFilter} from './FieldFilter';
13
13
  import {Filter} from './Filter';
@@ -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,8 +7,7 @@
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
- import {throwIf} from '@xh/hoist/utils/js';
10
+ import {logDebug, throwIf} from '@xh/hoist/utils/js';
12
11
  import {isArray, isEmpty, isFinite, isNil, isPlainObject, isString, round} from 'lodash';
13
12
  import {DashContainerViewSpec} from '../DashContainerViewSpec';
14
13
  import GoldenLayout, {ContentItem} from 'golden-layout';
@@ -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
 
@@ -0,0 +1,81 @@
1
+ /*
2
+ * This file belongs to Hoist, an application development toolkit
3
+ * developed by Extremely Heavy Industries (www.xh.io | info@xh.io)
4
+ *
5
+ * Copyright © 2025 Extremely Heavy Industries Inc.
6
+ */
7
+ import type {PlainObject} from '@xh/hoist/core';
8
+ import type {HoistException, TimeoutException, TimeoutExceptionConfig} from './Types';
9
+
10
+ import {isPlainObject} from 'lodash';
11
+
12
+ /**
13
+ * Standardized Exception/Error objects.
14
+ *
15
+ * The main entry point for this class is the create() method.
16
+ * Applications can use this method to create various generic runtime exceptions.
17
+ * @see ExceptionHandler.handleException
18
+ */
19
+ export class Exception {
20
+ /**
21
+ * Create and return a HoistException
22
+ *
23
+ * See {@link XH.exception} - an alias for this factory off of `XH`.
24
+ *
25
+ * @param src - If a native JS Error, it will be enhanced into a HoistException and returned.
26
+ * If a plain object, all properties will be set on a new HoistException.
27
+ * Other inputs will be treated as the `message` of a new HoistException.
28
+ */
29
+ static create(src: unknown): HoistException {
30
+ if (isHoistException(src)) return src;
31
+ if (src instanceof Error) return this.createInternal({}, src);
32
+
33
+ const attributes: PlainObject = isPlainObject(src) ? src : {message: src?.toString()};
34
+ return this.createInternal({
35
+ name: 'Exception',
36
+ message: 'An unknown error occurred',
37
+ ...attributes
38
+ });
39
+ }
40
+
41
+ /** Create an Error for when an operation (e.g. a Promise) times out. */
42
+ static timeout(config: TimeoutExceptionConfig): TimeoutException {
43
+ const {interval, ...rest} = config,
44
+ // Display timeout in seconds if an even multiple (or very close to it).
45
+ displayInterval =
46
+ interval % 1000 < 5 && interval > 2000
47
+ ? `${Math.round(interval / 1000)}secs`
48
+ : `${interval}ms`;
49
+
50
+ return this.createInternal({
51
+ name: 'Timeout Exception',
52
+ // Note FetchService.managedFetchAsync appends to this message - review if changing.
53
+ message: `Timed out after ${displayInterval}`,
54
+ isTimeout: true,
55
+ stack: null,
56
+ interval,
57
+ ...rest
58
+ }) as TimeoutException;
59
+ }
60
+
61
+ private static createInternal(attributes: PlainObject, baseError?: Error) {
62
+ const {message, ...rest} = attributes;
63
+ const ret = Object.assign(
64
+ baseError ?? new Error(message),
65
+ {
66
+ isRoutine: false,
67
+ isHoistException: true
68
+ },
69
+ rest
70
+ ) as HoistException;
71
+
72
+ // statuses of 0, 4XX, 5XX are server errors, so stack irrelevant and potentially misleading
73
+ if (ret.stack == null || /^[045]/.test(ret.httpStatus)) delete ret.stack;
74
+
75
+ return ret;
76
+ }
77
+ }
78
+
79
+ export function isHoistException(src: unknown): src is HoistException {
80
+ return src?.['isHoistException'];
81
+ }
@@ -4,8 +4,7 @@
4
4
  *
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
- import {PlainObject} from '@xh/hoist/core';
8
- import {FetchOptions} from '@xh/hoist/svc';
7
+ import type {PlainObject} from '@xh/hoist/core';
9
8
 
10
9
  /**
11
10
  * A Hoist optimized Javascript Error object.
@@ -39,26 +38,6 @@ export interface TimeoutException extends HoistException {
39
38
  interval: number;
40
39
  }
41
40
 
42
- /**
43
- * Exception thrown to indicate an HTTP error resulting from a call to FetchService.
44
- */
45
- export interface FetchException extends HoistException {
46
- /** Http Status code associated with exception. 0 if no response received. */
47
- httpStatus: number;
48
-
49
- /** Rich object or string containing details about the exception as sent by server. */
50
- serverDetails: string | PlainObject;
51
-
52
- /** Options of underlying fetch call. */
53
- fetchOptions: FetchOptions;
54
-
55
- /**
56
- * True if exception resulted from the fetch being aborted by fetchService, or the application.
57
- * @see FetchService.abort and FetchOptions.autoAbortKey.
58
- */
59
- isFetchAborted: boolean;
60
- }
61
-
62
41
  /**
63
42
  * Configuration for generating a timeout exception.
64
43
  *
@@ -4,5 +4,5 @@
4
4
  *
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
-
8
- export * from './LogUtils';
7
+ export * from './Types';
8
+ export * from './Exception';
@@ -5,8 +5,7 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
 
8
- import {logError} from '@xh/hoist/utils/log';
9
- import {checkVersion} from '@xh/hoist/utils/version';
8
+ import {checkVersion, logError} from '@xh/hoist/utils/js';
10
9
 
11
10
  /**
12
11
  * The exports below are ag-Grid components provided at runtime by applications.
@@ -5,8 +5,7 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
 
8
- import {logError} from '@xh/hoist/utils/log';
9
- import {checkVersion} from '@xh/hoist/utils/version';
8
+ import {checkVersion, logError} from '@xh/hoist/utils/js';
10
9
 
11
10
  export let Highcharts = null;
12
11
 
@@ -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 {
@@ -8,8 +8,7 @@ import {GridModel} from '@xh/hoist/cmp/grid';
8
8
  import {hoistCmp, MenuItemLike, useContextModel} from '@xh/hoist/core';
9
9
  import {Icon} from '@xh/hoist/icon';
10
10
  import '@xh/hoist/mobile/register';
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 {menuButton, MenuButtonProps} from '../../menu';
14
13
 
15
14
  export interface ExpandToLevelButtonProps extends MenuButtonProps {
@@ -7,8 +7,7 @@
7
7
  import {hoistCmp, useContextModel} from '@xh/hoist/core';
8
8
  import {Icon} from '@xh/hoist/icon';
9
9
  import {button, ButtonProps} from '@xh/hoist/mobile/cmp/button';
10
- import {withDefault} from '@xh/hoist/utils/js';
11
- import {logError} from '@xh/hoist/utils/log';
10
+ import {logError, withDefault} from '@xh/hoist/utils/js';
12
11
  import {ZoneGridModel} from '@xh/hoist/cmp/zoneGrid';
13
12
  import '@xh/hoist/mobile/register';
14
13
 
@@ -25,7 +25,7 @@ import {omitBy} from 'lodash';
25
25
  import {isValidElement, ReactNode, ReactElement} from 'react';
26
26
  import {panelHeader} from './impl/PanelHeader';
27
27
  import './Panel.scss';
28
- import {logWarn} from '@xh/hoist/utils/log';
28
+ import {logWarn} from '@xh/hoist/utils/js';
29
29
 
30
30
  export interface PanelProps extends HoistProps, Omit<BoxProps, 'title'> {
31
31
  /** A toolbar to be docked at the bottom of the panel. */
package/mobx/overrides.ts CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  observable,
14
14
  runInAction
15
15
  } from 'mobx';
16
- import {logError} from '@xh/hoist/utils/log/LogUtils';
16
+ import {logError} from '@xh/hoist/utils/js';
17
17
 
18
18
  /**
19
19
  * An enhanced version of the native mobx makeObservable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "76.0.0-SNAPSHOT.1758215282397",
3
+ "version": "76.0.0-SNAPSHOT.1758297294348",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",
@@ -6,15 +6,15 @@
6
6
  */
7
7
  import {
8
8
  Thunkable,
9
- Exception,
10
9
  ExceptionHandlerOptions,
11
10
  TaskObserver,
12
11
  TrackOptions,
13
12
  XH,
14
13
  Some,
15
- Awaitable,
16
- TimeoutExceptionConfig
14
+ Awaitable
17
15
  } from '@xh/hoist/core';
16
+ import {Exception, TimeoutExceptionConfig} from '@xh/hoist/exception';
17
+
18
18
  import {action} from '@xh/hoist/mobx';
19
19
  import {olderThan, SECONDS} from '@xh/hoist/utils/datetime';
20
20
  import {castArray, isFunction, isNumber, isString} from 'lodash';
@@ -5,7 +5,8 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
  import {br, fragment} from '@xh/hoist/cmp/layout';
8
- import {HoistBase, isHoistException, managed, XH} from '@xh/hoist/core';
8
+ import {isHoistException} from '@xh/hoist/exception';
9
+ import {HoistBase, managed, XH} from '@xh/hoist/core';
9
10
  import {Icon} from '@xh/hoist/icon';
10
11
  import {action, makeObservable} from '@xh/hoist/mobx';
11
12
  import {never, wait} from '@xh/hoist/promise';
@@ -13,8 +14,7 @@ import {Token} from '@xh/hoist/security/Token';
13
14
  import {AccessTokenSpec, TokenMap} from './Types';
14
15
  import {Timer} from '@xh/hoist/utils/async';
15
16
  import {MINUTES, olderThan, ONE_MINUTE, SECONDS} from '@xh/hoist/utils/datetime';
16
- import {logError} from '@xh/hoist/utils/log';
17
- import {isJSON, throwIf} from '@xh/hoist/utils/js';
17
+ import {isJSON, logError, throwIf} from '@xh/hoist/utils/js';
18
18
  import {compact, find, forEach, head, isEmpty, isObject, keys, map, pickBy, union} from 'lodash';
19
19
  import ShortUniqueId from 'short-unique-id';
20
20
 
@@ -17,8 +17,7 @@ import {
17
17
  } from '@azure/msal-browser';
18
18
  import {AppState, PlainObject, XH} from '@xh/hoist/core';
19
19
  import {Token} from '@xh/hoist/security/Token';
20
- import {mergeDeep, throwIf} from '@xh/hoist/utils/js';
21
- import {logDebug, logError, logInfo, logWarn} from '@xh/hoist/utils/log';
20
+ import {logDebug, logError, logInfo, logWarn, mergeDeep, throwIf} from '@xh/hoist/utils/js';
22
21
  import {withFormattedTimestamps} from '@xh/hoist/format';
23
22
  import {flatMap, union, uniq} from 'lodash';
24
23
  import {BaseOAuthClient, BaseOAuthClientConfig} from '../BaseOAuthClient';
@@ -8,7 +8,7 @@ import {HoistService, XH} from '@xh/hoist/core';
8
8
  // @ts-ignore
9
9
  import jsonFromMarkdown from '@xh/app-changelog.json';
10
10
  import {action, makeObservable, observable} from '@xh/hoist/mobx';
11
- import {checkMinVersion} from '@xh/hoist/utils/version';
11
+ import {checkMinVersion} from '@xh/hoist/utils/js';
12
12
  import {isEmpty, forOwn, includes} from 'lodash';
13
13
 
14
14
  /**
@@ -11,8 +11,7 @@ import {action, makeObservable, observable} from '@xh/hoist/mobx';
11
11
  import hoistPkg from '@xh/hoist/package.json';
12
12
  import {Timer} from '@xh/hoist/utils/async';
13
13
  import {MINUTES, SECONDS} from '@xh/hoist/utils/datetime';
14
- import {checkMaxVersion, checkMinVersion} from '@xh/hoist/utils/version';
15
- import {deepFreeze} from '@xh/hoist/utils/js';
14
+ import {checkMaxVersion, checkMinVersion, deepFreeze} from '@xh/hoist/utils/js';
16
15
  import {defaults, isFinite} from 'lodash';
17
16
  import mobxPkg from 'mobx/package.json';
18
17
  import {version as reactVersion} from 'react';