@trackunit/filters-asset-filter-definitions 0.0.356 → 0.0.359

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 CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var jsxRuntime = require('react/jsx-runtime');
6
4
  var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
7
5
  var client = require('@apollo/client');
@@ -1418,7 +1416,10 @@ const ActivityFiltersView = ({ filterBarActions, filterDefinition, filterState,
1418
1416
  const { data, loading } = client.useQuery(GetFleetActivitySummaryDocument, {
1419
1417
  fetchPolicy: "cache-first",
1420
1418
  variables: {
1421
- filters: Object.assign(Object.assign({}, activeFilters), { activities: null }),
1419
+ filters: {
1420
+ ...activeFilters,
1421
+ activities: null, // Omit the filters own values so list shows options correctly
1422
+ },
1422
1423
  },
1423
1424
  });
1424
1425
  const activity = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.activity;
@@ -1462,14 +1463,14 @@ const useActivityFilter = () => {
1462
1463
  group: "STATUS",
1463
1464
  title: t("fleetlist.column.activity"),
1464
1465
  valueAsText: values => values.map(value => t(mapActivityToLabelId(value))),
1465
- component: props => jsxRuntime.jsx(ActivityFiltersView, Object.assign({}, props)),
1466
+ component: props => jsxRuntime.jsx(ActivityFiltersView, { ...props }),
1466
1467
  };
1467
1468
  }, [t]);
1468
1469
  return result;
1469
1470
  };
1470
1471
 
1471
1472
  const AssetIdsFiltersView = (props) => {
1472
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsxRuntime.jsx("span", {})] }));
1473
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, { ...props.filterDefinition, ...props.filterBarActions }), jsxRuntime.jsx("span", {})] }));
1473
1474
  };
