@xh/hoist 78.0.0-SNAPSHOT.1763504782361 → 78.0.0-SNAPSHOT.1763568169798
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 +5 -0
- package/build/types/data/filter/Types.d.ts +1 -1
- package/build/types/desktop/cmp/grid/impl/filter/headerfilter/custom/CustomRowModel.d.ts +1 -1
- package/data/filter/FieldFilter.ts +12 -0
- package/data/filter/Types.ts +2 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
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
|
+
|
|
5
9
|
### ⚙️ Technical
|
|
6
10
|
|
|
7
11
|
* `FetchService` will recognize variants on the `application/json` content-type when processing
|
|
8
12
|
failed responses and decoding exceptions - e.g. `application/problem+json`.
|
|
9
13
|
|
|
14
|
+
|
|
10
15
|
## 77.1.1 - 2025-11-12
|
|
11
16
|
|
|
12
17
|
### 🎁 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 {};
|
|
@@ -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;
|
package/data/filter/Types.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "78.0.0-SNAPSHOT.
|
|
3
|
+
"version": "78.0.0-SNAPSHOT.1763568169798",
|
|
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",
|