@trackunit/filters-graphql-hook 1.33.8 → 1.33.11
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/index.cjs.js +9 -2
- package/index.esm.js +9 -2
- package/package.json +9 -9
- package/src/generated/graphql-api/graphql.d.ts +2 -0
package/index.cjs.js
CHANGED
|
@@ -400,13 +400,20 @@ const useCustomFieldFilters = (filters) => {
|
|
|
400
400
|
const customFieldValue = value;
|
|
401
401
|
if (key.startsWith(CustomFieldPrefix$1)) {
|
|
402
402
|
const definitionId = key.replace(CustomFieldPrefix$1, "");
|
|
403
|
-
if (
|
|
403
|
+
if (typeof customFieldValue === "string" && customFieldValue !== "") {
|
|
404
|
+
result.push({
|
|
405
|
+
definitionId,
|
|
406
|
+
stringWildcardValue: customFieldValue,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
else if (filtersFilterBar.isStringArrayFilterValue(customFieldValue) && customFieldValue.length > 0) {
|
|
404
410
|
result.push({
|
|
405
411
|
definitionId,
|
|
406
412
|
stringArrayValue: customFieldValue,
|
|
407
413
|
});
|
|
408
414
|
}
|
|
409
|
-
else if (filtersFilterBar.isMinMaxFilterValue(customFieldValue) &&
|
|
415
|
+
else if (filtersFilterBar.isMinMaxFilterValue(customFieldValue) &&
|
|
416
|
+
(customFieldValue.min !== undefined || customFieldValue.max !== undefined)) {
|
|
410
417
|
result.push({
|
|
411
418
|
definitionId,
|
|
412
419
|
numberRange: {
|
package/index.esm.js
CHANGED
|
@@ -398,13 +398,20 @@ const useCustomFieldFilters = (filters) => {
|
|
|
398
398
|
const customFieldValue = value;
|
|
399
399
|
if (key.startsWith(CustomFieldPrefix$1)) {
|
|
400
400
|
const definitionId = key.replace(CustomFieldPrefix$1, "");
|
|
401
|
-
if (
|
|
401
|
+
if (typeof customFieldValue === "string" && customFieldValue !== "") {
|
|
402
|
+
result.push({
|
|
403
|
+
definitionId,
|
|
404
|
+
stringWildcardValue: customFieldValue,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
else if (isStringArrayFilterValue(customFieldValue) && customFieldValue.length > 0) {
|
|
402
408
|
result.push({
|
|
403
409
|
definitionId,
|
|
404
410
|
stringArrayValue: customFieldValue,
|
|
405
411
|
});
|
|
406
412
|
}
|
|
407
|
-
else if (isMinMaxFilterValue(customFieldValue) &&
|
|
413
|
+
else if (isMinMaxFilterValue(customFieldValue) &&
|
|
414
|
+
(customFieldValue.min !== undefined || customFieldValue.max !== undefined)) {
|
|
408
415
|
result.push({
|
|
409
416
|
definitionId,
|
|
410
417
|
numberRange: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-graphql-hook",
|
|
3
|
-
"version": "1.33.
|
|
3
|
+
"version": "1.33.11",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"@graphql-codegen/cli": "^5.0.3",
|
|
11
11
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
12
12
|
"zod": "^3.25.76",
|
|
13
|
-
"@trackunit/iris-app-build-utilities": "1.18.
|
|
14
|
-
"@trackunit/filters-filter-bar": "1.27.
|
|
15
|
-
"@trackunit/shared-utils": "1.15.
|
|
16
|
-
"@trackunit/iris-app-api": "1.20.
|
|
17
|
-
"@trackunit/react-core-contexts-test": "1.17.
|
|
18
|
-
"@trackunit/i18n-library-translation": "1.22.
|
|
19
|
-
"@trackunit/iris-app-runtime-core-api": "1.16.
|
|
20
|
-
"@trackunit/react-core-hooks": "1.17.
|
|
13
|
+
"@trackunit/iris-app-build-utilities": "1.18.10",
|
|
14
|
+
"@trackunit/filters-filter-bar": "1.27.10",
|
|
15
|
+
"@trackunit/shared-utils": "1.15.9",
|
|
16
|
+
"@trackunit/iris-app-api": "1.20.10",
|
|
17
|
+
"@trackunit/react-core-contexts-test": "1.17.9",
|
|
18
|
+
"@trackunit/i18n-library-translation": "1.22.4",
|
|
19
|
+
"@trackunit/iris-app-runtime-core-api": "1.16.9",
|
|
20
|
+
"@trackunit/react-core-hooks": "1.17.13"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@apollo/client": "^3.13.8",
|
|
@@ -695,6 +695,8 @@ export type CustomFieldFilter = {
|
|
|
695
695
|
stringArrayValue?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
696
696
|
/** The string value of the custom field value input. */
|
|
697
697
|
stringValue?: InputMaybe<Scalars["String"]["input"]>;
|
|
698
|
+
/** The string wildcard value of the custom field value input. */
|
|
699
|
+
stringWildcardValue?: InputMaybe<Scalars["String"]["input"]>;
|
|
698
700
|
};
|
|
699
701
|
export type CustomFieldNumberRange = {
|
|
700
702
|
/** The smallest number to include. */
|