@backstage/plugin-catalog-react 1.3.0-next.0 → 1.3.0-next.1

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,27 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.3.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - fab93c2fe8: Aligned buttons on "Unregister entity" dialog to keep them on the same line
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @backstage/core-components@0.12.4-next.0
13
+ - @backstage/catalog-client@1.3.1-next.0
14
+ - @backstage/catalog-model@1.1.6-next.0
15
+ - @backstage/core-plugin-api@1.3.0
16
+ - @backstage/errors@1.1.4
17
+ - @backstage/integration@1.4.2
18
+ - @backstage/theme@0.2.16
19
+ - @backstage/types@1.0.2
20
+ - @backstage/version-bridge@1.0.3
21
+ - @backstage/plugin-catalog-common@1.0.11-next.0
22
+ - @backstage/plugin-permission-common@0.7.3
23
+ - @backstage/plugin-permission-react@0.4.9
24
+
3
25
  ## 1.3.0-next.0
4
26
 
5
27
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "1.3.0-next.0",
3
+ "version": "1.3.0-next.1",
4
4
  "main": "../dist/index.esm.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
package/dist/index.esm.js CHANGED
@@ -2183,11 +2183,15 @@ function useUnregisterEntityDialogState(entity) {
2183
2183
  const useStyles$2 = makeStyles({
2184
2184
  advancedButton: {
2185
2185
  fontSize: "0.7em"
2186
+ },
2187
+ dialogActions: {
2188
+ display: "inline-block"
2186
2189
  }
2187
2190
  });
2188
2191
  const Contents = ({
2189
2192
  entity,
2190
- onConfirm
2193
+ onConfirm,
2194
+ onClose
2191
2195
  }) => {
2192
2196
  var _a;
2193
2197
  const alertApi = useApi(alertApiRef);
@@ -2231,6 +2235,7 @@ const Contents = ({
2231
2235
  },
2232
2236
  [alertApi, onConfirm, state]
2233
2237
  );
2238
+ const DialogActionsPanel = () => /* @__PURE__ */ React.createElement(DialogActions, { className: classes.dialogActions }, /* @__PURE__ */ React.createElement(Button, { onClick: onClose, color: "primary" }, "Cancel"));
2234
2239
  if (state.type === "loading") {
2235
2240
  return /* @__PURE__ */ React.createElement(Progress, null);
2236
2241
  }
@@ -2238,7 +2243,7 @@ const Contents = ({
2238
2243
  return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error: state.error });
2239
2244
  }
2240
2245
  if (state.type === "bootstrap") {
2241
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Alert$1, { severity: "info" }, 'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "', state.location, '"). If you believe this is in error, please contact the ', appTitle, " ", "integrator."), /* @__PURE__ */ React.createElement(Box, { marginTop: 2 }, !showDelete && /* @__PURE__ */ React.createElement(
2246
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Alert$1, { severity: "info" }, 'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "', state.location, '"). If you believe this is in error, please contact the ', appTitle, " ", "integrator."), /* @__PURE__ */ React.createElement(Box, { marginTop: 2 }, !showDelete && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
2242
2247
  Button,
2243
2248
  {
2244
2249
  variant: "text",
@@ -2248,7 +2253,7 @@ const Contents = ({
2248
2253
  onClick: () => setShowDelete(true)
2249
2254
  },
2250
2255
  "Advanced Options"
2251
- ), showDelete && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DialogContentText, null, "You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."), /* @__PURE__ */ React.createElement(
2256
+ ), /* @__PURE__ */ React.createElement(DialogActionsPanel, null)), showDelete && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DialogContentText, null, "You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."), /* @__PURE__ */ React.createElement(
2252
2257
  Button,
2253
2258
  {
2254
2259
  variant: "contained",
@@ -2257,7 +2262,7 @@ const Contents = ({
2257
2262
  onClick: onDelete
2258
2263
  },
2259
2264
  "Delete Entity"
2260
- ))));
2265
+ ), /* @__PURE__ */ React.createElement(DialogActionsPanel, null))));
2261
2266
  }
2262
2267
  if (state.type === "only-delete") {
2263
2268
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DialogContentText, null, "This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."), /* @__PURE__ */ React.createElement(
@@ -2269,7 +2274,7 @@ const Contents = ({
2269
2274
  onClick: onDelete
2270
2275
  },
2271
2276
  "Delete Entity"
2272
- ));
2277
+ ), /* @__PURE__ */ React.createElement(DialogActionsPanel, null));
2273
2278
  }
2274
2279
  if (state.type === "unregister") {
2275
2280
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DialogContentText, null, "This action will unregister the following entities:"), /* @__PURE__ */ React.createElement(DialogContentText, { component: "ul" }, state.colocatedEntities.map((e) => /* @__PURE__ */ React.createElement("li", { key: `${e.kind}:${e.namespace}/${e.name}` }, /* @__PURE__ */ React.createElement(EntityRefLink, { entityRef: e })))), /* @__PURE__ */ React.createElement(DialogContentText, null, "Located at the following location:"), /* @__PURE__ */ React.createElement(DialogContentText, { component: "ul" }, /* @__PURE__ */ React.createElement("li", null, state.location)), /* @__PURE__ */ React.createElement(DialogContentText, null, "To undo, just re-register the entity in ", appTitle, "."), /* @__PURE__ */ React.createElement(Box, { marginTop: 2 }, /* @__PURE__ */ React.createElement(
@@ -2306,7 +2311,7 @@ const Contents = ({
2306
2311
  };
2307
2312
  const UnregisterEntityDialog = (props) => {
2308
2313
  const { open, onConfirm, onClose, entity } = props;
2309
- return /* @__PURE__ */ React.createElement(Dialog, { open, onClose }, /* @__PURE__ */ React.createElement(DialogTitle, { id: "responsive-dialog-title" }, "Are you sure you want to unregister this entity?"), /* @__PURE__ */ React.createElement(DialogContent, null, /* @__PURE__ */ React.createElement(Contents, { entity, onConfirm })), /* @__PURE__ */ React.createElement(DialogActions, null, /* @__PURE__ */ React.createElement(Button, { onClick: onClose, color: "primary" }, "Cancel")));
2314
+ return /* @__PURE__ */ React.createElement(Dialog, { open, onClose }, /* @__PURE__ */ React.createElement(DialogTitle, { id: "responsive-dialog-title" }, "Are you sure you want to unregister this entity?"), /* @__PURE__ */ React.createElement(DialogContent, null, /* @__PURE__ */ React.createElement(Contents, { entity, onConfirm, onClose })));
2310
2315
  };
2311
2316
 
2312
2317
  const useStyles$1 = makeStyles(
@@ -2382,8 +2387,10 @@ const UserListPicker = (props) => {
2382
2387
  const filterGroups = getFilterGroups(orgName).map((filterGroup) => ({
2383
2388
  ...filterGroup,
2384
2389
  items: filterGroup.items.filter(
2385
- ({ id }) => // TODO: avoid hardcoding kinds here
2386
- ["group", "user"].some((kind) => kind === kindParameter) ? userAndGroupFilterIds.includes(id) : !availableFilters || availableFilters.includes(id)
2390
+ ({ id }) => (
2391
+ // TODO: avoid hardcoding kinds here
2392
+ ["group", "user"].some((kind) => kind === kindParameter) ? userAndGroupFilterIds.includes(id) : !availableFilters || availableFilters.includes(id)
2393
+ )
2387
2394
  )
2388
2395
  })).filter(({ items }) => !!items.length);
2389
2396
  const { isStarredEntity } = useStarredEntities();