@trackunit/filters-asset-filter-definitions 0.0.241 → 0.0.243

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
@@ -1737,7 +1737,7 @@ const GroupIdsFilterView = (props) => {
1737
1737
  },
1738
1738
  });
1739
1739
  const options = react.useMemo(() => {
1740
- var _a, _b, _c;
1740
+ var _a, _b, _c, _d, _e;
1741
1741
  const result = (_c = (_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.map(edge => {
1742
1742
  var _a, _b;
1743
1743
  return ({
@@ -1747,14 +1747,13 @@ const GroupIdsFilterView = (props) => {
1747
1747
  });
1748
1748
  })) !== null && _c !== void 0 ? _c : [];
1749
1749
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$5);
1750
- // Comment this in when we can filter by missing group
1751
- // if (data?.assetSummary?.groups?.missing && data.assetSummary.groups.missing > 0) {
1752
- // result.push({
1753
- // key: "UNDEFINED",
1754
- // count: data.assetSummary.groups.missing,
1755
- // label: "Missing group",
1756
- // });
1757
- // }
1750
+ if (((_e = (_d = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _d === void 0 ? void 0 : _d.groups) === null || _e === void 0 ? void 0 : _e.missing) && data.assetSummary.groups.missing > 0) {
1751
+ result.push({
1752
+ key: "UNDEFINED",
1753
+ count: data.assetSummary.groups.missing,
1754
+ label: "Missing group",
1755
+ });
1756
+ }
1758
1757
  return result;
1759
1758
  }, [(_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.groups]);
1760
1759
  return (jsxRuntime.jsx(filtersFilterBar.DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
package/index.esm.js CHANGED
@@ -1713,7 +1713,7 @@ const GroupIdsFilterView = (props) => {
1713
1713
  },
1714
1714
  });
1715
1715
  const options = useMemo(() => {
1716
- var _a, _b, _c;
1716
+ var _a, _b, _c, _d, _e;
1717
1717
  const result = (_c = (_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.map(edge => {
1718
1718
  var _a, _b;
1719
1719
  return ({
@@ -1723,14 +1723,13 @@ const GroupIdsFilterView = (props) => {
1723
1723
  });
1724
1724
  })) !== null && _c !== void 0 ? _c : [];
1725
1725
  setShowRequestMoreUseSearch(result.length === FETCH_LIMIT$5);
1726
- // Comment this in when we can filter by missing group
1727
- // if (data?.assetSummary?.groups?.missing && data.assetSummary.groups.missing > 0) {
1728
- // result.push({
1729
- // key: "UNDEFINED",
1730
- // count: data.assetSummary.groups.missing,
1731
- // label: "Missing group",
1732
- // });
1733
- // }
1726
+ if (((_e = (_d = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _d === void 0 ? void 0 : _d.groups) === null || _e === void 0 ? void 0 : _e.missing) && data.assetSummary.groups.missing > 0) {
1727
+ result.push({
1728
+ key: "UNDEFINED",
1729
+ count: data.assetSummary.groups.missing,
1730
+ label: "Missing group",
1731
+ });
1732
+ }
1734
1733
  return result;
1735
1734
  }, [(_a = data === null || data === void 0 ? void 0 : data.assetSummary) === null || _a === void 0 ? void 0 : _a.groups]);
1736
1735
  return (jsx(DefaultCheckboxFilter, Object.assign({}, props, { customSearch: { value: searchText, onChange: setSearchText }, loading: loading, options: options, showRequestMoreUseSearch: showRequestMoreUseSearch })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/filters-asset-filter-definitions",
3
- "version": "0.0.241",
3
+ "version": "0.0.243",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {