@xh/hoist 74.0.0-SNAPSHOT.1747678860024 → 74.0.0-SNAPSHOT.1747680094010
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.
|
@@ -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
|
|
36
|
-
valueFromRecord
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "74.0.0-SNAPSHOT.
|
|
3
|
+
"version": "74.0.0-SNAPSHOT.1747680094010",
|
|
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",
|