@trackunit/filters-graphql-hook 1.5.145 → 1.5.147
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 +11 -4
- package/index.esm.js +11 -4
- package/package.json +10 -10
- package/src/generated/graphql-api/graphql.d.ts +2 -0
package/index.cjs.js
CHANGED
|
@@ -232,9 +232,17 @@ const fleetDataHealthIssueCategory = {
|
|
|
232
232
|
COVERAGE_ISSUES: "COVERAGE_ISSUES",
|
|
233
233
|
DEVICE_BATTERY_ISSUES: "DEVICE_BATTERY_ISSUES",
|
|
234
234
|
INSTALL_AND_CONFIGURATION_HEALTH: "INSTALL_AND_CONFIGURATION_HEALTH",
|
|
235
|
+
NON_REPORTING_UNIT: "NON_REPORTING_UNIT",
|
|
236
|
+
};
|
|
237
|
+
const fleetDataHealthIssueState = {
|
|
238
|
+
IGNORE: "IGNORE",
|
|
239
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
240
|
+
OPEN: "OPEN",
|
|
241
|
+
RESOLVED: "RESOLVED",
|
|
235
242
|
};
|
|
236
243
|
const fleetDataHealthIssueType = {
|
|
237
244
|
BLUETOOTH_DISABLED: "BLUETOOTH_DISABLED",
|
|
245
|
+
DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED",
|
|
238
246
|
DIGITAL_KEY_DISABLED: "DIGITAL_KEY_DISABLED",
|
|
239
247
|
INSTALLATION_VALIDATION_MISSING: "INSTALLATION_VALIDATION_MISSING",
|
|
240
248
|
LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE",
|
|
@@ -347,7 +355,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
347
355
|
const { systemOfMeasurement } = reactCoreHooks.useCurrentUserSystemOfMeasurement();
|
|
348
356
|
const customFields = useCustomFieldFilters(filters);
|
|
349
357
|
// TODO make typesafe checks for all filters
|
|
350
|
-
|
|
358
|
+
return react.useMemo(() => {
|
|
351
359
|
if (!filters) {
|
|
352
360
|
return {};
|
|
353
361
|
}
|
|
@@ -376,8 +384,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
376
384
|
servicePlanAssignments: fixTypes(filters.servicePlanStatus, servicePlanStatus),
|
|
377
385
|
servicePlanIds: valueNameArrayOrUndefined(filters.servicePlan),
|
|
378
386
|
servicePlanStatuses: fixTypes(filters.serviceStatus, servicePlanStatus),
|
|
379
|
-
serviceProviderIds: valueNameArrayOrUndefined(filters.serviceProvider),
|
|
380
|
-
//currently we support only 1 filter value to be set so there won't be a second value, soon the partnerId will be transformed to a normal filter and will support an array of strings
|
|
387
|
+
serviceProviderIds: valueNameArrayOrUndefined(filters.serviceProvider), //currently we support only 1 filter value to be set so there won't be a second value, soon the partnerId will be transformed to a normal filter and will support an array of strings
|
|
381
388
|
partnerId: valueNameArrayOrUndefined(filters.partner)?.[0],
|
|
382
389
|
groups: valueNameArrayOrUndefined(filters.groups),
|
|
383
390
|
siteIds: valueNameArrayOrUndefined(filters.siteIds),
|
|
@@ -391,9 +398,9 @@ const useActiveAssetFilters = (filters) => {
|
|
|
391
398
|
owningDepotSiteIds: valueNameArrayOrUndefined(filters.siteDepotOwnershipIds),
|
|
392
399
|
fleetHealthTypes: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthTypes), fleetDataHealthIssueType),
|
|
393
400
|
fleetHealthCategories: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthCategories), fleetDataHealthIssueCategory),
|
|
401
|
+
fleetHealthStates: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthStates), fleetDataHealthIssueState),
|
|
394
402
|
};
|
|
395
403
|
}, [filters, customFields, systemOfMeasurement]);
|
|
396
|
-
return filter;
|
|
397
404
|
};
|
|
398
405
|
const booleanArraySchema = zod.z.array(zod.z.boolean());
|
|
399
406
|
|
package/index.esm.js
CHANGED
|
@@ -230,9 +230,17 @@ const fleetDataHealthIssueCategory = {
|
|
|
230
230
|
COVERAGE_ISSUES: "COVERAGE_ISSUES",
|
|
231
231
|
DEVICE_BATTERY_ISSUES: "DEVICE_BATTERY_ISSUES",
|
|
232
232
|
INSTALL_AND_CONFIGURATION_HEALTH: "INSTALL_AND_CONFIGURATION_HEALTH",
|
|
233
|
+
NON_REPORTING_UNIT: "NON_REPORTING_UNIT",
|
|
234
|
+
};
|
|
235
|
+
const fleetDataHealthIssueState = {
|
|
236
|
+
IGNORE: "IGNORE",
|
|
237
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
238
|
+
OPEN: "OPEN",
|
|
239
|
+
RESOLVED: "RESOLVED",
|
|
233
240
|
};
|
|
234
241
|
const fleetDataHealthIssueType = {
|
|
235
242
|
BLUETOOTH_DISABLED: "BLUETOOTH_DISABLED",
|
|
243
|
+
DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED",
|
|
236
244
|
DIGITAL_KEY_DISABLED: "DIGITAL_KEY_DISABLED",
|
|
237
245
|
INSTALLATION_VALIDATION_MISSING: "INSTALLATION_VALIDATION_MISSING",
|
|
238
246
|
LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE",
|
|
@@ -345,7 +353,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
345
353
|
const { systemOfMeasurement } = useCurrentUserSystemOfMeasurement();
|
|
346
354
|
const customFields = useCustomFieldFilters(filters);
|
|
347
355
|
// TODO make typesafe checks for all filters
|
|
348
|
-
|
|
356
|
+
return useMemo(() => {
|
|
349
357
|
if (!filters) {
|
|
350
358
|
return {};
|
|
351
359
|
}
|
|
@@ -374,8 +382,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
374
382
|
servicePlanAssignments: fixTypes(filters.servicePlanStatus, servicePlanStatus),
|
|
375
383
|
servicePlanIds: valueNameArrayOrUndefined(filters.servicePlan),
|
|
376
384
|
servicePlanStatuses: fixTypes(filters.serviceStatus, servicePlanStatus),
|
|
377
|
-
serviceProviderIds: valueNameArrayOrUndefined(filters.serviceProvider),
|
|
378
|
-
//currently we support only 1 filter value to be set so there won't be a second value, soon the partnerId will be transformed to a normal filter and will support an array of strings
|
|
385
|
+
serviceProviderIds: valueNameArrayOrUndefined(filters.serviceProvider), //currently we support only 1 filter value to be set so there won't be a second value, soon the partnerId will be transformed to a normal filter and will support an array of strings
|
|
379
386
|
partnerId: valueNameArrayOrUndefined(filters.partner)?.[0],
|
|
380
387
|
groups: valueNameArrayOrUndefined(filters.groups),
|
|
381
388
|
siteIds: valueNameArrayOrUndefined(filters.siteIds),
|
|
@@ -389,9 +396,9 @@ const useActiveAssetFilters = (filters) => {
|
|
|
389
396
|
owningDepotSiteIds: valueNameArrayOrUndefined(filters.siteDepotOwnershipIds),
|
|
390
397
|
fleetHealthTypes: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthTypes), fleetDataHealthIssueType),
|
|
391
398
|
fleetHealthCategories: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthCategories), fleetDataHealthIssueCategory),
|
|
399
|
+
fleetHealthStates: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthStates), fleetDataHealthIssueState),
|
|
392
400
|
};
|
|
393
401
|
}, [filters, customFields, systemOfMeasurement]);
|
|
394
|
-
return filter;
|
|
395
402
|
};
|
|
396
403
|
const booleanArraySchema = z.array(z.boolean());
|
|
397
404
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-graphql-hook",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.147",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"graphql": "^16.10.0",
|
|
14
14
|
"@apollo/client": "3.13.8",
|
|
15
15
|
"zod": "3.23.4",
|
|
16
|
-
"@trackunit/iris-app-build-utilities": "1.3.
|
|
17
|
-
"@trackunit/filters-filter-bar": "1.4.
|
|
18
|
-
"@trackunit/shared-utils": "1.5.
|
|
19
|
-
"@trackunit/iris-app-api": "1.3.
|
|
20
|
-
"@trackunit/react-core-contexts-test": "1.3.
|
|
21
|
-
"@trackunit/i18n-library-translation": "1.3.
|
|
22
|
-
"@trackunit/react-core-contexts-api": "1.4.
|
|
23
|
-
"@trackunit/react-core-hooks": "1.3.
|
|
24
|
-
"@trackunit/react-test-setup": "1.0.
|
|
16
|
+
"@trackunit/iris-app-build-utilities": "1.3.173",
|
|
17
|
+
"@trackunit/filters-filter-bar": "1.4.7",
|
|
18
|
+
"@trackunit/shared-utils": "1.5.163",
|
|
19
|
+
"@trackunit/iris-app-api": "1.3.173",
|
|
20
|
+
"@trackunit/react-core-contexts-test": "1.3.181",
|
|
21
|
+
"@trackunit/i18n-library-translation": "1.3.187",
|
|
22
|
+
"@trackunit/react-core-contexts-api": "1.4.171",
|
|
23
|
+
"@trackunit/react-core-hooks": "1.3.178",
|
|
24
|
+
"@trackunit/react-test-setup": "1.0.53"
|
|
25
25
|
},
|
|
26
26
|
"module": "./index.esm.js",
|
|
27
27
|
"main": "./index.cjs.js",
|
|
@@ -392,6 +392,7 @@ export declare const fleetDataHealthIssueCategory: {
|
|
|
392
392
|
readonly COVERAGE_ISSUES: "COVERAGE_ISSUES";
|
|
393
393
|
readonly DEVICE_BATTERY_ISSUES: "DEVICE_BATTERY_ISSUES";
|
|
394
394
|
readonly INSTALL_AND_CONFIGURATION_HEALTH: "INSTALL_AND_CONFIGURATION_HEALTH";
|
|
395
|
+
readonly NON_REPORTING_UNIT: "NON_REPORTING_UNIT";
|
|
395
396
|
};
|
|
396
397
|
export type FleetDataHealthIssueCategory = (typeof fleetDataHealthIssueCategory)[keyof typeof fleetDataHealthIssueCategory];
|
|
397
398
|
export declare const fleetDataHealthIssueState: {
|
|
@@ -403,6 +404,7 @@ export declare const fleetDataHealthIssueState: {
|
|
|
403
404
|
export type FleetDataHealthIssueState = (typeof fleetDataHealthIssueState)[keyof typeof fleetDataHealthIssueState];
|
|
404
405
|
export declare const fleetDataHealthIssueType: {
|
|
405
406
|
readonly BLUETOOTH_DISABLED: "BLUETOOTH_DISABLED";
|
|
407
|
+
readonly DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED";
|
|
406
408
|
readonly DIGITAL_KEY_DISABLED: "DIGITAL_KEY_DISABLED";
|
|
407
409
|
readonly INSTALLATION_VALIDATION_MISSING: "INSTALLATION_VALIDATION_MISSING";
|
|
408
410
|
readonly LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE";
|