@trackunit/filters-asset-filter-definitions 0.0.19 → 0.0.23
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 +43 -43
- package/index.esm.js +43 -43
- package/package.json +1 -1
- package/src/defaultFilters/defaults/AssetTypeFilter.d.ts +5 -5
- package/src/generated/graphql-api/gql.d.ts +1 -1
- package/src/generated/graphql-api/graphql.d.ts +172 -172
- package/translation.cjs.js +5 -0
- package/translation.cjs10.js +5 -0
- package/translation.cjs11.js +5 -0
- package/translation.cjs12.js +5 -0
- package/translation.cjs13.js +5 -0
- package/translation.cjs14.js +5 -0
- package/translation.cjs15.js +5 -0
- package/translation.cjs16.js +5 -0
- package/translation.cjs17.js +5 -0
- package/translation.cjs2.js +5 -0
- package/translation.cjs3.js +5 -0
- package/translation.cjs4.js +5 -0
- package/translation.cjs5.js +5 -0
- package/translation.cjs6.js +5 -0
- package/translation.cjs7.js +5 -0
- package/translation.cjs8.js +5 -0
- package/translation.cjs9.js +5 -0
- package/translation.esm.js +5 -0
- package/translation.esm10.js +5 -0
- package/translation.esm11.js +5 -0
- package/translation.esm12.js +5 -0
- package/translation.esm13.js +5 -0
- package/translation.esm14.js +5 -0
- package/translation.esm15.js +5 -0
- package/translation.esm16.js +5 -0
- package/translation.esm17.js +5 -0
- package/translation.esm2.js +5 -0
- package/translation.esm3.js +5 -0
- package/translation.esm4.js +5 -0
- package/translation.esm5.js +5 -0
- package/translation.esm6.js +5 -0
- package/translation.esm7.js +5 -0
- package/translation.esm8.js +5 -0
- package/translation.esm9.js +5 -0
package/index.cjs.js
CHANGED
|
@@ -288,9 +288,9 @@ const setupLibraryTranslations = () => {
|
|
|
288
288
|
};
|
|
289
289
|
|
|
290
290
|
const assetCriticalityState = {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
291
|
+
CRITICAL: "CRITICAL",
|
|
292
|
+
LOW: "LOW",
|
|
293
|
+
NONE: "NONE",
|
|
294
294
|
};
|
|
295
295
|
const GetFleetAssetTypesSummaryDocument = {
|
|
296
296
|
kind: "Document",
|
|
@@ -1299,7 +1299,7 @@ const ActivityFiltersView = ({ filterBarActions, filterDefinition, filterState,
|
|
|
1299
1299
|
const { data, loading } = client.useQuery(GetFleetActivitySummaryDocument, {
|
|
1300
1300
|
fetchPolicy: "cache-first",
|
|
1301
1301
|
variables: {
|
|
1302
|
-
filters: Object.assign(Object.assign({}, activeFilters), { activities:
|
|
1302
|
+
filters: Object.assign(Object.assign({}, activeFilters), { activities: null }),
|
|
1303
1303
|
},
|
|
1304
1304
|
});
|
|
1305
1305
|
const activity = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.activity;
|
|
@@ -1376,20 +1376,20 @@ const useAssetIdsFilter = () => {
|
|
|
1376
1376
|
|
|
1377
1377
|
exports.AssetType = void 0;
|
|
1378
1378
|
(function (AssetType) {
|
|
1379
|
-
AssetType["
|
|
1380
|
-
AssetType["
|
|
1381
|
-
AssetType["
|
|
1379
|
+
AssetType["ATTACHMENT"] = "ATTACHMENT";
|
|
1380
|
+
AssetType["EQUIPMENT"] = "EQUIPMENT";
|
|
1381
|
+
AssetType["GATEWAY"] = "GATEWAY";
|
|
1382
1382
|
AssetType["Machine"] = "MACHINE";
|
|
1383
|
-
AssetType["
|
|
1384
|
-
AssetType["
|
|
1383
|
+
AssetType["OTHER"] = "OTHER";
|
|
1384
|
+
AssetType["TOOL"] = "TOOL";
|
|
1385
1385
|
})(exports.AssetType || (exports.AssetType = {}));
|
|
1386
1386
|
const ALL_TYPES = [
|
|
1387
1387
|
exports.AssetType.Machine,
|
|
1388
|
-
exports.AssetType.
|
|
1389
|
-
exports.AssetType.
|
|
1390
|
-
exports.AssetType.
|
|
1391
|
-
exports.AssetType.
|
|
1392
|
-
exports.AssetType.
|
|
1388
|
+
exports.AssetType.ATTACHMENT,
|
|
1389
|
+
exports.AssetType.EQUIPMENT,
|
|
1390
|
+
exports.AssetType.TOOL,
|
|
1391
|
+
exports.AssetType.GATEWAY,
|
|
1392
|
+
exports.AssetType.OTHER,
|
|
1393
1393
|
];
|
|
1394
1394
|
/**
|
|
1395
1395
|
* Maps the asset type to a label id
|
|
@@ -1417,7 +1417,7 @@ const AssetTypesFilterView = (props) => {
|
|
|
1417
1417
|
const { data, loading } = client.useQuery(GetFleetAssetTypesSummaryDocument, {
|
|
1418
1418
|
fetchPolicy: "cache-first",
|
|
1419
1419
|
variables: {
|
|
1420
|
-
filters: Object.assign(Object.assign({}, activeFilters), { assetTypes:
|
|
1420
|
+
filters: Object.assign(Object.assign({}, activeFilters), { assetTypes: null }),
|
|
1421
1421
|
},
|
|
1422
1422
|
});
|
|
1423
1423
|
const getCountForAssetType = react.useCallback((type) => {
|
|
@@ -1426,15 +1426,15 @@ const AssetTypesFilterView = (props) => {
|
|
|
1426
1426
|
switch (type) {
|
|
1427
1427
|
case exports.AssetType.Machine:
|
|
1428
1428
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.machines;
|
|
1429
|
-
case exports.AssetType.
|
|
1429
|
+
case exports.AssetType.ATTACHMENT:
|
|
1430
1430
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.attachments;
|
|
1431
|
-
case exports.AssetType.
|
|
1431
|
+
case exports.AssetType.EQUIPMENT:
|
|
1432
1432
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.equipments;
|
|
1433
|
-
case exports.AssetType.
|
|
1433
|
+
case exports.AssetType.TOOL:
|
|
1434
1434
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.tools;
|
|
1435
|
-
case exports.AssetType.
|
|
1435
|
+
case exports.AssetType.GATEWAY:
|
|
1436
1436
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.gateways;
|
|
1437
|
-
case exports.AssetType.
|
|
1437
|
+
case exports.AssetType.OTHER:
|
|
1438
1438
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.others;
|
|
1439
1439
|
default:
|
|
1440
1440
|
throw new Error("Unrecognized asset type");
|
|
@@ -1515,7 +1515,7 @@ const BrandFilterView = (props) => {
|
|
|
1515
1515
|
variables: {
|
|
1516
1516
|
limit: FETCH_LIMIT$7,
|
|
1517
1517
|
search: debouncedSearch,
|
|
1518
|
-
filters: Object.assign(Object.assign({}, activeFilters), { brands:
|
|
1518
|
+
filters: Object.assign(Object.assign({}, activeFilters), { brands: null }),
|
|
1519
1519
|
},
|
|
1520
1520
|
});
|
|
1521
1521
|
const options = react.useMemo(() => {
|
|
@@ -1556,11 +1556,11 @@ const useBrandFilter = () => {
|
|
|
1556
1556
|
|
|
1557
1557
|
const mapCriticalityToLabelId = (state) => {
|
|
1558
1558
|
switch (state) {
|
|
1559
|
-
case assetCriticalityState.
|
|
1559
|
+
case assetCriticalityState.CRITICAL:
|
|
1560
1560
|
return "assetFilters.criticality.CRITICAL";
|
|
1561
|
-
case assetCriticalityState.
|
|
1561
|
+
case assetCriticalityState.LOW:
|
|
1562
1562
|
return "assetFilters.criticality.LOW";
|
|
1563
|
-
case assetCriticalityState.
|
|
1563
|
+
case assetCriticalityState.NONE:
|
|
1564
1564
|
return "assetFilters.criticality.NONE";
|
|
1565
1565
|
default:
|
|
1566
1566
|
return "assetFilters.unknown";
|
|
@@ -1579,28 +1579,28 @@ const CriticalityFiltersView = (props) => {
|
|
|
1579
1579
|
const { data, loading } = client.useQuery(GetFleetCriticalitySummaryDocument, {
|
|
1580
1580
|
fetchPolicy: "cache-first",
|
|
1581
1581
|
variables: {
|
|
1582
|
-
filters: Object.assign(Object.assign({}, activeFilters), { criticalities:
|
|
1582
|
+
filters: Object.assign(Object.assign({}, activeFilters), { criticalities: null }),
|
|
1583
1583
|
},
|
|
1584
1584
|
});
|
|
1585
1585
|
const criticality = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.criticality;
|
|
1586
1586
|
return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: [
|
|
1587
1587
|
{
|
|
1588
|
-
key: assetCriticalityState.
|
|
1589
|
-
label: t(mapCriticalityToLabelId(assetCriticalityState.
|
|
1588
|
+
key: assetCriticalityState.CRITICAL,
|
|
1589
|
+
label: t(mapCriticalityToLabelId(assetCriticalityState.CRITICAL)),
|
|
1590
1590
|
count: criticality === null || criticality === void 0 ? void 0 : criticality.critical,
|
|
1591
|
-
prefix: (jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.
|
|
1591
|
+
prefix: (jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.CRITICAL })),
|
|
1592
1592
|
},
|
|
1593
1593
|
{
|
|
1594
|
-
key: assetCriticalityState.
|
|
1595
|
-
label: t(mapCriticalityToLabelId(assetCriticalityState.
|
|
1594
|
+
key: assetCriticalityState.LOW,
|
|
1595
|
+
label: t(mapCriticalityToLabelId(assetCriticalityState.LOW)),
|
|
1596
1596
|
count: criticality === null || criticality === void 0 ? void 0 : criticality.low,
|
|
1597
|
-
prefix: jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.
|
|
1597
|
+
prefix: jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.LOW }),
|
|
1598
1598
|
},
|
|
1599
1599
|
{
|
|
1600
|
-
key: assetCriticalityState.
|
|
1601
|
-
label: t(mapCriticalityToLabelId(assetCriticalityState.
|
|
1600
|
+
key: assetCriticalityState.NONE,
|
|
1601
|
+
label: t(mapCriticalityToLabelId(assetCriticalityState.NONE)),
|
|
1602
1602
|
count: criticality === null || criticality === void 0 ? void 0 : criticality.good,
|
|
1603
|
-
prefix: jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.
|
|
1603
|
+
prefix: jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.NONE }),
|
|
1604
1604
|
},
|
|
1605
1605
|
] })));
|
|
1606
1606
|
};
|
|
@@ -1637,7 +1637,7 @@ const CustomerIdsFilterView = (props) => {
|
|
|
1637
1637
|
variables: {
|
|
1638
1638
|
limit: FETCH_LIMIT$6,
|
|
1639
1639
|
search: debouncedSearch,
|
|
1640
|
-
filters: Object.assign(Object.assign({}, activeFilters), { customerIds:
|
|
1640
|
+
filters: Object.assign(Object.assign({}, activeFilters), { customerIds: null }),
|
|
1641
1641
|
},
|
|
1642
1642
|
context: { headers: { "TU-PREVIEW": "LIVE-PROSPER" } },
|
|
1643
1643
|
});
|
|
@@ -1731,7 +1731,7 @@ const GroupIdsFilterView = (props) => {
|
|
|
1731
1731
|
variables: {
|
|
1732
1732
|
limit: FETCH_LIMIT$5,
|
|
1733
1733
|
search: debouncedSearch,
|
|
1734
|
-
filters: Object.assign(Object.assign({}, activeFilters), { groups:
|
|
1734
|
+
filters: Object.assign(Object.assign({}, activeFilters), { groups: null }),
|
|
1735
1735
|
},
|
|
1736
1736
|
});
|
|
1737
1737
|
const options = react.useMemo(() => {
|
|
@@ -1884,7 +1884,7 @@ const MetadataCompletenessFilterView = (props) => {
|
|
|
1884
1884
|
const activeFilters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
|
|
1885
1885
|
const { data, loading } = client.useQuery(GetMetadataCompletenessSummaryDocument, {
|
|
1886
1886
|
variables: {
|
|
1887
|
-
filters: Object.assign(Object.assign({}, activeFilters), { metadataCompleteness:
|
|
1887
|
+
filters: Object.assign(Object.assign({}, activeFilters), { metadataCompleteness: null }),
|
|
1888
1888
|
},
|
|
1889
1889
|
});
|
|
1890
1890
|
const getCountForMetadataCompleteness = react.useCallback((type) => {
|
|
@@ -1950,7 +1950,7 @@ const ModelsFilterView = (props) => {
|
|
|
1950
1950
|
variables: {
|
|
1951
1951
|
limit: FETCH_LIMIT$4,
|
|
1952
1952
|
search: debouncedSearch,
|
|
1953
|
-
filters: Object.assign(Object.assign({}, activeFilters), { models:
|
|
1953
|
+
filters: Object.assign(Object.assign({}, activeFilters), { models: null }),
|
|
1954
1954
|
},
|
|
1955
1955
|
});
|
|
1956
1956
|
const options = react.useMemo(() => {
|
|
@@ -1999,7 +1999,7 @@ const OwnerAccountIdsFilterView = (props) => {
|
|
|
1999
1999
|
variables: {
|
|
2000
2000
|
limit: FETCH_LIMIT$3,
|
|
2001
2001
|
search: debouncedSearch,
|
|
2002
|
-
filters: Object.assign(Object.assign({}, activeFilters), { ownerAccountIds:
|
|
2002
|
+
filters: Object.assign(Object.assign({}, activeFilters), { ownerAccountIds: null }),
|
|
2003
2003
|
},
|
|
2004
2004
|
});
|
|
2005
2005
|
const options = react.useMemo(() => {
|
|
@@ -2125,7 +2125,7 @@ const ProductionYearFilterView = (_a) => {
|
|
|
2125
2125
|
variables: {
|
|
2126
2126
|
limit: FETCH_LIMIT$2,
|
|
2127
2127
|
search: debouncedSearch,
|
|
2128
|
-
filters: Object.assign(Object.assign({}, activeFilters), { productionYears:
|
|
2128
|
+
filters: Object.assign(Object.assign({}, activeFilters), { productionYears: null }),
|
|
2129
2129
|
},
|
|
2130
2130
|
fetchPolicy: "cache-first",
|
|
2131
2131
|
});
|
|
@@ -2196,7 +2196,7 @@ const SiteIdsFilterView = (props) => {
|
|
|
2196
2196
|
variables: {
|
|
2197
2197
|
limit: FETCH_LIMIT$1,
|
|
2198
2198
|
search: debouncedSearch,
|
|
2199
|
-
filters: Object.assign(Object.assign({}, activeFilters), { siteIds:
|
|
2199
|
+
filters: Object.assign(Object.assign({}, activeFilters), { siteIds: null }),
|
|
2200
2200
|
},
|
|
2201
2201
|
});
|
|
2202
2202
|
const options = react.useMemo(() => {
|
|
@@ -2348,7 +2348,7 @@ const SiteTypesFilterView = (props) => {
|
|
|
2348
2348
|
const { data, loading } = client.useQuery(GetFleetSiteTypeSummaryDocument, {
|
|
2349
2349
|
fetchPolicy: "cache-first",
|
|
2350
2350
|
variables: {
|
|
2351
|
-
filters: Object.assign(Object.assign({}, assetQueryVariables.filters), { siteTypes:
|
|
2351
|
+
filters: Object.assign(Object.assign({}, assetQueryVariables.filters), { siteTypes: null }),
|
|
2352
2352
|
},
|
|
2353
2353
|
});
|
|
2354
2354
|
const siteTypeData = react.useMemo(() => {
|
|
@@ -2432,7 +2432,7 @@ const TypesFilterView = (props) => {
|
|
|
2432
2432
|
variables: {
|
|
2433
2433
|
limit: FETCH_LIMIT,
|
|
2434
2434
|
search: debouncedSearch,
|
|
2435
|
-
filters: Object.assign(Object.assign({}, activeFilters), { types:
|
|
2435
|
+
filters: Object.assign(Object.assign({}, activeFilters), { types: null }),
|
|
2436
2436
|
},
|
|
2437
2437
|
});
|
|
2438
2438
|
const options = react.useMemo(() => {
|
package/index.esm.js
CHANGED
|
@@ -264,9 +264,9 @@ const setupLibraryTranslations = () => {
|
|
|
264
264
|
};
|
|
265
265
|
|
|
266
266
|
const assetCriticalityState = {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
CRITICAL: "CRITICAL",
|
|
268
|
+
LOW: "LOW",
|
|
269
|
+
NONE: "NONE",
|
|
270
270
|
};
|
|
271
271
|
const GetFleetAssetTypesSummaryDocument = {
|
|
272
272
|
kind: "Document",
|
|
@@ -1275,7 +1275,7 @@ const ActivityFiltersView = ({ filterBarActions, filterDefinition, filterState,
|
|
|
1275
1275
|
const { data, loading } = useQuery(GetFleetActivitySummaryDocument, {
|
|
1276
1276
|
fetchPolicy: "cache-first",
|
|
1277
1277
|
variables: {
|
|
1278
|
-
filters: Object.assign(Object.assign({}, activeFilters), { activities:
|
|
1278
|
+
filters: Object.assign(Object.assign({}, activeFilters), { activities: null }),
|
|
1279
1279
|
},
|
|
1280
1280
|
});
|
|
1281
1281
|
const activity = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.activity;
|
|
@@ -1352,20 +1352,20 @@ const useAssetIdsFilter = () => {
|
|
|
1352
1352
|
|
|
1353
1353
|
var AssetType;
|
|
1354
1354
|
(function (AssetType) {
|
|
1355
|
-
AssetType["
|
|
1356
|
-
AssetType["
|
|
1357
|
-
AssetType["
|
|
1355
|
+
AssetType["ATTACHMENT"] = "ATTACHMENT";
|
|
1356
|
+
AssetType["EQUIPMENT"] = "EQUIPMENT";
|
|
1357
|
+
AssetType["GATEWAY"] = "GATEWAY";
|
|
1358
1358
|
AssetType["Machine"] = "MACHINE";
|
|
1359
|
-
AssetType["
|
|
1360
|
-
AssetType["
|
|
1359
|
+
AssetType["OTHER"] = "OTHER";
|
|
1360
|
+
AssetType["TOOL"] = "TOOL";
|
|
1361
1361
|
})(AssetType || (AssetType = {}));
|
|
1362
1362
|
const ALL_TYPES = [
|
|
1363
1363
|
AssetType.Machine,
|
|
1364
|
-
AssetType.
|
|
1365
|
-
AssetType.
|
|
1366
|
-
AssetType.
|
|
1367
|
-
AssetType.
|
|
1368
|
-
AssetType.
|
|
1364
|
+
AssetType.ATTACHMENT,
|
|
1365
|
+
AssetType.EQUIPMENT,
|
|
1366
|
+
AssetType.TOOL,
|
|
1367
|
+
AssetType.GATEWAY,
|
|
1368
|
+
AssetType.OTHER,
|
|
1369
1369
|
];
|
|
1370
1370
|
/**
|
|
1371
1371
|
* Maps the asset type to a label id
|
|
@@ -1393,7 +1393,7 @@ const AssetTypesFilterView = (props) => {
|
|
|
1393
1393
|
const { data, loading } = useQuery(GetFleetAssetTypesSummaryDocument, {
|
|
1394
1394
|
fetchPolicy: "cache-first",
|
|
1395
1395
|
variables: {
|
|
1396
|
-
filters: Object.assign(Object.assign({}, activeFilters), { assetTypes:
|
|
1396
|
+
filters: Object.assign(Object.assign({}, activeFilters), { assetTypes: null }),
|
|
1397
1397
|
},
|
|
1398
1398
|
});
|
|
1399
1399
|
const getCountForAssetType = useCallback((type) => {
|
|
@@ -1402,15 +1402,15 @@ const AssetTypesFilterView = (props) => {
|
|
|
1402
1402
|
switch (type) {
|
|
1403
1403
|
case AssetType.Machine:
|
|
1404
1404
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.machines;
|
|
1405
|
-
case AssetType.
|
|
1405
|
+
case AssetType.ATTACHMENT:
|
|
1406
1406
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.attachments;
|
|
1407
|
-
case AssetType.
|
|
1407
|
+
case AssetType.EQUIPMENT:
|
|
1408
1408
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.equipments;
|
|
1409
|
-
case AssetType.
|
|
1409
|
+
case AssetType.TOOL:
|
|
1410
1410
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.tools;
|
|
1411
|
-
case AssetType.
|
|
1411
|
+
case AssetType.GATEWAY:
|
|
1412
1412
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.gateways;
|
|
1413
|
-
case AssetType.
|
|
1413
|
+
case AssetType.OTHER:
|
|
1414
1414
|
return assetTypes === null || assetTypes === void 0 ? void 0 : assetTypes.others;
|
|
1415
1415
|
default:
|
|
1416
1416
|
throw new Error("Unrecognized asset type");
|
|
@@ -1491,7 +1491,7 @@ const BrandFilterView = (props) => {
|
|
|
1491
1491
|
variables: {
|
|
1492
1492
|
limit: FETCH_LIMIT$7,
|
|
1493
1493
|
search: debouncedSearch,
|
|
1494
|
-
filters: Object.assign(Object.assign({}, activeFilters), { brands:
|
|
1494
|
+
filters: Object.assign(Object.assign({}, activeFilters), { brands: null }),
|
|
1495
1495
|
},
|
|
1496
1496
|
});
|
|
1497
1497
|
const options = useMemo(() => {
|
|
@@ -1532,11 +1532,11 @@ const useBrandFilter = () => {
|
|
|
1532
1532
|
|
|
1533
1533
|
const mapCriticalityToLabelId = (state) => {
|
|
1534
1534
|
switch (state) {
|
|
1535
|
-
case assetCriticalityState.
|
|
1535
|
+
case assetCriticalityState.CRITICAL:
|
|
1536
1536
|
return "assetFilters.criticality.CRITICAL";
|
|
1537
|
-
case assetCriticalityState.
|
|
1537
|
+
case assetCriticalityState.LOW:
|
|
1538
1538
|
return "assetFilters.criticality.LOW";
|
|
1539
|
-
case assetCriticalityState.
|
|
1539
|
+
case assetCriticalityState.NONE:
|
|
1540
1540
|
return "assetFilters.criticality.NONE";
|
|
1541
1541
|
default:
|
|
1542
1542
|
return "assetFilters.unknown";
|
|
@@ -1555,28 +1555,28 @@ const CriticalityFiltersView = (props) => {
|
|
|
1555
1555
|
const { data, loading } = useQuery(GetFleetCriticalitySummaryDocument, {
|
|
1556
1556
|
fetchPolicy: "cache-first",
|
|
1557
1557
|
variables: {
|
|
1558
|
-
filters: Object.assign(Object.assign({}, activeFilters), { criticalities:
|
|
1558
|
+
filters: Object.assign(Object.assign({}, activeFilters), { criticalities: null }),
|
|
1559
1559
|
},
|
|
1560
1560
|
});
|
|
1561
1561
|
const criticality = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.criticality;
|
|
1562
1562
|
return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: [
|
|
1563
1563
|
{
|
|
1564
|
-
key: assetCriticalityState.
|
|
1565
|
-
label: t(mapCriticalityToLabelId(assetCriticalityState.
|
|
1564
|
+
key: assetCriticalityState.CRITICAL,
|
|
1565
|
+
label: t(mapCriticalityToLabelId(assetCriticalityState.CRITICAL)),
|
|
1566
1566
|
count: criticality === null || criticality === void 0 ? void 0 : criticality.critical,
|
|
1567
|
-
prefix: (jsx(CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.
|
|
1567
|
+
prefix: (jsx(CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.CRITICAL })),
|
|
1568
1568
|
},
|
|
1569
1569
|
{
|
|
1570
|
-
key: assetCriticalityState.
|
|
1571
|
-
label: t(mapCriticalityToLabelId(assetCriticalityState.
|
|
1570
|
+
key: assetCriticalityState.LOW,
|
|
1571
|
+
label: t(mapCriticalityToLabelId(assetCriticalityState.LOW)),
|
|
1572
1572
|
count: criticality === null || criticality === void 0 ? void 0 : criticality.low,
|
|
1573
|
-
prefix: jsx(CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.
|
|
1573
|
+
prefix: jsx(CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.LOW }),
|
|
1574
1574
|
},
|
|
1575
1575
|
{
|
|
1576
|
-
key: assetCriticalityState.
|
|
1577
|
-
label: t(mapCriticalityToLabelId(assetCriticalityState.
|
|
1576
|
+
key: assetCriticalityState.NONE,
|
|
1577
|
+
label: t(mapCriticalityToLabelId(assetCriticalityState.NONE)),
|
|
1578
1578
|
count: criticality === null || criticality === void 0 ? void 0 : criticality.good,
|
|
1579
|
-
prefix: jsx(CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.
|
|
1579
|
+
prefix: jsx(CriticalityIndicator, { withLabel: false, withBackground: false, state: assetCriticalityState.NONE }),
|
|
1580
1580
|
},
|
|
1581
1581
|
] })));
|
|
1582
1582
|
};
|
|
@@ -1613,7 +1613,7 @@ const CustomerIdsFilterView = (props) => {
|
|
|
1613
1613
|
variables: {
|
|
1614
1614
|
limit: FETCH_LIMIT$6,
|
|
1615
1615
|
search: debouncedSearch,
|
|
1616
|
-
filters: Object.assign(Object.assign({}, activeFilters), { customerIds:
|
|
1616
|
+
filters: Object.assign(Object.assign({}, activeFilters), { customerIds: null }),
|
|
1617
1617
|
},
|
|
1618
1618
|
context: { headers: { "TU-PREVIEW": "LIVE-PROSPER" } },
|
|
1619
1619
|
});
|
|
@@ -1707,7 +1707,7 @@ const GroupIdsFilterView = (props) => {
|
|
|
1707
1707
|
variables: {
|
|
1708
1708
|
limit: FETCH_LIMIT$5,
|
|
1709
1709
|
search: debouncedSearch,
|
|
1710
|
-
filters: Object.assign(Object.assign({}, activeFilters), { groups:
|
|
1710
|
+
filters: Object.assign(Object.assign({}, activeFilters), { groups: null }),
|
|
1711
1711
|
},
|
|
1712
1712
|
});
|
|
1713
1713
|
const options = useMemo(() => {
|
|
@@ -1860,7 +1860,7 @@ const MetadataCompletenessFilterView = (props) => {
|
|
|
1860
1860
|
const activeFilters = useActiveAssetFilters(props.filterState.values);
|
|
1861
1861
|
const { data, loading } = useQuery(GetMetadataCompletenessSummaryDocument, {
|
|
1862
1862
|
variables: {
|
|
1863
|
-
filters: Object.assign(Object.assign({}, activeFilters), { metadataCompleteness:
|
|
1863
|
+
filters: Object.assign(Object.assign({}, activeFilters), { metadataCompleteness: null }),
|
|
1864
1864
|
},
|
|
1865
1865
|
});
|
|
1866
1866
|
const getCountForMetadataCompleteness = useCallback((type) => {
|
|
@@ -1926,7 +1926,7 @@ const ModelsFilterView = (props) => {
|
|
|
1926
1926
|
variables: {
|
|
1927
1927
|
limit: FETCH_LIMIT$4,
|
|
1928
1928
|
search: debouncedSearch,
|
|
1929
|
-
filters: Object.assign(Object.assign({}, activeFilters), { models:
|
|
1929
|
+
filters: Object.assign(Object.assign({}, activeFilters), { models: null }),
|
|
1930
1930
|
},
|
|
1931
1931
|
});
|
|
1932
1932
|
const options = useMemo(() => {
|
|
@@ -1975,7 +1975,7 @@ const OwnerAccountIdsFilterView = (props) => {
|
|
|
1975
1975
|
variables: {
|
|
1976
1976
|
limit: FETCH_LIMIT$3,
|
|
1977
1977
|
search: debouncedSearch,
|
|
1978
|
-
filters: Object.assign(Object.assign({}, activeFilters), { ownerAccountIds:
|
|
1978
|
+
filters: Object.assign(Object.assign({}, activeFilters), { ownerAccountIds: null }),
|
|
1979
1979
|
},
|
|
1980
1980
|
});
|
|
1981
1981
|
const options = useMemo(() => {
|
|
@@ -2101,7 +2101,7 @@ const ProductionYearFilterView = (_a) => {
|
|
|
2101
2101
|
variables: {
|
|
2102
2102
|
limit: FETCH_LIMIT$2,
|
|
2103
2103
|
search: debouncedSearch,
|
|
2104
|
-
filters: Object.assign(Object.assign({}, activeFilters), { productionYears:
|
|
2104
|
+
filters: Object.assign(Object.assign({}, activeFilters), { productionYears: null }),
|
|
2105
2105
|
},
|
|
2106
2106
|
fetchPolicy: "cache-first",
|
|
2107
2107
|
});
|
|
@@ -2172,7 +2172,7 @@ const SiteIdsFilterView = (props) => {
|
|
|
2172
2172
|
variables: {
|
|
2173
2173
|
limit: FETCH_LIMIT$1,
|
|
2174
2174
|
search: debouncedSearch,
|
|
2175
|
-
filters: Object.assign(Object.assign({}, activeFilters), { siteIds:
|
|
2175
|
+
filters: Object.assign(Object.assign({}, activeFilters), { siteIds: null }),
|
|
2176
2176
|
},
|
|
2177
2177
|
});
|
|
2178
2178
|
const options = useMemo(() => {
|
|
@@ -2324,7 +2324,7 @@ const SiteTypesFilterView = (props) => {
|
|
|
2324
2324
|
const { data, loading } = useQuery(GetFleetSiteTypeSummaryDocument, {
|
|
2325
2325
|
fetchPolicy: "cache-first",
|
|
2326
2326
|
variables: {
|
|
2327
|
-
filters: Object.assign(Object.assign({}, assetQueryVariables.filters), { siteTypes:
|
|
2327
|
+
filters: Object.assign(Object.assign({}, assetQueryVariables.filters), { siteTypes: null }),
|
|
2328
2328
|
},
|
|
2329
2329
|
});
|
|
2330
2330
|
const siteTypeData = useMemo(() => {
|
|
@@ -2408,7 +2408,7 @@ const TypesFilterView = (props) => {
|
|
|
2408
2408
|
variables: {
|
|
2409
2409
|
limit: FETCH_LIMIT,
|
|
2410
2410
|
search: debouncedSearch,
|
|
2411
|
-
filters: Object.assign(Object.assign({}, activeFilters), { types:
|
|
2411
|
+
filters: Object.assign(Object.assign({}, activeFilters), { types: null }),
|
|
2412
2412
|
},
|
|
2413
2413
|
});
|
|
2414
2414
|
const options = useMemo(() => {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { StringArrayFilterDefinition } from "@trackunit/filters-filter-bar";
|
|
2
2
|
export declare enum AssetType {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
ATTACHMENT = "ATTACHMENT",
|
|
4
|
+
EQUIPMENT = "EQUIPMENT",
|
|
5
|
+
GATEWAY = "GATEWAY",
|
|
6
6
|
Machine = "MACHINE",
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
OTHER = "OTHER",
|
|
8
|
+
TOOL = "TOOL"
|
|
9
9
|
}
|
|
10
10
|
export declare const ALL_TYPES: AssetType[];
|
|
11
11
|
/**
|
|
@@ -12,7 +12,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
|
|
|
12
12
|
*/
|
|
13
13
|
declare const documents: {
|
|
14
14
|
"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 }\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 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 accountName\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 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 }\n count\n }\n }\n }\n}": DocumentNode<types.GetFleetAssetTypesSummaryQuery, types.Exact<{
|
|
15
|
-
filters
|
|
15
|
+
filters: types.InputMaybe<types.AssetFiltersInput>;
|
|
16
16
|
}>>;
|
|
17
17
|
};
|
|
18
18
|
/**
|