@xh/hoist 69.0.0-SNAPSHOT.1729090176936 → 69.1.0

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
@@ -1,6 +1,27 @@
1
1
  # Changelog
2
2
 
3
- ## 69.0.0-SNAPSHOT - unreleased
3
+ ## 69.1.0 - 2024-11-07
4
+
5
+ ### 🐞 Bug Fixes
6
+
7
+ * Updated minimum required version of FontAwesome to 6.6, as required by the `fileXml()` icon added
8
+ in the prior Hoist release. The previous spec for FA dependencies allowed apps to upgrade to 6.6,
9
+ but did not enforce it, which could result in a build error due to an unresolved import.
10
+
11
+ ### ⚙️ Technical
12
+
13
+ * Deprecated `FileChooserModel.removeAllFiles()`, replaced with `clear()` for brevity/consistency.
14
+ * Improved timeout error message thrown by `FetchService` to format the timeout interval in seconds
15
+ where possible.
16
+
17
+ ### 📚 Libraries
18
+
19
+ * @azure/msal-browser `3.23 → 3.27`
20
+ * @fortawesome/fontawesome-pro `6.2 → 6.6`
21
+ * qs `6.12 → 6.13`
22
+ * store2 `2.13 → 2.14`
23
+
24
+ ## 69.0.0 - 2024-10-17
4
25
 
5
26
  ### 💥 Breaking Changes (upgrade difficulty: 🟢 LOW - Hoist core update)
6
27
 
@@ -8,7 +29,6 @@
8
29
  new memory monitoring persistence.
9
30
  * Replaced `AppState.INITIALIZING` with finer-grained states (not expected to impact most apps).
10
31
 
11
-
12
32
  ### 🎁 New Features
13
33
 
14
34
  * Optimized activity tracking to batch its calls to the server, reducing network overhead.
@@ -216,6 +236,7 @@
216
236
 
217
237
  * Requires update to `hoist-dev-utils >= v9.0.0` with updated handling of static/public assets.
218
238
  This should be a drop-in change for applications.
239
+ * iOS < 16.4 is no longer supported, due to the use of complex RegExes in GFM parsing.
219
240
 
220
241
  ### 🎁 New Features
221
242
 