1474
1475
  /**
1475
1476
  * AssetIds filter definition
@@ -1487,7 +1488,7 @@ const useAssetIdsFilter = () => {
1487
1488
  title: t("fleetlist.column.assetIds"),
1488
1489
  showInFilterBar: () => false,
1489
1490
  showInStarredMenu: () => false,
1490
- component: props => jsxRuntime.jsx(AssetIdsFiltersView, Object.assign({}, props)),
1491
+ component: props => jsxRuntime.jsx(AssetIdsFiltersView, { ...props }),
1491
1492
  };
1492
1493
  }, [t]);
1493
1494
  return result;
@@ -1510,7 +1511,10 @@ const AssetTypesFilterView = (props) => {
1510
1511
  const { data, loading } = client.useQuery(GetFleetAssetTypesSummaryDocument, {
1511
1512
  fetchPolicy: "cache-first",
1512
1513
  variables: {
1513
- filters: Object.assign(Object.assign({}, activeFilters), { assetTypes: null }),
1514
+ filters: {
1515
+ ...activeFilters,
1516
+ assetTypes: null, // Omit the filters own values so list shows options correctly
1517
+ },
1514
1518
  },
1515
1519
  });
1516
1520
  const getCountForAssetType = react.useCallback((assetType) => {
@@ -1544,7 +1548,7 @@ const AssetTypesFilterView = (props) => {
1544
1548
  }))
1545
1549
  .filter(option => option.count !== 0 && option.count !== undefined);
1546
1550
  }, [getCountForAssetType, props.showTypes, t]);
1547
- return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options }));
1551
+ return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, loading: loading, options: options });
1548
1552
  };
1549
1553
  /**
1550
1554
  * AssetType filter definition
@@ -1561,7 +1565,7 @@ const useAssetTypeFilter = ({ showTypes } = { showTypes: ALL_TYPES }) => {
1561
1565
  group: "METADATA",
1562
1566
  title: t("fleetlist.column.assetType"),
1563
1567
  valueAsText: values => values.map(value => t(`assetFilters.assetType.${value}`)),
1564
- component: props => jsxRuntime.jsx(AssetTypesFilterView, Object.assign({ showTypes: showTypes }, props)),
1568
+ component: props => jsxRuntime.jsx(AssetTypesFilterView, { showTypes: showTypes, ...props }),
1565
1569
  };
1566
1570
  }, [showTypes, t]);
1567
1571
  return result;
@@ -1569,7 +1573,7 @@ const useAssetTypeFilter = ({ showTypes } = { showTypes: ALL_TYPES }) => {
1569
1573
 
1570
1574
  const BoundingBoxView = (props) => {
1571
1575
  const [t] = useTranslation();
1572
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions)), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: `${t("assetFilters.boundingBoxFilter.value")}` })] }));
1576
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, { ...props.filterDefinition, ...props.filterBarActions }), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: `${t("assetFilters.boundingBoxFilter.value")}` })] }));
1573
1577
  };
1574
1578
  /**
1575
1579
  * BoundingBox filter definition
@@ -1591,7 +1595,7 @@ const useBoundingBoxFilter = ({ showInFilterBar } = {
1591
1595
  valueAsText: values => {
1592
1596
  return t("assetFilters.boundingBoxFilter.value");
1593
1597
  },
1594
- component: props => jsxRuntime.jsx(BoundingBoxView, Object.assign({}, props)),
1598
+ component: props => jsxRuntime.jsx(BoundingBoxView, { ...props }),
1595
1599
  };
1596
1600
  }, [showInFilterBar, t]);
1597
1601
  return result;
@@ -1610,7 +1614,10 @@ const BrandFilterView = (props) => {
1610
1614
  variables: {
1611
1615
  limit: FETCH_LIMIT$7,
1612
1616
  search: debouncedSearch.trim(),
1613
- filters: Object.assign(Object.assign({}, activeFilters), { brands: null }),
1617
+ filters: {
1618
+ ...activeFilters,
1619
+ brands: null, // Omit the filters own values so list shows options correctly
1620
+ },
1614
1621
  },
1615
1622
  });
1616
1623
  const options = react.useMemo(() => {
@@ -1623,7 +1630,7 @@ const BrandFilterView = (props) => {
1623
1630
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$7);
1624
1631
  return result;
1625
1632
  }, [(_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]);
1626
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1633
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
1627
1634
  };
1628
1635
  /**
1629
1636
  * Brand filter definition
@@ -1643,7 +1650,7 @@ const useBrandFilter = () => {
1643
1650
  valueAsText(value) {
1644
1651
  return value.map(v => getMachineTypeTranslation(v));
1645
1652
  },
1646
- component: props => jsxRuntime.jsx(BrandFilterView, Object.assign({}, props)),
1653
+ component: props => jsxRuntime.jsx(BrandFilterView, { ...props }),
1647
1654
  };
1648
1655
  }, [t, getMachineTypeTranslation]);
1649
1656
  return result;
@@ -1674,11 +1681,14 @@ const CriticalityFiltersView = (props) => {
1674
1681
  const { data, loading } = client.useQuery(GetFleetCriticalitySummaryDocument, {
1675
1682
  fetchPolicy: "cache-first",
1676
1683
  variables: {
1677
- filters: Object.assign(Object.assign({}, activeFilters), { criticalities: null }),
1684
+ filters: {
1685
+ ...activeFilters,
1686
+ criticalities: null, // Omit the filters own values so list shows options correctly
1687
+ },
1678
1688
  },
1679
1689
  });
1680
1690
  const criticality = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.criticality;
1681
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: [
1691
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, loading: loading, options: [
1682
1692
  {
1683
1693
  key: assetCriticalityState.CRITICAL,
1684
1694
  label: t(mapCriticalityToLabelId(assetCriticalityState.CRITICAL)),
@@ -1697,7 +1707,7 @@ const CriticalityFiltersView = (props) => {
1697
1707
  count: criticality === null || criticality === void 0 ? void 0 : criticality.good,
1698
1708
  prefix: jsxRuntime.jsx(criticalityIndicator.CriticalityIndicator, { state: assetCriticalityState.NONE, withBackground: false, withLabel: false }),
1699
1709
  },
1700
- ] })));
1710
+ ] }));
1701
1711
  };
1702
1712
  /**
1703
1713
  * Criticality filter definition
@@ -1714,7 +1724,7 @@ const useCriticalityFilter = () => {
1714
1724
  group: "STATUS",
1715
1725
  title: t("fleetlist.column.attention"),
1716
1726
  valueAsText: values => values.map(value => t(mapCriticalityToLabelId(value))),
1717
- component: props => jsxRuntime.jsx(CriticalityFiltersView, Object.assign({}, props)),
1727
+ component: props => jsxRuntime.jsx(CriticalityFiltersView, { ...props }),
1718
1728
  };
1719
1729
  }, [t]);
1720
1730
  return result;
@@ -1732,7 +1742,10 @@ const CustomerIdsFilterView = (props) => {
1732
1742
  variables: {
1733
1743
  limit: FETCH_LIMIT$6,
1734
1744
  search: debouncedSearch,
1735
- filters: Object.assign(Object.assign({}, activeFilters), { customerIds: null }),
1745
+ filters: {
1746
+ ...activeFilters,
1747
+ customerIds: null, // Omit the filters own values so list shows options correctly
1748
+ },
1736
1749
  },
1737
1750
  });
1738
1751
  const options = react.useMemo(() => {
@@ -1748,7 +1761,7 @@ const CustomerIdsFilterView = (props) => {
1748
1761
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$6);
1749
1762
  return result;
1750
1763
  }, [(_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]);
1751
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1764
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
1752
1765
  };
1753
1766
  /**
1754
1767
  *
@@ -1768,7 +1781,7 @@ const useCustomerIdsFilter = ({ showInStarredMenu, showInFilterBar, defaultValue
1768
1781
  title: t("fleetlist.column.customerIds"),
1769
1782
  showInStarredMenu,
1770
1783
  showInFilterBar,
1771
- component: props => jsxRuntime.jsx(CustomerIdsFilterView, Object.assign({}, props)),
1784
+ component: props => jsxRuntime.jsx(CustomerIdsFilterView, { ...props }),
1772
1785
  };
1773
1786
  }, [showInFilterBar, showInStarredMenu, defaultValue, t]);
1774
1787
  return result;
@@ -1785,7 +1798,7 @@ const FollowedFiltersView = (props) => {
1785
1798
  });
1786
1799
  props.setValue(prev => newValue);
1787
1800
  };
1788
- 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" })] }) })] }));
1801
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, { ...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" })] }) })] }));
1789
1802
  };
1790
1803
  /**
1791
1804
  *
@@ -1807,7 +1820,7 @@ const useFollowedFilter = () => {
1807
1820
  }
1808
1821
  },
1809
1822
  defaultValue: "ALL",
1810
- component: props => jsxRuntime.jsx(FollowedFiltersView, Object.assign({}, props)),
1823
+ component: props => jsxRuntime.jsx(FollowedFiltersView, { ...props }),
1811
1824
  };
1812
1825
  }, [t]);
1813
1826
  return result;
@@ -1825,7 +1838,10 @@ const GroupIdsFilterView = (props) => {
1825
1838
  variables: {
1826
1839
  limit: FETCH_LIMIT$5,
1827
1840
  search: debouncedSearch,
1828
- filters: Object.assign(Object.assign({}, activeFilters), { groups: null }),
1841
+ filters: {
1842
+ ...activeFilters,
1843
+ groups: null, // Omit the filters own values so list shows options correctly
1844
+ },
1829
1845
  },
1830
1846
  });
1831
1847
  const options = react.useMemo(() => {
@@ -1848,7 +1864,7 @@ const GroupIdsFilterView = (props) => {
1848
1864
  }
1849
1865
  return result;
1850
1866
  }, [(_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.groups]);
1851
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
1867
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
1852
1868
  };
1853
1869
  /**
1854
1870
  * GroupIds filter definition
@@ -1864,17 +1880,17 @@ const useGroupIdsFilter = () => {
1864
1880
  default: true,
1865
1881
  group: "OTHER",
1866
1882
  title: t("fleetlist.column.groupIds"),
1867
- component: props => jsxRuntime.jsx(GroupIdsFilterView, Object.assign({}, props)),
1883
+ component: props => jsxRuntime.jsx(GroupIdsFilterView, { ...props }),
1868
1884
  };
1869
1885
  }, [t]);
1870
1886
  return result;
1871
1887
  };
1872
1888
 
1873
1889
  const HourIntervalFilterView = (props) => {
1874
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { options: ["N/A", ...sharedUtils.hourIntervals].map(interval => ({
1890
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, options: ["N/A", ...sharedUtils.hourIntervals].map(interval => ({
1875
1891
  key: interval,
1876
1892
  label: interval,
1877
- })) })));
1893
+ })) }));
1878
1894
  };
1879
1895
  /**
1880
1896
  * HourInterval filter definition
@@ -1890,7 +1906,7 @@ const useHourIntervalFilter = () => {
1890
1906
  default: true,
1891
1907
  group: "OTHER",
1892
1908
  title: t("assetFilters.hourIntervalFilter.label"),
1893
- component: props => jsxRuntime.jsx(HourIntervalFilterView, Object.assign({}, props)),
1909
+ component: props => jsxRuntime.jsx(HourIntervalFilterView, { ...props }),
1894
1910
  };
1895
1911
  }, [t]);
1896
1912
  return result;
@@ -1916,7 +1932,7 @@ const LastSeenFiltersView = (props) => {
1916
1932
  });
1917
1933
  props.setValue(prev => value);
1918
1934
  };
1919
- 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 })] }) })] }));
1935
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, { ...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 })] }) })] }));
1920
1936
  };
1921
1937
  /**
1922
1938
  *
@@ -1951,7 +1967,7 @@ const useLastSeenFilter = () => {
1951
1967
  }
1952
1968
  },
1953
1969
  defaultValue: "ALL",
1954
- component: props => jsxRuntime.jsx(LastSeenFiltersView, Object.assign({}, props)),
1970
+ component: props => jsxRuntime.jsx(LastSeenFiltersView, { ...props }),
1955
1971
  };
1956
1972
  }, [t]);
1957
1973
  return result;
@@ -1985,7 +2001,10 @@ const MetadataCompletenessFilterView = (props) => {
1985
2001
  const activeFilters = filtersGraphqlHook.useActiveAssetFilters(props.filterState.values);
1986
2002
  const { data, loading } = client.useQuery(GetMetadataCompletenessSummaryDocument, {
1987
2003
  variables: {
1988
- filters: Object.assign(Object.assign({}, activeFilters), { metadataCompleteness: null }),
2004
+ filters: {
2005
+ ...activeFilters,
2006
+ metadataCompleteness: null, // Omit the filters own values so list shows options correctly
2007
+ },
1989
2008
  },
1990
2009
  });
1991
2010
  const getCountForMetadataCompleteness = react.useCallback((type) => {
@@ -2012,7 +2031,7 @@ const MetadataCompletenessFilterView = (props) => {
2012
2031
  });
2013
2032
  });
2014
2033
  }, [getCountForMetadataCompleteness, t]);
2015
- return jsxRuntime.jsx(filtersFilterBar.DefaultRadioFilter, Object.assign({}, props, { loading: loading, options: options }));
2034
+ return jsxRuntime.jsx(filtersFilterBar.DefaultRadioFilter, { ...props, loading: loading, options: options });
2016
2035
  };
2017
2036
  /**
2018
2037
  * MetadataCompleteness filter definition
@@ -2032,7 +2051,7 @@ const useMetadataCompletenessFilter = ({ isDefault } = {}) => {
2032
2051
  default: isDefault,
2033
2052
  defaultValue: [{ value: "ALL", name: t(mapMetadataCompletenessToLabelId("ALL")) }],
2034
2053
  title: t("fleetlist.column.metadataCompleteness"),
2035
- component: props => jsxRuntime.jsx(MetadataCompletenessFilterView, Object.assign({}, props)),
2054
+ component: props => jsxRuntime.jsx(MetadataCompletenessFilterView, { ...props }),
2036
2055
  };
2037
2056
  }, [isDefault, t]);
2038
2057
  return result;
@@ -2051,7 +2070,10 @@ const ModelsFilterView = (props) => {
2051
2070
  variables: {
2052
2071
  limit: FETCH_LIMIT$4,
2053
2072
  search: debouncedSearch,
2054
- filters: Object.assign(Object.assign({}, activeFilters), { models: null }),
2073
+ filters: {
2074
+ ...activeFilters,
2075
+ models: null, // Omit the filters own values so list shows options correctly
2076
+ },
2055
2077
  },
2056
2078
  });
2057
2079
  const options = react.useMemo(() => {
@@ -2064,7 +2086,7 @@ const ModelsFilterView = (props) => {
2064
2086
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$4);
2065
2087
  return result;
2066
2088
  }, [(_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]);
2067
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2089
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
2068
2090
  };
2069
2091
  /**
2070
2092
  *
@@ -2082,7 +2104,7 @@ const useModelsFilter = () => {
2082
2104
  valueAsText(value) {
2083
2105
  return value.map(v => getMachineTypeTranslation(v));
2084
2106
  },
2085
- component: props => jsxRuntime.jsx(ModelsFilterView, Object.assign({}, props)),
2107
+ component: props => jsxRuntime.jsx(ModelsFilterView, { ...props }),
2086
2108
  };
2087
2109
  }, [t, getMachineTypeTranslation]);
2088
2110
  return result;
@@ -2100,7 +2122,10 @@ const OwnerAccountIdsFilterView = (props) => {
2100
2122
  variables: {
2101
2123
  limit: FETCH_LIMIT$3,
2102
2124
  search: debouncedSearch,
2103
- filters: Object.assign(Object.assign({}, activeFilters), { ownerAccountIds: null }),
2125
+ filters: {
2126
+ ...activeFilters,
2127
+ ownerAccountIds: null, // Omit the filters own values so list shows options correctly
2128
+ },
2104
2129
  },
2105
2130
  });
2106
2131
  const options = react.useMemo(() => {
@@ -2116,7 +2141,7 @@ const OwnerAccountIdsFilterView = (props) => {
2116
2141
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$3);
2117
2142
  return result;
2118
2143
  }, [(_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]);
2119
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2144
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
2120
2145
  };
2121
2146
  /**
2122
2147
  * OwnerAccountIds filter definition
@@ -2131,7 +2156,7 @@ const useOwnerAccountIdsFilter = () => {
2131
2156
  type: "valueName",
2132
2157
  group: "OTHER",
2133
2158
  title: t("assetFilters.ownerAccountNameFilter.label"),
2134
- component: props => jsxRuntime.jsx(OwnerAccountIdsFilterView, Object.assign({}, props)),
2159
+ component: props => jsxRuntime.jsx(OwnerAccountIdsFilterView, { ...props }),
2135
2160
  };
2136
2161
  }, [t]);
2137
2162
  return result;
@@ -2154,7 +2179,7 @@ const PeriodFilterView = (props) => {
2154
2179
  });
2155
2180
  props.setValue(prev => value);
2156
2181
  };
2157
- 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 }))] }) })] }));
2182
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, { ...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 }))] }) })] }));
2158
2183
  };
2159
2184
  /**
2160
2185
  *
@@ -2180,48 +2205,15 @@ const usePeriodFilter = () => {
2180
2205
  }
2181
2206
  },
2182
2207
  defaultValue: exports.DayPeriod.LAST_7_DAYS,
2183
- component: props => jsxRuntime.jsx(PeriodFilterView, Object.assign({}, props)),
2208
+ component: props => jsxRuntime.jsx(PeriodFilterView, { ...props }),
2184
2209
  };
2185
2210
  }, [t]);
2186
2211
  return result;
2187
2212
  };
2188
2213
 
2189
- /******************************************************************************
2190
- Copyright (c) Microsoft Corporation.
2191
-
2192
- Permission to use, copy, modify, and/or distribute this software for any
2193
- purpose with or without fee is hereby granted.
2194
-
2195
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2196
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2197
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2198
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2199
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2200
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2201
- PERFORMANCE OF THIS SOFTWARE.
2202
- ***************************************************************************** */
2203
-
2204
- function __rest(s, e) {
2205
- var t = {};
2206
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2207
- t[p] = s[p];
2208
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
2209
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2210
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2211
- t[p[i]] = s[p[i]];
2212
- }
2213
- return t;
2214
- }
2215
-
2216
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2217
- var e = new Error(message);
2218
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2219
- };
2220
-
2221
2214
  const FETCH_LIMIT$2 = 1000;
