@xh/hoist 73.0.0-SNAPSHOT.1747414706232 → 73.0.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.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,16 @@
1
1
  # Changelog
2
2
 
3
- ## v73.0.0-SNAPSHOT - unreleased
3
+ ## v73.0.1 - 2025-05-19
4
4
 
5
- ### 💥 Breaking Changes (upgrade difficulty: 🟢 TRIVIAL - minor upgrade to Hoist Core)
5
+ ### 🐞 Bug Fixes
6
+
7
+ * Fixed a minor issue with Admin Console Role Management.
8
+
9
+ ## v73.0.0 - 2025-05-16
10
+
11
+ ### 💥 Breaking Changes (upgrade difficulty: 🟢 LOW - upgrade to Hoist Core)
6
12
 
7
- * Requires `hoist-core >= 30.1` with new APIs to support the consolidated Admin Console "Clients"
13
+ * Requires `hoist-core >= 31` with new APIs to support the consolidated Admin Console "Clients"
8
14
  tab and new properties on `TrackLog`.
9
15
  * Apps with a custom `AppModel` for their admin app that extends `@xh/hoist/admin/AppModel` must
10
16
  ensure they call `super.initAsync()` within their override of that lifecycle method, if
@@ -21,7 +27,7 @@
21
27
  * Added ability to append terms to active filter *only* when `commitOnChage:false`
22
28
  * Added new `PopoverFilterChooser` component - wraps `FilterChooser` in a `Popover` to allow it to
23
29
  expand vertically when used in a `Toolbar` or other space-constrained, single-line layout.
24
- * Enhanced OAuth clients with a new `reloginEnabled` config. Set to true to allow the client to do a
30
+ * Enhanced OAuth clients with a new `reloginEnabled` config. Set to true to allow the client to do a
25
31
  potentially interactive popup login mid-session to re-establish auth if its refresh token has
26
32
  expired or been invalidated. Strongly recommended for all OAuth usages.
27
33
  * Significantly upgraded the Admin Console "User Activity" tab:
@@ -76,8 +82,8 @@ build. That said, we *strongly* recommend taking these same changes into your ap
76
82
 
77
83
  * @xh/hoist-dev-utils `10.x → 11.x`
78
84
  * eslint `8.x → 9.x`
79
- * Apps making this update must also rename their `.eslintrc` file to `eslint.config.js`. See the
80
- configuration found in Toolbox's `eslint.config.js` as your new baseline.
85
+ * Apps making this update must also rename their `.eslintrc` file to `eslint.config.js`. See the
86
+ configuration found in Toolbox's `eslint.config.js` as your new baseline.
81
87
  * eslint-config-prettier `9.x → 10.x`
82
88
  * typescript `5.1 → 5.8`
83
89
 
@@ -11,7 +11,7 @@ import {HoistModel, managed, ReactionSpec, SelectOption, TaskObserver, XH} from
11
11
  import {RecordActionSpec, required} from '@xh/hoist/data';
12
12
  import {actionCol, calcActionColWidth, selectEditor} from '@xh/hoist/desktop/cmp/grid';
13
13
  import {Icon} from '@xh/hoist/icon';
14
- import {action, computed, observable} from '@xh/hoist/mobx';
14
+ import {action, computed, makeObservable, observable} from '@xh/hoist/mobx';
15
15
  import {groupBy, isNil, isString, map, sortBy, uniq, without} from 'lodash';
16
16
  import {RoleModel} from '../../RoleModel';
17
17
  import {HoistRole, RoleMemberType, RoleModuleConfig} from '../../Types';
