@xh/hoist 75.0.0-SNAPSHOT.1753485410401 → 75.0.0-SNAPSHOT.1753487024547

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.
package/CHANGELOG.md CHANGED
@@ -12,16 +12,15 @@
12
12
  * A new `ExpandToLevelButton` menu component is also available for both desktop and mobile.
13
13
  Provides easier discoverability on desktop and supports this feature on mobile, where we
14
14
  don't have context menus.
15
+ * Enhanced `FilterChooser` to better handle filters with different `op`s on the same field.
16
+ * Multiple "inclusive" ops (e.g. `=`, `like`) will be OR'ed together.
17
+ * Multiple "exclusive" ops (e.g. `!=`, `not like`) will be AND'ed together.
18
+ * Range ops (e.g. `<`, `>` ) use a heuristic to avoid creating a filter that could never match.
19
+ * This behavior is consistent with current behavior and user intuition and should maximize the
20
+ ability to create useful queries using this component.
21
+ * Deprecated the `RelativeTimestamp.options` prop - all the same options are now top-level props.
15
22
  * Added new `GroupingChooserModel.sortDimensions` config. Set to `false` to respect the order in
16
23
  which `dimensions` are provided to the model.
17
- * The usage of the `RelativeTimestamp` component has been streamlined by deprecating the `options`
18
- prop. All `RelativeTimestampOptions` are now supported by this component as top-level props.
19
- * `FilterChooserModel` has been enhanced to better handle multiple simultaneous filters with
20
- different `op`s on the same field. "Inclusive" ops (e.g. `=`, `like`) will be OR'ed together,
21
- "Exclusive" ops (e.g. `!=`, `not like`) will be AND'ed together and range ops (e.g. `<`, `>` )
22
- will use a heuristic to create a meaningful query that will actually return results. This
23
- behavior is consistent with current behavior and user intuition, and should maximize the ability
24
- to create useful queries.
25
24
 
26
25
  ### 🐞 Bug Fixes
27
26
 
@@ -34,6 +33,23 @@
34
33
  * Fixed framework components that bind to grids (e.g. `ColChooserButton`, `ColAutosizeButton`,
35
34
  `GridFindField`), ensuring they automatically rebind to a new observable `GridModel` via context.
36
35
 
36
+ ### ⚙️ Technical
37
+
38
+ * Hoist now sets a reference to an app's singleton `AuthModel` on a static `instance` property of
39
+ the app-specified class. App developers can declare a typed static `instance` property on their
40
+ model class and use it to access the singleton with its proper type, vs. `XH.authModel`.
41
+ * The `XH.authModel` property is still set and available - this is a non-breaking change.
42
+ * This approach was already (and continues to be) used for services and the `AppModel` singleton.
43
+
44
+ ### 💥 Breaking Changes (upgrade difficulty: 🟢 LOW - removing deprecations)
45
+
46
+ * Removed deprecated `LoadSupport.isLoadSupport`
47
+ * Removed deprecated `FileChooserModel.removeAllFiles`
48
+ * Removed deprecated `FetchService.setDefaultHeaders`
49
+ * Removed deprecated `FetchService.setDefaultTimeout`
50
+ * Removed deprecated `IdentityService.logoutAsync`
51
+
52
+
37
53
  ## v74.1.2 - 2025-07-03
38
54
 
39
55
  ### 🐞 Bug Fixes
@@ -52,6 +52,4 @@ export declare class LoadSpec {
52
52
  * {@link LoadSupport} class as part of its managed `loadAsync()` wrapper.
53
53
  */
54
54
  constructor(config: LoadSpecConfig, owner: LoadSupport);
55
- /** @deprecated Applications should use `instanceof` instead of this property. */
56
- get isLoadSpec(): boolean;
57
55
  }
