@backstage/plugin-catalog-react 0.6.0 → 0.6.4
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 +49 -0
- package/dist/index.cjs.js +14 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +35 -3
- package/dist/index.esm.js +13 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 0.6.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a125278b81: Refactor out the deprecated path and icon from RouteRefs
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-client@0.5.2
|
|
10
|
+
- @backstage/catalog-model@0.9.7
|
|
11
|
+
- @backstage/core-components@0.7.4
|
|
12
|
+
- @backstage/core-plugin-api@0.2.0
|
|
13
|
+
- @backstage/core-app-api@0.1.21
|
|
14
|
+
|
|
15
|
+
## 0.6.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 03b47a476d: export `loadIdentityOwnerRefs` and `loadCatalogOwnerRefs` all the way
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @backstage/core-components@0.7.3
|
|
22
|
+
- @backstage/catalog-client@0.5.1
|
|
23
|
+
- @backstage/core-plugin-api@0.1.13
|
|
24
|
+
- @backstage/core-app-api@0.1.20
|
|
25
|
+
|
|
26
|
+
## 0.6.2
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- f9cc2509f8: EntityTypePicker can be hidden and have an initial filter value set, similar to EntityKindPicker
|
|
31
|
+
- 10615525f3: Switch to use the json and observable types from `@backstage/types`
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
- @backstage/errors@0.1.4
|
|
34
|
+
- @backstage/integration@0.6.9
|
|
35
|
+
- @backstage/core-components@0.7.2
|
|
36
|
+
- @backstage/catalog-model@0.9.6
|
|
37
|
+
- @backstage/core-app-api@0.1.19
|
|
38
|
+
- @backstage/core-plugin-api@0.1.12
|
|
39
|
+
|
|
40
|
+
## 0.6.1
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- 36e67d2f24: Internal updates to apply more strict checks to throw errors.
|
|
45
|
+
- Updated dependencies
|
|
46
|
+
- @backstage/core-components@0.7.1
|
|
47
|
+
- @backstage/errors@0.1.3
|
|
48
|
+
- @backstage/core-app-api@0.1.18
|
|
49
|
+
- @backstage/core-plugin-api@0.1.11
|
|
50
|
+
- @backstage/catalog-model@0.9.5
|
|
51
|
+
|
|
3
52
|
## 0.6.0
|
|
4
53
|
|
|
5
54
|
### Minor Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -25,6 +25,7 @@ var capitalize = require('lodash/capitalize');
|
|
|
25
25
|
var Star = require('@material-ui/icons/Star');
|
|
26
26
|
var StarBorder = require('@material-ui/icons/StarBorder');
|
|
27
27
|
var Alert = require('@material-ui/lab/Alert');
|
|
28
|
+
var errors = require('@backstage/errors');
|
|
28
29
|
var SettingsIcon = require('@material-ui/icons/Settings');
|
|
29
30
|
|
|
30
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -111,17 +112,12 @@ const starredEntitiesApiRef = corePluginApi.createApiRef({
|
|
|
111
112
|
id: "catalog-react.starred-entities"
|
|
112
113
|
});
|
|
113
114
|
|
|
114
|
-
const NoIcon = () => null;
|
|
115
115
|
const rootRoute = corePluginApi.createRouteRef({
|
|
116
|
-
|
|
117
|
-
path: "",
|
|
118
|
-
title: "Catalog"
|
|
116
|
+
id: "catalog"
|
|
119
117
|
});
|
|
120
118
|
const catalogRouteRef = rootRoute;
|
|
121
119
|
const entityRoute = corePluginApi.createRouteRef({
|
|
122
|
-
|
|
123
|
-
path: ":namespace/:kind/:name/*",
|
|
124
|
-
title: "Entity",
|
|
120
|
+
id: "catalog:entity",
|
|
125
121
|
params: ["namespace", "kind", "name"]
|
|
126
122
|
});
|
|
127
123
|
const entityRouteRef = entityRoute;
|
|
@@ -1184,8 +1180,9 @@ const EntityTagPicker = () => {
|
|
|
1184
1180
|
}));
|
|
1185
1181
|
};
|
|
1186
1182
|
|
|
1187
|
-
const EntityTypePicker = () => {
|
|
1183
|
+
const EntityTypePicker = (props) => {
|
|
1188
1184
|
var _a;
|
|
1185
|
+
const {hidden, initialFilter} = props;
|
|
1189
1186
|
const alertApi = corePluginApi.useApi(corePluginApi.alertApiRef);
|
|
1190
1187
|
const {error, availableTypes, selectedTypes, setSelectedTypes} = useEntityTypeFilter();
|
|
1191
1188
|
React.useEffect(() => {
|
|
@@ -1195,7 +1192,10 @@ const EntityTypePicker = () => {
|
|
|
1195
1192
|
severity: "error"
|
|
1196
1193
|
});
|
|
1197
1194
|
}
|
|
1198
|
-
|
|
1195
|
+
if (initialFilter) {
|
|
1196
|
+
setSelectedTypes([initialFilter]);
|
|
1197
|
+
}
|
|
1198
|
+
}, [error, alertApi, initialFilter, setSelectedTypes]);
|
|
1199
1199
|
if (availableTypes.length === 0 || error)
|
|
1200
1200
|
return null;
|
|
1201
1201
|
const items = [
|
|
@@ -1205,7 +1205,7 @@ const EntityTypePicker = () => {
|
|
|
1205
1205
|
label: capitalize__default['default'](type)
|
|
1206
1206
|
}))
|
|
1207
1207
|
];
|
|
1208
|
-
return /* @__PURE__ */ React__default['default'].createElement(core.Box, {
|
|
1208
|
+
return hidden ? null : /* @__PURE__ */ React__default['default'].createElement(core.Box, {
|
|
1209
1209
|
pb: 1,
|
|
1210
1210
|
pt: 1
|
|
1211
1211
|
}, /* @__PURE__ */ React__default['default'].createElement(coreComponents.Select, {
|
|
@@ -1316,6 +1316,7 @@ const Contents = ({
|
|
|
1316
1316
|
await state.unregisterLocation();
|
|
1317
1317
|
onConfirm();
|
|
1318
1318
|
} catch (err) {
|
|
1319
|
+
errors.assertError(err);
|
|
1319
1320
|
alertApi.post({message: err.message});
|
|
1320
1321
|
} finally {
|
|
1321
1322
|
setBusy(false);
|
|
@@ -1329,6 +1330,7 @@ const Contents = ({
|
|
|
1329
1330
|
await state.deleteEntity();
|
|
1330
1331
|
onConfirm();
|
|
1331
1332
|
} catch (err) {
|
|
1333
|
+
errors.assertError(err);
|
|
1332
1334
|
alertApi.post({message: err.message});
|
|
1333
1335
|
} finally {
|
|
1334
1336
|
setBusy(false);
|
|
@@ -1620,6 +1622,8 @@ exports.getEntityMetadataViewUrl = getEntityMetadataViewUrl;
|
|
|
1620
1622
|
exports.getEntityRelations = getEntityRelations;
|
|
1621
1623
|
exports.getEntitySourceLocation = getEntitySourceLocation;
|
|
1622
1624
|
exports.isOwnerOf = isOwnerOf;
|
|
1625
|
+
exports.loadCatalogOwnerRefs = loadCatalogOwnerRefs;
|
|
1626
|
+
exports.loadIdentityOwnerRefs = loadIdentityOwnerRefs;
|
|
1623
1627
|
exports.reduceCatalogFilters = reduceCatalogFilters;
|
|
1624
1628
|
exports.reduceEntityFilters = reduceEntityFilters;
|
|
1625
1629
|
exports.rootRoute = rootRoute;
|