@xh/hoist 78.0.0-SNAPSHOT.1763504782361 → 78.0.0-SNAPSHOT.1763606028729

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
@@ -2,11 +2,21 @@
2
2
 
3
3
  ## 78.0.0-SNAPSHOT - unreleased
4
4
 
5
+ ### 🎁 New Features
6
+
7
+ * `FieldFilter` implementation expanded to support `not begins` and `not ends` operators.
8
+
9
+ ### 🐞 Bug Fixes
10
+
11
+ * Fixed `GridModel` not appending children to the parents correctly when loaded data uses a
12
+ numerical ID.
13
+
5
14
  ### ⚙️ Technical
6
15
 
7
16
  * `FetchService` will recognize variants on the `application/json` content-type when processing
8
17
  failed responses and decoding exceptions - e.g. `application/problem+json`.
9
18
 
19
+
10
20
  ## 77.1.1 - 2025-11-12
11
21
 
12
22
  ### 🎁 New Features
@@ -8,7 +8,7 @@ export interface CompoundFilterSpec {
8
8
  /** logical operator 'AND' (default) or 'OR'. */
9
9
  op?: CompoundFilterOperator;
10
10
  }
11
- export type FieldFilterOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'like' | 'not like' | 'begins' | 'ends' | 'includes' | 'excludes';
11
+ export type FieldFilterOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'like' | 'not like' | 'begins' | 'not begins' | 'ends' | 'not ends' | 'includes' | 'excludes';
12
12
  export interface FieldFilterSpec {
13
13
  /** Name of Field to filter or Field instance. */
14
14
  field: string | Field;
@@ -23,6 +23,6 @@ export declare class CustomRowModel extends HoistModel {
23
23
  get hideInput(): boolean;
24
24
  constructor(parentModel: CustomTabModel, op?: FieldFilterOperator, value?: any);
25
25
  removeRow(): void;
26
- getOperatorLabel(op: FieldFilterOperator): "includes" | "excludes" | "Equals" | "Not equals" | "Greater than" | "Greater than or equals" | "Less than" | "Less than or equals" | "Like" | "Not like" | "Begins with" | "Ends with";
26
+ getOperatorLabel(op: FieldFilterOperator): "includes" | "not begins" | "not ends" | "excludes" | "Equals" | "Not equals" | "Greater than" | "Greater than or equals" | "Less than" | "Less than or equals" | "Like" | "Not like" | "Begins with" | "Ends with";
27
27
  }
28
28
  export {};
@@ -230,7 +230,12 @@ export class StoreRecord {
230
230
  this.raw = raw;
231
231
  this.committedData = committedData;
232
232
  this.parentId = parent?.id;
233
- this.treePath = parent ? [...parent.treePath, id] : [id];
233
+ /*
234
+ * See https://www.ag-grid.com/javascript-data-grid/tree-data-paths/
235
+ * Each row's position in the hierarchy must be provided to the grid as an array of strings,
236
+ * representing the path to the row.
237
+ */
238
+ this.treePath = parent ? [...parent.treePath, id.toString()] : [id.toString()];
234
239
  this.isSummary = isSummary;
235
240
  }
236
241
 
@@ -54,7 +54,9 @@ export class FieldFilter extends Filter {
54
54
  'like',
55
55
  'not like',
56
56
  'begins',
57
+ 'not begins',
57
58
  'ends',
59
+ 'not ends',
58
60
  'includes',
59
61
  'excludes'
60
62
  ];
@@ -64,7 +66,9 @@ export class FieldFilter extends Filter {
64
66
  'like',
65
67
  'not like',
66
68
  'begins',
69
+ 'not begins',
67
70
  'ends',
71
+ 'not ends',
68
72
  'includes',
69
73
  'excludes'
70
74
  ];
@@ -161,10 +165,18 @@ export class FieldFilter extends Filter {
161
165
  regExps = value.map(v => new RegExp('^' + escapeRegExp(v), 'i'));
162
166
  opFn = v => regExps.some(re => re.test(v));
163
167
  break;
168
+ case 'not begins':
169
+ regExps = value.map(v => new RegExp('^' + escapeRegExp(v), 'i'));
170
+ opFn = v => regExps.every(re => !re.test(v));
171
+ break;
164
172
  case 'ends':
165
173
  regExps = value.map(v => new RegExp(escapeRegExp(v) + '$', 'i'));
166
174
  opFn = v => regExps.some(re => re.test(v));
167
175
  break;
176
+ case 'not ends':
177
+ regExps = value.map(v => new RegExp(escapeRegExp(v) + '$', 'i'));
178
+ opFn = v => regExps.every(re => !re.test(v));
179
+ break;
168
180
  case 'includes':
169
181
  opFn = v => !isNil(v) && v.some(it => value.includes(it));
170
182
  break;
@@ -28,7 +28,9 @@ export type FieldFilterOperator =
28
28
  | 'like'
29
29
  | 'not like'
30
30
  | 'begins'
31
+ | 'not begins'
31
32
  | 'ends'
33
+ | 'not ends'
32
34
  | 'includes'
33
35
  | 'excludes';
34
36
  export interface FieldFilterSpec {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "78.0.0-SNAPSHOT.1763504782361",
3
+ "version": "78.0.0-SNAPSHOT.1763606028729",
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",