@@ -17,8 +17,6 @@ export declare class FileChooserModel extends HoistModel {
17
17
  removeFileByName(name: string): void;
18
18
  /** Clear the current selection. */
19
19
  clear(): void;
20
- /** @deprecated use clear() instead */
21
- removeAllFiles(): void;
22
20
  private createGridModel;
23
21
  onDrop(accepted: any, rejected: any, enableMulti: any): void;
24
22
  onFilesChange(files: any): void;
@@ -115,18 +115,6 @@ export declare class FetchService extends HoistService {
115
115
  * @returns false if no request pending for the given key.
116
116
  */
117
117
  abort(autoAbortKey: string): boolean;
118
- /**
119
- * Set the timeout (default 30 seconds) to be used for all requests made via this service that
120
- * do not themselves spec a custom timeout.
121
- * @deprecated modify `defaultTimeout` directly instead.
122
- */
123
- setDefaultTimeout(timeout: PromiseTimeoutSpec): void;
124
- /**
125
- * Set default headers to be sent with all subsequent requests.
126
- * @param headers - to be sent with all fetch requests, or a function to generate.
127
- * @deprecated use addDefaultHeaders instead.
128
- */
129
- setDefaultHeaders(headers: DefaultHeaders): void;
130
118
  private fetchInternalAsync;
131
119
  private sendJsonInternalAsync;
132
120
  private withCorrelationId;
@@ -23,11 +23,6 @@ export declare class IdentityService extends HoistService {
23
23
  */
24
24
  get authUser(): HoistUser;
25
25
  get authUsername(): string;
26
- /**
27
- * Logs the current user out and reloads the application.
28
- * @deprecated use XH.logoutAsync() instead.
29
- */
30
- logoutAsync(): Promise<void>;
31
26
  /** Is an impersonation session currently active? */
32
27
  get isImpersonating(): boolean;
33
28
  /**
@@ -1,4 +1,5 @@
1
1
  import { Thunkable } from '@xh/hoist/core';
2
+ import { LogSource } from '@xh/hoist/utils/js/LogUtils';
2
3
  /**
3
4
  * Get a cached value on an object, creating it if it does not yet exist.
4
5
  *
@@ -64,6 +65,8 @@ export interface APIWarnOptions {
64
65
  v?: string;
65
66
  /** An additional message. Can contain suggestions for alternatives. */
66
67
  msg?: string;
68
+ /** Source of message for labelling log message. */
69
+ source?: LogSource;
67
70
  }
68
71
  /**
69
72
  * Document and prevent usage of a removed parameter.
@@ -50,3 +50,5 @@ export declare function logError(msgs: Some<unknown>, source?: LogSource): unkno
50
50
  * @param source - class, function or string to label the source of the message
51
51
  */
52
52
  export declare function logWarn(msgs: Some<unknown>, source?: LogSource): unknown;
53
+ /** Parse a LogSource in to a canonical string label. */
54
+ export declare function parseSource(source: LogSource): string;
@@ -138,7 +138,8 @@ class RelativeTimestampLocalModel extends HoistModel {
138
138
  apiDeprecated('options', {
139
139
  test: componentProps.options,
140
140
  msg: 'Spread options directly in this object instead',
141
- v: `77`
141
+ v: `v78`,
142
+ source: RelativeTimestamp
142
143
  });
143
144
 
144
145
  return componentProps.options ?? componentProps;
@@ -5,7 +5,6 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
 
8
- import {apiDeprecated} from '@xh/hoist/utils/js';
9
8
  import {PlainObject} from '../types/Types';
10
9
  import {LoadSupport} from './';
11
10
 
@@ -95,10 +94,4 @@ export class LoadSpec {
95
94
 
96
95
  Object.freeze(this);
97
96
  }
98
-
99
- /** @deprecated Applications should use `instanceof` instead of this property. */
100
- get isLoadSpec(): boolean {
101
- apiDeprecated('isLoadSpec', {v: '68', msg: 'Use `instanceof` instead.'});
102
- return true;
103
- }
104
97
  }
@@ -10,7 +10,6 @@ import {actionCol, calcActionColWidth} from '@xh/hoist/desktop/cmp/grid';
10
10
  import '@xh/hoist/desktop/register';
11
11
  import {Icon} from '@xh/hoist/icon';
12
12
  import {action, makeObservable, observable} from '@xh/hoist/mobx';
13
- import {apiDeprecated} from '@xh/hoist/utils/js';
14
13
  import {isEmpty} from 'codemirror/src/util/misc';
15
14
  import filesize from 'filesize';
16
15
  import {find, uniqBy, without} from 'lodash';
@@ -65,12 +64,6 @@ export class FileChooserModel extends HoistModel {
65
64
  this.files = [];
66
65
  }
67
66
 
68
- /** @deprecated use clear() instead */
69
- removeAllFiles() {
70
- apiDeprecated('FileChooserModel.removeAllFiles()', {msg: 'Use clear() instead'});
71
- this.clear();
72
- }
73
-
74
67
  //------------------------
75
68
  // Implementation
76
69
  //------------------------
@@ -106,7 +106,9 @@ export const [GroupingChooser, groupingChooser] = hoistCmp.withFactory<GroupingC
106
106
 
107
107
  if (!isUndefined(popoverTitle)) {
108
108
  apiDeprecated('GroupingChooser.popoverTitle', {
109
- msg: `Update to use 'editorTitle' instead`
109
+ msg: `Update to use 'editorTitle' instead`,
110
+ v: `v78`,
111
+ source: GroupingChooser
110
112
  });
111
113
  editorTitle = popoverTitle;
112
114
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "75.0.0-SNAPSHOT.1753485410401",
3
+ "version": "75.0.0-SNAPSHOT.1753487024547",
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",
@@ -15,7 +15,7 @@ import {
15
15
  } from '@xh/hoist/core';
16
16
  import {PromiseTimeoutSpec} from '@xh/hoist/promise';
17
17
  import {isLocalDate, SECONDS} from '@xh/hoist/utils/datetime';
18
- import {apiDeprecated, warnIf} from '@xh/hoist/utils/js';
18
+ import {warnIf} from '@xh/hoist/utils/js';
19
19
  import {StatusCodes} from 'http-status-codes';
20
20
  import {isDate, isFunction, isNil, isObject, isString, omit, omitBy} from 'lodash';
21
21
  import {IStringifyOptions, stringify} from 'qs';
@@ -186,32 +186,6 @@ export class FetchService extends HoistService {
186
186
  return true;
187
187
  }
188
188
 
189
- //-------------
190
- // Deprecations
191
- //-------------
192
- /**
193
- * Set the timeout (default 30 seconds) to be used for all requests made via this service that
194
- * do not themselves spec a custom timeout.
195
- * @deprecated modify `defaultTimeout` directly instead.
196
- */
197
- setDefaultTimeout(timeout: PromiseTimeoutSpec) {
198
- apiDeprecated('setDefaultTimeout', {
199
- v: '68',
200
- msg: 'Modify `defaultTimeout` directly instead.'
201
- });
202
- this.defaultTimeout = timeout;
203
- }
204
-
205
- /**
206
- * Set default headers to be sent with all subsequent requests.
207
- * @param headers - to be sent with all fetch requests, or a function to generate.
208
- * @deprecated use addDefaultHeaders instead.
209
- */
210
- setDefaultHeaders(headers: DefaultHeaders) {
211
- apiDeprecated('setDefaultHeaders', {v: '66', msg: 'Use addDefaultHeaders instead'});
212
- this.addDefaultHeaders(headers);
213
- }
214
-
215
189
  //-----------------------
216
190
  // Implementation
217
191
  //-----------------------
@@ -5,7 +5,7 @@
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
7
  import {HoistService, HoistUser, XH} from '@xh/hoist/core';
8
- import {apiDeprecated, deepFreeze, throwIf} from '@xh/hoist/utils/js';
8
+ import {deepFreeze, throwIf} from '@xh/hoist/utils/js';
9
9
 
10
10
  /**
11
11
  * Provides basic information related to the authenticated user, including application roles.
@@ -54,15 +54,6 @@ export class IdentityService extends HoistService {
54
54
  return this.authUser?.username ?? null;
55
55
  }
56
56
 
57
- /**
58
- * Logs the current user out and reloads the application.
59
- * @deprecated use XH.logoutAsync() instead.
60
- */
61
- async logoutAsync() {
62
- apiDeprecated('logoutAsync', {v: '67', msg: 'Call XH.logoutAsync() instead.'});
63
- return XH.logoutAsync();
64
- }
65
-
66
57
  //------------------------
67
58
  // Impersonation
68
59
  //------------------------