@@ -72,6 +72,8 @@ export class RoleFormModel extends HoistModel {
72
72
 
73
73
  constructor(roleModel: RoleModel) {
74
74
  super();
75
+ makeObservable(this);
76
+
75
77
  this.roleModel = roleModel;
76
78
  this.addReaction(
77
79
  this.clearDegenerateRowReaction(this.usersGridModel),
@@ -6,10 +6,12 @@
6
6
  */
7
7
  import {table, tbody, td, th, tr} from '@xh/hoist/cmp/layout';
8
8
  import {AboutDialogItem, HoistModel, XH} from '@xh/hoist/core';
9
- import {action, observable, makeObservable} from '@xh/hoist/mobx';
10
- import {warnIf} from '@xh/hoist/utils/js';
9
+ import {action, makeObservable, observable} from '@xh/hoist/mobx';
11
10
  import {isOmitted} from '@xh/hoist/utils/impl';
11
+ import {warnIf} from '@xh/hoist/utils/js';
12
+ import copy from 'clipboard-copy';
12
13
  import {isNull} from 'lodash';
14
+ import {Icon} from '../icon';
13
15
 
14
16
  /**
15
17
  * @internal
@@ -50,7 +52,24 @@ export class AboutDialogModel extends HoistModel {
50
52
  }
51
53
 
52
54
  getTable() {
53
- const rows = this.getItems().map(it => tr(th(it.label), td(it.value)));
55
+ const rows = this.getItems().map(it =>
56
+ tr(
57
+ th(it.label),
58
+ td({
59
+ item: it.value,
60
+ onClick: () => {
61
+ const val = it.value?.toString();
62
+ if (val === 'null' || val === '[object Object]') return;
63
+
64
+ copy(val);
65
+ XH.toast({
66
+ icon: Icon.clipboard(),
67
+ message: `Copied ${val} to clipboard`
68
+ });
69
+ }
70
+ })
71
+ )
72
+ );
54
73
  return table(tbody(rows));
55
74
  }
56
75
 
@@ -31,8 +31,8 @@ export declare class GridFilterFieldSpec extends BaseFilterFieldSpec {
31
31
  defaultOp: FieldFilterOperator;
32
32
  valueCount: number;
33
33
  constructor({ filterModel, renderer, inputProps, defaultOp, ...rest }: GridFilterFieldSpecConfig);
34
+ getUniqueValue(value: unknown): unknown;
34
35
  loadValuesFromSource(): void;
35
- cleanFilter(filter: any): any;
36
- valueFromRecord(record: any): any;
37
- getUniqueValue(value: any): any;
36
+ private cleanFilter;
37
+ private valueFromRecord;
38
38
  }
@@ -7,7 +7,7 @@
7
7
  import {ColumnRenderer} from '@xh/hoist/cmp/grid';
8
8
  import {HoistInputProps} from '@xh/hoist/cmp/input';
9
9
  import {PlainObject} from '@xh/hoist/core';
10
- import {FieldFilterOperator, parseFilter, View} from '@xh/hoist/data';
10
+ import {FieldFilterOperator, parseFilter, StoreRecord, View} from '@xh/hoist/data';
11
11
  import {
12
12
  BaseFilterFieldSpec,
13
13
  BaseFilterFieldSpecConfig
@@ -61,6 +61,11 @@ export class GridFilterFieldSpec extends BaseFilterFieldSpec {
61
61
  this.defaultOp = this.ops.includes(defaultOp) ? defaultOp : this.ops[0];
62
62
  }
63
63
 
64
+ getUniqueValue(value: unknown) {
65
+ // Return ms timestamp for dates to facilitate uniqueness check
66
+ return isDate(value) ? value.getTime() : value;
67
+ }
68
+
64
69
  //------------------------
65
70
  // Implementation
66
71
  //------------------------
@@ -112,7 +117,7 @@ export class GridFilterFieldSpec extends BaseFilterFieldSpec {
112
117
  }
113
118
 
114
119
  // Recursively modify a Filter|CompoundFilter to remove all FieldFilters referencing this column
115
- cleanFilter(filter) {
120
+ private cleanFilter(filter) {
116
121
  if (!filter) return filter;
117
122
 
118
123
  const {field, filters, op} = filter;
@@ -126,13 +131,8 @@ export class GridFilterFieldSpec extends BaseFilterFieldSpec {
126
131
  return filter;
127
132
  }
128
133
 
129
- valueFromRecord(record) {
134
+ private valueFromRecord(record: StoreRecord) {
130
135
  const {filterModel, field} = this;
131
136
  return filterModel.toDisplayValue(record.get(field));
132
137
  }
133
-
134
- getUniqueValue(value) {
135
- // Return ms timestamp for dates to facilitate uniqueness check
136
- return isDate(value) ? value.getTime() : value;
137
- }
138
138
  }
@@ -279,6 +279,7 @@ export class ZoneMapperModel extends HoistModel {
279
279
  this.mappings = mappings;
280
280
  }
281
281
 
282
+ @action
282
283
  private removeZoneMapping(zone: Zone, field: string) {
283
284
  let mappings = cloneDeep(this.mappings);
284
285
  mappings[zone] = mappings[zone].filter(it => it.field !== field);
@@ -78,8 +78,9 @@ export class HoistAppModel extends HoistModel {
78
78
  {label: 'Hoist Core', value: svc.get('hoistCoreVersion')},
79
79
  {label: 'Hoist React', value: svc.get('hoistReactVersion')},
80
80
  {label: 'User Agent', value: window.navigator.userAgent},
81
- {label: 'Tab/Load IDs', value: XH.tabId + ' / ' + XH.loadId},
82
- {label: 'Server', value: svc.serverInstance},
81
+ {label: 'Tab ID', value: XH.tabId},
82
+ {label: 'Load ID', value: XH.loadId},
83
+ {label: 'Server Instance', value: svc.serverInstance},
83
84
  {label: 'WebSockets', value: webSocketIndicator()}
84
85
  ];
85
86
  }
@@ -16,17 +16,18 @@
16
16
  }
17
17
 
18
18
  th {
19
- text-align: right;
20
- vertical-align: middle;
21
- white-space: nowrap;
22
19
  background-color: var(--xh-bg-alt);
23
20
  border-bottom: var(--xh-border-solid);
24
21
  border-right: var(--xh-border-solid);
25
- padding: var(--xh-pad-half-px);
22
+ padding: var(--xh-pad-half-px) var(--xh-pad-px);
23
+ text-align: right;
24
+ vertical-align: middle;
25
+ white-space: nowrap;
26
26
  }
27
27
 
28
28
  td {
29
29
  border-bottom: var(--xh-border-solid);
30
+ cursor: copy;
30
31
  padding: var(--xh-pad-half-px);
31
32
  }
32
33
  }
@@ -5,13 +5,13 @@
5
5
  }
6
6
 
7
7
  th {
8
- text-align: right;
9
- vertical-align: middle;
10
- white-space: nowrap;
11
8
  background-color: var(--xh-bg-alt);
12
9
  border-bottom: var(--xh-border-solid);
13
10
  border-right: var(--xh-border-solid);
14
- padding: var(--xh-pad-half-px);
11
+ padding: var(--xh-pad-half-px) var(--xh-pad-px);
12
+ text-align: right;
13
+ vertical-align: top;
14
+ white-space: nowrap;
15
15
  }
16
16
 
17
17
  td {
package/mobx/overrides.ts CHANGED
@@ -81,7 +81,7 @@ export function checkMakeObservable(target: any) {
81
81
  if (!isEmpty(missing)) {
82
82
  logError(
83
83
  `Observable properties [${missing.join(', ')}] not initialized properly. ` +
84
- 'Ensure you call makeObservable() in your constructor',
84
+ 'Ensure you call makeObservable(this) in your constructor',
85
85
  target
86
86
  );
87
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "73.0.0-SNAPSHOT.1747414706232",
3
+ "version": "73.0.1",
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",