@trackunit/filters-asset-filter-definitions 1.11.113 → 1.12.0
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 +395 -0
- package/index.esm.js +393 -2
- package/package.json +18 -18
- package/src/defaultFilters/defaults/DeviceHealthIssueCategoryFilter/DeviceHealthIssueCategoryFilter.d.ts +9 -0
- package/src/defaultFilters/defaults/DeviceHealthIssueCategoryFilter/getHealthCategoryEnumWithFallback/getHealthCategoryEnumWithFallback.d.ts +8 -0
- package/src/defaultFilters/defaults/DeviceHealthIssueCategoryFilter/useDeviceHealthIssueCategoryDisplayNames/useDeviceHealthIssueCategoryDisplayNames.d.ts +7 -0
- package/src/defaultFilters/defaults/DeviceHealthIssueCategoryFilter/useDeviceHealthIssueCategoryFilter.d.ts +7 -0
- package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/DeviceHealthIssueTypeFilter.d.ts +9 -0
- package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/getHealthTypeEnumWithFallback/getHealthTypeEnumWithFallback.d.ts +8 -0
- package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/useDeviceHealthIssueTypeDisplayNames/useDeviceHealthIssueTypeDisplayNames.d.ts +7 -0
- package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/useDeviceHealthIssueTypeFilter.d.ts +7 -0
- package/src/defaultFilters/defaults/index.d.ts +2 -0
- package/src/generated/graphql-api/gql.d.ts +14 -0
- package/src/generated/graphql-api/graphql.d.ts +38 -0
- package/src/generated/graphql-api/mock.d.ts +6 -0
- package/src/hooks/useDefaultAssetFilterBarDefinition.d.ts +2 -0
- package/src/translation.d.ts +2 -2
package/index.esm.js
CHANGED
|
@@ -13,7 +13,7 @@ import { geoJsonPolygonSchema, geoJsonPointSchema, geoJsonMultiPolygonSchema, ge
|
|
|
13
13
|
import { Tooltip, IconButton, Icon, Text, Button, useLocalStorage, useDebounce, usePrevious, MenuItem, useMeasure, Popover, PopoverTrigger, PopoverContent, MenuList } from '@trackunit/react-components';
|
|
14
14
|
import { titleCase, lowerCase } from 'string-ts';
|
|
15
15
|
import { z } from 'zod';
|
|
16
|
-
import { objectValues,
|
|
16
|
+
import { objectValues, enumFromValue, nonNullable, hourIntervals } from '@trackunit/shared-utils';
|
|
17
17
|
import { useMachineTypeTranslations } from '@trackunit/translations-machine-type';
|
|
18
18
|
import { CriticalityIndicator } from '@trackunit/criticality-indicator';
|
|
19
19
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -63,6 +63,20 @@ var defaultTranslations = {
|
|
|
63
63
|
"assetFilters.criticality.CRITICAL": "Critical",
|
|
64
64
|
"assetFilters.criticality.LOW": "Low",
|
|
65
65
|
"assetFilters.criticality.NONE": "Good",
|
|
66
|
+
"assetFilters.deviceHealthIssueCategories": "Issue Categories",
|
|
67
|
+
"assetFilters.deviceHealthIssueCategory.coverageIssues": "Coverage",
|
|
68
|
+
"assetFilters.deviceHealthIssueCategory.deviceBatteryIssues": "Device battery",
|
|
69
|
+
"assetFilters.deviceHealthIssueCategory.installAndConfigurationHealth": "Install and configuration",
|
|
70
|
+
"assetFilters.deviceHealthIssueCategory.nonReportingUnit": "Non reporting devices",
|
|
71
|
+
"assetFilters.deviceHealthIssueType.dataNotReceived": "Data not received",
|
|
72
|
+
"assetFilters.deviceHealthIssueType.installationValidationMissing": "Installation validation missing",
|
|
73
|
+
"assetFilters.deviceHealthIssueType.lowCellularCoverage": "Low cellular coverage",
|
|
74
|
+
"assetFilters.deviceHealthIssueType.lowDeviceBatteryVoltage": "Low device battery voltage",
|
|
75
|
+
"assetFilters.deviceHealthIssueType.lowDeviceInputVoltage": "Low device input voltage",
|
|
76
|
+
"assetFilters.deviceHealthIssueType.lowGpsCoverage": "Low GPS coverage",
|
|
77
|
+
"assetFilters.deviceHealthIssueType.noCanDataConfiguration": "No CAN data",
|
|
78
|
+
"assetFilters.deviceHealthIssueType.operatingHours": "Unusual operating hours",
|
|
79
|
+
"assetFilters.deviceHealthIssueTypes": "Issue Types",
|
|
66
80
|
"assetFilters.followedFilter.label": "Followed",
|
|
67
81
|
"assetFilters.hourIntervalFilter.label": "Hour interval",
|
|
68
82
|
"assetFilters.lastSeenFilter.anytime": "Any time",
|
|
@@ -446,6 +460,22 @@ const assetCriticalityState = {
|
|
|
446
460
|
LOW: "LOW",
|
|
447
461
|
NONE: "NONE",
|
|
448
462
|
};
|
|
463
|
+
const fleetDataHealthIssueCategory = {
|
|
464
|
+
COVERAGE_ISSUES: "COVERAGE_ISSUES",
|
|
465
|
+
DEVICE_BATTERY_ISSUES: "DEVICE_BATTERY_ISSUES",
|
|
466
|
+
INSTALL_AND_CONFIGURATION_HEALTH: "INSTALL_AND_CONFIGURATION_HEALTH",
|
|
467
|
+
NON_REPORTING_UNIT: "NON_REPORTING_UNIT",
|
|
468
|
+
};
|
|
469
|
+
const fleetDataHealthIssueType = {
|
|
470
|
+
DATA_NOT_RECEIVED: "DATA_NOT_RECEIVED",
|
|
471
|
+
INSTALLATION_VALIDATION_MISSING: "INSTALLATION_VALIDATION_MISSING",
|
|
472
|
+
LOW_CELLULAR_COVERAGE: "LOW_CELLULAR_COVERAGE",
|
|
473
|
+
LOW_DEVICE_BATTERY_VOLTAGE: "LOW_DEVICE_BATTERY_VOLTAGE",
|
|
474
|
+
LOW_DEVICE_INPUT_VOLTAGE: "LOW_DEVICE_INPUT_VOLTAGE",
|
|
475
|
+
LOW_GPS_COVERAGE: "LOW_GPS_COVERAGE",
|
|
476
|
+
NO_CAN_DATA_CONFIGURATION: "NO_CAN_DATA_CONFIGURATION",
|
|
477
|
+
OPERATING_HOURS: "OPERATING_HOURS",
|
|
478
|
+
};
|
|
449
479
|
const servicePlanStatus = {
|
|
450
480
|
COMPLETE: "COMPLETE",
|
|
451
481
|
DRAFT: "DRAFT",
|
|
@@ -459,6 +489,124 @@ const servicePlanStatus = {
|
|
|
459
489
|
UNKNOWN: "UNKNOWN",
|
|
460
490
|
UPCOMING: "UPCOMING",
|
|
461
491
|
};
|
|
492
|
+
const DeviceHealthIssueCategorySummariesDocument = {
|
|
493
|
+
kind: "Document",
|
|
494
|
+
definitions: [
|
|
495
|
+
{
|
|
496
|
+
kind: "OperationDefinition",
|
|
497
|
+
operation: "query",
|
|
498
|
+
name: { kind: "Name", value: "DeviceHealthIssueCategorySummaries" },
|
|
499
|
+
variableDefinitions: [
|
|
500
|
+
{
|
|
501
|
+
kind: "VariableDefinition",
|
|
502
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "filters" } },
|
|
503
|
+
type: { kind: "NamedType", name: { kind: "Name", value: "AssetFiltersInput" } },
|
|
504
|
+
},
|
|
505
|
+
],
|
|
506
|
+
selectionSet: {
|
|
507
|
+
kind: "SelectionSet",
|
|
508
|
+
selections: [
|
|
509
|
+
{
|
|
510
|
+
kind: "Field",
|
|
511
|
+
name: { kind: "Name", value: "assetSummary" },
|
|
512
|
+
arguments: [
|
|
513
|
+
{
|
|
514
|
+
kind: "Argument",
|
|
515
|
+
name: { kind: "Name", value: "filters" },
|
|
516
|
+
value: { kind: "Variable", name: { kind: "Name", value: "filters" } },
|
|
517
|
+
},
|
|
518
|
+
],
|
|
519
|
+
selectionSet: {
|
|
520
|
+
kind: "SelectionSet",
|
|
521
|
+
selections: [
|
|
522
|
+
{
|
|
523
|
+
kind: "Field",
|
|
524
|
+
name: { kind: "Name", value: "fleetHealthCategoriesSummary" },
|
|
525
|
+
selectionSet: {
|
|
526
|
+
kind: "SelectionSet",
|
|
527
|
+
selections: [
|
|
528
|
+
{
|
|
529
|
+
kind: "Field",
|
|
530
|
+
name: { kind: "Name", value: "summary" },
|
|
531
|
+
selectionSet: {
|
|
532
|
+
kind: "SelectionSet",
|
|
533
|
+
selections: [
|
|
534
|
+
{ kind: "Field", name: { kind: "Name", value: "count" } },
|
|
535
|
+
{ kind: "Field", name: { kind: "Name", value: "key" } },
|
|
536
|
+
],
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
{ kind: "Field", name: { kind: "Name", value: "total" } },
|
|
540
|
+
],
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
],
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
],
|
|
547
|
+
},
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
};
|
|
551
|
+
const DeviceHealthIssueTypeSummariesDocument = {
|
|
552
|
+
kind: "Document",
|
|
553
|
+
definitions: [
|
|
554
|
+
{
|
|
555
|
+
kind: "OperationDefinition",
|
|
556
|
+
operation: "query",
|
|
557
|
+
name: { kind: "Name", value: "DeviceHealthIssueTypeSummaries" },
|
|
558
|
+
variableDefinitions: [
|
|
559
|
+
{
|
|
560
|
+
kind: "VariableDefinition",
|
|
561
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "filters" } },
|
|
562
|
+
type: { kind: "NamedType", name: { kind: "Name", value: "AssetFiltersInput" } },
|
|
563
|
+
},
|
|
564
|
+
],
|
|
565
|
+
selectionSet: {
|
|
566
|
+
kind: "SelectionSet",
|
|
567
|
+
selections: [
|
|
568
|
+
{
|
|
569
|
+
kind: "Field",
|
|
570
|
+
name: { kind: "Name", value: "assetSummary" },
|
|
571
|
+
arguments: [
|
|
572
|
+
{
|
|
573
|
+
kind: "Argument",
|
|
574
|
+
name: { kind: "Name", value: "filters" },
|
|
575
|
+
value: { kind: "Variable", name: { kind: "Name", value: "filters" } },
|
|
576
|
+
},
|
|
577
|
+
],
|
|
578
|
+
selectionSet: {
|
|
579
|
+
kind: "SelectionSet",
|
|
580
|
+
selections: [
|
|
581
|
+
{
|
|
582
|
+
kind: "Field",
|
|
583
|
+
name: { kind: "Name", value: "fleetHealthTypesSummary" },
|
|
584
|
+
selectionSet: {
|
|
585
|
+
kind: "SelectionSet",
|
|
586
|
+
selections: [
|
|
587
|
+
{
|
|
588
|
+
kind: "Field",
|
|
589
|
+
name: { kind: "Name", value: "summary" },
|
|
590
|
+
selectionSet: {
|
|
591
|
+
kind: "SelectionSet",
|
|
592
|
+
selections: [
|
|
593
|
+
{ kind: "Field", name: { kind: "Name", value: "key" } },
|
|
594
|
+
{ kind: "Field", name: { kind: "Name", value: "count" } },
|
|
595
|
+
],
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
{ kind: "Field", name: { kind: "Name", value: "total" } },
|
|
599
|
+
],
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
],
|
|
603
|
+
},
|
|
604
|
+
},
|
|
605
|
+
],
|
|
606
|
+
},
|
|
607
|
+
},
|
|
608
|
+
],
|
|
609
|
+
};
|
|
462
610
|
const GetFleetAssetTypesSummaryDocument = {
|
|
463
611
|
kind: "Document",
|
|
464
612
|
definitions: [
|
|
@@ -3072,6 +3220,205 @@ const useCustomerIdsFilter = ({ showInFilterBar, defaultValue, hasCount, persist
|
|
|
3072
3220
|
return result;
|
|
3073
3221
|
};
|
|
3074
3222
|
|
|
3223
|
+
/**
|
|
3224
|
+
* Get the Fleet Data Health Issue Category enum value with fallback
|
|
3225
|
+
*
|
|
3226
|
+
* @param key - The key to get the enum value for
|
|
3227
|
+
* @returns {FleetDataHealthIssueCategory | null} The Fleet Data Health Issue Category enum value or null if not found
|
|
3228
|
+
*/
|
|
3229
|
+
const getHealthCategoryEnumWithFallback = (key) => {
|
|
3230
|
+
try {
|
|
3231
|
+
return enumFromValue(key, fleetDataHealthIssueCategory);
|
|
3232
|
+
}
|
|
3233
|
+
catch {
|
|
3234
|
+
return null;
|
|
3235
|
+
}
|
|
3236
|
+
};
|
|
3237
|
+
|
|
3238
|
+
/**
|
|
3239
|
+
* Get a record of device health category display names
|
|
3240
|
+
*
|
|
3241
|
+
* @returns {Record<FleetDataHealthIssueCategory, string>} A record of device health category display names
|
|
3242
|
+
*/
|
|
3243
|
+
const useDeviceHealthIssueCategoryDisplayNames = () => {
|
|
3244
|
+
const [t] = useTranslation();
|
|
3245
|
+
return useMemo(() => ({
|
|
3246
|
+
[fleetDataHealthIssueCategory.COVERAGE_ISSUES]: t("assetFilters.deviceHealthIssueCategory.coverageIssues"),
|
|
3247
|
+
[fleetDataHealthIssueCategory.DEVICE_BATTERY_ISSUES]: t("assetFilters.deviceHealthIssueCategory.deviceBatteryIssues"),
|
|
3248
|
+
[fleetDataHealthIssueCategory.INSTALL_AND_CONFIGURATION_HEALTH]: t("assetFilters.deviceHealthIssueCategory.installAndConfigurationHealth"),
|
|
3249
|
+
[fleetDataHealthIssueCategory.NON_REPORTING_UNIT]: t("assetFilters.deviceHealthIssueCategory.nonReportingUnit"),
|
|
3250
|
+
}), [t]);
|
|
3251
|
+
};
|
|
3252
|
+
|
|
3253
|
+
/**
|
|
3254
|
+
* Device Health Issue Category Filter component
|
|
3255
|
+
*
|
|
3256
|
+
* @param {FilterViewProps<Array<ValueName>>} props - Filter view props
|
|
3257
|
+
* @returns {ReactElement} React element
|
|
3258
|
+
*/
|
|
3259
|
+
const DeviceHealthIssueCategoryFilter = (props) => {
|
|
3260
|
+
const categoryDisplayNames = useDeviceHealthIssueCategoryDisplayNames();
|
|
3261
|
+
const filters = useActiveAssetFilters(props.filterState.values);
|
|
3262
|
+
const { data, loading } = useQuery(DeviceHealthIssueCategorySummariesDocument, {
|
|
3263
|
+
variables: {
|
|
3264
|
+
filters: {
|
|
3265
|
+
...filters,
|
|
3266
|
+
activeFilter: true,
|
|
3267
|
+
fleetHealthCategories: undefined,
|
|
3268
|
+
fleetHealthStates: ["OPEN"],
|
|
3269
|
+
},
|
|
3270
|
+
},
|
|
3271
|
+
});
|
|
3272
|
+
const categories = useMemo(() => data?.assetSummary?.fleetHealthCategoriesSummary.summary.reduce((acc, category) => {
|
|
3273
|
+
const existingCategory = acc.find(c => c.key === category.key);
|
|
3274
|
+
if (existingCategory) {
|
|
3275
|
+
existingCategory.count += category.count;
|
|
3276
|
+
}
|
|
3277
|
+
else {
|
|
3278
|
+
acc.push(category);
|
|
3279
|
+
}
|
|
3280
|
+
return acc;
|
|
3281
|
+
}, []), [data?.assetSummary?.fleetHealthCategoriesSummary.summary]);
|
|
3282
|
+
const options = useMemo(() => {
|
|
3283
|
+
return (categories
|
|
3284
|
+
?.map(issueCategory => {
|
|
3285
|
+
const categoryKey = issueCategory.key;
|
|
3286
|
+
const categoryEnum = getHealthCategoryEnumWithFallback(categoryKey);
|
|
3287
|
+
if (!categoryEnum) {
|
|
3288
|
+
return null;
|
|
3289
|
+
}
|
|
3290
|
+
return {
|
|
3291
|
+
key: categoryKey,
|
|
3292
|
+
label: categoryDisplayNames[categoryEnum],
|
|
3293
|
+
count: issueCategory.count,
|
|
3294
|
+
};
|
|
3295
|
+
})
|
|
3296
|
+
.filter(nonNullable) ?? []);
|
|
3297
|
+
}, [categories, categoryDisplayNames]);
|
|
3298
|
+
return jsx(DefaultCheckboxFilter, { ...props, loading: loading, options: options });
|
|
3299
|
+
};
|
|
3300
|
+
|
|
3301
|
+
/**
|
|
3302
|
+
* Get the Device Health Issue Category filter definition
|
|
3303
|
+
*
|
|
3304
|
+
* @returns {ValueNameArrayFilterDefinition} The Device Health Issue Category filter definition
|
|
3305
|
+
*/
|
|
3306
|
+
const useDeviceHealthIssueCategoryFilter = () => {
|
|
3307
|
+
const [t] = useTranslation();
|
|
3308
|
+
return useMemo(() => {
|
|
3309
|
+
return {
|
|
3310
|
+
filterKey: "fleetHealthCategories",
|
|
3311
|
+
type: "valueNameArray",
|
|
3312
|
+
group: "DEVICE_HEALTH",
|
|
3313
|
+
title: t("assetFilters.deviceHealthIssueCategories"),
|
|
3314
|
+
component: props => jsx(DeviceHealthIssueCategoryFilter, { ...props }),
|
|
3315
|
+
};
|
|
3316
|
+
}, [t]);
|
|
3317
|
+
};
|
|
3318
|
+
|
|
3319
|
+
/**
|
|
3320
|
+
* Get the Fleet Data Health Issue Type enum value with fallback
|
|
3321
|
+
*
|
|
3322
|
+
* @param {string} key - The key to get the enum value for
|
|
3323
|
+
* @returns {FleetDataHealthIssueType | null} The Fleet Data Health Issue Type enum value or null if not found
|
|
3324
|
+
*/
|
|
3325
|
+
const getHealthTypeEnumWithFallback = (key) => {
|
|
3326
|
+
try {
|
|
3327
|
+
return enumFromValue(key, fleetDataHealthIssueType);
|
|
3328
|
+
}
|
|
3329
|
+
catch {
|
|
3330
|
+
return null;
|
|
3331
|
+
}
|
|
3332
|
+
};
|
|
3333
|
+
|
|
3334
|
+
/**
|
|
3335
|
+
* Get a record of device health issue type display names
|
|
3336
|
+
*
|
|
3337
|
+
* @returns {Record<FleetDataHealthIssueType, string>} A record of device health issue type display names
|
|
3338
|
+
*/
|
|
3339
|
+
const useDeviceHealthIssueTypeDisplayNames = () => {
|
|
3340
|
+
const [t] = useTranslation();
|
|
3341
|
+
return useMemo(() => ({
|
|
3342
|
+
[fleetDataHealthIssueType.DATA_NOT_RECEIVED]: t("assetFilters.deviceHealthIssueType.dataNotReceived"),
|
|
3343
|
+
[fleetDataHealthIssueType.INSTALLATION_VALIDATION_MISSING]: t("assetFilters.deviceHealthIssueType.installationValidationMissing"),
|
|
3344
|
+
[fleetDataHealthIssueType.LOW_CELLULAR_COVERAGE]: t("assetFilters.deviceHealthIssueType.lowCellularCoverage"),
|
|
3345
|
+
[fleetDataHealthIssueType.LOW_DEVICE_BATTERY_VOLTAGE]: t("assetFilters.deviceHealthIssueType.lowDeviceBatteryVoltage"),
|
|
3346
|
+
[fleetDataHealthIssueType.LOW_DEVICE_INPUT_VOLTAGE]: t("assetFilters.deviceHealthIssueType.lowDeviceInputVoltage"),
|
|
3347
|
+
[fleetDataHealthIssueType.LOW_GPS_COVERAGE]: t("assetFilters.deviceHealthIssueType.lowGpsCoverage"),
|
|
3348
|
+
[fleetDataHealthIssueType.NO_CAN_DATA_CONFIGURATION]: t("assetFilters.deviceHealthIssueType.noCanDataConfiguration"),
|
|
3349
|
+
[fleetDataHealthIssueType.OPERATING_HOURS]: t("assetFilters.deviceHealthIssueType.operatingHours"),
|
|
3350
|
+
}), [t]);
|
|
3351
|
+
};
|
|
3352
|
+
|
|
3353
|
+
/**
|
|
3354
|
+
* Device Health Issue Type Filter component
|
|
3355
|
+
*
|
|
3356
|
+
* @param {FilterViewProps<Array<ValueName>>} props - Filter view props
|
|
3357
|
+
* @returns {ReactElement} React element
|
|
3358
|
+
*/
|
|
3359
|
+
const DeviceHealthIssueTypeFilter = (props) => {
|
|
3360
|
+
const issueTypeDisplayNames = useDeviceHealthIssueTypeDisplayNames();
|
|
3361
|
+
const filters = useActiveAssetFilters(props.filterState.values);
|
|
3362
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
3363
|
+
const debouncedSearchQuery = useDebounce(searchQuery.trim().toLocaleLowerCase(), { delay: 300 });
|
|
3364
|
+
const { data, loading } = useQuery(DeviceHealthIssueTypeSummariesDocument, {
|
|
3365
|
+
variables: {
|
|
3366
|
+
filters: {
|
|
3367
|
+
...filters,
|
|
3368
|
+
activeFilter: true,
|
|
3369
|
+
fleetHealthTypes: undefined,
|
|
3370
|
+
fleetHealthStates: ["OPEN"],
|
|
3371
|
+
},
|
|
3372
|
+
},
|
|
3373
|
+
});
|
|
3374
|
+
const types = useMemo(() => data?.assetSummary?.fleetHealthTypesSummary.summary.reduce((acc, type) => {
|
|
3375
|
+
const existingType = acc.find(c => c.key === type.key);
|
|
3376
|
+
if (existingType) {
|
|
3377
|
+
existingType.count += type.count;
|
|
3378
|
+
}
|
|
3379
|
+
else {
|
|
3380
|
+
acc.push(type);
|
|
3381
|
+
}
|
|
3382
|
+
return acc;
|
|
3383
|
+
}, []), [data?.assetSummary?.fleetHealthTypesSummary.summary]);
|
|
3384
|
+
const options = useMemo(() => {
|
|
3385
|
+
return (types
|
|
3386
|
+
?.map(issuetype => {
|
|
3387
|
+
const typeKey = issuetype.key;
|
|
3388
|
+
const typeEnum = getHealthTypeEnumWithFallback(typeKey);
|
|
3389
|
+
if (!typeEnum) {
|
|
3390
|
+
return null;
|
|
3391
|
+
}
|
|
3392
|
+
return {
|
|
3393
|
+
key: typeKey,
|
|
3394
|
+
label: issueTypeDisplayNames[typeEnum],
|
|
3395
|
+
count: issuetype.count,
|
|
3396
|
+
};
|
|
3397
|
+
})
|
|
3398
|
+
.filter(nonNullable)
|
|
3399
|
+
.filter(option => option.label.toLowerCase().includes(debouncedSearchQuery)) ?? []);
|
|
3400
|
+
}, [debouncedSearchQuery, issueTypeDisplayNames, types]);
|
|
3401
|
+
return (jsx(DefaultCheckboxFilter, { ...props, customSearch: { value: searchQuery, onChange: setSearchQuery }, loading: loading, options: options }));
|
|
3402
|
+
};
|
|
3403
|
+
|
|
3404
|
+
/**
|
|
3405
|
+
* Get the Device Health Issue Type filter definition
|
|
3406
|
+
*
|
|
3407
|
+
* @returns {ValueNameArrayFilterDefinition} The Device Health Issue Type filter definition
|
|
3408
|
+
*/
|
|
3409
|
+
const useDeviceHealthIssueTypeFilter = () => {
|
|
3410
|
+
const [t] = useTranslation();
|
|
3411
|
+
return useMemo(() => {
|
|
3412
|
+
return {
|
|
3413
|
+
filterKey: "fleetHealthTypes",
|
|
3414
|
+
type: "valueNameArray",
|
|
3415
|
+
group: "DEVICE_HEALTH",
|
|
3416
|
+
title: t("assetFilters.deviceHealthIssueTypes"),
|
|
3417
|
+
component: props => jsx(DeviceHealthIssueTypeFilter, { ...props }),
|
|
3418
|
+
};
|
|
3419
|
+
}, [t]);
|
|
3420
|
+
};
|
|
3421
|
+
|
|
3075
3422
|
/**
|
|
3076
3423
|
* The `FollowedFiltersView` component displays filter settings for "Followed" and allows the user to select between different values.
|
|
3077
3424
|
*
|
|
@@ -4456,6 +4803,44 @@ const useTypesFilter = () => {
|
|
|
4456
4803
|
return result;
|
|
4457
4804
|
};
|
|
4458
4805
|
|
|
4806
|
+
const mockForDeviceHealthIssueCategorySummariesQuery = (variables, data) => {
|
|
4807
|
+
return queryFor(DeviceHealthIssueCategorySummariesDocument, variables, mergeDeep({
|
|
4808
|
+
__typename: "Query",
|
|
4809
|
+
assetSummary: {
|
|
4810
|
+
__typename: "AssetSummary",
|
|
4811
|
+
fleetHealthCategoriesSummary: {
|
|
4812
|
+
__typename: "MetadataSummary",
|
|
4813
|
+
total: 6273236744536064,
|
|
4814
|
+
summary: [
|
|
4815
|
+
{
|
|
4816
|
+
__typename: "Summary",
|
|
4817
|
+
count: 6273236744536064,
|
|
4818
|
+
key: "subito",
|
|
4819
|
+
},
|
|
4820
|
+
],
|
|
4821
|
+
},
|
|
4822
|
+
},
|
|
4823
|
+
}, data || {}));
|
|
4824
|
+
};
|
|
4825
|
+
const mockForDeviceHealthIssueTypeSummariesQuery = (variables, data) => {
|
|
4826
|
+
return queryFor(DeviceHealthIssueTypeSummariesDocument, variables, mergeDeep({
|
|
4827
|
+
__typename: "Query",
|
|
4828
|
+
assetSummary: {
|
|
4829
|
+
__typename: "AssetSummary",
|
|
4830
|
+
fleetHealthTypesSummary: {
|
|
4831
|
+
__typename: "MetadataSummary",
|
|
4832
|
+
total: 6273236744536064,
|
|
4833
|
+
summary: [
|
|
4834
|
+
{
|
|
4835
|
+
__typename: "Summary",
|
|
4836
|
+
key: "subito",
|
|
4837
|
+
count: 6273236744536064,
|
|
4838
|
+
},
|
|
4839
|
+
],
|
|
4840
|
+
},
|
|
4841
|
+
},
|
|
4842
|
+
}, data || {}));
|
|
4843
|
+
};
|
|
4459
4844
|
const mockForGetFleetAssetTypesSummaryQuery = (variables, data) => {
|
|
4460
4845
|
return queryFor(GetFleetAssetTypesSummaryDocument, variables, mergeDeep({
|
|
4461
4846
|
__typename: "Query",
|
|
@@ -5003,6 +5388,8 @@ const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, owningDepotEnabled,
|
|
|
5003
5388
|
}, [showHiddenAssetsEnabled]);
|
|
5004
5389
|
const activeFilter = useActiveFilterFilter(activeFilterEnabledProps);
|
|
5005
5390
|
const accessManagementMode = useAccessManagementModeFilter();
|
|
5391
|
+
const fleetHealthTypes = useDeviceHealthIssueTypeFilter();
|
|
5392
|
+
const fleetHealthCategories = useDeviceHealthIssueCategoryFilter();
|
|
5006
5393
|
return useMemo(() => {
|
|
5007
5394
|
return {
|
|
5008
5395
|
assetType,
|
|
@@ -5027,6 +5414,8 @@ const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, owningDepotEnabled,
|
|
|
5027
5414
|
partner,
|
|
5028
5415
|
search,
|
|
5029
5416
|
accessManagementMode,
|
|
5417
|
+
fleetHealthTypes,
|
|
5418
|
+
fleetHealthCategories,
|
|
5030
5419
|
};
|
|
5031
5420
|
}, [
|
|
5032
5421
|
siteIds,
|
|
@@ -5051,6 +5440,8 @@ const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, owningDepotEnabled,
|
|
|
5051
5440
|
activeFilter,
|
|
5052
5441
|
siteDepotOwnershipIds,
|
|
5053
5442
|
accessManagementMode,
|
|
5443
|
+
fleetHealthTypes,
|
|
5444
|
+
fleetHealthCategories,
|
|
5054
5445
|
]);
|
|
5055
5446
|
};
|
|
5056
5447
|
|
|
@@ -5063,4 +5454,4 @@ const useDefaultAssetFilterBarDefinition = ({ sitesEnabled, owningDepotEnabled,
|
|
|
5063
5454
|
*/
|
|
5064
5455
|
setupLibraryTranslations();
|
|
5065
5456
|
|
|
5066
|
-
export { ALL_TYPES, AccessManagementMode, ActiveFilterFiltersView, ActivityFiltersView, AreaView, AssetActivityState, AssetIdsFiltersView, AssetLastSeen, AssetTypesFilterView, BrandFilterView, ClearItemButton, CriticalityFiltersView, CustomerIdsFilterView, DayPeriod, FollowedFiltersView, GetFleetGroupSummaryDocument, GroupIdsFilterView, HourIntervalFilterView, LastSeenFiltersView, MetadataCompletenessFilterView, ModelsFilterView, OwnerAccountIdsFilterView, PartnerFilterView, PeriodFilterView, ProductionYearFilterView, RentalContractOrderNumberFilterView, RentalContractReferenceCodeDescriptionFilterView, RentalContractReferenceCodeFilterView, SERVICE_PLAN_STATUSES_TO_SHOW, SearchFilterInline, ServicePanStatusesFiltersView, SiteDepotOwnershipIdsFilterView, SiteIdsFilterView, SiteStatus, SiteStatusFilterView, SiteTypeSFS, SiteTypesFilterView, TelematicsConnectedFiltersView, TypesFilterView, areaFilterInternalGeoJsonGeometrySchema, areaFilterInternalSchema, assetTypeConst, mapActivityToLabelId, mapMetadataCompletenessToLabelId, metadataCompleteness, metadataCompletenessOptions, mockForGetAccessManagementModeDesiredSummaryQuery, mockForGetAssetTelematicsDeviceConnectionSummaryQuery, mockForGetCustomFieldSummaryQuery, mockForGetCustomerIdSummaryQuery, mockForGetFleetActivitySummaryQuery, mockForGetFleetAssetTypesSummaryQuery, mockForGetFleetBrandsSummaryQuery, mockForGetFleetCriticalitySummaryQuery, mockForGetFleetGroupSummaryQuery, mockForGetFleetModelsSummaryQuery, mockForGetFleetOwnerAccountSummaryQuery, mockForGetFleetProductionYearsSummaryQuery, mockForGetFleetRentalContractOrderNumberSummaryQuery, mockForGetFleetRentalContractReferenceCodesSummaryQuery, mockForGetFleetServicePlanAssignmentsSummaryQuery, mockForGetFleetServicePlanStatusesSummaryQuery, mockForGetFleetServiceProvidersSummaryQuery, mockForGetFleetSiteTypeSummaryQuery, mockForGetFleetTypesSummaryQuery, mockForGetMetadataCompletenessSummaryQuery, mockForGetPlaceAutocompletePredictionsQuery, mockForGetPlaceDetailsQuery, mockForGetServicePlanNamesSummaryQuery, mockForGetSiteDepotOwnershipIdSummaryQuery, mockForGetSiteIdSummaryQuery, placePredictionSchema, placeSchema, sortSiteTypeSummary, useAccessManagementModeFilter, useActiveFilterFilter, useActivityFilter, useAreaFilter, useAssetIdsFilter, useAssetTypeFilter, useBrandFilter, useCriticalityFilter, useCustomerIdsFilter, useDefaultAssetFilterBarDefinition, useFollowedFilter, useGroupIdsFilter, useHourIntervalFilter, useLastSeenFilter, useMetadataCompletenessFilter, useModelsFilter, useOwnerAccountIdsFilter, usePartnerFilter, usePeriodFilter, usePlacesSearch, useProductionYearFilter, useRentalContractOrderNumberFilter, useRentalContractReferenceCodeDescriptionFilter, useRentalContractReferenceCodeFilter, useSearchFilter, useServicePlanStatusFilter, useSiteDepotOwnershipIdsFilter, useSiteIdsFilter, useSiteStatusFilter, useSiteTypeFilter, useTelematicsConnectedFilter, useTypesFilter };
|
|
5457
|
+
export { ALL_TYPES, AccessManagementMode, ActiveFilterFiltersView, ActivityFiltersView, AreaView, AssetActivityState, AssetIdsFiltersView, AssetLastSeen, AssetTypesFilterView, BrandFilterView, ClearItemButton, CriticalityFiltersView, CustomerIdsFilterView, DayPeriod, FollowedFiltersView, GetFleetGroupSummaryDocument, GroupIdsFilterView, HourIntervalFilterView, LastSeenFiltersView, MetadataCompletenessFilterView, ModelsFilterView, OwnerAccountIdsFilterView, PartnerFilterView, PeriodFilterView, ProductionYearFilterView, RentalContractOrderNumberFilterView, RentalContractReferenceCodeDescriptionFilterView, RentalContractReferenceCodeFilterView, SERVICE_PLAN_STATUSES_TO_SHOW, SearchFilterInline, ServicePanStatusesFiltersView, SiteDepotOwnershipIdsFilterView, SiteIdsFilterView, SiteStatus, SiteStatusFilterView, SiteTypeSFS, SiteTypesFilterView, TelematicsConnectedFiltersView, TypesFilterView, areaFilterInternalGeoJsonGeometrySchema, areaFilterInternalSchema, assetTypeConst, mapActivityToLabelId, mapMetadataCompletenessToLabelId, metadataCompleteness, metadataCompletenessOptions, mockForDeviceHealthIssueCategorySummariesQuery, mockForDeviceHealthIssueTypeSummariesQuery, mockForGetAccessManagementModeDesiredSummaryQuery, mockForGetAssetTelematicsDeviceConnectionSummaryQuery, mockForGetCustomFieldSummaryQuery, mockForGetCustomerIdSummaryQuery, mockForGetFleetActivitySummaryQuery, mockForGetFleetAssetTypesSummaryQuery, mockForGetFleetBrandsSummaryQuery, mockForGetFleetCriticalitySummaryQuery, mockForGetFleetGroupSummaryQuery, mockForGetFleetModelsSummaryQuery, mockForGetFleetOwnerAccountSummaryQuery, mockForGetFleetProductionYearsSummaryQuery, mockForGetFleetRentalContractOrderNumberSummaryQuery, mockForGetFleetRentalContractReferenceCodesSummaryQuery, mockForGetFleetServicePlanAssignmentsSummaryQuery, mockForGetFleetServicePlanStatusesSummaryQuery, mockForGetFleetServiceProvidersSummaryQuery, mockForGetFleetSiteTypeSummaryQuery, mockForGetFleetTypesSummaryQuery, mockForGetMetadataCompletenessSummaryQuery, mockForGetPlaceAutocompletePredictionsQuery, mockForGetPlaceDetailsQuery, mockForGetServicePlanNamesSummaryQuery, mockForGetSiteDepotOwnershipIdSummaryQuery, mockForGetSiteIdSummaryQuery, placePredictionSchema, placeSchema, sortSiteTypeSummary, useAccessManagementModeFilter, useActiveFilterFilter, useActivityFilter, useAreaFilter, useAssetIdsFilter, useAssetTypeFilter, useBrandFilter, useCriticalityFilter, useCustomerIdsFilter, useDefaultAssetFilterBarDefinition, useDeviceHealthIssueCategoryFilter, useDeviceHealthIssueTypeFilter, useFollowedFilter, useGroupIdsFilter, useHourIntervalFilter, useLastSeenFilter, useMetadataCompletenessFilter, useModelsFilter, useOwnerAccountIdsFilter, usePartnerFilter, usePeriodFilter, usePlacesSearch, useProductionYearFilter, useRentalContractOrderNumberFilter, useRentalContractReferenceCodeDescriptionFilter, useRentalContractReferenceCodeFilter, useSearchFilter, useServicePlanStatusFilter, useSiteDepotOwnershipIdsFilter, useSiteIdsFilter, useSiteStatusFilter, useSiteTypeFilter, useTelematicsConnectedFilter, useTypesFilter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/filters-asset-filter-definitions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
"zod": "^3.23.8",
|
|
16
16
|
"string-ts": "^2.0.0",
|
|
17
17
|
"tailwind-merge": "^2.0.0",
|
|
18
|
-
"@trackunit/iris-app-build-utilities": "1.7.
|
|
19
|
-
"@trackunit/filters-filter-bar": "1.8.
|
|
20
|
-
"@trackunit/react-core-hooks": "1.7.
|
|
21
|
-
"@trackunit/react-filter-components": "1.7.
|
|
22
|
-
"@trackunit/react-form-components": "1.8.
|
|
23
|
-
"@trackunit/filters-graphql-hook": "1.11.
|
|
24
|
-
"@trackunit/utilization-indicator": "1.7.
|
|
25
|
-
"@trackunit/geo-json-utils": "1.7.
|
|
26
|
-
"@trackunit/react-components": "1.10.
|
|
27
|
-
"@trackunit/shared-utils": "1.9.
|
|
28
|
-
"@trackunit/translations-machine-type": "1.7.
|
|
29
|
-
"@trackunit/criticality-indicator": "1.7.
|
|
30
|
-
"@trackunit/iris-app-api": "1.
|
|
31
|
-
"@trackunit/react-core-contexts-test": "1.7.
|
|
32
|
-
"@trackunit/i18n-library-translation": "1.7.
|
|
33
|
-
"@trackunit/iris-app-runtime-core-api": "1.7.
|
|
34
|
-
"@trackunit/react-graphql-hooks": "1.7.
|
|
18
|
+
"@trackunit/iris-app-build-utilities": "1.7.113",
|
|
19
|
+
"@trackunit/filters-filter-bar": "1.8.167",
|
|
20
|
+
"@trackunit/react-core-hooks": "1.7.121",
|
|
21
|
+
"@trackunit/react-filter-components": "1.7.161",
|
|
22
|
+
"@trackunit/react-form-components": "1.8.158",
|
|
23
|
+
"@trackunit/filters-graphql-hook": "1.11.110",
|
|
24
|
+
"@trackunit/utilization-indicator": "1.7.147",
|
|
25
|
+
"@trackunit/geo-json-utils": "1.7.107",
|
|
26
|
+
"@trackunit/react-components": "1.10.83",
|
|
27
|
+
"@trackunit/shared-utils": "1.9.107",
|
|
28
|
+
"@trackunit/translations-machine-type": "1.7.140",
|
|
29
|
+
"@trackunit/criticality-indicator": "1.7.147",
|
|
30
|
+
"@trackunit/iris-app-api": "1.10.0",
|
|
31
|
+
"@trackunit/react-core-contexts-test": "1.7.121",
|
|
32
|
+
"@trackunit/i18n-library-translation": "1.7.128",
|
|
33
|
+
"@trackunit/iris-app-runtime-core-api": "1.7.117",
|
|
34
|
+
"@trackunit/react-graphql-hooks": "1.7.148"
|
|
35
35
|
},
|
|
36
36
|
"module": "./index.esm.js",
|
|
37
37
|
"main": "./index.cjs.js",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Device Health Issue Category Filter component
|
|
5
|
+
*
|
|
6
|
+
* @param {FilterViewProps<Array<ValueName>>} props - Filter view props
|
|
7
|
+
* @returns {ReactElement} React element
|
|
8
|
+
*/
|
|
9
|
+
export declare const DeviceHealthIssueCategoryFilter: (props: FilterViewProps<Array<ValueName>>) => ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FleetDataHealthIssueCategory } from "../../../../generated/graphql-api/graphql";
|
|
2
|
+
/**
|
|
3
|
+
* Get the Fleet Data Health Issue Category enum value with fallback
|
|
4
|
+
*
|
|
5
|
+
* @param key - The key to get the enum value for
|
|
6
|
+
* @returns {FleetDataHealthIssueCategory | null} The Fleet Data Health Issue Category enum value or null if not found
|
|
7
|
+
*/
|
|
8
|
+
export declare const getHealthCategoryEnumWithFallback: (key: string) => FleetDataHealthIssueCategory | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FleetDataHealthIssueCategory } from "../../../../generated/graphql-api/graphql";
|
|
2
|
+
/**
|
|
3
|
+
* Get a record of device health category display names
|
|
4
|
+
*
|
|
5
|
+
* @returns {Record<FleetDataHealthIssueCategory, string>} A record of device health category display names
|
|
6
|
+
*/
|
|
7
|
+
export declare const useDeviceHealthIssueCategoryDisplayNames: () => Record<FleetDataHealthIssueCategory, string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ValueNameArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
|
+
/**
|
|
3
|
+
* Get the Device Health Issue Category filter definition
|
|
4
|
+
*
|
|
5
|
+
* @returns {ValueNameArrayFilterDefinition} The Device Health Issue Category filter definition
|
|
6
|
+
*/
|
|
7
|
+
export declare const useDeviceHealthIssueCategoryFilter: () => ValueNameArrayFilterDefinition;
|
package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/DeviceHealthIssueTypeFilter.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FilterViewProps, ValueName } from "@trackunit/filters-filter-bar";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Device Health Issue Type Filter component
|
|
5
|
+
*
|
|
6
|
+
* @param {FilterViewProps<Array<ValueName>>} props - Filter view props
|
|
7
|
+
* @returns {ReactElement} React element
|
|
8
|
+
*/
|
|
9
|
+
export declare const DeviceHealthIssueTypeFilter: (props: FilterViewProps<Array<ValueName>>) => ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FleetDataHealthIssueType } from "../../../../generated/graphql-api/graphql";
|
|
2
|
+
/**
|
|
3
|
+
* Get the Fleet Data Health Issue Type enum value with fallback
|
|
4
|
+
*
|
|
5
|
+
* @param {string} key - The key to get the enum value for
|
|
6
|
+
* @returns {FleetDataHealthIssueType | null} The Fleet Data Health Issue Type enum value or null if not found
|
|
7
|
+
*/
|
|
8
|
+
export declare const getHealthTypeEnumWithFallback: (key: string) => FleetDataHealthIssueType | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FleetDataHealthIssueType } from "../../../../generated/graphql-api/graphql";
|
|
2
|
+
/**
|
|
3
|
+
* Get a record of device health issue type display names
|
|
4
|
+
*
|
|
5
|
+
* @returns {Record<FleetDataHealthIssueType, string>} A record of device health issue type display names
|
|
6
|
+
*/
|
|
7
|
+
export declare const useDeviceHealthIssueTypeDisplayNames: () => Record<FleetDataHealthIssueType, string>;
|
package/src/defaultFilters/defaults/DeviceHealthIssueTypeFilter/useDeviceHealthIssueTypeFilter.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ValueNameArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
|
+
/**
|
|
3
|
+
* Get the Device Health Issue Type filter definition
|
|
4
|
+
*
|
|
5
|
+
* @returns {ValueNameArrayFilterDefinition} The Device Health Issue Type filter definition
|
|
6
|
+
*/
|
|
7
|
+
export declare const useDeviceHealthIssueTypeFilter: () => ValueNameArrayFilterDefinition;
|
|
@@ -9,6 +9,8 @@ export * from "./AssetTypeFilter";
|
|
|
9
9
|
export * from "./BrandFilter";
|
|
10
10
|
export * from "./CriticalityFilter";
|
|
11
11
|
export * from "./CustomerIdsFilter";
|
|
12
|
+
export * from "./DeviceHealthIssueCategoryFilter/useDeviceHealthIssueCategoryFilter";
|
|
13
|
+
export * from "./DeviceHealthIssueTypeFilter/useDeviceHealthIssueTypeFilter";
|
|
12
14
|
export * from "./FollowedFilter";
|
|
13
15
|
export * from "./GroupIdsFilter";
|
|
14
16
|
export * from "./HourIntervalFilter";
|
|
@@ -12,6 +12,12 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
|
|
|
12
12
|
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
|
|
13
13
|
*/
|
|
14
14
|
declare const documents: {
|
|
15
|
+
"query DeviceHealthIssueCategorySummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n fleetHealthCategoriesSummary {\n summary {\n count\n key\n }\n total\n }\n }\n}": DocumentNode<types.DeviceHealthIssueCategorySummariesQuery, types.Exact<{
|
|
16
|
+
filters: types.InputMaybe<types.AssetFiltersInput>;
|
|
17
|
+
}>>;
|
|
18
|
+
"query DeviceHealthIssueTypeSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n fleetHealthTypesSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}": DocumentNode<types.DeviceHealthIssueTypeSummariesQuery, types.Exact<{
|
|
19
|
+
filters: types.InputMaybe<types.AssetFiltersInput>;
|
|
20
|
+
}>>;
|
|
15
21
|
"query GetFleetAssetTypesSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n assetTypes {\n total\n summary {\n machines\n attachments\n equipments\n tools\n gateways\n others\n vehicles\n }\n }\n }\n}\n\nquery GetFleetSiteTypeSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n siteTypes {\n total\n summary {\n siteType\n count\n }\n }\n }\n}\n\nquery GetMetadataCompletenessSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n metadataCompletenesses {\n total\n summary {\n metadataCompleteness\n count\n }\n }\n }\n}\n\nquery GetFleetGroupSummary($filters: AssetFiltersInput, $search: String, $limit: Int!) {\n assetSummary(filters: $filters) {\n groups(filter: $search, limit: $limit) {\n total\n missing\n summary {\n group {\n id\n groupId\n name\n }\n count\n }\n }\n }\n}\n\nquery GetFleetOwnerAccountSummary($filters: AssetFiltersInput, $search: String, $limit: Int!) {\n assetSummary(filters: $filters) {\n ownerAccounts(filter: $search, limit: $limit) {\n total\n summary {\n ownerAccount {\n accountId\n name\n }\n count\n }\n }\n }\n}\n\nquery GetFleetModelsSummary($filters: AssetFiltersInput, $search: String, $limit: Int) {\n assetSummary(filters: $filters) {\n models(filter: $search, limit: $limit) {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetCustomFieldSummary($filters: AssetFiltersInput, $definitionIds: [String!]!) {\n assetSummary(filters: $filters) {\n customFields(definitionIds: $definitionIds) {\n definitionId\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetFleetBrandsSummary($filters: AssetFiltersInput, $search: String, $limit: Int) {\n assetSummary(filters: $filters) {\n brands(filter: $search, limit: $limit) {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetFleetTypesSummary($filters: AssetFiltersInput, $search: String, $limit: Int) {\n assetSummary(filters: $filters) {\n types(filter: $search, limit: $limit) {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetFleetCriticalitySummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n criticality {\n critical\n low\n good\n }\n }\n}\n\nquery GetFleetProductionYearsSummary($filters: AssetFiltersInput, $search: String, $limit: Int) {\n assetSummary(filters: $filters) {\n productionYears(filter: $search, limit: $limit) {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetServicePlanNamesSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n servicePlanNames {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetFleetServicePlanStatusesSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n servicePlanStatuses {\n overdue\n upcoming\n planned\n }\n }\n}\n\nquery GetFleetServiceProvidersSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n serviceProviders {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetFleetServicePlanAssignmentsSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n servicePlanAssignments {\n fullyConfigured\n partiallyConfigured\n notConfigured\n }\n }\n}\n\nquery GetFleetActivitySummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n activity {\n working\n idling\n stopped\n unknown\n }\n }\n}\n\nquery GetSiteIdSummary($filters: AssetFiltersInput, $search: String, $limit: Int!) {\n assetSummary(filters: $filters) {\n sites(filter: $search, limit: $limit) {\n total\n summary {\n site {\n id\n siteId\n name\n }\n count\n }\n }\n }\n}\n\nquery GetSiteDepotOwnershipIdSummary($filters: AssetFiltersInput, $search: String, $limit: Int!) {\n assetSummary(filters: $filters) {\n owningDepots(filter: $search, limit: $limit) {\n total\n summary {\n site {\n id\n siteId\n name\n }\n count\n }\n }\n }\n}\n\nquery GetCustomerIdSummary($filters: AssetFiltersInput, $search: String, $limit: Int!) {\n assetSummary(filters: $filters) {\n customers(filter: $search, limit: $limit) {\n total\n summary {\n customer {\n id\n customerId\n name\n parent {\n customerId\n name\n }\n }\n count\n }\n }\n }\n}\n\nquery GetAssetTelematicsDeviceConnectionSummary($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n assetTelematicsDeviceConnected {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetPlaceAutocompletePredictions($search: String!) {\n placeAutocomplete(input: $search) {\n predictions {\n placeId\n description\n }\n }\n}\n\nquery GetPlaceDetails($placeId: String!) {\n placeDetails(placeId: $placeId) {\n geometry {\n type\n coordinates\n }\n bbox\n properties {\n formattedAddress\n }\n }\n}\n\nquery GetFleetRentalContractOrderNumberSummary($filters: AssetFiltersInput, $limit: Int!, $search: String) {\n assetSummary(filters: $filters) {\n rentalContractOrderNumbers(limit: $limit, filter: $search) {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetFleetRentalContractReferenceCodesSummary($filters: AssetFiltersInput, $limit: Int!, $search: String) {\n assetSummary(filters: $filters) {\n rentalContractReferenceCodes(limit: $limit, filter: $search) {\n total\n summary {\n key\n count\n }\n }\n }\n}\n\nquery GetAccessManagementModeDesiredSummary($filters: AssetFiltersInput, $limit: Int!) {\n assetSummary(filters: $filters) {\n accessManagementModeDesired(limit: $limit) {\n total\n summary {\n accessManagementMode\n count\n }\n }\n }\n}": DocumentNode<types.GetFleetAssetTypesSummaryQuery, types.Exact<{
|
|
16
22
|
filters: types.InputMaybe<types.AssetFiltersInput>;
|
|
17
23
|
}>>;
|
|
@@ -29,6 +35,14 @@ declare const documents: {
|
|
|
29
35
|
* Please regenerate the types.
|
|
30
36
|
*/
|
|
31
37
|
export declare function graphql(source: string): unknown;
|
|
38
|
+
/**
|
|
39
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
40
|
+
*/
|
|
41
|
+
export declare function graphql(source: "query DeviceHealthIssueCategorySummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n fleetHealthCategoriesSummary {\n summary {\n count\n key\n }\n total\n }\n }\n}"): (typeof documents)["query DeviceHealthIssueCategorySummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n fleetHealthCategoriesSummary {\n summary {\n count\n key\n }\n total\n }\n }\n}"];
|
|
42
|
+
/**
|
|
43
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
44
|
+
*/
|
|
45
|
+
export declare function graphql(source: "query DeviceHealthIssueTypeSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n fleetHealthTypesSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}"): (typeof documents)["query DeviceHealthIssueTypeSummaries($filters: AssetFiltersInput) {\n assetSummary(filters: $filters) {\n fleetHealthTypesSummary {\n summary {\n key\n count\n }\n total\n }\n }\n}"];
|
|
32
46
|
/**
|
|
33
47
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
34
48
|
*/
|