2222
- const ProductionYearFilterView = (_a) => {
2223
- var _b, _c;
2224
- var { filterDefinition, filterState, filterBarActions } = _a, props = __rest(_a, ["filterDefinition", "filterState", "filterBarActions"]);
2215
+ const ProductionYearFilterView = ({ filterDefinition, filterState, filterBarActions, ...props }) => {
2216
+ var _a, _b;
2225
2217
  const [t] = useTranslation();
2226
2218
  const activeFilters = filtersGraphqlHook.useActiveAssetFilters(filterState.values);
2227
2219
  const [showRequestMoreUseSearch, setShowRequestMoreUseSearch] = react.useState(false);
@@ -2231,17 +2223,23 @@ const ProductionYearFilterView = (_a) => {
2231
2223
  variables: {
2232
2224
  limit: FETCH_LIMIT$2,
2233
2225
  search: debouncedSearch,
2234
- filters: Object.assign(Object.assign({}, activeFilters), { productionYears: null }),
2226
+ filters: {
2227
+ ...activeFilters,
2228
+ productionYears: null, // Omit the filters own values so list shows options correctly
2229
+ },
2235
2230
  },
2236
2231
  fetchPolicy: "cache-first",
2237
2232
  });
2238
2233
  const options = react.useMemo(() => {
2239
2234
  var _a, _b, _c;
2240
- const result = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.productionYears) === null || _b === void 0 ? void 0 : _b.summary.map(productionYear => (Object.assign(Object.assign({}, productionYear), { label: productionYear.key.toUpperCase() === "UNDEFINED" ? t(`machine.types.Unknown`) : productionYear.key })))) !== null && _c !== void 0 ? _c : [];
2235
+ const result = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.productionYears) === null || _b === void 0 ? void 0 : _b.summary.map(productionYear => ({
2236
+ ...productionYear,
2237
+ label: productionYear.key.toUpperCase() === "UNDEFINED" ? t(`machine.types.Unknown`) : productionYear.key,
2238
+ }))) !== null && _c !== void 0 ? _c : [];
2241
2239
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$2);
2242
2240
  return result;
