@trackunit/filters-asset-filter-definitions 2.4.13 → 2.4.14
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 +53 -53
- package/index.esm.js +53 -53
- package/package.json +4 -4
- package/src/defaultFilters/defaults/DeviceHealthIssueCategoryFilter/DeviceHealthIssueCategoryFilter.d.ts +6 -6
- package/src/defaultFilters/defaults/DeviceHealthIssueCategoryFilter/useDeviceHealthIssueCategoryDisplayNames/useDeviceHealthIssueCategoryDisplayNames.d.ts +3 -3
- package/src/defaultFilters/defaults/DeviceHealthIssueCategoryFilter/useDeviceHealthIssueCategoryFilter.d.ts +3 -3
- package/src/defaultFilters/defaults/DeviceHealthIssueStatusFilter/DeviceHealthIssueStatusFilter.d.ts +6 -6
- package/src/defaultFilters/defaults/DeviceHealthIssueStatusFilter/useDeviceHealthIssueStatusDisplayNames/useDeviceHealthIssueStatusDisplayNames.d.ts +3 -3
- package/src/defaultFilters/defaults/DeviceHealthIssueStatusFilter/useDeviceHealthIssueStatusFilter.d.ts +3 -3
- package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/DeviceHealthIssueTypeFilter.d.ts +6 -6
- package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/useDeviceHealthIssueTypeDisplayNames/useDeviceHealthIssueTypeDisplayNames.d.ts +3 -3
- package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/useDeviceHealthIssueTypeFilter.d.ts +3 -3
- package/src/generated/graphql-api/gql.d.ts +6 -6
- package/src/generated/graphql-api/graphql.d.ts +64 -17
package/index.cjs.js
CHANGED
|
@@ -494,17 +494,17 @@ const assetCriticalityState = {
|
|
|
494
494
|
LOW: "LOW",
|
|
495
495
|
NONE: "NONE",
|
|
496
496
|
};
|
|
497
|
-
const
|
|
497
|
+
const deviceHealthDeviceStatus = {
|
|
498
498
|
CRITICAL: "CRITICAL",
|
|
499
499
|
LOW: "LOW",
|
|
500
500
|
};
|
|
501
|
-
const
|
|
501
|
+
const deviceHealthIssueCategory = {
|
|
502
502
|
COVERAGE: "COVERAGE",
|
|
503
503
|
DEVICE_BATTERY: "DEVICE_BATTERY",
|
|
504
504
|
INSTALL_AND_CONFIGURATION: "INSTALL_AND_CONFIGURATION",
|
|
505
505
|
NON_REPORTING_DEVICE: "NON_REPORTING_DEVICE",
|
|
506
506
|
};
|
|
507
|
-
const
|
|
507
|
+
const deviceHealthIssueType = {
|
|
508
508
|
DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED",
|
|
509
509
|
DEVICE_BATTERY_APPROACHING_END_OF_LIFE: "DEVICE_BATTERY_APPROACHING_END_OF_LIFE",
|
|
510
510
|
LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE",
|
|
@@ -875,7 +875,7 @@ const DeviceHealthIssueCategorySummariesDocument = {
|
|
|
875
875
|
selections: [
|
|
876
876
|
{
|
|
877
877
|
kind: "Field",
|
|
878
|
-
name: { kind: "Name", value: "
|
|
878
|
+
name: { kind: "Name", value: "deviceHealthCategoriesSummary" },
|
|
879
879
|
selectionSet: {
|
|
880
880
|
kind: "SelectionSet",
|
|
881
881
|
selections: [
|
|
@@ -934,7 +934,7 @@ const DeviceHealthIssueStatusSummariesDocument = {
|
|
|
934
934
|
selections: [
|
|
935
935
|
{
|
|
936
936
|
kind: "Field",
|
|
937
|
-
name: { kind: "Name", value: "
|
|
937
|
+
name: { kind: "Name", value: "deviceHealthDeviceStatusSummary" },
|
|
938
938
|
selectionSet: {
|
|
939
939
|
kind: "SelectionSet",
|
|
940
940
|
selections: [
|
|
@@ -993,7 +993,7 @@ const DeviceHealthIssueTypeSummariesDocument = {
|
|
|
993
993
|
selections: [
|
|
994
994
|
{
|
|
995
995
|
kind: "Field",
|
|
996
|
-
name: { kind: "Name", value: "
|
|
996
|
+
name: { kind: "Name", value: "deviceHealthTypesSummary" },
|
|
997
997
|
selectionSet: {
|
|
998
998
|
kind: "SelectionSet",
|
|
999
999
|
selections: [
|
|
@@ -4005,15 +4005,15 @@ const useFleetHealthFilterUtils = ({ filterSummaries, filterTranslations, }) =>
|
|
|
4005
4005
|
/**
|
|
4006
4006
|
* Get a record of device health category display names
|
|
4007
4007
|
*
|
|
4008
|
-
* @returns {Record<
|
|
4008
|
+
* @returns {Record<DeviceHealthIssueCategory, string>} A record of device health category display names
|
|
4009
4009
|
*/
|
|
4010
4010
|
const useDeviceHealthIssueCategoryDisplayNames = () => {
|
|
4011
4011
|
const [t] = useTranslation();
|
|
4012
4012
|
return react.useMemo(() => ({
|
|
4013
|
-
[
|
|
4014
|
-
[
|
|
4015
|
-
[
|
|
4016
|
-
[
|
|
4013
|
+
[deviceHealthIssueCategory.COVERAGE]: t("assetFilters.deviceHealthIssueCategory.coverageIssues"),
|
|
4014
|
+
[deviceHealthIssueCategory.DEVICE_BATTERY]: t("assetFilters.deviceHealthIssueCategory.deviceBatteryIssues"),
|
|
4015
|
+
[deviceHealthIssueCategory.INSTALL_AND_CONFIGURATION]: t("assetFilters.deviceHealthIssueCategory.installAndConfigurationHealth"),
|
|
4016
|
+
[deviceHealthIssueCategory.NON_REPORTING_DEVICE]: t("assetFilters.deviceHealthIssueCategory.nonReportingUnit"),
|
|
4017
4017
|
}), [t]);
|
|
4018
4018
|
};
|
|
4019
4019
|
|
|
@@ -4021,11 +4021,11 @@ const useDeviceHealthIssueCategoryDisplayNames = () => {
|
|
|
4021
4021
|
* The Device Health Issue Category Filter component
|
|
4022
4022
|
*
|
|
4023
4023
|
* @param props - The component props
|
|
4024
|
-
* @param props.
|
|
4025
|
-
* @param props.
|
|
4024
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
4025
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
4026
4026
|
* @returns {ReactElement} The Device Health Issue Category Filter component
|
|
4027
4027
|
*/
|
|
4028
|
-
const DeviceHealthIssueCategoryFilter = ({
|
|
4028
|
+
const DeviceHealthIssueCategoryFilter = ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }) => {
|
|
4029
4029
|
const categoryDisplayNames = useDeviceHealthIssueCategoryDisplayNames();
|
|
4030
4030
|
const filters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
|
|
4031
4031
|
const { data, loading } = reactGraphqlHooks.useQuery(DeviceHealthIssueCategorySummariesDocument, {
|
|
@@ -4033,14 +4033,14 @@ const DeviceHealthIssueCategoryFilter = ({ fleetHealthStates, fleetHealthDateTim
|
|
|
4033
4033
|
filters: {
|
|
4034
4034
|
...filters,
|
|
4035
4035
|
activeFilter: true,
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4036
|
+
deviceHealthCategories: undefined,
|
|
4037
|
+
deviceHealthStates: deviceHealthStates ? [...deviceHealthStates] : ["OPEN"],
|
|
4038
|
+
deviceHealthDateTimeRange,
|
|
4039
4039
|
},
|
|
4040
4040
|
},
|
|
4041
4041
|
});
|
|
4042
4042
|
const { options } = useFleetHealthFilterUtils({
|
|
4043
|
-
filterSummaries: data?.assetSummary?.
|
|
4043
|
+
filterSummaries: data?.assetSummary?.deviceHealthCategoriesSummary.summary,
|
|
4044
4044
|
filterTranslations: categoryDisplayNames,
|
|
4045
4045
|
});
|
|
4046
4046
|
return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, loading: loading, options: options });
|
|
@@ -4060,21 +4060,21 @@ const useDeviceHealthIssueCategoryFilter = (hookProps) => {
|
|
|
4060
4060
|
type: "valueNameArray",
|
|
4061
4061
|
group: "DEVICE_HEALTH",
|
|
4062
4062
|
title: t("assetFilters.deviceHealthIssueCategories"),
|
|
4063
|
-
component: props => (jsxRuntime.jsx(DeviceHealthIssueCategoryFilter, { ...props,
|
|
4063
|
+
component: props => (jsxRuntime.jsx(DeviceHealthIssueCategoryFilter, { ...props, deviceHealthDateTimeRange: hookProps?.deviceHealthDateTimeRange, deviceHealthStates: hookProps?.deviceHealthStates })),
|
|
4064
4064
|
};
|
|
4065
|
-
}, [t, hookProps?.
|
|
4065
|
+
}, [t, hookProps?.deviceHealthStates, hookProps?.deviceHealthDateTimeRange]);
|
|
4066
4066
|
};
|
|
4067
4067
|
|
|
4068
4068
|
/**
|
|
4069
4069
|
* Get a record of device health issue type display names
|
|
4070
4070
|
*
|
|
4071
|
-
* @returns {Record<
|
|
4071
|
+
* @returns {Record<DeviceHealthDeviceStatus, string>} A record of device health issue type display names
|
|
4072
4072
|
*/
|
|
4073
4073
|
const useDeviceHealthIssueStatusDisplayNames = () => {
|
|
4074
4074
|
const [t] = useTranslation();
|
|
4075
4075
|
return react.useMemo(() => ({
|
|
4076
|
-
[
|
|
4077
|
-
[
|
|
4076
|
+
[deviceHealthDeviceStatus.CRITICAL]: t("assetFilters.deviceHealthIssueStatus.critical"),
|
|
4077
|
+
[deviceHealthDeviceStatus.LOW]: t("assetFilters.deviceHealthIssueStatus.low"),
|
|
4078
4078
|
}), [t]);
|
|
4079
4079
|
};
|
|
4080
4080
|
|
|
@@ -4082,11 +4082,11 @@ const useDeviceHealthIssueStatusDisplayNames = () => {
|
|
|
4082
4082
|
* The Device Health Issue Status Filter component
|
|
4083
4083
|
*
|
|
4084
4084
|
* @param props - The component props
|
|
4085
|
-
* @param props.
|
|
4086
|
-
* @param props.
|
|
4085
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
4086
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
4087
4087
|
* @returns {ReactElement} The Device Health Issue Status Filter component
|
|
4088
4088
|
*/
|
|
4089
|
-
const DeviceHealthIssueStatusFilter = ({
|
|
4089
|
+
const DeviceHealthIssueStatusFilter = ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }) => {
|
|
4090
4090
|
const issueTypeDisplayNames = useDeviceHealthIssueStatusDisplayNames();
|
|
4091
4091
|
const filters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
|
|
4092
4092
|
const { data, loading } = reactGraphqlHooks.useQuery(DeviceHealthIssueStatusSummariesDocument, {
|
|
@@ -4094,14 +4094,14 @@ const DeviceHealthIssueStatusFilter = ({ fleetHealthStates, fleetHealthDateTimeR
|
|
|
4094
4094
|
filters: {
|
|
4095
4095
|
...filters,
|
|
4096
4096
|
activeFilter: true,
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4097
|
+
deviceHealthDeviceStatuses: undefined,
|
|
4098
|
+
deviceHealthStates: deviceHealthStates ? [...deviceHealthStates] : ["OPEN"],
|
|
4099
|
+
deviceHealthDateTimeRange,
|
|
4100
4100
|
},
|
|
4101
4101
|
},
|
|
4102
4102
|
});
|
|
4103
4103
|
const { options } = useFleetHealthFilterUtils({
|
|
4104
|
-
filterSummaries: data?.assetSummary?.
|
|
4104
|
+
filterSummaries: data?.assetSummary?.deviceHealthDeviceStatusSummary.summary,
|
|
4105
4105
|
filterTranslations: issueTypeDisplayNames,
|
|
4106
4106
|
});
|
|
4107
4107
|
return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, loading: loading, options: options });
|
|
@@ -4121,30 +4121,30 @@ const useDeviceHealthIssueStatusFilter = (hookProps) => {
|
|
|
4121
4121
|
type: "valueNameArray",
|
|
4122
4122
|
group: "DEVICE_HEALTH",
|
|
4123
4123
|
title: t("assetFilters.deviceHealthIssueStatus"),
|
|
4124
|
-
component: props => (jsxRuntime.jsx(DeviceHealthIssueStatusFilter, { ...props,
|
|
4124
|
+
component: props => (jsxRuntime.jsx(DeviceHealthIssueStatusFilter, { ...props, deviceHealthDateTimeRange: hookProps?.deviceHealthDateTimeRange, deviceHealthStates: hookProps?.deviceHealthStates })),
|
|
4125
4125
|
};
|
|
4126
|
-
}, [t, hookProps?.
|
|
4126
|
+
}, [t, hookProps?.deviceHealthStates, hookProps?.deviceHealthDateTimeRange]);
|
|
4127
4127
|
};
|
|
4128
4128
|
|
|
4129
4129
|
/**
|
|
4130
4130
|
* Get a record of device health issue type display names
|
|
4131
4131
|
*
|
|
4132
|
-
* @returns {Record<
|
|
4132
|
+
* @returns {Record<DeviceHealthIssueType, string>} A record of device health issue type display names
|
|
4133
4133
|
*/
|
|
4134
4134
|
const useDeviceHealthIssueTypeDisplayNames = () => {
|
|
4135
4135
|
const [t] = useTranslation();
|
|
4136
4136
|
return react.useMemo(() => ({
|
|
4137
|
-
[
|
|
4138
|
-
[
|
|
4139
|
-
[
|
|
4140
|
-
[
|
|
4141
|
-
[
|
|
4142
|
-
[
|
|
4143
|
-
[
|
|
4144
|
-
[
|
|
4145
|
-
[
|
|
4146
|
-
[
|
|
4147
|
-
[
|
|
4137
|
+
[deviceHealthIssueType.DATA_NOT_RECEIVED]: t("assetFilters.deviceHealthIssueType.dataNotReceived"),
|
|
4138
|
+
[deviceHealthIssueType.DEVICE_BATTERY_APPROACHING_END_OF_LIFE]: t("assetFilters.deviceHealthIssueType.deviceBatteryApproachingEndOfLife"),
|
|
4139
|
+
[deviceHealthIssueType.LOW_CELLULAR_COVERAGE]: t("assetFilters.deviceHealthIssueType.lowCellularCoverage"),
|
|
4140
|
+
[deviceHealthIssueType.LOW_DEVICE_BATTERY]: t("assetFilters.deviceHealthIssueType.lowDeviceBattery"),
|
|
4141
|
+
[deviceHealthIssueType.LOW_DEVICE_INPUT_VOLTAGE]: t("assetFilters.deviceHealthIssueType.lowDeviceInputVoltage"),
|
|
4142
|
+
[deviceHealthIssueType.LOW_GPS_COVERAGE]: t("assetFilters.deviceHealthIssueType.lowGpsCoverage"),
|
|
4143
|
+
[deviceHealthIssueType.NO_CAN_DATA_CONFIGURATION]: t("assetFilters.deviceHealthIssueType.noCanDataConfiguration"),
|
|
4144
|
+
[deviceHealthIssueType.UNUSUAL_OPERATING_HOURS]: t("assetFilters.deviceHealthIssueType.operatingHours"),
|
|
4145
|
+
[deviceHealthIssueType.OPERATING_HOURS_FROM_CAN_MODIFIED]: t("assetFilters.deviceHealthIssueType.operatingHoursFromCanModified"),
|
|
4146
|
+
[deviceHealthIssueType.OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY]: t("assetFilters.deviceHealthIssueType.operatingHoursReporting0HoursPerDay"),
|
|
4147
|
+
[deviceHealthIssueType.OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY]: t("assetFilters.deviceHealthIssueType.operatingHoursReporting24HoursPerDay"),
|
|
4148
4148
|
}), [t]);
|
|
4149
4149
|
};
|
|
4150
4150
|
|
|
@@ -4152,11 +4152,11 @@ const useDeviceHealthIssueTypeDisplayNames = () => {
|
|
|
4152
4152
|
* The Device Health Issue Type Filter component
|
|
4153
4153
|
*
|
|
4154
4154
|
* @param props - The component props
|
|
4155
|
-
* @param props.
|
|
4156
|
-
* @param props.
|
|
4155
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
4156
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
4157
4157
|
* @returns {ReactElement} The Device Health Issue Type Filter component
|
|
4158
4158
|
*/
|
|
4159
|
-
const DeviceHealthIssueTypeFilter = ({
|
|
4159
|
+
const DeviceHealthIssueTypeFilter = ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }) => {
|
|
4160
4160
|
const issueTypeDisplayNames = useDeviceHealthIssueTypeDisplayNames();
|
|
4161
4161
|
const filters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
|
|
4162
4162
|
const [searchQuery, setSearchQuery] = react.useState("");
|
|
@@ -4166,14 +4166,14 @@ const DeviceHealthIssueTypeFilter = ({ fleetHealthStates, fleetHealthDateTimeRan
|
|
|
4166
4166
|
filters: {
|
|
4167
4167
|
...filters,
|
|
4168
4168
|
activeFilter: true,
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4169
|
+
deviceHealthTypes: undefined,
|
|
4170
|
+
deviceHealthStates: deviceHealthStates ? [...deviceHealthStates] : ["OPEN"],
|
|
4171
|
+
deviceHealthDateTimeRange,
|
|
4172
4172
|
},
|
|
4173
4173
|
},
|
|
4174
4174
|
});
|
|
4175
4175
|
const { options } = useFleetHealthFilterUtils({
|
|
4176
|
-
filterSummaries: data?.assetSummary?.
|
|
4176
|
+
filterSummaries: data?.assetSummary?.deviceHealthTypesSummary.summary,
|
|
4177
4177
|
filterTranslations: issueTypeDisplayNames,
|
|
4178
4178
|
});
|
|
4179
4179
|
return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchQuery, onChange: setSearchQuery }, loading: loading, options: options.filter(option => option.label.toLowerCase().includes(debouncedSearchQuery)) }));
|
|
@@ -4193,9 +4193,9 @@ const useDeviceHealthIssueTypeFilter = (hookProps) => {
|
|
|
4193
4193
|
type: "valueNameArray",
|
|
4194
4194
|
group: "DEVICE_HEALTH",
|
|
4195
4195
|
title: t("assetFilters.deviceHealthIssueTypes"),
|
|
4196
|
-
component: props => (jsxRuntime.jsx(DeviceHealthIssueTypeFilter, { ...props,
|
|
4196
|
+
component: props => (jsxRuntime.jsx(DeviceHealthIssueTypeFilter, { ...props, deviceHealthDateTimeRange: hookProps?.deviceHealthDateTimeRange, deviceHealthStates: hookProps?.deviceHealthStates })),
|
|
4197
4197
|
};
|
|
4198
|
-
}, [t, hookProps?.
|
|
4198
|
+
}, [t, hookProps?.deviceHealthStates, hookProps?.deviceHealthDateTimeRange]);
|
|
4199
4199
|
};
|
|
4200
4200
|
|
|
4201
4201
|
/**
|
package/index.esm.js
CHANGED
|
@@ -492,17 +492,17 @@ const assetCriticalityState = {
|
|
|
492
492
|
LOW: "LOW",
|
|
493
493
|
NONE: "NONE",
|
|
494
494
|
};
|
|
495
|
-
const
|
|
495
|
+
const deviceHealthDeviceStatus = {
|
|
496
496
|
CRITICAL: "CRITICAL",
|
|
497
497
|
LOW: "LOW",
|
|
498
498
|
};
|
|
499
|
-
const
|
|
499
|
+
const deviceHealthIssueCategory = {
|
|
500
500
|
COVERAGE: "COVERAGE",
|
|
501
501
|
DEVICE_BATTERY: "DEVICE_BATTERY",
|
|
502
502
|
INSTALL_AND_CONFIGURATION: "INSTALL_AND_CONFIGURATION",
|
|
503
503
|
NON_REPORTING_DEVICE: "NON_REPORTING_DEVICE",
|
|
504
504
|
};
|
|
505
|
-
const
|
|
505
|
+
const deviceHealthIssueType = {
|
|
506
506
|
DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED",
|
|
507
507
|
DEVICE_BATTERY_APPROACHING_END_OF_LIFE: "DEVICE_BATTERY_APPROACHING_END_OF_LIFE",
|
|
508
508
|
LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE",
|
|
@@ -873,7 +873,7 @@ const DeviceHealthIssueCategorySummariesDocument = {
|
|
|
873
873
|
selections: [
|
|
874
874
|
{
|
|
875
875
|
kind: "Field",
|
|
876
|
-
name: { kind: "Name", value: "
|
|
876
|
+
name: { kind: "Name", value: "deviceHealthCategoriesSummary" },
|
|
877
877
|
selectionSet: {
|
|
878
878
|
kind: "SelectionSet",
|
|
879
879
|
selections: [
|
|
@@ -932,7 +932,7 @@ const DeviceHealthIssueStatusSummariesDocument = {
|
|
|
932
932
|
selections: [
|
|
933
933
|
{
|
|
934
934
|
kind: "Field",
|
|
935
|
-
name: { kind: "Name", value: "
|
|
935
|
+
name: { kind: "Name", value: "deviceHealthDeviceStatusSummary" },
|
|
936
936
|
selectionSet: {
|
|
937
937
|
kind: "SelectionSet",
|
|
938
938
|
selections: [
|
|
@@ -991,7 +991,7 @@ const DeviceHealthIssueTypeSummariesDocument = {
|
|
|
991
991
|
selections: [
|
|
992
992
|
{
|
|
993
993
|
kind: "Field",
|
|
994
|
-
name: { kind: "Name", value: "
|
|
994
|
+
name: { kind: "Name", value: "deviceHealthTypesSummary" },
|
|
995
995
|
selectionSet: {
|
|
996
996
|
kind: "SelectionSet",
|
|
997
997
|
selections: [
|
|
@@ -4003,15 +4003,15 @@ const useFleetHealthFilterUtils = ({ filterSummaries, filterTranslations, }) =>
|
|
|
4003
4003
|
/**
|
|
4004
4004
|
* Get a record of device health category display names
|
|
4005
4005
|
*
|
|
4006
|
-
* @returns {Record<
|
|
4006
|
+
* @returns {Record<DeviceHealthIssueCategory, string>} A record of device health category display names
|
|
4007
4007
|
*/
|
|
4008
4008
|
const useDeviceHealthIssueCategoryDisplayNames = () => {
|
|
4009
4009
|
const [t] = useTranslation();
|
|
4010
4010
|
return useMemo(() => ({
|
|
4011
|
-
[
|
|
4012
|
-
[
|
|
4013
|
-
[
|
|
4014
|
-
[
|
|
4011
|
+
[deviceHealthIssueCategory.COVERAGE]: t("assetFilters.deviceHealthIssueCategory.coverageIssues"),
|
|
4012
|
+
[deviceHealthIssueCategory.DEVICE_BATTERY]: t("assetFilters.deviceHealthIssueCategory.deviceBatteryIssues"),
|
|
4013
|
+
[deviceHealthIssueCategory.INSTALL_AND_CONFIGURATION]: t("assetFilters.deviceHealthIssueCategory.installAndConfigurationHealth"),
|
|
4014
|
+
[deviceHealthIssueCategory.NON_REPORTING_DEVICE]: t("assetFilters.deviceHealthIssueCategory.nonReportingUnit"),
|
|
4015
4015
|
}), [t]);
|
|
4016
4016
|
};
|
|
4017
4017
|
|
|
@@ -4019,11 +4019,11 @@ const useDeviceHealthIssueCategoryDisplayNames = () => {
|
|
|
4019
4019
|
* The Device Health Issue Category Filter component
|
|
4020
4020
|
*
|
|
4021
4021
|
* @param props - The component props
|
|
4022
|
-
* @param props.
|
|
4023
|
-
* @param props.
|
|
4022
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
4023
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
4024
4024
|
* @returns {ReactElement} The Device Health Issue Category Filter component
|
|
4025
4025
|
*/
|
|
4026
|
-
const DeviceHealthIssueCategoryFilter = ({
|
|
4026
|
+
const DeviceHealthIssueCategoryFilter = ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }) => {
|
|
4027
4027
|
const categoryDisplayNames = useDeviceHealthIssueCategoryDisplayNames();
|
|
4028
4028
|
const filters = useActiveAssetFilters(props.filterState.values);
|
|
4029
4029
|
const { data, loading } = useQuery(DeviceHealthIssueCategorySummariesDocument, {
|
|
@@ -4031,14 +4031,14 @@ const DeviceHealthIssueCategoryFilter = ({ fleetHealthStates, fleetHealthDateTim
|
|
|
4031
4031
|
filters: {
|
|
4032
4032
|
...filters,
|
|
4033
4033
|
activeFilter: true,
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4034
|
+
deviceHealthCategories: undefined,
|
|
4035
|
+
deviceHealthStates: deviceHealthStates ? [...deviceHealthStates] : ["OPEN"],
|
|
4036
|
+
deviceHealthDateTimeRange,
|
|
4037
4037
|
},
|
|
4038
4038
|
},
|
|
4039
4039
|
});
|
|
4040
4040
|
const { options } = useFleetHealthFilterUtils({
|
|
4041
|
-
filterSummaries: data?.assetSummary?.
|
|
4041
|
+
filterSummaries: data?.assetSummary?.deviceHealthCategoriesSummary.summary,
|
|
4042
4042
|
filterTranslations: categoryDisplayNames,
|
|
4043
4043
|
});
|
|
4044
4044
|
return jsx(DefaultCheckboxFilter, { ...props, loading: loading, options: options });
|
|
@@ -4058,21 +4058,21 @@ const useDeviceHealthIssueCategoryFilter = (hookProps) => {
|
|
|
4058
4058
|
type: "valueNameArray",
|
|
4059
4059
|
group: "DEVICE_HEALTH",
|
|
4060
4060
|
title: t("assetFilters.deviceHealthIssueCategories"),
|
|
4061
|
-
component: props => (jsx(DeviceHealthIssueCategoryFilter, { ...props,
|
|
4061
|
+
component: props => (jsx(DeviceHealthIssueCategoryFilter, { ...props, deviceHealthDateTimeRange: hookProps?.deviceHealthDateTimeRange, deviceHealthStates: hookProps?.deviceHealthStates })),
|
|
4062
4062
|
};
|
|
4063
|
-
}, [t, hookProps?.
|
|
4063
|
+
}, [t, hookProps?.deviceHealthStates, hookProps?.deviceHealthDateTimeRange]);
|
|
4064
4064
|
};
|
|
4065
4065
|
|
|
4066
4066
|
/**
|
|
4067
4067
|
* Get a record of device health issue type display names
|
|
4068
4068
|
*
|
|
4069
|
-
* @returns {Record<
|
|
4069
|
+
* @returns {Record<DeviceHealthDeviceStatus, string>} A record of device health issue type display names
|
|
4070
4070
|
*/
|
|
4071
4071
|
const useDeviceHealthIssueStatusDisplayNames = () => {
|
|
4072
4072
|
const [t] = useTranslation();
|
|
4073
4073
|
return useMemo(() => ({
|
|
4074
|
-
[
|
|
4075
|
-
[
|
|
4074
|
+
[deviceHealthDeviceStatus.CRITICAL]: t("assetFilters.deviceHealthIssueStatus.critical"),
|
|
4075
|
+
[deviceHealthDeviceStatus.LOW]: t("assetFilters.deviceHealthIssueStatus.low"),
|
|
4076
4076
|
}), [t]);
|
|
4077
4077
|
};
|
|
4078
4078
|
|
|
@@ -4080,11 +4080,11 @@ const useDeviceHealthIssueStatusDisplayNames = () => {
|
|
|
4080
4080
|
* The Device Health Issue Status Filter component
|
|
4081
4081
|
*
|
|
4082
4082
|
* @param props - The component props
|
|
4083
|
-
* @param props.
|
|
4084
|
-
* @param props.
|
|
4083
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
4084
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
4085
4085
|
* @returns {ReactElement} The Device Health Issue Status Filter component
|
|
4086
4086
|
*/
|
|
4087
|
-
const DeviceHealthIssueStatusFilter = ({
|
|
4087
|
+
const DeviceHealthIssueStatusFilter = ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }) => {
|
|
4088
4088
|
const issueTypeDisplayNames = useDeviceHealthIssueStatusDisplayNames();
|
|
4089
4089
|
const filters = useActiveAssetFilters(props.filterState.values);
|
|
4090
4090
|
const { data, loading } = useQuery(DeviceHealthIssueStatusSummariesDocument, {
|
|
@@ -4092,14 +4092,14 @@ const DeviceHealthIssueStatusFilter = ({ fleetHealthStates, fleetHealthDateTimeR
|
|
|
4092
4092
|
filters: {
|
|
4093
4093
|
...filters,
|
|
4094
4094
|
activeFilter: true,
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4095
|
+
deviceHealthDeviceStatuses: undefined,
|
|
4096
|
+
deviceHealthStates: deviceHealthStates ? [...deviceHealthStates] : ["OPEN"],
|
|
4097
|
+
deviceHealthDateTimeRange,
|
|
4098
4098
|
},
|
|
4099
4099
|
},
|
|
4100
4100
|
});
|
|
4101
4101
|
const { options } = useFleetHealthFilterUtils({
|
|
4102
|
-
filterSummaries: data?.assetSummary?.
|
|
4102
|
+
filterSummaries: data?.assetSummary?.deviceHealthDeviceStatusSummary.summary,
|
|
4103
4103
|
filterTranslations: issueTypeDisplayNames,
|
|
4104
4104
|
});
|
|
4105
4105
|
return jsx(DefaultCheckboxFilter, { ...props, loading: loading, options: options });
|
|
@@ -4119,30 +4119,30 @@ const useDeviceHealthIssueStatusFilter = (hookProps) => {
|
|
|
4119
4119
|
type: "valueNameArray",
|
|
4120
4120
|
group: "DEVICE_HEALTH",
|
|
4121
4121
|
title: t("assetFilters.deviceHealthIssueStatus"),
|
|
4122
|
-
component: props => (jsx(DeviceHealthIssueStatusFilter, { ...props,
|
|
4122
|
+
component: props => (jsx(DeviceHealthIssueStatusFilter, { ...props, deviceHealthDateTimeRange: hookProps?.deviceHealthDateTimeRange, deviceHealthStates: hookProps?.deviceHealthStates })),
|
|
4123
4123
|
};
|
|
4124
|
-
}, [t, hookProps?.
|
|
4124
|
+
}, [t, hookProps?.deviceHealthStates, hookProps?.deviceHealthDateTimeRange]);
|
|
4125
4125
|
};
|
|
4126
4126
|
|
|
4127
4127
|
/**
|
|
4128
4128
|
* Get a record of device health issue type display names
|
|
4129
4129
|
*
|
|
4130
|
-
* @returns {Record<
|
|
4130
|
+
* @returns {Record<DeviceHealthIssueType, string>} A record of device health issue type display names
|
|
4131
4131
|
*/
|
|
4132
4132
|
const useDeviceHealthIssueTypeDisplayNames = () => {
|
|
4133
4133
|
const [t] = useTranslation();
|
|
4134
4134
|
return useMemo(() => ({
|
|
4135
|
-
[
|
|
4136
|
-
[
|
|
4137
|
-
[
|
|
4138
|
-
[
|
|
4139
|
-
[
|
|
4140
|
-
[
|
|
4141
|
-
[
|
|
4142
|
-
[
|
|
4143
|
-
[
|
|
4144
|
-
[
|
|
4145
|
-
[
|
|
4135
|
+
[deviceHealthIssueType.DATA_NOT_RECEIVED]: t("assetFilters.deviceHealthIssueType.dataNotReceived"),
|
|
4136
|
+
[deviceHealthIssueType.DEVICE_BATTERY_APPROACHING_END_OF_LIFE]: t("assetFilters.deviceHealthIssueType.deviceBatteryApproachingEndOfLife"),
|
|
4137
|
+
[deviceHealthIssueType.LOW_CELLULAR_COVERAGE]: t("assetFilters.deviceHealthIssueType.lowCellularCoverage"),
|
|
4138
|
+
[deviceHealthIssueType.LOW_DEVICE_BATTERY]: t("assetFilters.deviceHealthIssueType.lowDeviceBattery"),
|
|
4139
|
+
[deviceHealthIssueType.LOW_DEVICE_INPUT_VOLTAGE]: t("assetFilters.deviceHealthIssueType.lowDeviceInputVoltage"),
|
|
4140
|
+
[deviceHealthIssueType.LOW_GPS_COVERAGE]: t("assetFilters.deviceHealthIssueType.lowGpsCoverage"),
|
|
4141
|
+
[deviceHealthIssueType.NO_CAN_DATA_CONFIGURATION]: t("assetFilters.deviceHealthIssueType.noCanDataConfiguration"),
|
|
4142
|
+
[deviceHealthIssueType.UNUSUAL_OPERATING_HOURS]: t("assetFilters.deviceHealthIssueType.operatingHours"),
|
|
4143
|
+
[deviceHealthIssueType.OPERATING_HOURS_FROM_CAN_MODIFIED]: t("assetFilters.deviceHealthIssueType.operatingHoursFromCanModified"),
|
|
4144
|
+
[deviceHealthIssueType.OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY]: t("assetFilters.deviceHealthIssueType.operatingHoursReporting0HoursPerDay"),
|
|
4145
|
+
[deviceHealthIssueType.OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY]: t("assetFilters.deviceHealthIssueType.operatingHoursReporting24HoursPerDay"),
|
|
4146
4146
|
}), [t]);
|
|
4147
4147
|
};
|
|
4148
4148
|
|
|
@@ -4150,11 +4150,11 @@ const useDeviceHealthIssueTypeDisplayNames = () => {
|
|
|
4150
4150
|
* The Device Health Issue Type Filter component
|
|
4151
4151
|
*
|
|
4152
4152
|
* @param props - The component props
|
|
4153
|
-
* @param props.
|
|
4154
|
-
* @param props.
|
|
4153
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
4154
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
4155
4155
|
* @returns {ReactElement} The Device Health Issue Type Filter component
|
|
4156
4156
|
*/
|
|
4157
|
-
const DeviceHealthIssueTypeFilter = ({
|
|
4157
|
+
const DeviceHealthIssueTypeFilter = ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }) => {
|
|
4158
4158
|
const issueTypeDisplayNames = useDeviceHealthIssueTypeDisplayNames();
|
|
4159
4159
|
const filters = useActiveAssetFilters(props.filterState.values);
|
|
4160
4160
|
const [searchQuery, setSearchQuery] = useState("");
|
|
@@ -4164,14 +4164,14 @@ const DeviceHealthIssueTypeFilter = ({ fleetHealthStates, fleetHealthDateTimeRan
|
|
|
4164
4164
|
filters: {
|
|
4165
4165
|
...filters,
|
|
4166
4166
|
activeFilter: true,
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4167
|
+
deviceHealthTypes: undefined,
|
|
4168
|
+
deviceHealthStates: deviceHealthStates ? [...deviceHealthStates] : ["OPEN"],
|
|
4169
|
+
deviceHealthDateTimeRange,
|
|
4170
4170
|
},
|
|
4171
4171
|
},
|
|
4172
4172
|
});
|
|
4173
4173
|
const { options } = useFleetHealthFilterUtils({
|
|
4174
|
-
filterSummaries: data?.assetSummary?.
|
|
4174
|
+
filterSummaries: data?.assetSummary?.deviceHealthTypesSummary.summary,
|
|
4175
4175
|
filterTranslations: issueTypeDisplayNames,
|
|
4176
4176
|
});
|
|
4177
4177
|
return (jsx(DefaultCheckboxFilter, { ...props, customSearch: { value: searchQuery, onChange: setSearchQuery }, loading: loading, options: options.filter(option => option.label.toLowerCase().includes(debouncedSearchQuery)) }));
|
|
@@ -4191,9 +4191,9 @@ const useDeviceHealthIssueTypeFilter = (hookProps) => {
|
|
|
4191
4191
|
type: "valueNameArray",
|
|
4192
4192
|
group: "DEVICE_HEALTH",
|
|
4193
4193
|
title: t("assetFilters.deviceHealthIssueTypes"),
|
|
4194
|
-
component: props => (jsx(DeviceHealthIssueTypeFilter, { ...props,
|
|
4194
|
+
component: props => (jsx(DeviceHealthIssueTypeFilter, { ...props, deviceHealthDateTimeRange: hookProps?.deviceHealthDateTimeRange, deviceHealthStates: hookProps?.deviceHealthStates })),
|
|
4195
4195
|
};
|
|
4196
|
-
}, [t, hookProps?.
|
|
4196
|
+
}, [t, hookProps?.deviceHealthStates, hookProps?.deviceHealthDateTimeRange]);
|
|
4197
4197
|
};
|
|
4198
4198
|
|
|
4199
4199
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-asset-filter-definitions",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.14",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"@trackunit/react-core-hooks": "1.18.5",
|
|
18
18
|
"@trackunit/react-filter-components": "2.2.7",
|
|
19
19
|
"@trackunit/react-form-components": "2.2.7",
|
|
20
|
-
"@trackunit/filters-graphql-hook": "2.3.
|
|
21
|
-
"@trackunit/utilization-indicator": "2.2.
|
|
20
|
+
"@trackunit/filters-graphql-hook": "2.3.11",
|
|
21
|
+
"@trackunit/utilization-indicator": "2.2.7",
|
|
22
22
|
"@trackunit/geo-json-utils": "1.14.67",
|
|
23
23
|
"@trackunit/react-components": "2.2.6",
|
|
24
24
|
"@trackunit/shared-utils": "1.15.67",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@trackunit/i18n-library-translation": "2.1.5",
|
|
30
30
|
"@trackunit/iris-app-runtime-core-api": "1.16.73",
|
|
31
31
|
"@trackunit/react-graphql-hooks": "2.2.6",
|
|
32
|
-
"@trackunit/translations-device": "1.3.
|
|
32
|
+
"@trackunit/translations-device": "1.3.10"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@apollo/client": "^3.13.8",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
|
-
import { type DateTimeRange, type
|
|
3
|
+
import { type DateTimeRange, type DeviceHealthIssueState } from "../../../generated/graphql-api/graphql";
|
|
4
4
|
/** Props for the Device Health Issue Category Filter component */
|
|
5
5
|
interface DeviceHealthIssueCategoryFilterProps extends FilterViewProps<Array<ValueName>> {
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly deviceHealthStates?: ReadonlyArray<DeviceHealthIssueState>;
|
|
7
|
+
readonly deviceHealthDateTimeRange?: DateTimeRange;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* The Device Health Issue Category Filter component
|
|
11
11
|
*
|
|
12
12
|
* @param props - The component props
|
|
13
|
-
* @param props.
|
|
14
|
-
* @param props.
|
|
13
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
14
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
15
15
|
* @returns {ReactElement} The Device Health Issue Category Filter component
|
|
16
16
|
*/
|
|
17
|
-
export declare const DeviceHealthIssueCategoryFilter: ({
|
|
17
|
+
export declare const DeviceHealthIssueCategoryFilter: ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }: DeviceHealthIssueCategoryFilterProps) => ReactElement;
|
|
18
18
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeviceHealthIssueCategory } from "../../../../generated/graphql-api/graphql";
|
|
2
2
|
/**
|
|
3
3
|
* Get a record of device health category display names
|
|
4
4
|
*
|
|
5
|
-
* @returns {Record<
|
|
5
|
+
* @returns {Record<DeviceHealthIssueCategory, string>} A record of device health category display names
|
|
6
6
|
*/
|
|
7
|
-
export declare const useDeviceHealthIssueCategoryDisplayNames: () => Record<
|
|
7
|
+
export declare const useDeviceHealthIssueCategoryDisplayNames: () => Record<DeviceHealthIssueCategory, string>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ValueNameArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
|
-
import type { DateTimeRange,
|
|
2
|
+
import type { DateTimeRange, DeviceHealthIssueState } from "../../../generated/graphql-api/graphql";
|
|
3
3
|
/** Props for the Device Health Issue Category filter hook */
|
|
4
4
|
type DeviceHealthIssueCategoryFilterHookProps = {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly deviceHealthStates?: ReadonlyArray<DeviceHealthIssueState>;
|
|
6
|
+
readonly deviceHealthDateTimeRange?: DateTimeRange;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Get the Device Health Issue Category filter definition
|
package/src/defaultFilters/defaults/DeviceHealthIssueStatusFilter/DeviceHealthIssueStatusFilter.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
|
-
import { type DateTimeRange, type
|
|
3
|
+
import { type DateTimeRange, type DeviceHealthIssueState } from "../../../generated/graphql-api/graphql";
|
|
4
4
|
/** Props for the Device Health Issue Status Filter component */
|
|
5
5
|
interface DeviceHealthIssueStatusFilterProps extends FilterViewProps<Array<ValueName>> {
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly deviceHealthStates?: ReadonlyArray<DeviceHealthIssueState>;
|
|
7
|
+
readonly deviceHealthDateTimeRange?: DateTimeRange;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* The Device Health Issue Status Filter component
|
|
11
11
|
*
|
|
12
12
|
* @param props - The component props
|
|
13
|
-
* @param props.
|
|
14
|
-
* @param props.
|
|
13
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
14
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
15
15
|
* @returns {ReactElement} The Device Health Issue Status Filter component
|
|
16
16
|
*/
|
|
17
|
-
export declare const DeviceHealthIssueStatusFilter: ({
|
|
17
|
+
export declare const DeviceHealthIssueStatusFilter: ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }: DeviceHealthIssueStatusFilterProps) => ReactElement;
|
|
18
18
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeviceHealthDeviceStatus } from "../../../../generated/graphql-api/graphql";
|
|
2
2
|
/**
|
|
3
3
|
* Get a record of device health issue type display names
|
|
4
4
|
*
|
|
5
|
-
* @returns {Record<
|
|
5
|
+
* @returns {Record<DeviceHealthDeviceStatus, string>} A record of device health issue type display names
|
|
6
6
|
*/
|
|
7
|
-
export declare const useDeviceHealthIssueStatusDisplayNames: () => Record<
|
|
7
|
+
export declare const useDeviceHealthIssueStatusDisplayNames: () => Record<DeviceHealthDeviceStatus, string>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ValueNameArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
|
-
import type { DateTimeRange,
|
|
2
|
+
import type { DateTimeRange, DeviceHealthIssueState } from "../../../generated/graphql-api/graphql";
|
|
3
3
|
/** Props for the Device Health Issue Status filter hook */
|
|
4
4
|
type DeviceHealthIssueStatusFilterHookProps = {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly deviceHealthStates?: ReadonlyArray<DeviceHealthIssueState>;
|
|
6
|
+
readonly deviceHealthDateTimeRange?: DateTimeRange;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Get the Device Health Issue Status filter definition
|
package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/DeviceHealthIssueTypeFilter.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
|
-
import { type DateTimeRange, type
|
|
3
|
+
import { type DateTimeRange, type DeviceHealthIssueState } from "../../../generated/graphql-api/graphql";
|
|
4
4
|
/** Props for the Device Health Issue Type Filter component */
|
|
5
5
|
interface DeviceHealthIssueTypeFilterProps extends FilterViewProps<Array<ValueName>> {
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly deviceHealthStates?: ReadonlyArray<DeviceHealthIssueState>;
|
|
7
|
+
readonly deviceHealthDateTimeRange?: DateTimeRange;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* The Device Health Issue Type Filter component
|
|
11
11
|
*
|
|
12
12
|
* @param props - The component props
|
|
13
|
-
* @param props.
|
|
14
|
-
* @param props.
|
|
13
|
+
* @param props.deviceHealthStates - Fleet health states to filter by, defaults to ["OPEN"]
|
|
14
|
+
* @param props.deviceHealthDateTimeRange - Optional date range to scope the filter summary query
|
|
15
15
|
* @returns {ReactElement} The Device Health Issue Type Filter component
|
|
16
16
|
*/
|
|
17
|
-
export declare const DeviceHealthIssueTypeFilter: ({
|
|
17
|
+
export declare const DeviceHealthIssueTypeFilter: ({ deviceHealthStates, deviceHealthDateTimeRange, ...props }: DeviceHealthIssueTypeFilterProps) => ReactElement;
|
|
18
18
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeviceHealthIssueType } from "../../../../generated/graphql-api/graphql";
|
|
2
2
|
/**
|
|
3
3
|
* Get a record of device health issue type display names
|
|
4
4
|
*
|
|
5
|
-
* @returns {Record<
|
|
5
|
+
* @returns {Record<DeviceHealthIssueType, string>} A record of device health issue type display names
|
|
6
6
|
*/
|
|
7
|
-
export declare const useDeviceHealthIssueTypeDisplayNames: () => Record<
|
|
7
|
+
export declare const useDeviceHealthIssueTypeDisplayNames: () => Record<DeviceHealthIssueType, string>;
|
package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/useDeviceHealthIssueTypeFilter.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ValueNameArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
|
-
import type { DateTimeRange,
|
|
2
|
+
import type { DateTimeRange, DeviceHealthIssueState } from "../../../generated/graphql-api/graphql";
|
|
3
3
|
/** Props for the Device Health Issue Type filter hook */
|
|
4
4
|
type DeviceHealthIssueTypeFilterHookProps = {
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly deviceHealthStates?: ReadonlyArray<DeviceHealthIssueState>;
|
|
6
|
+
readonly deviceHealthDateTimeRange?: DateTimeRange;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Get the Device Health Issue Type filter definition
|
|
@@ -32,13 +32,13 @@ declare const documents: {
|
|
|
32
32
|
filters: types.InputMaybe<types.AssetFiltersInput>;
|
|
33
33
|
limit: types.InputMaybe<types.Scalars["Int"]["input"]>;
|
|
34
34
|
}>>;
|
|
35
|
-
"query DeviceHealthIssueCategorySummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n
|
|
35
|
+
"query DeviceHealthIssueCategorySummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthCategoriesSummary {\n summary {\n count\n key\n }\n total\n }\n }\n}": DocumentNode<types.DeviceHealthIssueCategorySummariesQuery, types.Exact<{
|
|
36
36
|
filters: types.InputMaybe<types.AssetFiltersInput>;
|
|
37
37
|
}>>;
|
|
38
|
-
"query DeviceHealthIssueStatusSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n
|
|
38
|
+
"query DeviceHealthIssueStatusSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthDeviceStatusSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}": DocumentNode<types.DeviceHealthIssueStatusSummariesQuery, types.Exact<{
|
|
39
39
|
filters: types.InputMaybe<types.AssetFiltersInput>;
|
|
40
40
|
}>>;
|
|
41
|
-
"query DeviceHealthIssueTypeSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n
|
|
41
|
+
"query DeviceHealthIssueTypeSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthTypesSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}": DocumentNode<types.DeviceHealthIssueTypeSummariesQuery, types.Exact<{
|
|
42
42
|
filters: types.InputMaybe<types.AssetFiltersInput>;
|
|
43
43
|
}>>;
|
|
44
44
|
"query DeviceTypesSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceTypesSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}": DocumentNode<types.DeviceTypesSummaryQuery, types.Exact<{
|
|
@@ -99,15 +99,15 @@ export declare function graphql(source: "query GetFleetCountriesSummary($filters
|
|
|
99
99
|
/**
|
|
100
100
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
101
101
|
*/
|
|
102
|
-
export declare function graphql(source: "query DeviceHealthIssueCategorySummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n
|
|
102
|
+
export declare function graphql(source: "query DeviceHealthIssueCategorySummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthCategoriesSummary {\n summary {\n count\n key\n }\n total\n }\n }\n}"): (typeof documents)["query DeviceHealthIssueCategorySummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthCategoriesSummary {\n summary {\n count\n key\n }\n total\n }\n }\n}"];
|
|
103
103
|
/**
|
|
104
104
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
105
105
|
*/
|
|
106
|
-
export declare function graphql(source: "query DeviceHealthIssueStatusSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n
|
|
106
|
+
export declare function graphql(source: "query DeviceHealthIssueStatusSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthDeviceStatusSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}"): (typeof documents)["query DeviceHealthIssueStatusSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthDeviceStatusSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}"];
|
|
107
107
|
/**
|
|
108
108
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
109
109
|
*/
|
|
110
|
-
export declare function graphql(source: "query DeviceHealthIssueTypeSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n
|
|
110
|
+
export declare function graphql(source: "query DeviceHealthIssueTypeSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthTypesSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}"): (typeof documents)["query DeviceHealthIssueTypeSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n deviceHealthTypesSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}"];
|
|
111
111
|
/**
|
|
112
112
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
113
113
|
*/
|
|
@@ -144,6 +144,7 @@ export type AreaFilterGeoJsonGeometryType = (typeof areaFilterGeoJsonGeometryTyp
|
|
|
144
144
|
export declare const assetActivityState: {
|
|
145
145
|
readonly IDLING: "IDLING";
|
|
146
146
|
readonly STOPPED: "STOPPED";
|
|
147
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
147
148
|
readonly UNKNOWN: "UNKNOWN";
|
|
148
149
|
readonly WORKING: "WORKING";
|
|
149
150
|
};
|
|
@@ -352,6 +353,37 @@ export declare const customerTypeSFS: {
|
|
|
352
353
|
readonly SERVICE: "SERVICE";
|
|
353
354
|
};
|
|
354
355
|
export type CustomerTypeSFS = (typeof customerTypeSFS)[keyof typeof customerTypeSFS];
|
|
356
|
+
export declare const deviceHealthDeviceStatus: {
|
|
357
|
+
readonly CRITICAL: "CRITICAL";
|
|
358
|
+
readonly LOW: "LOW";
|
|
359
|
+
};
|
|
360
|
+
export type DeviceHealthDeviceStatus = (typeof deviceHealthDeviceStatus)[keyof typeof deviceHealthDeviceStatus];
|
|
361
|
+
export declare const deviceHealthIssueCategory: {
|
|
362
|
+
readonly COVERAGE: "COVERAGE";
|
|
363
|
+
readonly DEVICE_BATTERY: "DEVICE_BATTERY";
|
|
364
|
+
readonly INSTALL_AND_CONFIGURATION: "INSTALL_AND_CONFIGURATION";
|
|
365
|
+
readonly NON_REPORTING_DEVICE: "NON_REPORTING_DEVICE";
|
|
366
|
+
};
|
|
367
|
+
export type DeviceHealthIssueCategory = (typeof deviceHealthIssueCategory)[keyof typeof deviceHealthIssueCategory];
|
|
368
|
+
export declare const deviceHealthIssueState: {
|
|
369
|
+
readonly OPEN: "OPEN";
|
|
370
|
+
readonly RESOLVED: "RESOLVED";
|
|
371
|
+
};
|
|
372
|
+
export type DeviceHealthIssueState = (typeof deviceHealthIssueState)[keyof typeof deviceHealthIssueState];
|
|
373
|
+
export declare const deviceHealthIssueType: {
|
|
374
|
+
readonly DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED";
|
|
375
|
+
readonly DEVICE_BATTERY_APPROACHING_END_OF_LIFE: "DEVICE_BATTERY_APPROACHING_END_OF_LIFE";
|
|
376
|
+
readonly LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE";
|
|
377
|
+
readonly LOW_DEVICE_BATTERY: "LOW_DEVICE_BATTERY";
|
|
378
|
+
readonly LOW_DEVICE_INPUT_VOLTAGE: "LOW_DEVICE_INPUT_VOLTAGE";
|
|
379
|
+
readonly LOW_GPS_COVERAGE: "LOW_GPS_COVERAGE";
|
|
380
|
+
readonly NO_CAN_DATA_CONFIGURATION: "NO_CAN_DATA_CONFIGURATION";
|
|
381
|
+
readonly OPERATING_HOURS_FROM_CAN_MODIFIED: "OPERATING_HOURS_FROM_CAN_MODIFIED";
|
|
382
|
+
readonly OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY: "OPERATING_HOURS_REPORTING_0_HOURS_PER_DAY";
|
|
383
|
+
readonly OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY: "OPERATING_HOURS_REPORTING_24_HOURS_PER_DAY";
|
|
384
|
+
readonly UNUSUAL_OPERATING_HOURS: "UNUSUAL_OPERATING_HOURS";
|
|
385
|
+
};
|
|
386
|
+
export type DeviceHealthIssueType = (typeof deviceHealthIssueType)[keyof typeof deviceHealthIssueType];
|
|
355
387
|
export declare const digitalKeyMode: {
|
|
356
388
|
readonly DISABLED: "DISABLED";
|
|
357
389
|
readonly LOCKED_FOR_ALL: "LOCKED_FOR_ALL";
|
|
@@ -450,6 +482,7 @@ export declare const rentalStatus: {
|
|
|
450
482
|
readonly RESERVED: "RESERVED";
|
|
451
483
|
readonly RETURNED: "RETURNED";
|
|
452
484
|
readonly TRANSFER: "TRANSFER";
|
|
485
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
453
486
|
};
|
|
454
487
|
export type RentalStatus = (typeof rentalStatus)[keyof typeof rentalStatus];
|
|
455
488
|
export declare const servicePlanStatus: {
|
|
@@ -537,6 +570,16 @@ export type AssetFiltersInput = {
|
|
|
537
570
|
customerIds?: InputMaybe<Array<Scalars["ID"]["input"]>>;
|
|
538
571
|
/** List of customer types */
|
|
539
572
|
customerTypes?: InputMaybe<Array<CustomerTypeSFS>>;
|
|
573
|
+
/** Filter by Device Health Categories */
|
|
574
|
+
deviceHealthCategories?: InputMaybe<Array<DeviceHealthIssueCategory>>;
|
|
575
|
+
/** Filter by Device Health datetime range */
|
|
576
|
+
deviceHealthDateTimeRange?: InputMaybe<DateTimeRange>;
|
|
577
|
+
/** Filter by Device Health device statuses */
|
|
578
|
+
deviceHealthDeviceStatuses?: InputMaybe<Array<DeviceHealthDeviceStatus>>;
|
|
579
|
+
/** Filter by Device Health states */
|
|
580
|
+
deviceHealthStates?: InputMaybe<Array<DeviceHealthIssueState>>;
|
|
581
|
+
/** Filter by Device Health Types */
|
|
582
|
+
deviceHealthTypes?: InputMaybe<Array<DeviceHealthIssueType>>;
|
|
540
583
|
/** Filter by telematics device types */
|
|
541
584
|
deviceTypes?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
542
585
|
/**
|
|
@@ -548,20 +591,30 @@ export type AssetFiltersInput = {
|
|
|
548
591
|
externalReferences?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
549
592
|
/** Filter by reported firmware versions */
|
|
550
593
|
firmwareVersion?: InputMaybe<Array<Scalars["String"]["input"]>>;
|
|
551
|
-
/**
|
|
594
|
+
/**
|
|
595
|
+
* Filter by Fleet Health Categories
|
|
596
|
+
* @deprecated Use `deviceHealthCategories` instead
|
|
597
|
+
*/
|
|
552
598
|
fleetHealthCategories?: InputMaybe<Array<FleetDataHealthIssueCategory>>;
|
|
553
599
|
/**
|
|
554
|
-
* Filter by Fleet Health
|
|
555
|
-
* @deprecated Use
|
|
600
|
+
* Filter by Fleet Health datetime range
|
|
601
|
+
* @deprecated Use `deviceHealthDateTimeRange` instead
|
|
556
602
|
*/
|
|
557
|
-
fleetHealthDateRange?: InputMaybe<DateRange>;
|
|
558
|
-
/** Filter by Fleet Health datetime range */
|
|
559
603
|
fleetHealthDateTimeRange?: InputMaybe<DateTimeRange>;
|
|
560
|
-
/**
|
|
604
|
+
/**
|
|
605
|
+
* Filter by Fleet Health device statuses
|
|
606
|
+
* @deprecated Use `deviceHealthDeviceStatuses` instead
|
|
607
|
+
*/
|
|
561
608
|
fleetHealthDeviceStatuses?: InputMaybe<Array<FleetDataHealthDeviceStatus>>;
|
|
562
|
-
/**
|
|
609
|
+
/**
|
|
610
|
+
* Filter by Fleet Health states
|
|
611
|
+
* @deprecated Use `deviceHealthStates` instead
|
|
612
|
+
*/
|
|
563
613
|
fleetHealthStates?: InputMaybe<Array<FleetDataHealthIssueState>>;
|
|
564
|
-
/**
|
|
614
|
+
/**
|
|
615
|
+
* Filter by Fleet Health Types
|
|
616
|
+
* @deprecated Use `deviceHealthTypes` instead
|
|
617
|
+
*/
|
|
565
618
|
fleetHealthTypes?: InputMaybe<Array<FleetDataHealthIssueType>>;
|
|
566
619
|
/** Filter by if the asset is followed */
|
|
567
620
|
followed?: InputMaybe<Scalars["Boolean"]["input"]>;
|
|
@@ -711,12 +764,6 @@ export type CustomFieldOwnerInput = {
|
|
|
711
764
|
/** The owner type of the custom field owner input. */
|
|
712
765
|
ownerType: CustomFieldOwnerType;
|
|
713
766
|
};
|
|
714
|
-
export type DateRange = {
|
|
715
|
-
/** end date */
|
|
716
|
-
end: Scalars["DateTime"]["input"];
|
|
717
|
-
/** start date */
|
|
718
|
-
start: Scalars["DateTime"]["input"];
|
|
719
|
-
};
|
|
720
767
|
export type DateTimeRange = {
|
|
721
768
|
/** Start date */
|
|
722
769
|
from?: InputMaybe<Scalars["DateTime"]["input"]>;
|
|
@@ -895,7 +942,7 @@ export type DeviceHealthIssueCategorySummariesQuery = {
|
|
|
895
942
|
__typename?: "Query";
|
|
896
943
|
assetSummary: {
|
|
897
944
|
__typename?: "AssetSummary";
|
|
898
|
-
|
|
945
|
+
deviceHealthCategoriesSummary: {
|
|
899
946
|
__typename?: "MetadataSummary";
|
|
900
947
|
total: number;
|
|
901
948
|
summary: Array<{
|
|
@@ -913,7 +960,7 @@ export type DeviceHealthIssueStatusSummariesQuery = {
|
|
|
913
960
|
__typename?: "Query";
|
|
914
961
|
assetSummary: {
|
|
915
962
|
__typename?: "AssetSummary";
|
|
916
|
-
|
|
963
|
+
deviceHealthDeviceStatusSummary: {
|
|
917
964
|
__typename?: "MetadataSummary";
|
|
918
965
|
total: number;
|
|
919
966
|
summary: Array<{
|
|
@@ -931,7 +978,7 @@ export type DeviceHealthIssueTypeSummariesQuery = {
|
|
|
931
978
|
__typename?: "Query";
|
|
932
979
|
assetSummary: {
|
|
933
980
|
__typename?: "AssetSummary";
|
|
934
|
-
|
|
981
|
+
deviceHealthTypesSummary: {
|
|
935
982
|
__typename?: "MetadataSummary";
|
|
936
983
|
total: number;
|
|
937
984
|
summary: Array<{
|