@backstage/plugin-catalog-react 1.11.1 → 1.11.3-next.0
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 +38 -0
- package/alpha/package.json +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +19 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 1.11.3-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/core-components@0.14.4-next.0
|
|
9
|
+
- @backstage/catalog-client@1.6.3
|
|
10
|
+
- @backstage/catalog-model@1.4.5
|
|
11
|
+
- @backstage/core-plugin-api@1.9.1
|
|
12
|
+
- @backstage/errors@1.2.4
|
|
13
|
+
- @backstage/frontend-plugin-api@0.6.4-next.0
|
|
14
|
+
- @backstage/integration-react@1.1.26-next.0
|
|
15
|
+
- @backstage/types@1.1.1
|
|
16
|
+
- @backstage/version-bridge@1.0.7
|
|
17
|
+
- @backstage/plugin-catalog-common@1.0.22
|
|
18
|
+
- @backstage/plugin-permission-common@0.7.13
|
|
19
|
+
- @backstage/plugin-permission-react@0.4.21
|
|
20
|
+
|
|
21
|
+
## 1.11.2
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- e8f026a: Use ESM exports of react-use library
|
|
26
|
+
- b5cbbb6: `EntitySearchBar` and `EntityTextFilter` have been updated accordingly to persist the status as query params, following the same pattern as the other server side
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @backstage/catalog-client@1.6.3
|
|
29
|
+
- @backstage/core-components@0.14.3
|
|
30
|
+
- @backstage/frontend-plugin-api@0.6.3
|
|
31
|
+
- @backstage/integration-react@1.1.25
|
|
32
|
+
- @backstage/core-plugin-api@1.9.1
|
|
33
|
+
- @backstage/catalog-model@1.4.5
|
|
34
|
+
- @backstage/errors@1.2.4
|
|
35
|
+
- @backstage/types@1.1.1
|
|
36
|
+
- @backstage/version-bridge@1.0.7
|
|
37
|
+
- @backstage/plugin-catalog-common@1.0.22
|
|
38
|
+
- @backstage/plugin-permission-common@0.7.13
|
|
39
|
+
- @backstage/plugin-permission-react@0.4.21
|
|
40
|
+
|
|
3
41
|
## 1.11.1
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -38,6 +38,7 @@ import InfoIcon from '@material-ui/icons/Info';
|
|
|
38
38
|
import EmailIcon from '@material-ui/icons/Email';
|
|
39
39
|
import Clear from '@material-ui/icons/Clear';
|
|
40
40
|
import Search from '@material-ui/icons/Search';
|
|
41
|
+
import useDebounce$1 from 'react-use/lib/useDebounce';
|
|
41
42
|
import StarBorder from '@material-ui/icons/StarBorder';
|
|
42
43
|
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
43
44
|
import HelpOutlineIcon from '@material-ui/icons/HelpOutline';
|
|
@@ -393,6 +394,9 @@ class EntityTextFilter {
|
|
|
393
394
|
fields: ["metadata.name", "metadata.title", "spec.profile.displayName"]
|
|
394
395
|
};
|
|
395
396
|
}
|
|
397
|
+
toQueryValue() {
|
|
398
|
+
return this.value;
|
|
399
|
+
}
|
|
396
400
|
toUpperArray(value) {
|
|
397
401
|
return value.flat().filter((m) => Boolean(m)).map((m) => m.toLocaleUpperCase("en-US"));
|
|
398
402
|
}
|
|
@@ -2268,11 +2272,17 @@ const useStyles$8 = makeStyles(
|
|
|
2268
2272
|
}
|
|
2269
2273
|
);
|
|
2270
2274
|
const EntitySearchBar = () => {
|
|
2271
|
-
var _a, _b;
|
|
2272
2275
|
const classes = useStyles$8();
|
|
2273
|
-
const {
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
+
const {
|
|
2277
|
+
updateFilters,
|
|
2278
|
+
queryParameters: { text: textParameter }
|
|
2279
|
+
} = useEntityList();
|
|
2280
|
+
const queryParamTextFilter = useMemo(
|
|
2281
|
+
() => [textParameter].flat()[0],
|
|
2282
|
+
[textParameter]
|
|
2283
|
+
);
|
|
2284
|
+
const [search, setSearch] = useState(queryParamTextFilter != null ? queryParamTextFilter : "");
|
|
2285
|
+
useDebounce$1(
|
|
2276
2286
|
() => {
|
|
2277
2287
|
updateFilters({
|
|
2278
2288
|
text: search.length ? new EntityTextFilter(search) : void 0
|
|
@@ -2281,6 +2291,11 @@ const EntitySearchBar = () => {
|
|
|
2281
2291
|
250,
|
|
2282
2292
|
[search, updateFilters]
|
|
2283
2293
|
);
|
|
2294
|
+
useEffect(() => {
|
|
2295
|
+
if (queryParamTextFilter) {
|
|
2296
|
+
setSearch(queryParamTextFilter);
|
|
2297
|
+
}
|
|
2298
|
+
}, [queryParamTextFilter]);
|
|
2284
2299
|
return /* @__PURE__ */ React.createElement(Toolbar, { className: classes.searchToolbar }, /* @__PURE__ */ React.createElement(FormControl, null, /* @__PURE__ */ React.createElement(
|
|
2285
2300
|
Input,
|
|
2286
2301
|
{
|