@trackunit/filters-graphql-hook 2.1.86 → 2.1.88
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
CHANGED
|
@@ -476,6 +476,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
476
476
|
activities: fixTypes(filters.activity, assetActivityState),
|
|
477
477
|
geometry: parsedArea.success ? parsedArea.data : undefined,
|
|
478
478
|
brands: stringArrayOrUndefined(filters.brands),
|
|
479
|
+
countries: stringArrayOrUndefined(filters.countries),
|
|
479
480
|
types: stringArrayOrUndefined(filters.types),
|
|
480
481
|
criticalities: fixTypes(filters.criticality, assetCriticalityState),
|
|
481
482
|
productionYears: valueNameArrayOrUndefined(filters.productionYears),
|
|
@@ -525,6 +526,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
525
526
|
fleetHealthDeviceStatuses: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthStatus), fleetDataHealthDeviceStatus),
|
|
526
527
|
deviceTypes: valueNameArrayOrUndefined(filters.deviceTypes),
|
|
527
528
|
firmwareVersion: valueNameArrayOrUndefined(filters.firmwareVersion),
|
|
529
|
+
modbusProfile: valueNameArrayOrUndefined(filters.modbusProfile),
|
|
528
530
|
sustainabilityExcluded: valueBooleanOrUndefined(filters.assetVisibility),
|
|
529
531
|
accessManagementDesiredModes: fixTypes(filters.accessManagementMode, accessManagementMode),
|
|
530
532
|
insightsFilters: {
|
|
@@ -610,6 +612,7 @@ const assetFiltersInputSchema = zod.z
|
|
|
610
612
|
assetIds: zod.z.array(zod.z.string()).optional(),
|
|
611
613
|
assetTypes: zod.z.array(zod.z.nativeEnum(assetType)).optional(),
|
|
612
614
|
brands: zod.z.array(zod.z.string()).optional(),
|
|
615
|
+
countries: zod.z.array(zod.z.string()).optional(),
|
|
613
616
|
criticalities: zod.z.array(zod.z.nativeEnum(assetCriticalityState)).optional(),
|
|
614
617
|
customerIds: zod.z.array(zod.z.string()).optional(),
|
|
615
618
|
deviceTypes: zod.z.array(zod.z.string()).optional(),
|
|
@@ -633,6 +636,7 @@ const assetFiltersInputSchema = zod.z
|
|
|
633
636
|
.optional(),
|
|
634
637
|
lastSeen: zod.z.nativeEnum(assetLastSeen).optional(),
|
|
635
638
|
metadataCompleteness: zod.z.nativeEnum(metadataCompleteness).optional(),
|
|
639
|
+
modbusProfile: zod.z.array(zod.z.string()).optional(),
|
|
636
640
|
models: zod.z.array(zod.z.string()).optional(),
|
|
637
641
|
ownerAccountIds: zod.z.array(zod.z.string()).optional(),
|
|
638
642
|
owningDepotSiteIds: zod.z.array(zod.z.string()).optional(),
|
|
@@ -770,6 +774,9 @@ const convertAssetFiltersInputToFilterBarValues = (input) => {
|
|
|
770
774
|
if (parsed.data.brands !== undefined) {
|
|
771
775
|
filterBarValues.brands = parsed.data.brands;
|
|
772
776
|
}
|
|
777
|
+
if (parsed.data.countries !== undefined) {
|
|
778
|
+
filterBarValues.countries = parsed.data.countries;
|
|
779
|
+
}
|
|
773
780
|
if (parsed.data.types !== undefined) {
|
|
774
781
|
filterBarValues.types = parsed.data.types;
|
|
775
782
|
}
|
|
@@ -785,6 +792,9 @@ const convertAssetFiltersInputToFilterBarValues = (input) => {
|
|
|
785
792
|
if (parsed.data.firmwareVersion !== undefined) {
|
|
786
793
|
filterBarValues.firmwareVersion = toValueNameArray(parsed.data.firmwareVersion);
|
|
787
794
|
}
|
|
795
|
+
if (parsed.data.modbusProfile !== undefined) {
|
|
796
|
+
filterBarValues.modbusProfile = toValueNameArray(parsed.data.modbusProfile);
|
|
797
|
+
}
|
|
788
798
|
if (parsed.data.activities !== undefined) {
|
|
789
799
|
filterBarValues.activity = parsed.data.activities;
|
|
790
800
|
}
|
package/index.esm.js
CHANGED
|
@@ -474,6 +474,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
474
474
|
activities: fixTypes(filters.activity, assetActivityState),
|
|
475
475
|
geometry: parsedArea.success ? parsedArea.data : undefined,
|
|
476
476
|
brands: stringArrayOrUndefined(filters.brands),
|
|
477
|
+
countries: stringArrayOrUndefined(filters.countries),
|
|
477
478
|
types: stringArrayOrUndefined(filters.types),
|
|
478
479
|
criticalities: fixTypes(filters.criticality, assetCriticalityState),
|
|
479
480
|
productionYears: valueNameArrayOrUndefined(filters.productionYears),
|
|
@@ -523,6 +524,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
523
524
|
fleetHealthDeviceStatuses: fixTypes(valueNameArrayOrUndefined(filters.fleetHealthStatus), fleetDataHealthDeviceStatus),
|
|
524
525
|
deviceTypes: valueNameArrayOrUndefined(filters.deviceTypes),
|
|
525
526
|
firmwareVersion: valueNameArrayOrUndefined(filters.firmwareVersion),
|
|
527
|
+
modbusProfile: valueNameArrayOrUndefined(filters.modbusProfile),
|
|
526
528
|
sustainabilityExcluded: valueBooleanOrUndefined(filters.assetVisibility),
|
|
527
529
|
accessManagementDesiredModes: fixTypes(filters.accessManagementMode, accessManagementMode),
|
|
528
530
|
insightsFilters: {
|
|
@@ -608,6 +610,7 @@ const assetFiltersInputSchema = z
|
|
|
608
610
|
assetIds: z.array(z.string()).optional(),
|
|
609
611
|
assetTypes: z.array(z.nativeEnum(assetType)).optional(),
|
|
610
612
|
brands: z.array(z.string()).optional(),
|
|
613
|
+
countries: z.array(z.string()).optional(),
|
|
611
614
|
criticalities: z.array(z.nativeEnum(assetCriticalityState)).optional(),
|
|
612
615
|
customerIds: z.array(z.string()).optional(),
|
|
613
616
|
deviceTypes: z.array(z.string()).optional(),
|
|
@@ -631,6 +634,7 @@ const assetFiltersInputSchema = z
|
|
|
631
634
|
.optional(),
|
|
632
635
|
lastSeen: z.nativeEnum(assetLastSeen).optional(),
|
|
633
636
|
metadataCompleteness: z.nativeEnum(metadataCompleteness).optional(),
|
|
637
|
+
modbusProfile: z.array(z.string()).optional(),
|
|
634
638
|
models: z.array(z.string()).optional(),
|
|
635
639
|
ownerAccountIds: z.array(z.string()).optional(),
|
|
636
640
|
owningDepotSiteIds: z.array(z.string()).optional(),
|
|
@@ -768,6 +772,9 @@ const convertAssetFiltersInputToFilterBarValues = (input) => {
|
|
|
768
772
|
if (parsed.data.brands !== undefined) {
|
|
769
773
|
filterBarValues.brands = parsed.data.brands;
|
|
770
774
|
}
|
|
775
|
+
if (parsed.data.countries !== undefined) {
|
|
776
|
+
filterBarValues.countries = parsed.data.countries;
|
|
777
|
+
}
|
|
771
778
|
if (parsed.data.types !== undefined) {
|
|
772
779
|
filterBarValues.types = parsed.data.types;
|
|
773
780
|
}
|
|
@@ -783,6 +790,9 @@ const convertAssetFiltersInputToFilterBarValues = (input) => {
|
|
|
783
790
|
if (parsed.data.firmwareVersion !== undefined) {
|
|
784
791
|
filterBarValues.firmwareVersion = toValueNameArray(parsed.data.firmwareVersion);
|
|
785
792
|
}
|
|
793
|
+
if (parsed.data.modbusProfile !== undefined) {
|
|
794
|
+
filterBarValues.modbusProfile = toValueNameArray(parsed.data.modbusProfile);
|
|
795
|
+
}
|
|
786
796
|
if (parsed.data.activities !== undefined) {
|
|
787
797
|
filterBarValues.activity = parsed.data.activities;
|
|
788
798
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-graphql-hook",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.88",
|
|
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": "2.0.
|
|
14
|
-
"@trackunit/filters-filter-bar": "2.1.
|
|
15
|
-
"@trackunit/shared-utils": "1.15.
|
|
16
|
-
"@trackunit/iris-app-api": "2.0.
|
|
17
|
-
"@trackunit/react-core-contexts-test": "1.17.
|
|
18
|
-
"@trackunit/i18n-library-translation": "2.0.
|
|
19
|
-
"@trackunit/iris-app-runtime-core-api": "1.16.
|
|
20
|
-
"@trackunit/react-core-hooks": "1.17.
|
|
13
|
+
"@trackunit/iris-app-build-utilities": "2.0.53",
|
|
14
|
+
"@trackunit/filters-filter-bar": "2.1.66",
|
|
15
|
+
"@trackunit/shared-utils": "1.15.58",
|
|
16
|
+
"@trackunit/iris-app-api": "2.0.49",
|
|
17
|
+
"@trackunit/react-core-contexts-test": "1.17.64",
|
|
18
|
+
"@trackunit/i18n-library-translation": "2.0.59",
|
|
19
|
+
"@trackunit/iris-app-runtime-core-api": "1.16.64",
|
|
20
|
+
"@trackunit/react-core-hooks": "1.17.70"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@apollo/client": "^3.13.8",
|
|
@@ -337,6 +337,7 @@ export declare const assetSortByProperty: {
|
|
|
337
337
|
readonly CATEGORY: "CATEGORY";
|
|
338
338
|
readonly CONTRACT_ITEM_OFF_RENT_DATE: "CONTRACT_ITEM_OFF_RENT_DATE";
|
|
339
339
|
readonly CONTRACT_ITEM_ON_RENT_DATE: "CONTRACT_ITEM_ON_RENT_DATE";
|
|
340
|
+
readonly COUNTRY: "COUNTRY";
|
|
340
341
|
readonly CRITICALITY: "CRITICALITY";
|
|
341
342
|
readonly CUMULATIVE_ENGINE_HOURS: "CUMULATIVE_ENGINE_HOURS";
|
|
342
343
|
readonly CUMULATIVE_IDLE_HOURS: "CUMULATIVE_IDLE_HOURS";
|
|
@@ -553,6 +554,8 @@ export type AssetFiltersInput = {
|
|
|
553
554
|
can1Profile?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
554
555
|
/** Filter by reported CAN profile 2 values */
|
|
555
556
|
can2Profile?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
557
|
+
/** Filter to only include this list of countries */
|
|
558
|
+
countries?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
556
559
|
/** List of criticalities */
|
|
557
560
|
criticalities?: InputMaybe<Array<AssetCriticalityState>>;
|
|
558
561
|
/** List of custom fields to filter by */
|
|
@@ -610,6 +613,8 @@ export type AssetFiltersInput = {
|
|
|
610
613
|
lastSeen?: InputMaybe<AssetLastSeen>;
|
|
611
614
|
/** Filter by PARTIAL or COMPLETE asset metadata information */
|
|
612
615
|
metadataCompleteness?: InputMaybe<MetadataCompleteness>;
|
|
616
|
+
/** Filter by reported Modbus profile values */
|
|
617
|
+
modbusProfile?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
613
618
|
/** List of models */
|
|
614
619
|
models?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
615
620
|
/** List of owner account ids */
|
|
@@ -81,6 +81,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
81
81
|
readonly VEHICLE: "VEHICLE";
|
|
82
82
|
}>, "many">>;
|
|
83
83
|
brands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
84
|
+
countries: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
84
85
|
criticalities: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
|
|
85
86
|
readonly CRITICAL: "CRITICAL";
|
|
86
87
|
readonly LOW: "LOW";
|
|
@@ -333,6 +334,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
333
334
|
readonly COMPLETE: "COMPLETE";
|
|
334
335
|
readonly PARTIAL: "PARTIAL";
|
|
335
336
|
}>>;
|
|
337
|
+
modbusProfile: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
336
338
|
models: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
337
339
|
ownerAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
338
340
|
owningDepotSiteIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -461,6 +463,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
461
463
|
assetIds?: string[] | undefined;
|
|
462
464
|
assetTypes?: ("OTHER" | "ATTACHMENT" | "EQUIPMENT" | "GATEWAY" | "MACHINE" | "TOOL" | "VEHICLE")[] | undefined;
|
|
463
465
|
brands?: string[] | undefined;
|
|
466
|
+
countries?: string[] | undefined;
|
|
464
467
|
criticalities?: ("CRITICAL" | "LOW" | "NONE")[] | undefined;
|
|
465
468
|
customFields?: {
|
|
466
469
|
booleanValue?: boolean | undefined;
|
|
@@ -527,6 +530,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
527
530
|
} | undefined;
|
|
528
531
|
lastSeen?: "LAST_7_DAYS" | "LAST_24_HOURS" | "LAST_30_DAYS" | "LAST_HOUR" | "OLDER_THAN_30_DAYS" | undefined;
|
|
529
532
|
metadataCompleteness?: "COMPLETE" | "PARTIAL" | undefined;
|
|
533
|
+
modbusProfile?: string[] | undefined;
|
|
530
534
|
models?: string[] | undefined;
|
|
531
535
|
ownerAccountIds?: string[] | undefined;
|
|
532
536
|
owningDepotSiteIds?: string[] | undefined;
|
|
@@ -576,6 +580,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
576
580
|
assetIds?: string[] | undefined;
|
|
577
581
|
assetTypes?: ("OTHER" | "ATTACHMENT" | "EQUIPMENT" | "GATEWAY" | "MACHINE" | "TOOL" | "VEHICLE")[] | undefined;
|
|
578
582
|
brands?: string[] | undefined;
|
|
583
|
+
countries?: string[] | undefined;
|
|
579
584
|
criticalities?: ("CRITICAL" | "LOW" | "NONE")[] | undefined;
|
|
580
585
|
customFields?: {
|
|
581
586
|
booleanValue?: boolean | undefined;
|
|
@@ -642,6 +647,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
642
647
|
} | undefined;
|
|
643
648
|
lastSeen?: "LAST_7_DAYS" | "LAST_24_HOURS" | "LAST_30_DAYS" | "LAST_HOUR" | "OLDER_THAN_30_DAYS" | undefined;
|
|
644
649
|
metadataCompleteness?: "COMPLETE" | "PARTIAL" | undefined;
|
|
650
|
+
modbusProfile?: string[] | undefined;
|
|
645
651
|
models?: string[] | undefined;
|
|
646
652
|
ownerAccountIds?: string[] | undefined;
|
|
647
653
|
owningDepotSiteIds?: string[] | undefined;
|