@backstage/plugin-catalog-react 1.2.2-next.3 → 1.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`.
8
+ - 6ffa47bb0a: Cleanup and small fixes for the kind selector
9
+ - 19356df560: Updated dependency `zen-observable` to `^0.9.0`.
10
+ - c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`.
11
+ - Updated dependencies
12
+ - @backstage/core-plugin-api@1.2.0
13
+ - @backstage/catalog-client@1.2.0
14
+ - @backstage/core-components@0.12.1
15
+ - @backstage/version-bridge@1.0.3
16
+ - @backstage/plugin-permission-common@0.7.2
17
+ - @backstage/errors@1.1.4
18
+ - @backstage/plugin-permission-react@0.4.8
19
+ - @backstage/integration@1.4.1
20
+ - @backstage/types@1.0.2
21
+ - @backstage/catalog-model@1.1.4
22
+ - @backstage/theme@0.2.16
23
+ - @backstage/plugin-catalog-common@1.0.9
24
+
25
+ ## 1.2.2-next.4
26
+
27
+ ### Patch Changes
28
+
29
+ - 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`.
30
+ - Updated dependencies
31
+ - @backstage/core-components@0.12.1-next.4
32
+ - @backstage/plugin-permission-common@0.7.2-next.2
33
+ - @backstage/plugin-permission-react@0.4.8-next.3
34
+ - @backstage/catalog-client@1.2.0-next.1
35
+ - @backstage/catalog-model@1.1.4-next.1
36
+ - @backstage/core-plugin-api@1.2.0-next.2
37
+ - @backstage/errors@1.1.4-next.1
38
+ - @backstage/integration@1.4.1-next.1
39
+ - @backstage/theme@0.2.16
40
+ - @backstage/types@1.0.2-next.1
41
+ - @backstage/version-bridge@1.0.3-next.0
42
+ - @backstage/plugin-catalog-common@1.0.9-next.3
43
+
3
44
  ## 1.2.2-next.3
4
45
 
5
46
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "1.2.2-next.3",
3
+ "version": "1.2.2",
4
4
  "main": "../dist/index.esm.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
package/dist/index.esm.js CHANGED
@@ -10,7 +10,7 @@ import { getOrCreateGlobalSingleton, createVersionedContext, createVersionedValu
10
10
  import useAsync from 'react-use/lib/useAsync';
11
11
  import { compact, isEqual, groupBy, chunk } from 'lodash';
12
12
  import qs from 'qs';
13
- import { useLocation, useNavigate } from 'react-router';
13
+ import { useLocation, useNavigate } from 'react-router-dom';
14
14
  import useAsyncFn from 'react-use/lib/useAsyncFn';
15
15
  import useDebounce from 'react-use/lib/useDebounce';
16
16
  import useMountedState from 'react-use/lib/useMountedState';
@@ -989,11 +989,6 @@ const EntityLifecyclePicker = () => {
989
989
  setSelectedLifecycles(queryParamLifecycles);
990
990
  }
991
991
  }, [queryParamLifecycles]);
992
- useEffect(() => {
993
- updateFilters({
994
- lifecycles: selectedLifecycles.length ? new EntityLifecycleFilter(selectedLifecycles) : void 0
995
- });
996
- }, [selectedLifecycles, updateFilters]);
997
992
  const availableLifecycles = useMemo(
998
993
  () => [
999
994
  ...new Set(
@@ -1005,6 +1000,11 @@ const EntityLifecyclePicker = () => {
1005
1000
  ].sort(),
1006
1001
  [backendEntities]
1007
1002
  );
1003
+ useEffect(() => {
1004
+ updateFilters({
1005
+ lifecycles: selectedLifecycles.length && availableLifecycles.length ? new EntityLifecycleFilter(selectedLifecycles) : void 0
1006
+ });
1007
+ }, [selectedLifecycles, updateFilters, availableLifecycles]);
1008
1008
  if (!availableLifecycles.length)
1009
1009
  return null;
1010
1010
  return /* @__PURE__ */ React.createElement(Box, { pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(Typography, { variant: "button", component: "label" }, "Lifecycle", /* @__PURE__ */ React.createElement(
@@ -1073,11 +1073,6 @@ const EntityOwnerPicker = () => {
1073
1073
  setSelectedOwners(queryParamOwners);
1074
1074
  }
1075
1075
  }, [queryParamOwners]);
1076
- useEffect(() => {
1077
- updateFilters({
1078
- owners: selectedOwners.length ? new EntityOwnerFilter(selectedOwners) : void 0
1079
- });
1080
- }, [selectedOwners, updateFilters]);
1081
1076
  const availableOwners = useMemo(
1082
1077
  () => [
1083
1078
  ...new Set(
@@ -1090,6 +1085,11 @@ const EntityOwnerPicker = () => {
1090
1085
  ].sort(),
1091
1086
  [backendEntities]
1092
1087
  );
1088
+ useEffect(() => {
1089
+ updateFilters({
1090
+ owners: selectedOwners.length && availableOwners.length ? new EntityOwnerFilter(selectedOwners) : void 0
1091
+ });
1092
+ }, [selectedOwners, updateFilters, availableOwners]);
1093
1093
  if (!availableOwners.length)
1094
1094
  return null;
1095
1095
  return /* @__PURE__ */ React.createElement(Box, { pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(Typography, { variant: "button", component: "label" }, "Owner", /* @__PURE__ */ React.createElement(