@trackunit/filters-asset-filter-definitions 0.0.72 → 0.0.73

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.
Files changed (3) hide show
  1. package/index.cjs.js +21 -21
  2. package/index.esm.js +21 -21
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -1303,32 +1303,32 @@ const ActivityFiltersView = ({ filterBarActions, filterDefinition, filterState,
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;
1306
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { value: value, setValue: setValue, filterDefinition: filterDefinition, filterState: filterState, filterBarActions: filterBarActions, loading: loading, options: [
1306
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { filterBarActions: filterBarActions, filterDefinition: filterDefinition, filterState: filterState, loading: loading, options: [
1307
1307
  {
1308
1308
  key: exports.AssetActivityState.Working,
1309
1309
  label: t("assetFilters.activityFilter.working"),
1310
1310
  count: activity === null || activity === void 0 ? void 0 : activity.working,
1311
- prefix: jsxRuntime.jsx(utilizationIndicator.ActivityIndicator, { withLabel: false, withBackground: false, state: exports.AssetActivityState.Working }),
1311
+ prefix: jsxRuntime.jsx(utilizationIndicator.ActivityIndicator, { state: exports.AssetActivityState.Working, withBackground: false, withLabel: false }),
1312
1312
  },
1313
1313
  {
1314
1314
  key: exports.AssetActivityState.Idling,
1315
1315
  label: t("assetFilters.activityFilter.idling"),
1316
1316
  count: activity === null || activity === void 0 ? void 0 : activity.idling,
1317
- prefix: jsxRuntime.jsx(utilizationIndicator.ActivityIndicator, { withLabel: false, withBackground: false, state: exports.AssetActivityState.Idling }),
1317
+ prefix: jsxRuntime.jsx(utilizationIndicator.ActivityIndicator, { state: exports.AssetActivityState.Idling, withBackground: false, withLabel: false }),
1318
1318
  },
1319
1319
  {
1320
1320
  key: exports.AssetActivityState.Stopped,
1321
1321
  label: t("assetFilters.activityFilter.stopped"),
1322
1322
  count: activity === null || activity === void 0 ? void 0 : activity.stopped,
1323
- prefix: jsxRuntime.jsx(utilizationIndicator.ActivityIndicator, { withLabel: false, withBackground: false, state: exports.AssetActivityState.Stopped }),
1323
+ prefix: jsxRuntime.jsx(utilizationIndicator.ActivityIndicator, { state: exports.AssetActivityState.Stopped, withBackground: false, withLabel: false }),
1324
1324
  },
1325
1325
  {
1326
1326
  key: exports.AssetActivityState.Unknown,
1327
1327
  label: t("assetFilters.activityFilter.unknown"),
1328
1328
  count: activity === null || activity === void 0 ? void 0 : activity.unknown,
1329
- prefix: jsxRuntime.jsx(utilizationIndicator.ActivityIndicator, { withLabel: false, withBackground: false, state: exports.AssetActivityState.Unknown }),
1329
+ prefix: jsxRuntime.jsx(utilizationIndicator.ActivityIndicator, { state: exports.AssetActivityState.Unknown, withBackground: false, withLabel: false }),
1330
1330
  },
1331
- ] }));
1331
+ ], setValue: setValue, value: value }));
1332
1332
  };
