@backstage/plugin-catalog 1.9.0-next.0 → 1.9.0-next.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 +39 -0
- package/README.md +1 -1
- package/dist/esm/index/{index-ec7d6301.esm.js → index-183568a0.esm.js} +41 -15
- package/dist/esm/index/{index-ec7d6301.esm.js.map → index-183568a0.esm.js.map} +1 -1
- package/dist/esm/index/{index-f175ded7.esm.js → index-474c17e4.esm.js} +9 -5
- package/dist/esm/index/index-474c17e4.esm.js.map +1 -0
- package/dist/esm/index/{index-beb40544.esm.js → index-5d8a33ba.esm.js} +3 -3
- package/dist/esm/index/index-5d8a33ba.esm.js.map +1 -0
- package/dist/esm/index/{index-f1cc0d2c.esm.js → index-67477a96.esm.js} +2 -2
- package/dist/esm/index/{index-f1cc0d2c.esm.js.map → index-67477a96.esm.js.map} +1 -1
- package/dist/esm/index/{index-c15f6a86.esm.js → index-a019c16d.esm.js} +2 -2
- package/dist/esm/index/index-a019c16d.esm.js.map +1 -0
- package/dist/esm/index/{index-0ccf0c80.esm.js → index-b3cf2aa8.esm.js} +4 -2
- package/dist/esm/index/index-b3cf2aa8.esm.js.map +1 -0
- package/dist/esm/index/{index-1fe32bf9.esm.js → index-de447672.esm.js} +2 -2
- package/dist/esm/index/index-de447672.esm.js.map +1 -0
- package/dist/esm/index/{index-418d558b.esm.js → index-e4233e9c.esm.js} +8 -4
- package/dist/esm/index/index-e4233e9c.esm.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.esm.js +1 -1
- package/package.json +17 -17
- package/dist/esm/index/index-0ccf0c80.esm.js.map +0 -1
- package/dist/esm/index/index-1fe32bf9.esm.js.map +0 -1
- package/dist/esm/index/index-418d558b.esm.js.map +0 -1
- package/dist/esm/index/index-beb40544.esm.js.map +0 -1
- package/dist/esm/index/index-c15f6a86.esm.js.map +0 -1
- package/dist/esm/index/index-f175ded7.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.9.0-next.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 23cc40039c0: allow entity switch to render all cases that match the condition
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/core-components@0.12.5-next.2
|
|
13
|
+
- @backstage/plugin-catalog-react@1.4.0-next.2
|
|
14
|
+
- @backstage/plugin-search-react@1.5.1-next.2
|
|
15
|
+
- @backstage/core-plugin-api@1.5.0-next.2
|
|
16
|
+
- @backstage/integration-react@1.1.11-next.2
|
|
17
|
+
|
|
18
|
+
## 1.9.0-next.1
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- c9a9f3c834f: Add a `columns` prop to certain components that use the `EntityTable` for easier extensibility.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 7e8930ae1c6: Fix icon alignment in `CatalogSearchResultListItem`
|
|
27
|
+
- cb8ec97cdeb: Change black & white colors to be theme aware
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- @backstage/core-components@0.12.5-next.1
|
|
30
|
+
- @backstage/errors@1.1.5-next.0
|
|
31
|
+
- @backstage/catalog-client@1.4.0-next.1
|
|
32
|
+
- @backstage/core-plugin-api@1.4.1-next.1
|
|
33
|
+
- @backstage/integration-react@1.1.11-next.1
|
|
34
|
+
- @backstage/theme@0.2.18-next.0
|
|
35
|
+
- @backstage/plugin-catalog-react@1.4.0-next.1
|
|
36
|
+
- @backstage/catalog-model@1.2.1-next.1
|
|
37
|
+
- @backstage/types@1.0.2
|
|
38
|
+
- @backstage/plugin-catalog-common@1.0.12-next.1
|
|
39
|
+
- @backstage/plugin-search-common@1.2.2-next.0
|
|
40
|
+
- @backstage/plugin-search-react@1.5.1-next.1
|
|
41
|
+
|
|
3
42
|
## 1.9.0-next.0
|
|
4
43
|
|
|
5
44
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Backstage Catalog Frontend
|
|
2
2
|
|
|
3
3
|
This is the React frontend for the default Backstage [software
|
|
4
|
-
catalog](http://backstage.io/docs/features/software-catalog/
|
|
4
|
+
catalog](http://backstage.io/docs/features/software-catalog/).
|
|
5
5
|
This package supplies interfaces related to listing catalog entities or showing
|
|
6
6
|
more information about them on entity pages.
|
|
7
7
|
|
|
@@ -1198,7 +1198,6 @@ const EntitySwitch = (props) => {
|
|
|
1198
1198
|
key: ENTITY_SWITCH_KEY,
|
|
1199
1199
|
withStrictError: "Child of EntitySwitch is not an EntitySwitch.Case"
|
|
1200
1200
|
}).getElements().flatMap((element) => {
|
|
1201
|
-
var _a2;
|
|
1202
1201
|
if (loading) {
|
|
1203
1202
|
return [];
|
|
1204
1203
|
}
|
|
@@ -1213,7 +1212,7 @@ const EntitySwitch = (props) => {
|
|
|
1213
1212
|
}
|
|
1214
1213
|
return [
|
|
1215
1214
|
{
|
|
1216
|
-
if:
|
|
1215
|
+
if: condition == null ? void 0 : condition(entity, { apis }),
|
|
1217
1216
|
children: elementsChildren
|
|
1218
1217
|
}
|
|
1219
1218
|
];
|
|
@@ -1224,11 +1223,27 @@ const EntitySwitch = (props) => {
|
|
|
1224
1223
|
(r) => typeof r.if === "object" && "then" in r.if
|
|
1225
1224
|
);
|
|
1226
1225
|
if (hasAsyncCases) {
|
|
1227
|
-
return /* @__PURE__ */ React.createElement(
|
|
1226
|
+
return /* @__PURE__ */ React.createElement(
|
|
1227
|
+
AsyncEntitySwitch,
|
|
1228
|
+
{
|
|
1229
|
+
results,
|
|
1230
|
+
renderMultipleMatches: props.renderMultipleMatches
|
|
1231
|
+
}
|
|
1232
|
+
);
|
|
1233
|
+
}
|
|
1234
|
+
if (props.renderMultipleMatches === "all") {
|
|
1235
|
+
const children = results.filter((r) => r.if).map((r) => r.children);
|
|
1236
|
+
if (children.length === 0) {
|
|
1237
|
+
return getDefaultChildren(results);
|
|
1238
|
+
}
|
|
1239
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
1228
1240
|
}
|
|
1229
|
-
return (_b = (_a = results.find((r) => r.if)) == null ? void 0 : _a.children) != null ? _b :
|
|
1241
|
+
return (_b = (_a = results.find((r) => r.if)) == null ? void 0 : _a.children) != null ? _b : getDefaultChildren(results);
|
|
1230
1242
|
};
|
|
1231
|
-
function AsyncEntitySwitch({
|
|
1243
|
+
function AsyncEntitySwitch({
|
|
1244
|
+
results,
|
|
1245
|
+
renderMultipleMatches
|
|
1246
|
+
}) {
|
|
1232
1247
|
const { loading, value } = useAsync(async () => {
|
|
1233
1248
|
var _a;
|
|
1234
1249
|
const promises = results.map(
|
|
@@ -1242,13 +1257,24 @@ function AsyncEntitySwitch({ results }) {
|
|
|
1242
1257
|
return null;
|
|
1243
1258
|
}
|
|
1244
1259
|
);
|
|
1245
|
-
|
|
1260
|
+
if (renderMultipleMatches === "all") {
|
|
1261
|
+
const children = (await Promise.all(promises)).filter(Boolean);
|
|
1262
|
+
if (children.length === 0) {
|
|
1263
|
+
return getDefaultChildren(results);
|
|
1264
|
+
}
|
|
1265
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
1266
|
+
}
|
|
1267
|
+
return (_a = (await Promise.all(promises)).find(Boolean)) != null ? _a : getDefaultChildren(results);
|
|
1246
1268
|
}, [results]);
|
|
1247
1269
|
if (loading || !value) {
|
|
1248
1270
|
return null;
|
|
1249
1271
|
}
|
|
1250
1272
|
return value;
|
|
1251
1273
|
}
|
|
1274
|
+
function getDefaultChildren(results) {
|
|
1275
|
+
var _a;
|
|
1276
|
+
return (_a = results.filter((r) => r.if === void 0)[0].children) != null ? _a : null;
|
|
1277
|
+
}
|
|
1252
1278
|
EntitySwitch.Case = EntitySwitchCaseComponent;
|
|
1253
1279
|
|
|
1254
1280
|
function strCmp(a, b) {
|
|
@@ -1291,7 +1317,7 @@ const useStyles$1 = makeStyles(
|
|
|
1291
1317
|
code: {
|
|
1292
1318
|
borderRadius: 6,
|
|
1293
1319
|
margin: `${theme.spacing(2)}px 0px`,
|
|
1294
|
-
background: theme.palette.type === "dark" ? "#444" :
|
|
1320
|
+
background: theme.palette.type === "dark" ? "#444" : theme.palette.common.white
|
|
1295
1321
|
}
|
|
1296
1322
|
}),
|
|
1297
1323
|
{ name: "PluginCatalogEntityLabelsEmptyState" }
|
|
@@ -1402,7 +1428,7 @@ const catalogPlugin = createPlugin({
|
|
|
1402
1428
|
const CatalogIndexPage = catalogPlugin.provide(
|
|
1403
1429
|
createRoutableExtension({
|
|
1404
1430
|
name: "CatalogIndexPage",
|
|
1405
|
-
component: () => import('./index-
|
|
1431
|
+
component: () => import('./index-67477a96.esm.js').then((m) => m.CatalogPage),
|
|
1406
1432
|
mountPoint: rootRouteRef
|
|
1407
1433
|
})
|
|
1408
1434
|
);
|
|
@@ -1417,7 +1443,7 @@ const EntityAboutCard = catalogPlugin.provide(
|
|
|
1417
1443
|
createComponentExtension({
|
|
1418
1444
|
name: "EntityAboutCard",
|
|
1419
1445
|
component: {
|
|
1420
|
-
lazy: () => import('./index-
|
|
1446
|
+
lazy: () => import('./index-de447672.esm.js').then((m) => m.AboutCard)
|
|
1421
1447
|
}
|
|
1422
1448
|
})
|
|
1423
1449
|
);
|
|
@@ -1425,7 +1451,7 @@ const EntityLinksCard = catalogPlugin.provide(
|
|
|
1425
1451
|
createComponentExtension({
|
|
1426
1452
|
name: "EntityLinksCard",
|
|
1427
1453
|
component: {
|
|
1428
|
-
lazy: () => import('./index-
|
|
1454
|
+
lazy: () => import('./index-5d8a33ba.esm.js').then((m) => m.EntityLinksCard)
|
|
1429
1455
|
}
|
|
1430
1456
|
})
|
|
1431
1457
|
);
|
|
@@ -1433,7 +1459,7 @@ const EntityLabelsCard = catalogPlugin.provide(
|
|
|
1433
1459
|
createComponentExtension({
|
|
1434
1460
|
name: "EntityLabelsCard",
|
|
1435
1461
|
component: {
|
|
1436
|
-
lazy: () => import('./index-
|
|
1462
|
+
lazy: () => import('./index-a019c16d.esm.js').then((m) => m.EntityLabelsCard)
|
|
1437
1463
|
}
|
|
1438
1464
|
})
|
|
1439
1465
|
);
|
|
@@ -1475,7 +1501,7 @@ const EntityDependsOnComponentsCard = catalogPlugin.provide(
|
|
|
1475
1501
|
createComponentExtension({
|
|
1476
1502
|
name: "EntityDependsOnComponentsCard",
|
|
1477
1503
|
component: {
|
|
1478
|
-
lazy: () => import('./index-
|
|
1504
|
+
lazy: () => import('./index-e4233e9c.esm.js').then(
|
|
1479
1505
|
(m) => m.DependsOnComponentsCard
|
|
1480
1506
|
)
|
|
1481
1507
|
}
|
|
@@ -1495,7 +1521,7 @@ const EntityDependsOnResourcesCard = catalogPlugin.provide(
|
|
|
1495
1521
|
createComponentExtension({
|
|
1496
1522
|
name: "EntityDependsOnResourcesCard",
|
|
1497
1523
|
component: {
|
|
1498
|
-
lazy: () => import('./index-
|
|
1524
|
+
lazy: () => import('./index-474c17e4.esm.js').then(
|
|
1499
1525
|
(m) => m.DependsOnResourcesCard
|
|
1500
1526
|
)
|
|
1501
1527
|
}
|
|
@@ -1514,7 +1540,7 @@ const RelatedEntitiesCard = catalogPlugin.provide(
|
|
|
1514
1540
|
const CatalogSearchResultListItem = catalogPlugin.provide(
|
|
1515
1541
|
createSearchResultListItemExtension({
|
|
1516
1542
|
name: "CatalogSearchResultListItem",
|
|
1517
|
-
component: () => import('./index-
|
|
1543
|
+
component: () => import('./index-b3cf2aa8.esm.js').then(
|
|
1518
1544
|
(m) => m.CatalogSearchResultListItem
|
|
1519
1545
|
),
|
|
1520
1546
|
predicate: (result) => result.type === "software-catalog"
|
|
@@ -1522,4 +1548,4 @@ const CatalogSearchResultListItem = catalogPlugin.provide(
|
|
|
1522
1548
|
);
|
|
1523
1549
|
|
|
1524
1550
|
export { AboutCard as A, isNamespace as B, CatalogTable as C, DefaultStarredEntitiesApi as D, EntityLabelsCard$1 as E, isComponentType as F, FilteredEntityLayout as G, FilterContainer as H, EntityListContainer as I, LinksGridList as L, RelatedEntitiesCard as R, AboutContent as a, AboutField as b, createComponentRouteRef as c, CatalogEntityPage as d, CatalogIndexPage as e, catalogPlugin as f, EntityAboutCard as g, hasLabels as h, EntityDependencyOfComponentsCard as i, EntityDependsOnComponentsCard as j, EntityDependsOnResourcesCard as k, EntityHasComponentsCard as l, EntityHasResourcesCard as m, EntityHasSubcomponentsCard as n, EntityHasSystemsCard as o, EntityLinksCard as p, EntityLabelsCard as q, CatalogSearchResultListItem as r, CatalogKindHeader as s, EntityLayout as t, EntityOrphanWarning as u, isOrphan as v, EntityProcessingErrorsPanel as w, hasCatalogProcessingErrors as x, EntitySwitch as y, isKind as z };
|
|
1525
|
-
//# sourceMappingURL=index-
|
|
1551
|
+
//# sourceMappingURL=index-183568a0.esm.js.map
|