@trackunit/filters-asset-filter-definitions 2.6.3 → 2.6.7
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 +2411 -953
- package/index.esm.js +2411 -954
- package/migrations/entry.js.map +1 -0
- package/package.json +19 -19
- package/src/defaultFilters/defaults/BrandFilter.d.ts +0 -5
- package/src/defaultFilters/defaults/CanProfileFilter/Can1ProfileFilter.d.ts +0 -11
- package/src/defaultFilters/defaults/CanProfileFilter/Can2ProfileFilter.d.ts +0 -11
- package/src/defaultFilters/defaults/FirmwareVersionFilter/FirmwareVersionFilter.d.ts +0 -9
- package/src/defaultFilters/defaults/GroupIdsFilter.d.ts +0 -6
- package/src/defaultFilters/defaults/ModbusProfileFilter/ModbusProfileFilter.d.ts +0 -9
- package/src/defaultFilters/defaults/OwnerAccountIdsFilter.d.ts +0 -5
- package/src/defaultFilters/defaults/RentalContractCustomerParentExternalReferenceFilter.d.ts +0 -8
- package/src/defaultFilters/defaults/RentalContractCustomerParentNameFilter.d.ts +0 -8
- package/src/defaultFilters/defaults/RentalContractOrderNumberFilter.d.ts +1 -9
- package/src/defaultFilters/defaults/RentalContractReferenceCodeFilter.d.ts +1 -9
- package/src/defaultFilters/defaults/TypesFilter.d.ts +0 -5
- package/src/defaultFilters/defaults/area/areaSchemas.d.ts +12 -12
- package/src/defaultFilters/defaults/area/usePlacesSearch.d.ts +4 -4
- package/src/defaultFilters/defaults/refetchQueries.d.ts +9 -1
- package/src/defaultFilters/defaults/summaryConnectionTypes.d.ts +209 -0
- package/src/defaultFilters/defaults/test/summaryConnectionTestUtils.d.ts +116 -0
- package/src/defaultFilters/defaults/useFacetMissingCount.d.ts +25 -0
- package/src/defaultFilters/defaults/useFleetSummaryConnection.d.ts +28 -0
- package/src/generated/graphql-api/gql.d.ts +31 -14
- package/src/generated/graphql-api/graphql.d.ts +472 -226
- package/src/generated/graphql-api/mock.d.ts +69 -33
- package/src/translation.d.ts +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/filters/asset-filter-definitions/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-asset-filter-definitions",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.7",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -12,24 +12,24 @@
|
|
|
12
12
|
"zod": "^3.25.76",
|
|
13
13
|
"string-ts": "^2.0.0",
|
|
14
14
|
"tailwind-merge": "^2.0.0",
|
|
15
|
-
"@trackunit/iris-app-build-utilities": "2.2.
|
|
16
|
-
"@trackunit/filters-filter-bar": "2.3.
|
|
17
|
-
"@trackunit/react-core-hooks": "1.19.
|
|
18
|
-
"@trackunit/react-filter-components": "2.3.
|
|
19
|
-
"@trackunit/react-form-components": "2.3.
|
|
20
|
-
"@trackunit/filters-graphql-hook": "2.5.
|
|
21
|
-
"@trackunit/utilization-indicator": "2.3.
|
|
22
|
-
"@trackunit/geo-json-utils": "1.14.
|
|
23
|
-
"@trackunit/react-components": "2.
|
|
24
|
-
"@trackunit/shared-utils": "1.15.
|
|
25
|
-
"@trackunit/translations-machine-type": "2.2.
|
|
26
|
-
"@trackunit/criticality-indicator": "2.3.
|
|
27
|
-
"@trackunit/iris-app-api": "2.2.
|
|
28
|
-
"@trackunit/react-core-contexts-test": "1.17.
|
|
29
|
-
"@trackunit/i18n-library-translation": "2.2.
|
|
30
|
-
"@trackunit/iris-app-runtime-core-api": "1.16.
|
|
31
|
-
"@trackunit/react-graphql-hooks": "2.3.
|
|
32
|
-
"@trackunit/translations-device": "1.5.
|
|
15
|
+
"@trackunit/iris-app-build-utilities": "2.2.5",
|
|
16
|
+
"@trackunit/filters-filter-bar": "2.3.7",
|
|
17
|
+
"@trackunit/react-core-hooks": "1.19.5",
|
|
18
|
+
"@trackunit/react-filter-components": "2.3.7",
|
|
19
|
+
"@trackunit/react-form-components": "2.3.6",
|
|
20
|
+
"@trackunit/filters-graphql-hook": "2.5.7",
|
|
21
|
+
"@trackunit/utilization-indicator": "2.3.6",
|
|
22
|
+
"@trackunit/geo-json-utils": "1.14.93",
|
|
23
|
+
"@trackunit/react-components": "2.4.0",
|
|
24
|
+
"@trackunit/shared-utils": "1.15.93",
|
|
25
|
+
"@trackunit/translations-machine-type": "2.2.5",
|
|
26
|
+
"@trackunit/criticality-indicator": "2.3.6",
|
|
27
|
+
"@trackunit/iris-app-api": "2.2.5",
|
|
28
|
+
"@trackunit/react-core-contexts-test": "1.17.100",
|
|
29
|
+
"@trackunit/i18n-library-translation": "2.2.5",
|
|
30
|
+
"@trackunit/iris-app-runtime-core-api": "1.16.99",
|
|
31
|
+
"@trackunit/react-graphql-hooks": "2.3.6",
|
|
32
|
+
"@trackunit/translations-device": "1.5.6"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@apollo/client": "^3.13.8",
|
|
@@ -2,14 +2,9 @@ import { FilterViewProps, StringArrayFilterDefinition } from "@trackunit/filters
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* React component for rendering the brand filter.
|
|
5
|
-
*
|
|
6
|
-
* @param {FilterViewProps<string[]>} props - The component's properties, including filter state and values.
|
|
7
|
-
* @returns {ReactElement} The brand filter component.
|
|
8
5
|
*/
|
|
9
6
|
export declare const BrandFilterView: (props: FilterViewProps<Array<string>>) => ReactElement;
|
|
10
7
|
/**
|
|
11
8
|
* Brand filter definition
|
|
12
|
-
*
|
|
13
|
-
* @returns {StringArrayFilterDefinition} Brand filter definition
|
|
14
9
|
*/
|
|
15
10
|
export declare const useBrandFilter: () => StringArrayFilterDefinition;
|
|
@@ -2,16 +2,5 @@ import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* The CAN 1 Profile Filter component.
|
|
5
|
-
*
|
|
6
|
-
* Provides an interface to select CAN profiles reported on the CAN1 port. Options are
|
|
7
|
-
* fetched from a GraphQL query keyed by the profile key, but only the resolved profile
|
|
8
|
-
* name is displayed. Searching is delegated to the backend, which matches against the
|
|
9
|
-
* profile key.
|
|
10
|
-
*
|
|
11
|
-
* @param props - The filter view props.
|
|
12
|
-
* @param props.filterDefinition - The filter's definition.
|
|
13
|
-
* @param props.filterState - The current state of the filter, including selected values.
|
|
14
|
-
* @param props.filterBarActions - Actions for the filter's interaction with the filter bar.
|
|
15
|
-
* @returns {ReactElement} React component to render the CAN1 profile filter.
|
|
16
5
|
*/
|
|
17
6
|
export declare const Can1ProfileFilter: ({ filterDefinition, filterState, filterBarActions, ...props }: FilterViewProps<Array<ValueName>>) => ReactElement;
|
|
@@ -2,16 +2,5 @@ import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* The CAN 2 Profile Filter component.
|
|
5
|
-
*
|
|
6
|
-
* Provides an interface to select CAN profiles reported on the CAN2 port. Options are
|
|
7
|
-
* fetched from a GraphQL query keyed by the profile key, but only the resolved profile
|
|
8
|
-
* name is displayed. Searching is delegated to the backend, which matches against the
|
|
9
|
-
* profile key.
|
|
10
|
-
*
|
|
11
|
-
* @param props - The filter view props.
|
|
12
|
-
* @param props.filterDefinition - The filter's definition.
|
|
13
|
-
* @param props.filterState - The current state of the filter, including selected values.
|
|
14
|
-
* @param props.filterBarActions - Actions for the filter's interaction with the filter bar.
|
|
15
|
-
* @returns {ReactElement} React component to render the CAN2 profile filter.
|
|
16
5
|
*/
|
|
17
6
|
export declare const Can2ProfileFilter: ({ filterDefinition, filterState, filterBarActions, ...props }: FilterViewProps<Array<ValueName>>) => ReactElement;
|
|
@@ -2,14 +2,5 @@ import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* The Firmware Version Filter component.
|
|
5
|
-
*
|
|
6
|
-
* Provides an interface to select firmware versions. It fetches data from a GraphQL query
|
|
7
|
-
* and integrates with the filter bar's filtering logic.
|
|
8
|
-
*
|
|
9
|
-
* @param props - The filter view props.
|
|
10
|
-
* @param props.filterDefinition - The filter's definition.
|
|
11
|
-
* @param props.filterState - The current state of the filter, including selected values.
|
|
12
|
-
* @param props.filterBarActions - Actions for the filter's interaction with the filter bar.
|
|
13
|
-
* @returns {ReactElement} React component to render the firmware version filter.
|
|
14
5
|
*/
|
|
15
6
|
export declare const FirmwareVersionFilter: ({ filterDefinition, filterState, filterBarActions, ...props }: FilterViewProps<Array<ValueName>>) => ReactElement;
|
|
@@ -2,10 +2,6 @@ import { FilterViewProps, ValueName, ValueNameArrayFilterDefinition } from "@tra
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* The GroupIdsFilterView component is a filter view for group IDs.
|
|
5
|
-
* It utilizes a checkbox filter with a search feature to display and manage group selections.
|
|
6
|
-
*
|
|
7
|
-
* @param {FilterViewProps<ValueName[]>} props - The properties for the filter view, including filter state and callbacks.
|
|
8
|
-
* @returns {ReactElement} The GroupIdsFilterView component.
|
|
9
5
|
*/
|
|
10
6
|
export declare const GroupIdsFilterView: (props: FilterViewProps<Array<ValueName>>) => ReactElement;
|
|
11
7
|
interface GroupsIdsFilterProps {
|
|
@@ -13,8 +9,6 @@ interface GroupsIdsFilterProps {
|
|
|
13
9
|
}
|
|
14
10
|
/**
|
|
15
11
|
* GroupIds filter definition
|
|
16
|
-
*
|
|
17
|
-
* @returns {ValueNameArrayFilterDefinition} GroupIds filter definition
|
|
18
12
|
*/
|
|
19
13
|
export declare const useGroupIdsFilter: ({ hasCount }?: GroupsIdsFilterProps) => ValueNameArrayFilterDefinition;
|
|
20
14
|
export {};
|
|
@@ -2,14 +2,5 @@ import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* The Modbus Profile Filter component.
|
|
5
|
-
*
|
|
6
|
-
* Provides an interface to select Modbus profiles. It fetches data from a GraphQL query
|
|
7
|
-
* and integrates with the filter bar's filtering logic.
|
|
8
|
-
*
|
|
9
|
-
* @param props - The filter view props.
|
|
10
|
-
* @param props.filterDefinition - The filter's definition.
|
|
11
|
-
* @param props.filterState - The current state of the filter, including selected values.
|
|
12
|
-
* @param props.filterBarActions - Actions for the filter's interaction with the filter bar.
|
|
13
|
-
* @returns {ReactElement} React component to render the Modbus profile filter.
|
|
14
5
|
*/
|
|
15
6
|
export declare const ModbusProfileFilter: ({ filterDefinition, filterState, filterBarActions, ...props }: FilterViewProps<Array<ValueName>>) => ReactElement;
|
|
@@ -2,14 +2,9 @@ import { FilterViewProps, ValueName, ValueNameArrayFilterDefinition } from "@tra
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Component for rendering the Owner Account IDs filter view within the filter bar.
|
|
5
|
-
*
|
|
6
|
-
* @param {FilterViewProps<ValueName[]>} props - The props to render the filter view, including filter state and settings.
|
|
7
|
-
* @returns {ReactElement} The rendered filter view component.
|
|
8
5
|
*/
|
|
9
6
|
export declare const OwnerAccountIdsFilterView: (props: FilterViewProps<Array<ValueName>>) => ReactElement;
|
|
10
7
|
/**
|
|
11
8
|
* OwnerAccountIds filter definition
|
|
12
|
-
*
|
|
13
|
-
* @returns {ValueNameArrayFilterDefinition} OwnerAccountIds filter definition
|
|
14
9
|
*/
|
|
15
10
|
export declare const useOwnerAccountIdsFilter: (defaultValue?: Array<ValueName>) => ValueNameArrayFilterDefinition;
|
package/src/defaultFilters/defaults/RentalContractCustomerParentExternalReferenceFilter.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { FilterViewProps, StringArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
2
|
/**
|
|
3
3
|
* Rental contract customer parent external reference filter view component.
|
|
4
|
-
*
|
|
5
|
-
* This component provides an interface to select rental contract customer parent external references.
|
|
6
|
-
* It fetches data from a GraphQL query and integrates with the filter bar's filtering logic.
|
|
7
|
-
*
|
|
8
|
-
* @param {FilterViewProps<Array<string>>} props - The props for the component.
|
|
9
|
-
* @returns {Element} The rendered component.
|
|
10
4
|
*/
|
|
11
5
|
export declare const RentalContractCustomerParentExternalReferenceFilterView: (props: FilterViewProps<Array<string>>) => import("react/jsx-runtime").JSX.Element;
|
|
12
6
|
interface FilterProps {
|
|
@@ -14,8 +8,6 @@ interface FilterProps {
|
|
|
14
8
|
}
|
|
15
9
|
/**
|
|
16
10
|
* Rental contract customer parent external reference filter definition
|
|
17
|
-
*
|
|
18
|
-
* @returns {StringArrayFilterDefinition} Rental contract customer parent external reference filter definition
|
|
19
11
|
*/
|
|
20
12
|
export declare const useRentalContractCustomerParentExternalReferenceFilter: (props?: FilterProps) => StringArrayFilterDefinition;
|
|
21
13
|
export {};
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { FilterViewProps, StringArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
2
|
/**
|
|
3
3
|
* Rental contract customer parent name filter view component.
|
|
4
|
-
*
|
|
5
|
-
* This component provides an interface to select rental contract customer parent names.
|
|
6
|
-
* It fetches data from a GraphQL query and integrates with the filter bar's filtering logic.
|
|
7
|
-
*
|
|
8
|
-
* @param {FilterViewProps<Array<string>>} props - The props for the component.
|
|
9
|
-
* @returns {Element} The rendered component.
|
|
10
4
|
*/
|
|
11
5
|
export declare const RentalContractCustomerParentNameFilterView: (props: FilterViewProps<Array<string>>) => import("react/jsx-runtime").JSX.Element;
|
|
12
6
|
interface FilterProps {
|
|
@@ -14,8 +8,6 @@ interface FilterProps {
|
|
|
14
8
|
}
|
|
15
9
|
/**
|
|
16
10
|
* Rental contract customer parent name filter definition
|
|
17
|
-
*
|
|
18
|
-
* @returns {StringArrayFilterDefinition} Rental contract customer parent name filter definition
|
|
19
11
|
*/
|
|
20
12
|
export declare const useRentalContractCustomerParentNameFilter: (props?: FilterProps) => StringArrayFilterDefinition;
|
|
21
13
|
export {};
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { FilterViewProps, StringArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
2
|
/**
|
|
3
3
|
* Rental contract order numbers filter view component.
|
|
4
|
-
*
|
|
5
|
-
* This component provides an interface to select rental contract order numbers.
|
|
6
|
-
* It fetches data from a GraphQL query and integrates with the filter bar's filtering logic.
|
|
7
|
-
*
|
|
8
|
-
* @param {FilterViewProps<Array<string>>} props - The props for the component.
|
|
9
|
-
* @returns {Element} The rendered component.
|
|
10
4
|
*/
|
|
11
5
|
export declare const RentalContractOrderNumberFilterView: (props: FilterViewProps<Array<string>>) => import("react/jsx-runtime").JSX.Element;
|
|
12
6
|
interface FilterProps {
|
|
13
7
|
showInFilterBar?: () => boolean;
|
|
14
8
|
}
|
|
15
9
|
/**
|
|
16
|
-
* Rental contract order
|
|
17
|
-
*
|
|
18
|
-
* @returns {StringArrayFilterDefinition} Rental contract order numbers filter definition
|
|
10
|
+
* Rental contract order number filter definition
|
|
19
11
|
*/
|
|
20
12
|
export declare const useRentalContractOrderNumberFilter: (props?: FilterProps) => StringArrayFilterDefinition;
|
|
21
13
|
export {};
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { FilterViewProps, StringArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
2
|
/**
|
|
3
|
-
* Rental contract
|
|
4
|
-
*
|
|
5
|
-
* This component provides an interface to select rental contract order numbers.
|
|
6
|
-
* It fetches data from a GraphQL query and integrates with the filter bar's filtering logic.
|
|
7
|
-
*
|
|
8
|
-
* @param {FilterViewProps<Array<string>>} props - The props for the component.
|
|
9
|
-
* @returns {Element} The rendered component.
|
|
3
|
+
* Rental contract reference code filter view component.
|
|
10
4
|
*/
|
|
11
5
|
export declare const RentalContractReferenceCodeFilterView: (props: FilterViewProps<Array<string>>) => import("react/jsx-runtime").JSX.Element;
|
|
12
6
|
interface FilterProps {
|
|
@@ -14,8 +8,6 @@ interface FilterProps {
|
|
|
14
8
|
}
|
|
15
9
|
/**
|
|
16
10
|
* Rental contract reference code filter definition
|
|
17
|
-
*
|
|
18
|
-
* @returns {StringArrayFilterDefinition} Rental contract reference code filter definition
|
|
19
11
|
*/
|
|
20
12
|
export declare const useRentalContractReferenceCodeFilter: (props?: FilterProps) => StringArrayFilterDefinition;
|
|
21
13
|
export {};
|
|
@@ -2,14 +2,9 @@ import { FilterViewProps, StringArrayFilterDefinition } from "@trackunit/filters
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Functional component for rendering a checkbox filter for types.
|
|
5
|
-
*
|
|
6
|
-
* @param {FilterViewProps<string[]>} props - The properties passed to the filter view.
|
|
7
|
-
* @returns {ReactElement} The rendered filter view component.
|
|
8
5
|
*/
|
|
9
6
|
export declare const TypesFilterView: (props: FilterViewProps<Array<string>>) => ReactElement;
|
|
10
7
|
/**
|
|
11
8
|
* Types filter definition
|
|
12
|
-
*
|
|
13
|
-
* @returns {StringArrayFilterDefinition} Types filter definition
|
|
14
9
|
*/
|
|
15
10
|
export declare const useTypesFilter: () => StringArrayFilterDefinition;
|
|
@@ -82,27 +82,27 @@ export declare const areaFilterInternalSchema: z.ZodObject<{
|
|
|
82
82
|
shortName: z.ZodString;
|
|
83
83
|
types: z.ZodArray<z.ZodString, "many">;
|
|
84
84
|
}, "strip", z.ZodTypeAny, {
|
|
85
|
-
types: string[];
|
|
86
85
|
longName: string;
|
|
87
86
|
shortName: string;
|
|
88
|
-
}, {
|
|
89
87
|
types: string[];
|
|
88
|
+
}, {
|
|
90
89
|
longName: string;
|
|
91
90
|
shortName: string;
|
|
91
|
+
types: string[];
|
|
92
92
|
}>, "many">>;
|
|
93
93
|
}, "strip", z.ZodTypeAny, {
|
|
94
94
|
formattedAddress: string;
|
|
95
95
|
addressComponents?: {
|
|
96
|
-
types: string[];
|
|
97
96
|
longName: string;
|
|
98
97
|
shortName: string;
|
|
98
|
+
types: string[];
|
|
99
99
|
}[] | undefined;
|
|
100
100
|
}, {
|
|
101
101
|
formattedAddress: string;
|
|
102
102
|
addressComponents?: {
|
|
103
|
-
types: string[];
|
|
104
103
|
longName: string;
|
|
105
104
|
shortName: string;
|
|
105
|
+
types: string[];
|
|
106
106
|
}[] | undefined;
|
|
107
107
|
}>;
|
|
108
108
|
dateIsoString: z.ZodOptional<z.ZodString>;
|
|
@@ -123,9 +123,9 @@ export declare const areaFilterInternalSchema: z.ZodObject<{
|
|
|
123
123
|
properties: {
|
|
124
124
|
formattedAddress: string;
|
|
125
125
|
addressComponents?: {
|
|
126
|
-
types: string[];
|
|
127
126
|
longName: string;
|
|
128
127
|
shortName: string;
|
|
128
|
+
types: string[];
|
|
129
129
|
}[] | undefined;
|
|
130
130
|
};
|
|
131
131
|
bBox: [number, number, number, number];
|
|
@@ -147,9 +147,9 @@ export declare const areaFilterInternalSchema: z.ZodObject<{
|
|
|
147
147
|
properties: {
|
|
148
148
|
formattedAddress: string;
|
|
149
149
|
addressComponents?: {
|
|
150
|
-
types: string[];
|
|
151
150
|
longName: string;
|
|
152
151
|
shortName: string;
|
|
152
|
+
types: string[];
|
|
153
153
|
}[] | undefined;
|
|
154
154
|
};
|
|
155
155
|
bBox: [number, number, number, number];
|
|
@@ -211,27 +211,27 @@ export declare const placeSchema: z.ZodObject<{
|
|
|
211
211
|
shortName: z.ZodString;
|
|
212
212
|
types: z.ZodArray<z.ZodString, "many">;
|
|
213
213
|
}, "strip", z.ZodTypeAny, {
|
|
214
|
-
types: string[];
|
|
215
214
|
longName: string;
|
|
216
215
|
shortName: string;
|
|
217
|
-
}, {
|
|
218
216
|
types: string[];
|
|
217
|
+
}, {
|
|
219
218
|
longName: string;
|
|
220
219
|
shortName: string;
|
|
220
|
+
types: string[];
|
|
221
221
|
}>, "many">>;
|
|
222
222
|
}, "strip", z.ZodTypeAny, {
|
|
223
223
|
formattedAddress: string;
|
|
224
224
|
addressComponents?: {
|
|
225
|
-
types: string[];
|
|
226
225
|
longName: string;
|
|
227
226
|
shortName: string;
|
|
227
|
+
types: string[];
|
|
228
228
|
}[] | undefined;
|
|
229
229
|
}, {
|
|
230
230
|
formattedAddress: string;
|
|
231
231
|
addressComponents?: {
|
|
232
|
-
types: string[];
|
|
233
232
|
longName: string;
|
|
234
233
|
shortName: string;
|
|
234
|
+
types: string[];
|
|
235
235
|
}[] | undefined;
|
|
236
236
|
}>;
|
|
237
237
|
dateIsoString: z.ZodOptional<z.ZodString>;
|
|
@@ -257,9 +257,9 @@ export declare const placeSchema: z.ZodObject<{
|
|
|
257
257
|
properties: {
|
|
258
258
|
formattedAddress: string;
|
|
259
259
|
addressComponents?: {
|
|
260
|
-
types: string[];
|
|
261
260
|
longName: string;
|
|
262
261
|
shortName: string;
|
|
262
|
+
types: string[];
|
|
263
263
|
}[] | undefined;
|
|
264
264
|
};
|
|
265
265
|
bBox: [number, number, number, number];
|
|
@@ -283,9 +283,9 @@ export declare const placeSchema: z.ZodObject<{
|
|
|
283
283
|
properties: {
|
|
284
284
|
formattedAddress: string;
|
|
285
285
|
addressComponents?: {
|
|
286
|
-
types: string[];
|
|
287
286
|
longName: string;
|
|
288
287
|
shortName: string;
|
|
288
|
+
types: string[];
|
|
289
289
|
}[] | undefined;
|
|
290
290
|
};
|
|
291
291
|
bBox: [number, number, number, number];
|
|
@@ -36,9 +36,9 @@ export declare const usePlacesSearch: ({ localStorageKey, maxRecentSearches, max
|
|
|
36
36
|
properties: {
|
|
37
37
|
formattedAddress: string;
|
|
38
38
|
addressComponents?: {
|
|
39
|
-
types: string[];
|
|
40
39
|
longName: string;
|
|
41
40
|
shortName: string;
|
|
41
|
+
types: string[];
|
|
42
42
|
}[] | undefined;
|
|
43
43
|
};
|
|
44
44
|
bBox: [number, number, number, number];
|
|
@@ -67,9 +67,9 @@ export declare const usePlacesSearch: ({ localStorageKey, maxRecentSearches, max
|
|
|
67
67
|
properties: {
|
|
68
68
|
formattedAddress: string;
|
|
69
69
|
addressComponents?: {
|
|
70
|
-
types: string[];
|
|
71
70
|
longName: string;
|
|
72
71
|
shortName: string;
|
|
72
|
+
types: string[];
|
|
73
73
|
}[] | undefined;
|
|
74
74
|
};
|
|
75
75
|
bBox: [number, number, number, number];
|
|
@@ -94,9 +94,9 @@ export declare const usePlacesSearch: ({ localStorageKey, maxRecentSearches, max
|
|
|
94
94
|
properties: {
|
|
95
95
|
formattedAddress: string;
|
|
96
96
|
addressComponents?: {
|
|
97
|
-
types: string[];
|
|
98
97
|
longName: string;
|
|
99
98
|
shortName: string;
|
|
99
|
+
types: string[];
|
|
100
100
|
}[] | undefined;
|
|
101
101
|
};
|
|
102
102
|
bBox: [number, number, number, number];
|
|
@@ -132,9 +132,9 @@ export declare const usePlacesSearch: ({ localStorageKey, maxRecentSearches, max
|
|
|
132
132
|
properties: {
|
|
133
133
|
formattedAddress: string;
|
|
134
134
|
addressComponents?: {
|
|
135
|
-
types: string[];
|
|
136
135
|
longName: string;
|
|
137
136
|
shortName: string;
|
|
137
|
+
types: string[];
|
|
138
138
|
}[] | undefined;
|
|
139
139
|
};
|
|
140
140
|
bBox: [number, number, number, number];
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Documents behind the default asset filters, re-exported so consumers can refresh a filter from a
|
|
3
|
+
* mutation's `refetchQueries`.
|
|
4
|
+
*
|
|
5
|
+
* Only export what a filter actually executes — a document no filter runs makes `refetchQueries`
|
|
6
|
+
* silently do nothing. A facet that pages its values reads them and its count of assets without a
|
|
7
|
+
* value through separate documents, so refreshing it takes both.
|
|
8
|
+
*/
|
|
9
|
+
export { GetFleetGroupSummaryConnectionDocument, GetFleetGroupSummaryMissingDocument, } from "../../generated/graphql-api/graphql";
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AssetFiltersInput } from "../../generated/graphql-api/graphql";
|
|
3
|
+
/**
|
|
4
|
+
* Shape every `assetSummary` connection query shares once the generated document is executed.
|
|
5
|
+
* The generated types differ per filter, so the connection payload is validated at runtime
|
|
6
|
+
* instead of being narrowed structurally.
|
|
7
|
+
*/
|
|
8
|
+
export declare const assetSummaryConnectionSchema: z.ZodObject<{
|
|
9
|
+
missing: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
10
|
+
pageInfo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
11
|
+
hasNextPage: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
12
|
+
hasPreviousPage: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
13
|
+
startCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
endCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
hasNextPage?: boolean | null | undefined;
|
|
17
|
+
hasPreviousPage?: boolean | null | undefined;
|
|
18
|
+
endCursor?: string | null | undefined;
|
|
19
|
+
startCursor?: string | null | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
hasNextPage?: boolean | null | undefined;
|
|
22
|
+
hasPreviousPage?: boolean | null | undefined;
|
|
23
|
+
endCursor?: string | null | undefined;
|
|
24
|
+
startCursor?: string | null | undefined;
|
|
25
|
+
}>>>;
|
|
26
|
+
edges: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
27
|
+
cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
node: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
node: Record<string, unknown>;
|
|
31
|
+
cursor?: string | null | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
node: Record<string, unknown>;
|
|
34
|
+
cursor?: string | null | undefined;
|
|
35
|
+
}>, "many">>>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
pageInfo?: {
|
|
38
|
+
hasNextPage?: boolean | null | undefined;
|
|
39
|
+
hasPreviousPage?: boolean | null | undefined;
|
|
40
|
+
endCursor?: string | null | undefined;
|
|
41
|
+
startCursor?: string | null | undefined;
|
|
42
|
+
} | null | undefined;
|
|
43
|
+
edges?: {
|
|
44
|
+
node: Record<string, unknown>;
|
|
45
|
+
cursor?: string | null | undefined;
|
|
46
|
+
}[] | null | undefined;
|
|
47
|
+
missing?: number | null | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
pageInfo?: {
|
|
50
|
+
hasNextPage?: boolean | null | undefined;
|
|
51
|
+
hasPreviousPage?: boolean | null | undefined;
|
|
52
|
+
endCursor?: string | null | undefined;
|
|
53
|
+
startCursor?: string | null | undefined;
|
|
54
|
+
} | null | undefined;
|
|
55
|
+
edges?: {
|
|
56
|
+
node: Record<string, unknown>;
|
|
57
|
+
cursor?: string | null | undefined;
|
|
58
|
+
}[] | null | undefined;
|
|
59
|
+
missing?: number | null | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export type AssetSummaryConnection = z.infer<typeof assetSummaryConnectionSchema>;
|
|
62
|
+
export type AssetSummaryConnectionEdge = NonNullable<AssetSummaryConnection["edges"]>[number];
|
|
63
|
+
/**
|
|
64
|
+
* Reads a single connection out of an `assetSummary` query result.
|
|
65
|
+
*
|
|
66
|
+
* @param data the raw query result
|
|
67
|
+
* @param connectionField name of the connection field on `assetSummary`
|
|
68
|
+
* @returns {AssetSummaryConnection | undefined} the connection, or undefined when the query has not resolved it
|
|
69
|
+
*/
|
|
70
|
+
export declare const extractAssetSummaryConnection: (data: unknown, connectionField: string) => AssetSummaryConnection | undefined;
|
|
71
|
+
declare const summaryNodeSchema: z.ZodObject<{
|
|
72
|
+
key: z.ZodString;
|
|
73
|
+
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
key: string;
|
|
76
|
+
count?: number | null | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
key: string;
|
|
79
|
+
count?: number | null | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
declare const groupNodeSchema: z.ZodObject<{
|
|
82
|
+
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
83
|
+
group: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
84
|
+
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
groupId?: string | null | undefined;
|
|
88
|
+
name?: string | null | undefined;
|
|
89
|
+
}, {
|
|
90
|
+
groupId?: string | null | undefined;
|
|
91
|
+
name?: string | null | undefined;
|
|
92
|
+
}>>>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
count?: number | null | undefined;
|
|
95
|
+
group?: {
|
|
96
|
+
groupId?: string | null | undefined;
|
|
97
|
+
name?: string | null | undefined;
|
|
98
|
+
} | null | undefined;
|
|
99
|
+
}, {
|
|
100
|
+
count?: number | null | undefined;
|
|
101
|
+
group?: {
|
|
102
|
+
groupId?: string | null | undefined;
|
|
103
|
+
name?: string | null | undefined;
|
|
104
|
+
} | null | undefined;
|
|
105
|
+
}>;
|
|
106
|
+
declare const ownerAccountNodeSchema: z.ZodObject<{
|
|
107
|
+
count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
108
|
+
ownerAccount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
109
|
+
accountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
name?: string | null | undefined;
|
|
113
|
+
accountId?: string | null | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
name?: string | null | undefined;
|
|
116
|
+
accountId?: string | null | undefined;
|
|
117
|
+
}>>>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
count?: number | null | undefined;
|
|
120
|
+
ownerAccount?: {
|
|
121
|
+
name?: string | null | undefined;
|
|
122
|
+
accountId?: string | null | undefined;
|
|
123
|
+
} | null | undefined;
|
|
124
|
+
}, {
|
|
125
|
+
count?: number | null | undefined;
|
|
126
|
+
ownerAccount?: {
|
|
127
|
+
name?: string | null | undefined;
|
|
128
|
+
accountId?: string | null | undefined;
|
|
129
|
+
} | null | undefined;
|
|
130
|
+
}>;
|
|
131
|
+
export type SummaryConnectionNode = z.infer<typeof summaryNodeSchema>;
|
|
132
|
+
export type GroupConnectionNode = z.infer<typeof groupNodeSchema>;
|
|
133
|
+
export type OwnerAccountConnectionNode = z.infer<typeof ownerAccountNodeSchema>;
|
|
134
|
+
/**
|
|
135
|
+
* Reads a plain key/count summary node.
|
|
136
|
+
*
|
|
137
|
+
* @param node the raw edge node
|
|
138
|
+
* @returns {object} the node with a guaranteed count
|
|
139
|
+
*/
|
|
140
|
+
export declare const asSummaryConnectionNode: (node: unknown) => {
|
|
141
|
+
key: string;
|
|
142
|
+
count: number;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Key the backend and the filter bar agree on for the bucket of assets that have no value
|
|
146
|
+
* for a facet. `DefaultCheckboxFilter` pins the option carrying this key to the bottom of the list.
|
|
147
|
+
*/
|
|
148
|
+
export declare const UNDEFINED_SUMMARY_KEY = "UNDEFINED";
|
|
149
|
+
/**
|
|
150
|
+
* Flattens connection edges into plain summary entries, appending the bucket of assets without
|
|
151
|
+
* a value when one is reported.
|
|
152
|
+
*
|
|
153
|
+
* @param edges the edges of a key/count summary connection
|
|
154
|
+
* @param missing the number of assets without a value, counted by a separate query
|
|
155
|
+
* @param loading whether either query behind the facet is still fetching, which suppresses the
|
|
156
|
+
* entries until the first page arrives. The two queries resolve independently, and
|
|
157
|
+
* `FilterResults` only renders its loading state for an empty list, so without this a facet
|
|
158
|
+
* would briefly show whichever of the two landed first as its only content — the undefined
|
|
159
|
+
* bucket alone, or a set of values that the undefined bucket is about to be appended to.
|
|
160
|
+
* @returns {Array<{ key: string; count: number }>} the summary entries to render as filter options
|
|
161
|
+
*/
|
|
162
|
+
export declare const toSummaryEntries: (edges: Array<AssetSummaryConnectionEdge>, missing: number | null | undefined, loading?: boolean) => Array<{
|
|
163
|
+
key: string;
|
|
164
|
+
count: number;
|
|
165
|
+
}>;
|
|
166
|
+
/**
|
|
167
|
+
* Reads a group summary node.
|
|
168
|
+
*
|
|
169
|
+
* @param node the raw edge node
|
|
170
|
+
* @returns {GroupConnectionNode} the group node, empty when the payload does not match
|
|
171
|
+
*/
|
|
172
|
+
export declare const asGroupConnectionNode: (node: unknown) => GroupConnectionNode;
|
|
173
|
+
/**
|
|
174
|
+
* Reads an owner account summary node.
|
|
175
|
+
*
|
|
176
|
+
* @param node the raw edge node
|
|
177
|
+
* @returns {OwnerAccountConnectionNode} the owner account node, empty when the payload does not match
|
|
178
|
+
*/
|
|
179
|
+
export declare const asOwnerAccountConnectionNode: (node: unknown) => OwnerAccountConnectionNode;
|
|
180
|
+
/**
|
|
181
|
+
* Variables shared by every generated `assetSummary` connection document. Keys are required
|
|
182
|
+
* (values nullable) so a document missing one of them is rejected at compile time.
|
|
183
|
+
*/
|
|
184
|
+
export type FleetSummaryConnectionVariables = {
|
|
185
|
+
filters: AssetFiltersInput | null | undefined;
|
|
186
|
+
search: string | null | undefined;
|
|
187
|
+
first: number | null | undefined;
|
|
188
|
+
after: string | null | undefined;
|
|
189
|
+
before: string | null | undefined;
|
|
190
|
+
last: number | null | undefined;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Variables of the standalone documents that count the assets without a value for a facet.
|
|
194
|
+
* The count ignores both the facet search term and paging, so `filters` is all it takes.
|
|
195
|
+
*/
|
|
196
|
+
export type FacetMissingCountVariables = {
|
|
197
|
+
filters: AssetFiltersInput | null | undefined;
|
|
198
|
+
};
|
|
199
|
+
export type FleetSummaryConnectionInput = {
|
|
200
|
+
filters?: AssetFiltersInput | null;
|
|
201
|
+
search?: string | null;
|
|
202
|
+
};
|
|
203
|
+
/** Result shape every `assetSummary` query shares before its connection payload is validated. */
|
|
204
|
+
export type AssetSummaryQueryShape = {
|
|
205
|
+
assetSummary?: {
|
|
206
|
+
[key: string]: unknown;
|
|
207
|
+
} | null;
|
|
208
|
+
};
|
|
209
|
+
export {};
|