1333
1333
  /**
1334
1334
  *
@@ -1528,7 +1528,7 @@ const BrandFilterView = (props) => {
1528
1528
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$7);
1529
1529
  return result;
1530
1530
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.brands) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
1531
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1531
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1532
1532
  };
1533
1533
  /**
1534
1534
  * Brand filter definition
@@ -1588,19 +1588,19 @@ const CriticalityFiltersView = (props) => {
1588
1588
  key: assetCriticalityState.CRITICAL,
1589
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.CRITICAL })),
1591
+ prefix: (jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { state: assetCriticalityState.CRITICAL, withBackground: false, withLabel: false })),
1592
1592
  },
1593
1593
  {
1594
1594
  key: assetCriticalityState.LOW,
1595
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.LOW }),
1597
+ prefix: jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { state: assetCriticalityState.LOW, withBackground: false, withLabel: false }),
1598
1598
  },
1599
1599
  {
1600
1600
  key: assetCriticalityState.NONE,
1601
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.NONE }),
1603
+ prefix: jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { state: assetCriticalityState.NONE, withBackground: false, withLabel: false }),
1604
1604
  },
1605
1605
  ] })));
1606
1606
  };
@@ -1653,7 +1653,7 @@ const CustomerIdsFilterView = (props) => {
1653
1653
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$6);
1654
1654
  return result;
1655
1655
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.customers) === null || _b === void 0 ? void 0 : _b.summary]);
1656
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1656
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1657
1657
  };
1658
1658
  /**
1659
1659
  *
@@ -1690,7 +1690,7 @@ const FollowedFiltersView = (props) => {
1690
1690
  });
1691
1691
  props.setValue(prev => newValue);
1692
1692
  };
1693
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: jsxRuntime.jsxs(reactFormComponents.RadioGroup, { id: "followed", value: (_a = props.value) !== null && _a !== void 0 ? _a : "ALL", className: "pl-2 pr-2", label: "", onChange: e => handleChange(e.currentTarget.value), children: [jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("filtersBar.defaultAssetFilters.followedFilter.allLabel"), value: "ALL" }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("filtersBar.defaultAssetFilters.followedFilter.followedOnlyLabel"), value: "FOLLOWED" })] }) })] }));
1693
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: jsxRuntime.jsxs(reactFormComponents.RadioGroup, { className: "pl-2 pr-2", id: "followed", label: "", onChange: e => handleChange(e.currentTarget.value), value: (_a = props.value) !== null && _a !== void 0 ? _a : "ALL", children: [jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("filtersBar.defaultAssetFilters.followedFilter.allLabel"), value: "ALL" }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("filtersBar.defaultAssetFilters.followedFilter.followedOnlyLabel"), value: "FOLLOWED" })] }) })] }));
1694
1694
  };
1695
1695
  /**
1696
1696
  *
@@ -1746,7 +1746,7 @@ const GroupIdsFilterView = (props) => {
1746
1746
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$5);
1747
1747
  return result;
1748
1748
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.summary]);
1749
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1749
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1750
1750
  };
1751
1751
  /**
1752
1752
  * GroupIds filter definition
@@ -1814,7 +1814,7 @@ const LastSeenFiltersView = (props) => {
1814
1814
  });
1815
1815
  props.setValue(prev => value);
1816
1816
  };
1817
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: jsxRuntime.jsxs(reactFormComponents.RadioGroup, { id: "lastSeen", value: (_a = props.value) !== null && _a !== void 0 ? _a : "ALL", className: "pl-2 pr-2", label: "", onChange: val => handleChange(val.currentTarget.value), children: [jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.anytime"), value: "ALL" }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.lastHour"), value: exports.AssetLastSeen.LastHour }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.last24Hours"), value: exports.AssetLastSeen.Last_24Hours }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.last7Days"), value: exports.AssetLastSeen.Last_7Days }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.last30Days"), value: exports.AssetLastSeen.Last_30Days }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.olderThan30Days"), value: exports.AssetLastSeen.OlderThan_30Days })] }) })] }));
1817
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: jsxRuntime.jsxs(reactFormComponents.RadioGroup, { className: "pl-2 pr-2", id: "lastSeen", label: "", onChange: val => handleChange(val.currentTarget.value), value: (_a = props.value) !== null && _a !== void 0 ? _a : "ALL", children: [jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.anytime"), value: "ALL" }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.lastHour"), value: exports.AssetLastSeen.LastHour }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.last24Hours"), value: exports.AssetLastSeen.Last_24Hours }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.last7Days"), value: exports.AssetLastSeen.Last_7Days }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.last30Days"), value: exports.AssetLastSeen.Last_30Days }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.lastSeenFilter.olderThan30Days"), value: exports.AssetLastSeen.OlderThan_30Days })] }) })] }));
1818
1818
  };
1819
1819
  /**
1820
1820
  *
@@ -1962,7 +1962,7 @@ const ModelsFilterView = (props) => {
1962
1962
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$4);
1963
1963
  return result;
1964
1964
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.models) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
1965
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1965
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1966
1966
  };
1967
1967
  /**
1968
1968
  *
@@ -2014,7 +2014,7 @@ const OwnerAccountIdsFilterView = (props) => {
2014
2014
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$3);
2015
2015
  return result;
2016
2016
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.ownerAccounts) === null || _b === void 0 ? void 0 : _b.summary]);
2017
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2017
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2018
2018
  };
2019
2019
  /**
2020
2020
  * OwnerAccountIds filter definition
@@ -2052,7 +2052,7 @@ const PeriodFilterView = (props) => {
2052
2052
  });
2053
2053
  props.setValue(prev => value);
2054
2054
  };
2055
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: jsxRuntime.jsxs(reactFormComponents.RadioGroup, { id: "period", value: props.value || "LAST_24_HOURS", label: "", onChange: val => handleChange(val.currentTarget.value), children: [props.filterBarActions.getFilterName() !== "utilizationFilter" ? (jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.periodFilter.LAST_24_HOURS"), value: exports.DayPeriod.LAST_24_HOURS })) : null, jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.periodFilter.LAST_7_DAYS"), value: exports.DayPeriod.LAST_7_DAYS }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.periodFilter.LAST_30_DAYS"), value: exports.DayPeriod.LAST_30_DAYS }), props.filterBarActions.getFilterName() === "fleetEmissionsFilter" && (jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.periodFilter.LIFETIME"), value: exports.DayPeriod.LIFETIME }))] }) })] }));
2055
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: jsxRuntime.jsxs(reactFormComponents.RadioGroup, { id: "period", label: "", onChange: val => handleChange(val.currentTarget.value), value: props.value || "LAST_24_HOURS", children: [props.filterBarActions.getFilterName() !== "utilizationFilter" ? (jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.periodFilter.LAST_24_HOURS"), value: exports.DayPeriod.LAST_24_HOURS })) : null, jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.periodFilter.LAST_7_DAYS"), value: exports.DayPeriod.LAST_7_DAYS }), jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.periodFilter.LAST_30_DAYS"), value: exports.DayPeriod.LAST_30_DAYS }), props.filterBarActions.getFilterName() === "fleetEmissionsFilter" && (jsxRuntime.jsx(reactFormComponents.RadioItem, { label: t("assetFilters.periodFilter.LIFETIME"), value: exports.DayPeriod.LIFETIME }))] }) })] }));
2056
2056
  };
2057
2057
  /**
2058
2058
  *
@@ -2134,7 +2134,7 @@ const ProductionYearFilterView = (_a) => {
2134
2134
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$2);
2135
2135
  return result;
2136
2136
  }, [(_c = (_b = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _b === void 0 ? void 0 : _b.productionYears) === null || _c === void 0 ? void 0 : _c.summary, t]);
2137
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { filterDefinition: filterDefinition, filterState: filterState, filterBarActions: filterBarActions, loading: loading, customSearch: { value: searchText, onChange: setSearchText }, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2137
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, filterBarActions: filterBarActions, filterDefinition: filterDefinition, filterState: filterState, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2138
2138
  };
2139
2139
  /**
2140
2140
  * Production year filter definition
@@ -2211,7 +2211,7 @@ const SiteIdsFilterView = (props) => {
2211
2211
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$1);
2212
2212
  return result;
2213
2213
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.sites) === null || _b === void 0 ? void 0 : _b.summary]);
2214
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2214
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2215
2215
  };
2216
2216
  /**
2217
2217
  *
@@ -2374,7 +2374,7 @@ const SiteTypesFilterView = (props) => {
2374
2374
  label: t(mapSiteTypeToLabelId(type.key)),
2375
2375
  }))
2376
2376
  .filter(option => option.count !== 0);
2377
- return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { options: siteTypeOptions, loading: loading }));
2377
+ return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: siteTypeOptions }));
2378
2378
  };
2379
2379
  /**
2380
2380
  * SiteType filter definition
@@ -2444,7 +2444,7 @@ const TypesFilterView = (props) => {
2444
2444
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT);
2445
2445
  return result;
2446
2446
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.types) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
2447
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, customSearch: { value: searchText, onChange: setSearchText }, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2447
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2448
2448
  };
2449
2449
  /**
2450
2450
  * Types filter definition
package/index.esm.js CHANGED
@@ -1279,32 +1279,32 @@ const ActivityFiltersView = ({ filterBarActions, filterDefinition, filterState,
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;
1282
- return (jsx(DefaultCheckboxFilter, { value: value, setValue: setValue, filterDefinition: filterDefinition, filterState: filterState, filterBarActions: filterBarActions, loading: loading, options: [
1282
+ return (jsx(DefaultCheckboxFilter, { filterBarActions: filterBarActions, filterDefinition: filterDefinition, filterState: filterState, loading: loading, options: [
1283
1283
  {
1284
1284
  key: AssetActivityState.Working,
1285
1285
  label: t("assetFilters.activityFilter.working"),
1286
1286
  count: activity === null || activity === void 0 ? void 0 : activity.working,
1287
- prefix: jsx(ActivityIndicator, { withLabel: false, withBackground: false, state: AssetActivityState.Working }),
1287
+ prefix: jsx(ActivityIndicator, { state: AssetActivityState.Working, withBackground: false, withLabel: false }),
1288
1288
  },
1289
1289
  {
1290
1290
  key: AssetActivityState.Idling,
1291
1291
  label: t("assetFilters.activityFilter.idling"),
1292
1292
  count: activity === null || activity === void 0 ? void 0 : activity.idling,
1293
- prefix: jsx(ActivityIndicator, { withLabel: false, withBackground: false, state: AssetActivityState.Idling }),
1293
+ prefix: jsx(ActivityIndicator, { state: AssetActivityState.Idling, withBackground: false, withLabel: false }),
1294
1294
  },
1295
1295
  {
1296
1296
  key: AssetActivityState.Stopped,
1297
1297
  label: t("assetFilters.activityFilter.stopped"),
1298
1298
  count: activity === null || activity === void 0 ? void 0 : activity.stopped,
1299
- prefix: jsx(ActivityIndicator, { withLabel: false, withBackground: false, state: AssetActivityState.Stopped }),
1299
+ prefix: jsx(ActivityIndicator, { state: AssetActivityState.Stopped, withBackground: false, withLabel: false }),
1300
1300
  },
1301
1301
  {
1302
1302
  key: AssetActivityState.Unknown,
1303
1303
  label: t("assetFilters.activityFilter.unknown"),
1304
1304
  count: activity === null || activity === void 0 ? void 0 : activity.unknown,
1305
- prefix: jsx(ActivityIndicator, { withLabel: false, withBackground: false, state: AssetActivityState.Unknown }),
1305
+ prefix: jsx(ActivityIndicator, { state: AssetActivityState.Unknown, withBackground: false, withLabel: false }),
1306
1306
  },
1307
- ] }));
1307
+ ], setValue: setValue, value: value }));
1308
1308
  };
1309
1309
  /**
1310
1310
  *
@@ -1504,7 +1504,7 @@ const BrandFilterView = (props) => {
1504
1504
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$7);
1505
1505
  return result;
1506
1506
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.brands) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
1507
- return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1507
+ return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1508
1508
  };
1509
1509
  /**
1510
1510
  * Brand filter definition
@@ -1564,19 +1564,19 @@ const CriticalityFiltersView = (props) => {
1564
1564
  key: assetCriticalityState.CRITICAL,
1565
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.CRITICAL })),
1567
+ prefix: (jsx(CriticalityIndicator, { state: assetCriticalityState.CRITICAL, withBackground: false, withLabel: false })),
1568
1568
  },
1569
1569
  {
1570
1570
  key: assetCriticalityState.LOW,
1571
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.LOW }),
1573
+ prefix: jsx(CriticalityIndicator, { state: assetCriticalityState.LOW, withBackground: false, withLabel: false }),
1574
1574
  },
1575
1575
  {
1576
1576
  key: assetCriticalityState.NONE,
1577
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.NONE }),
1579
+ prefix: jsx(CriticalityIndicator, { state: assetCriticalityState.NONE, withBackground: false, withLabel: false }),
1580
1580
  },
1581
1581
  ] })));
1582
1582
  };
@@ -1629,7 +1629,7 @@ const CustomerIdsFilterView = (props) => {
1629
1629
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$6);
1630
1630
  return result;
1631
1631
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.customers) === null || _b === void 0 ? void 0 : _b.summary]);
1632
- return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1632
+ return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1633
1633
  };
1634
1634
  /**
1635
1635
  *
@@ -1666,7 +1666,7 @@ const FollowedFiltersView = (props) => {
1666
1666
  });
1667
1667
  props.setValue(prev => newValue);
1668
1668
  };
1669
- return (jsxs(Fragment, { children: [jsx(FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsx(FilterBody, { limitSize: true, children: jsxs(RadioGroup, { id: "followed", value: (_a = props.value) !== null && _a !== void 0 ? _a : "ALL", className: "pl-2 pr-2", label: "", onChange: e => handleChange(e.currentTarget.value), children: [jsx(RadioItem, { label: t("filtersBar.defaultAssetFilters.followedFilter.allLabel"), value: "ALL" }), jsx(RadioItem, { label: t("filtersBar.defaultAssetFilters.followedFilter.followedOnlyLabel"), value: "FOLLOWED" })] }) })] }));
1669
+ return (jsxs(Fragment, { children: [jsx(FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsx(FilterBody, { limitSize: true, children: jsxs(RadioGroup, { className: "pl-2 pr-2", id: "followed", label: "", onChange: e => handleChange(e.currentTarget.value), value: (_a = props.value) !== null && _a !== void 0 ? _a : "ALL", children: [jsx(RadioItem, { label: t("filtersBar.defaultAssetFilters.followedFilter.allLabel"), value: "ALL" }), jsx(RadioItem, { label: t("filtersBar.defaultAssetFilters.followedFilter.followedOnlyLabel"), value: "FOLLOWED" })] }) })] }));
1670
1670
  };
1671
1671
  /**
1672
1672
  *
@@ -1722,7 +1722,7 @@ const GroupIdsFilterView = (props) => {
1722
1722
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$5);
1723
1723
  return result;
1724
1724
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.summary]);
1725
- return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1725
+ return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1726
1726
  };
1727
1727
  /**
1728
1728
  * GroupIds filter definition
@@ -1790,7 +1790,7 @@ const LastSeenFiltersView = (props) => {
1790
1790
  });
1791
1791
  props.setValue(prev => value);
1792
1792
  };
1793
- return (jsxs(Fragment, { children: [jsx(FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsx(FilterBody, { limitSize: true, children: jsxs(RadioGroup, { id: "lastSeen", value: (_a = props.value) !== null && _a !== void 0 ? _a : "ALL", className: "pl-2 pr-2", label: "", onChange: val => handleChange(val.currentTarget.value), children: [jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.anytime"), value: "ALL" }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.lastHour"), value: AssetLastSeen.LastHour }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.last24Hours"), value: AssetLastSeen.Last_24Hours }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.last7Days"), value: AssetLastSeen.Last_7Days }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.last30Days"), value: AssetLastSeen.Last_30Days }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.olderThan30Days"), value: AssetLastSeen.OlderThan_30Days })] }) })] }));
1793
+ return (jsxs(Fragment, { children: [jsx(FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsx(FilterBody, { limitSize: true, children: jsxs(RadioGroup, { className: "pl-2 pr-2", id: "lastSeen", label: "", onChange: val => handleChange(val.currentTarget.value), value: (_a = props.value) !== null && _a !== void 0 ? _a : "ALL", children: [jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.anytime"), value: "ALL" }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.lastHour"), value: AssetLastSeen.LastHour }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.last24Hours"), value: AssetLastSeen.Last_24Hours }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.last7Days"), value: AssetLastSeen.Last_7Days }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.last30Days"), value: AssetLastSeen.Last_30Days }), jsx(RadioItem, { label: t("assetFilters.lastSeenFilter.olderThan30Days"), value: AssetLastSeen.OlderThan_30Days })] }) })] }));
1794
1794
  };
1795
1795
  /**
1796
1796
  *
@@ -1938,7 +1938,7 @@ const ModelsFilterView = (props) => {
1938
1938
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$4);
1939
1939
  return result;
1940
1940
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.models) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
1941
- return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1941
+ return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1942
1942
  };
1943
1943
  /**
1944
1944
  *
@@ -1990,7 +1990,7 @@ const OwnerAccountIdsFilterView = (props) => {
1990
1990
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$3);
1991
1991
  return result;
1992
1992
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.ownerAccounts) === null || _b === void 0 ? void 0 : _b.summary]);
1993
- return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1993
+ return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1994
1994
  };
1995
1995
  /**
1996
1996
  * OwnerAccountIds filter definition
@@ -2028,7 +2028,7 @@ const PeriodFilterView = (props) => {
2028
2028
  });
2029
2029
  props.setValue(prev => value);
2030
2030
  };
2031
- return (jsxs(Fragment, { children: [jsx(FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsx(FilterBody, { limitSize: true, children: jsxs(RadioGroup, { id: "period", value: props.value || "LAST_24_HOURS", label: "", onChange: val => handleChange(val.currentTarget.value), children: [props.filterBarActions.getFilterName() !== "utilizationFilter" ? (jsx(RadioItem, { label: t("assetFilters.periodFilter.LAST_24_HOURS"), value: DayPeriod.LAST_24_HOURS })) : null, jsx(RadioItem, { label: t("assetFilters.periodFilter.LAST_7_DAYS"), value: DayPeriod.LAST_7_DAYS }), jsx(RadioItem, { label: t("assetFilters.periodFilter.LAST_30_DAYS"), value: DayPeriod.LAST_30_DAYS }), props.filterBarActions.getFilterName() === "fleetEmissionsFilter" && (jsx(RadioItem, { label: t("assetFilters.periodFilter.LIFETIME"), value: DayPeriod.LIFETIME }))] }) })] }));
2031
+ return (jsxs(Fragment, { children: [jsx(FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsx(FilterBody, { limitSize: true, children: jsxs(RadioGroup, { id: "period", label: "", onChange: val => handleChange(val.currentTarget.value), value: props.value || "LAST_24_HOURS", children: [props.filterBarActions.getFilterName() !== "utilizationFilter" ? (jsx(RadioItem, { label: t("assetFilters.periodFilter.LAST_24_HOURS"), value: DayPeriod.LAST_24_HOURS })) : null, jsx(RadioItem, { label: t("assetFilters.periodFilter.LAST_7_DAYS"), value: DayPeriod.LAST_7_DAYS }), jsx(RadioItem, { label: t("assetFilters.periodFilter.LAST_30_DAYS"), value: DayPeriod.LAST_30_DAYS }), props.filterBarActions.getFilterName() === "fleetEmissionsFilter" && (jsx(RadioItem, { label: t("assetFilters.periodFilter.LIFETIME"), value: DayPeriod.LIFETIME }))] }) })] }));
2032
2032
  };
2033
2033
  /**
2034
2034
  *
@@ -2110,7 +2110,7 @@ const ProductionYearFilterView = (_a) => {
2110
2110
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$2);
2111
2111
  return result;
2112
2112
  }, [(_c = (_b = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _b === void 0 ? void 0 : _b.productionYears) === null || _c === void 0 ? void 0 : _c.summary, t]);
2113
- return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { filterDefinition: filterDefinition, filterState: filterState, filterBarActions: filterBarActions, loading: loading, customSearch: { value: searchText, onChange: setSearchText }, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2113
+ return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, filterBarActions: filterBarActions, filterDefinition: filterDefinition, filterState: filterState, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2114
2114
  };
2115
2115
  /**
2116
2116
  * Production year filter definition
@@ -2187,7 +2187,7 @@ const SiteIdsFilterView = (props) => {
2187
2187
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$1);
2188
2188
  return result;
2189
2189
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.sites) === null || _b === void 0 ? void 0 : _b.summary]);
2190
- return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options, customSearch: { value: searchText, onChange: setSearchText }, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2190
+ return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2191
2191
  };
2192
2192
  /**
2193
2193
  *
@@ -2350,7 +2350,7 @@ const SiteTypesFilterView = (props) => {
2350
2350
  label: t(mapSiteTypeToLabelId(type.key)),
2351
2351
  }))
2352
2352
  .filter(option => option.count !== 0);
2353
- return jsx(DefaultCheckboxFilter, Object.assign({}, props, { options: siteTypeOptions, loading: loading }));
2353
+ return jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: siteTypeOptions }));
2354
2354
  };
2355
2355
  /**
2356
2356
  * SiteType filter definition
@@ -2420,7 +2420,7 @@ const TypesFilterView = (props) => {
2420
2420
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT);
2421
2421
  return result;
2422
2422
  }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.types) === null || _b === void 0 ? void 0 : _b.summary, getMachineTypeTranslation]);
2423
- return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, customSearch: { value: searchText, onChange: setSearchText }, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2423
+ return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2424
2424
  };
2425
2425
  /**
2426
2426
  * Types filter definition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/filters-asset-filter-definitions",
3
- "version": "0.0.72",
3
+ "version": "0.0.73",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {