@trackunit/filters-graphql-hook 2.1.87 → 2.1.89
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),
|
|
@@ -611,6 +612,7 @@ const assetFiltersInputSchema = zod.z
|
|
|
611
612
|
assetIds: zod.z.array(zod.z.string()).optional(),
|
|
612
613
|
assetTypes: zod.z.array(zod.z.nativeEnum(assetType)).optional(),
|
|
613
614
|
brands: zod.z.array(zod.z.string()).optional(),
|
|
615
|
+
countries: zod.z.array(zod.z.string()).optional(),
|
|
614
616
|
criticalities: zod.z.array(zod.z.nativeEnum(assetCriticalityState)).optional(),
|
|
615
617
|
customerIds: zod.z.array(zod.z.string()).optional(),
|
|
616
618
|
deviceTypes: zod.z.array(zod.z.string()).optional(),
|
|
@@ -772,6 +774,9 @@ const convertAssetFiltersInputToFilterBarValues = (input) => {
|
|
|
772
774
|
if (parsed.data.brands !== undefined) {
|
|
773
775
|
filterBarValues.brands = parsed.data.brands;
|
|
774
776
|
}
|
|
777
|
+
if (parsed.data.countries !== undefined) {
|
|
778
|
+
filterBarValues.countries = parsed.data.countries;
|
|
779
|
+
}
|
|
775
780
|
if (parsed.data.types !== undefined) {
|
|
776
781
|
filterBarValues.types = parsed.data.types;
|
|
777
782
|
}
|
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),
|
|
@@ -609,6 +610,7 @@ const assetFiltersInputSchema = z
|
|
|
609
610
|
assetIds: z.array(z.string()).optional(),
|
|
610
611
|
assetTypes: z.array(z.nativeEnum(assetType)).optional(),
|
|
611
612
|
brands: z.array(z.string()).optional(),
|
|
613
|
+
countries: z.array(z.string()).optional(),
|
|
612
614
|
criticalities: z.array(z.nativeEnum(assetCriticalityState)).optional(),
|
|
613
615
|
customerIds: z.array(z.string()).optional(),
|
|
614
616
|
deviceTypes: z.array(z.string()).optional(),
|
|
@@ -770,6 +772,9 @@ const convertAssetFiltersInputToFilterBarValues = (input) => {
|
|
|
770
772
|
if (parsed.data.brands !== undefined) {
|
|
771
773
|
filterBarValues.brands = parsed.data.brands;
|
|
772
774
|
}
|
|
775
|
+
if (parsed.data.countries !== undefined) {
|
|
776
|
+
filterBarValues.countries = parsed.data.countries;
|
|
777
|
+
}
|
|
773
778
|
if (parsed.data.types !== undefined) {
|
|
774
779
|
filterBarValues.types = parsed.data.types;
|
|
775
780
|
}
|
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.89",
|
|
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 */
|
|
@@ -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";
|
|
@@ -462,6 +463,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
462
463
|
assetIds?: string[] | undefined;
|
|
463
464
|
assetTypes?: ("OTHER" | "ATTACHMENT" | "EQUIPMENT" | "GATEWAY" | "MACHINE" | "TOOL" | "VEHICLE")[] | undefined;
|
|
464
465
|
brands?: string[] | undefined;
|
|
466
|
+
countries?: string[] | undefined;
|
|
465
467
|
criticalities?: ("CRITICAL" | "LOW" | "NONE")[] | undefined;
|
|
466
468
|
customFields?: {
|
|
467
469
|
booleanValue?: boolean | undefined;
|
|
@@ -578,6 +580,7 @@ declare const assetFiltersInputSchema: z.ZodObject<{
|
|
|
578
580
|
assetIds?: string[] | undefined;
|
|
579
581
|
assetTypes?: ("OTHER" | "ATTACHMENT" | "EQUIPMENT" | "GATEWAY" | "MACHINE" | "TOOL" | "VEHICLE")[] | undefined;
|
|
580
582
|
brands?: string[] | undefined;
|
|
583
|
+
countries?: string[] | undefined;
|
|
581
584
|
criticalities?: ("CRITICAL" | "LOW" | "NONE")[] | undefined;
|
|
582
585
|
customFields?: {
|
|
583
586
|
booleanValue?: boolean | undefined;
|