2243
- }, [(_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]);
2244
- 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 })));
2241
+ }, [(_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.productionYears) === null || _b === void 0 ? void 0 : _b.summary, t]);
2242
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, filterBarActions: filterBarActions, filterDefinition: filterDefinition, filterState: filterState, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
2245
2243
  };
2246
2244
  /**
2247
2245
  * Production year filter definition
@@ -2257,7 +2255,7 @@ const useProductionYearFilter = () => {
2257
2255
  default: true,
2258
2256
  group: "METADATA",
2259
2257
  title: t("assetFilters.productionYear.label"),
2260
- component: props => jsxRuntime.jsx(ProductionYearFilterView, Object.assign({}, props)),
2258
+ component: props => jsxRuntime.jsx(ProductionYearFilterView, { ...props }),
2261
2259
  };
2262
2260
  }, [t]);
2263
2261
  return result;
@@ -2266,9 +2264,9 @@ const useProductionYearFilter = () => {
2266
2264
  const SearchFiltersView = (props) => {
2267
2265
  const { location: { pathname }, } = reactRouter.useRouterState();
2268
2266
  const navigate = reactRouter.useNavigate();
2269
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions, { onResetFilter: () => {
2267
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, { ...props.filterDefinition, ...props.filterBarActions, onResetFilter: () => {
2270
2268
  navigate({ to: pathname, replace: true });
2271
- } })), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: props.value })] }));
2269
+ } }), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: props.value })] }));
2272
2270
  };
2273
2271
  /**
2274
2272
  * Search filter definition
@@ -2284,7 +2282,7 @@ const useSearchFilter = () => {
2284
2282
  group: "OTHER",
2285
2283
  title: t("assetFilters.searchFilter.label"),
2286
2284
  showInStarredMenu: () => false,
2287
- component: props => jsxRuntime.jsx(SearchFiltersView, Object.assign({}, props)),
2285
+ component: props => jsxRuntime.jsx(SearchFiltersView, { ...props }),
2288
2286
  };
2289
2287
  }, [t]);
2290
2288
  return result;
@@ -2331,7 +2329,10 @@ const ServicePanStatusesFiltersView = (props) => {
2331
2329
  },
2332
2330
  fetchPolicy: "cache-first",
2333
2331
  variables: {
2334
- filters: Object.assign(Object.assign({}, activeFilters), { servicePlanStatuses: null }),
2332
+ filters: {
2333
+ ...activeFilters,
2334
+ servicePlanStatuses: null, // Omit the filters own values so list shows options correctly
2335
+ },
2335
2336
  },
2336
2337
  });
2337
2338
  const servicePlanStatusData = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.servicePlanStatuses;
@@ -2356,7 +2357,7 @@ const ServicePanStatusesFiltersView = (props) => {
2356
2357
  }))
2357
2358
  .filter(option => option.count !== 0 && option.count !== undefined);
2358
2359
  }, [getCountForAssetType, props.servicePlanStatusToShow, t]);
2359
- return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: options }));
2360
+ return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, loading: loading, options: options });
2360
2361
  };
2361
2362
  /**
2362
2363
  * Serive plan status filter definition
@@ -2375,7 +2376,7 @@ const useServicePlanStatusFilter = ({ showInStarredMenu, showInFilterBar, servic
2375
2376
  showInStarredMenu,
2376
2377
  showInFilterBar,
2377
2378
  valueAsText: values => values.map(value => t(mapServicePlansStatusToLabelId(value))),
2378
- component: props => (jsxRuntime.jsx(ServicePanStatusesFiltersView, Object.assign({ servicePlanStatusToShow: servicePlanStatusToShow }, props))),
2379
+ component: props => (jsxRuntime.jsx(ServicePanStatusesFiltersView, { servicePlanStatusToShow: servicePlanStatusToShow, ...props })),
2379
2380
  };
2380
2381
  }, [servicePlanStatusToShow, showInFilterBar, showInStarredMenu, t]);
2381
2382
  return result;
@@ -2393,7 +2394,10 @@ const SiteIdsFilterView = (props) => {
2393
2394
  variables: {
2394
2395
  limit: FETCH_LIMIT$1,
2395
2396
  search: debouncedSearch,
2396
- filters: Object.assign(Object.assign({}, activeFilters), { siteIds: null }),
2397
+ filters: {
2398
+ ...activeFilters,
2399
+ siteIds: null, // Omit the filters own values so list shows options correctly
2400
+ },
2397
2401
  },
2398
2402
  });
2399
2403
  const options = react.useMemo(() => {
@@ -2409,7 +2413,7 @@ const SiteIdsFilterView = (props) => {
2409
2413
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$1);
2410
2414
  return result;
2411
2415
  }, [(_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]);
2412
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2416
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
2413
2417
  };
2414
2418
  /**
2415
2419
  *
@@ -2429,7 +2433,7 @@ const useSiteIdsFilter = ({ showInStarredMenu, showInFilterBar, defaultValue } =
2429
2433
  title: t("fleetlist.column.siteIds"),
2430
2434
  showInStarredMenu,
2431
2435
  showInFilterBar,
2432
- component: props => jsxRuntime.jsx(SiteIdsFilterView, Object.assign({}, props)),
2436
+ component: props => jsxRuntime.jsx(SiteIdsFilterView, { ...props }),
2433
2437
  };
2434
2438
  }, [showInFilterBar, showInStarredMenu, defaultValue, t]);
2435
2439
  return result;
@@ -2446,10 +2450,10 @@ exports.SiteStatus = void 0;
2446
2450
  const SiteStatusFilterView = (props) => {
2447
2451
  const [t] = useTranslation();
2448
2452
  const shownStatus = [exports.SiteStatus.Active, exports.SiteStatus.Planned, exports.SiteStatus.Finished, exports.SiteStatus.Archived];
2449
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { options: shownStatus.map(value => ({
2453
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, options: shownStatus.map(value => ({
2450
2454
  key: value,
2451
2455
  label: t(mapSiteStatusToLabelId(value)),
2452
- })) })));
2456
+ })) }));
2453
2457
  };
2454
2458
  const mapSiteStatusToLabelId = (status) => {
2455
2459
  switch (status) {
@@ -2484,7 +2488,7 @@ const useSiteStatusFilter = ({ showInStarredMenu, showInFilterBar } = {
2484
2488
  showInFilterBar,
2485
2489
  valueAsText: values => values.map(value => t(mapSiteStatusToLabelId(value))),
2486
2490
  defaultValue: defaultValue,
2487
- component: props => jsxRuntime.jsx(SiteStatusFilterView, Object.assign({}, props)),
2491
+ component: props => jsxRuntime.jsx(SiteStatusFilterView, { ...props }),
2488
2492
  };
2489
2493
  }, [showInFilterBar, showInStarredMenu, t]);
2490
2494
  return result;
@@ -2545,7 +2549,11 @@ const SiteTypesFilterView = (props) => {
2545
2549
  const { data, loading } = client.useQuery(GetFleetSiteTypeSummaryDocument, {
2546
2550
  fetchPolicy: "cache-first",
2547
2551
  variables: {
2548
- filters: Object.assign(Object.assign({}, assetQueryVariables.filters), { siteTypes: null }),
2552
+ filters: {
2553
+ ...assetQueryVariables.filters,
2554
+ siteTypes: null, // Omit the filters own values so list shows options correctly
2555
+ // There is default backend filtering for siteStatus equals [Planned, Active, Finished]
2556
+ },
2549
2557
  },
2550
2558
  });
2551
2559
  const siteTypeData = react.useMemo(() => {
@@ -2572,7 +2580,7 @@ const SiteTypesFilterView = (props) => {
2572
2580
  label: t(mapSiteTypeToLabelId(type.key)),
2573
2581
  }))
2574
2582
  .filter(option => option.count !== 0);
2575
- return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { loading: loading, options: siteTypeOptions }));
2583
+ return jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, loading: loading, options: siteTypeOptions });
2576
2584
  };
2577
2585
  /**
2578
2586
  * SiteType filter definition
@@ -2596,7 +2604,7 @@ const useSiteTypeFilter = ({ showInStarredMenu, showInFilterBar } = {
2596
2604
  showInStarredMenu: showInStarredMenu,
2597
2605
  showInFilterBar: showInFilterBar,
2598
2606
  valueAsText: values => values.map(value => t(mapSiteTypeToLabelId(value))),
2599
- component: props => jsxRuntime.jsx(SiteTypesFilterView, Object.assign({}, props)),
2607
+ component: props => jsxRuntime.jsx(SiteTypesFilterView, { ...props }),
2600
2608
  };
2601
2609
  }, [showInFilterBar, showInStarredMenu, t]);
2602
2610
  return result;
@@ -2624,7 +2632,10 @@ const TelematicsConnectedFiltersView = (props) => {
2624
2632
  const { data, loading } = client.useQuery(GetAssetTelematicsDeviceConnectionSummaryDocument, {
2625
2633
  fetchPolicy: "cache-first",
2626
2634
  variables: {
2627
- filters: Object.assign(Object.assign({}, activeFilters), { telematicsDeviceIsConnected: null }),
2635
+ filters: {
2636
+ ...activeFilters,
2637
+ telematicsDeviceIsConnected: null, // Omit the filters own values so list shows options correctly
2638
+ },
2628
2639
  },
2629
2640
  });
2630
2641
  const summaries = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.assetTelematicsDeviceConnected) === null || _b === void 0 ? void 0 : _b.summary) !== null && _c !== void 0 ? _c : [];
@@ -2640,7 +2651,7 @@ const TelematicsConnectedFiltersView = (props) => {
2640
2651
  return newValue === "true" ? { booleanValue: true } : { booleanValue: false };
2641
2652
  });
2642
2653
  };
2643
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, props.filterDefinition, props.filterBarActions, { loading: loading })), 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: props.value ? props.value.booleanValue + "" : "", children: [jsxRuntime.jsx(reactFilterComponents.RadioFilterItem, { itemCount: (_d = summaries.find(item => item.key === "numberOfAssetsConnectedWithTelematicsDevice")) === null || _d === void 0 ? void 0 : _d.count, label: t("filtersBar.defaultAssetFilters.telematicsConnectedFilter.connected"), value: "true" }), jsxRuntime.jsx(reactFilterComponents.RadioFilterItem, { itemCount: (_e = summaries.find(item => item.key === "numberOfAssetsNotConnectedWithTelematicsDevice")) === null || _e === void 0 ? void 0 : _e.count, label: t("filtersBar.defaultAssetFilters.telematicsConnectedFilter.notConnected"), value: "false" })] }) })] }));
2654
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, { ...props.filterDefinition, ...props.filterBarActions, loading: loading }), 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: props.value ? props.value.booleanValue + "" : "", children: [jsxRuntime.jsx(reactFilterComponents.RadioFilterItem, { itemCount: (_d = summaries.find(item => item.key === "numberOfAssetsConnectedWithTelematicsDevice")) === null || _d === void 0 ? void 0 : _d.count, label: t("filtersBar.defaultAssetFilters.telematicsConnectedFilter.connected"), value: "true" }), jsxRuntime.jsx(reactFilterComponents.RadioFilterItem, { itemCount: (_e = summaries.find(item => item.key === "numberOfAssetsNotConnectedWithTelematicsDevice")) === null || _e === void 0 ? void 0 : _e.count, label: t("filtersBar.defaultAssetFilters.telematicsConnectedFilter.notConnected"), value: "false" })] }) })] }));
2644
2655
  };
2645
2656
  /**
2646
2657
  *
@@ -2661,7 +2672,7 @@ const useTelematicsConnectedFilter = () => {
2661
2672
  return t("filtersBar.defaultAssetFilters.telematicsConnectedFilter.notConnected");
2662
2673
  }
2663
2674
  },
2664
- component: props => jsxRuntime.jsx(TelematicsConnectedFiltersView, Object.assign({}, props)),
2675
+ component: props => jsxRuntime.jsx(TelematicsConnectedFiltersView, { ...props }),
2665
2676
  };
2666
2677
  }, [t]);
2667
2678
  return result;
@@ -2680,7 +2691,10 @@ const TypesFilterView = (props) => {
2680
2691
  variables: {
2681
2692
  limit: FETCH_LIMIT,
2682
2693
  search: debouncedSearch,
2683
- filters: Object.assign(Object.assign({}, activeFilters), { types: null }),
2694
+ filters: {
2695
+ ...activeFilters,
2696
+ types: null, // Omit the filters own values so list shows options correctly
2697
+ },
2684
2698
  },
2685
2699
  });
2686
2700
  const options = react.useMemo(() => {
@@ -2693,7 +2707,7 @@ const TypesFilterView = (props) => {
2693
2707
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT);
2694
2708
  return result;
2695
2709
  }, [(_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]);
2696
- return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
2710
+ return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, { ...props, customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch }));
2697
2711
  };
2698
2712
  /**
2699
2713
  * Types filter definition
@@ -2711,14 +2725,14 @@ const useTypesFilter = () => {
2711
2725
  group: "METADATA",
2712
2726
  title: t("fleetlist.column.type"),
2713
2727
  valueAsText: values => values.map(value => getMachineTypeTranslation(value)),
2714
- component: props => jsxRuntime.jsx(TypesFilterView, Object.assign({}, props)),
2728
+ component: props => jsxRuntime.jsx(TypesFilterView, { ...props }),
2715
2729
  };
2716
2730
  }, [getMachineTypeTranslation, t]);
2717
2731
  return result;
2718
2732
  };
2719
2733
 
2720
2734
  const PartnerFilterView = ({ filterDefinition, value, filterBarActions }) => {
2721
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, Object.assign({}, filterDefinition, filterBarActions)), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: value === null || value === void 0 ? void 0 : value.map(vn => vn.name).join(",") })] }));
2735
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(filtersFilterBar.FilterHeader, { ...filterDefinition, ...filterBarActions }), jsxRuntime.jsx(reactFilterComponents.FilterBody, { limitSize: true, children: value === null || value === void 0 ? void 0 : value.map(vn => vn.name).join(",") })] }));
2722
2736
  };
2723
2737
  /**
2724
2738
  * Partner filter definition
@@ -2734,7 +2748,7 @@ const usePartnerFilter = () => {
2734
2748
  group: "OTHER",
2735
2749
  title: t("assetFilters.partnerFilter.label"),
2736
2750
  showInStarredMenu: () => false,
2737
- component: props => jsxRuntime.jsx(PartnerFilterView, Object.assign({}, props)),
2751
+ component: props => jsxRuntime.jsx(PartnerFilterView, { ...props }),
2738
2752
  };
2739
2753
  }, [t]);
2740
2754
  return result;
@@ -2855,8 +2869,16 @@ const useSetFilterStateFromUrl = ({ setters, setCustomerIds }) => {
2855
2869
  navigate({
2856
2870
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2857
2871
  search: (prev) => {
2858
- const searchWithFilters = Object.assign(Object.assign({}, prev), { q: undefined, groups: undefined, criticalities: undefined, boundingBox: undefined, serviceStatus: undefined, customerIds: undefined });
2859
- return Object.assign(Object.assign({}, prev), searchWithFilters);
2872
+ const searchWithFilters = {
2873
+ ...prev,
2874
+ q: undefined,
2875
+ groups: undefined,
2876
+ criticalities: undefined,
2877
+ boundingBox: undefined,
2878
+ serviceStatus: undefined,
2879
+ customerIds: undefined,
2880
+ };
2881
+ return { ...prev, ...searchWithFilters };
2860
2882
  },
2861
2883
  replace: true,
2862
2884
  params: {},