@@ -48,6 +48,7 @@ const modelSpec: RestGridConfig = {
48
48
  persistWith: {localStorageKey: 'xhAdminMonitorState'},
49
49
  colChooserModel: true,
50
50
  enableExport: true,
51
+ showRefreshButton: true,
51
52
  store: {
52
53
  url: 'rest/monitorAdmin',
53
54
  fieldDefaults: {disableXssProtection: true},
@@ -18,9 +18,7 @@ export declare class Exception {
18
18
  * Other inputs will be treated as the `message` of a new HoistException.
19
19
  */
20
20
  static create(src: unknown): HoistException;
21
- /**
22
- * Create an Error for when an operation (e.g. a Promise) times out.
23
- */
21
+ /** Create an Error for when an operation (e.g. a Promise) times out. */
24
22
  static timeout(config: TimeoutExceptionConfig): TimeoutException;
25
23
  /**
26
24
  * Create an Error to throw when a fetch call returns a !ok response.
@@ -83,6 +83,7 @@ export declare const autoRefreshAppOption: ({ formFieldProps, inputProps }?: Aut
83
83
  suppressContentEditableWarning?: boolean;
84
84
  suppressHydrationWarning?: boolean;
85
85
  accessKey?: string;
86
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {});
86
87
  autoFocus?: boolean;
87
88
  contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only";
88
89
  dir?: string;
@@ -106,7 +107,6 @@ export declare const autoRefreshAppOption: ({ formFieldProps, inputProps }?: Aut
106
107
  rev?: string;
107
108
  typeof?: string;
108
109
  vocab?: string;
109
- autoCapitalize?: string;
110
110
  autoCorrect?: string;
111
111
  autoSave?: string;
112
112
  color?: string;
@@ -117,12 +117,12 @@ export declare const autoRefreshAppOption: ({ formFieldProps, inputProps }?: Aut
117
117
  itemRef?: string;
118
118
  results?: number;
119
119
  security?: string;
120
- unselectable?: "on" | "off";
120
+ unselectable?: "off" | "on";
121
121
  inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal";
122
122
  is?: string;
123
123
  "aria-activedescendant"?: string;
124
124
  "aria-atomic"?: boolean | "true" | "false";
125
- "aria-autocomplete"?: "list" | "none" | "inline" | "both";
125
+ "aria-autocomplete"?: "none" | "list" | "inline" | "both";
126
126
  "aria-braillelabel"?: string;
127
127
  "aria-brailleroledescription"?: string;
128
128
  "aria-busy"?: boolean | "true" | "false";
@@ -81,6 +81,7 @@ export declare const themeAppOption: ({ formFieldProps, inputProps }?: ThemeAppO
81
81
  suppressContentEditableWarning?: boolean;
82
82
  suppressHydrationWarning?: boolean;
83
83
  accessKey?: string;
84
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {});
84
85
  autoFocus?: boolean;
85
86
  contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only";
86
87
  dir?: string;
@@ -104,7 +105,6 @@ export declare const themeAppOption: ({ formFieldProps, inputProps }?: ThemeAppO
104
105
  rev?: string;
105
106
  typeof?: string;
106
107
  vocab?: string;
107
- autoCapitalize?: string;
108
108
  autoCorrect?: string;
109
109
  autoSave?: string;
110
110
  color?: string;
@@ -115,12 +115,12 @@ export declare const themeAppOption: ({ formFieldProps, inputProps }?: ThemeAppO
115
115
  itemRef?: string;
116
116
  results?: number;
117
117
  security?: string;
118
- unselectable?: "on" | "off";
118
+ unselectable?: "off" | "on";
119
119
  inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal";
120
120
  is?: string;
121
121
  "aria-activedescendant"?: string;
122
122
  "aria-atomic"?: boolean | "true" | "false";
123
- "aria-autocomplete"?: "list" | "none" | "inline" | "both";
123
+ "aria-autocomplete"?: "none" | "list" | "inline" | "both";
124
124
  "aria-braillelabel"?: string;
125
125
  "aria-brailleroledescription"?: string;
126
126
  "aria-busy"?: boolean | "true" | "false";
@@ -13,11 +13,11 @@ export declare class FileChooserModel extends HoistModel {
13
13
  */
14
14
  addFiles(filesToAdd: File[]): void;
15
15
  setSingleFile(file: File): void;
16
- /**
17
- * Remove a single file from the current selection.
18
- */
16
+ /** Remove a single file from the current selection. */
19
17
  removeFileByName(name: string): void;
20
18
  /** Clear the current selection. */
19
+ clear(): void;
20
+ /** @deprecated use clear() instead */
21
21
  removeAllFiles(): void;
22
22
  private createGridModel;
23
23
  onDrop(accepted: any, rejected: any, enableMulti: any): void;
@@ -4,10 +4,10 @@
4
4
  *
5
5
  * Copyright © 2024 Extremely Heavy Industries Inc.
6
6
  */
7
+ import {PlainObject, XH} from '@xh/hoist/core';
7
8
  import {FetchOptions} from '@xh/hoist/svc';
8
- import {PlainObject, XH} from '../';
9
+ import {pluralize} from '@xh/hoist/utils/js';
9
10
  import {isPlainObject} from 'lodash';
10
-
11
11
  import {FetchException, HoistException, TimeoutException, TimeoutExceptionConfig} from './Types';
12
12
 
13
13
  /**
@@ -39,15 +39,19 @@ export class Exception {
39
39
  });
40
40
  }
41
41
 
42
- /**
43
- * Create an Error for when an operation (e.g. a Promise) times out.
44
- */
42
+ /** Create an Error for when an operation (e.g. a Promise) times out. */
45
43
  static timeout(config: TimeoutExceptionConfig): TimeoutException {
46
44
  const {interval, ...rest} = config,
47
- displayInterval = interval % 1000 ? `${interval}ms` : `${interval / 1000}s`;
45
+ // Display timeout in seconds if an even multiple (or very close to it).
46
+ displayInterval =
47
+ interval % 1000 < 5
48
+ ? pluralize('second', Math.round(interval / 1000), true)
49
+ : `${interval}ms`;
50
+
48
51
  return this.createInternal({
49
52
  name: 'Timeout Exception',
50
- message: `Operation timed out after ${displayInterval}`,
53
+ // Note FetchService.managedFetchAsync appends to this message - review if changing.
54
+ message: `Timed out after ${displayInterval}`,
51
55
  isTimeout: true,
52
56
  stack: null,
53
57
  interval,
@@ -10,6 +10,7 @@ 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';
13
14
  import {isEmpty} from 'codemirror/src/util/misc';
14
15
  import filesize from 'filesize';
15
16
  import {find, uniqBy, without} from 'lodash';
@@ -51,9 +52,7 @@ export class FileChooserModel extends HoistModel {
51
52
  this.files = [file];
52
53
  }
53
54
 
54
- /**
55
- * Remove a single file from the current selection.
56
- */
55
+ /** Remove a single file from the current selection. */
57
56
  @action
58
57
  removeFileByName(name: string) {
59
58
  const toRemove = find(this.files, {name});
@@ -62,10 +61,16 @@ export class FileChooserModel extends HoistModel {
62
61
 
63
62
  /** Clear the current selection. */
64
63
  @action
65
- removeAllFiles() {
64
+ clear() {
66
65
  this.files = [];
67
66
  }
68
67
 
68
+ /** @deprecated use clear() instead */
69
+ removeAllFiles() {
70
+ apiDeprecated('FileChooserModel.removeAllFiles()', {msg: 'Use clear() instead'});
71
+ this.clear();
72
+ }
73
+
69
74
  //------------------------
70
75
  // Implementation
71
76
  //------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "69.0.0-SNAPSHOT.1729090176936",
3
+ "version": "69.1.0",
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",
@@ -31,17 +31,17 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@auth0/auth0-spa-js": "~2.1.3",
34
- "@azure/msal-browser": "~3.23.0",
34
+ "@azure/msal-browser": "~3.27.0",
35
35
  "@blueprintjs/core": "^5.10.5",
36
36
  "@blueprintjs/datetime": "^5.3.7",
37
37
  "@blueprintjs/datetime2": "^2.3.7",
38
- "@fortawesome/fontawesome-pro": "^6.2.1",
39
- "@fortawesome/fontawesome-svg-core": "^6.2.1",
40
- "@fortawesome/pro-light-svg-icons": "^6.2.1",
41
- "@fortawesome/pro-regular-svg-icons": "^6.2.1",
42
- "@fortawesome/pro-solid-svg-icons": "^6.2.1",
43
- "@fortawesome/pro-thin-svg-icons": "^6.2.1",
44
- "@fortawesome/react-fontawesome": "^0.2.0",
38
+ "@fortawesome/fontawesome-pro": "^6.6.0",
39
+ "@fortawesome/fontawesome-svg-core": "^6.6.0",
40
+ "@fortawesome/pro-light-svg-icons": "^6.6.0",
41
+ "@fortawesome/pro-regular-svg-icons": "^6.6.0",
42
+ "@fortawesome/pro-solid-svg-icons": "^6.6.0",
43
+ "@fortawesome/pro-thin-svg-icons": "^6.6.0",
44
+ "@fortawesome/react-fontawesome": "^0.2.2",
45
45
  "@onsenui/fastclick": "~1.1.1",
46
46
  "@popperjs/core": "~2.11.0",
47
47
  "@seznam/compose-react-refs": "~1.0.5",
@@ -65,7 +65,7 @@
65
65
  "moment": "~2.30.1",
66
66
  "numbro": "~2.5.0",
67
67
  "onsenui": "~2.12.8",
68
- "qs": "~6.12.1",
68
+ "qs": "~6.13.0",
69
69
  "react-beautiful-dnd": "~13.1.0",
70
70
  "react-dates": "~21.8.0",
71
71
  "react-dropzone": "~10.2.2",
@@ -84,7 +84,7 @@
84
84
  "router5-plugin-browser": "~7.0.2",
85
85
  "semver": "~7.6.0",
86
86
  "short-unique-id": "~5.2.0",
87
- "store2": "~2.13.1",
87
+ "store2": "~2.14.3",
88
88
  "ua-parser-js": "~1.0.2"
89
89
  },
90
90
  "peerDependencies": {
@@ -314,7 +314,8 @@ export class FetchService extends HoistService {
314
314
  const msg =
315
315
  isObject(timeout) && 'message' in timeout
316
316
  ? timeout.message
317
- : `Timed out loading '${opts.url}' - no response after ${e.interval}ms.`;
317
+ : // Exception.timeout() message already includes interval - add URL here.
318
+ e.message + ` loading '${opts.url}'`;
318
319
  throw Exception.fetchTimeout(opts, e, msg);
319
320
  }
320
321