@backstage/plugin-catalog-react 1.11.3-next.0 → 1.11.3

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,45 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.11.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 47dec6f: Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5
8
+ - b863830: Change behavior in EntityAutoCompletePicker to only hide filter if there are no available options. Previously the filter was hidden if there were <= 1 available options.
9
+ - abfbcfc: Updated dependency `@testing-library/react` to `^15.0.0`.
10
+ - cb1e3b0: Updated dependency `@testing-library/dom` to `^10.0.0`.
11
+ - Updated dependencies
12
+ - @backstage/core-components@0.14.4
13
+ - @backstage/core-plugin-api@1.9.2
14
+ - @backstage/frontend-plugin-api@0.6.4
15
+ - @backstage/version-bridge@1.0.8
16
+ - @backstage/plugin-permission-react@0.4.22
17
+ - @backstage/integration-react@1.1.26
18
+ - @backstage/catalog-client@1.6.4
19
+ - @backstage/catalog-model@1.4.5
20
+ - @backstage/errors@1.2.4
21
+ - @backstage/types@1.1.1
22
+ - @backstage/plugin-catalog-common@1.0.22
23
+ - @backstage/plugin-permission-common@0.7.13
24
+
25
+ ## 1.11.3-next.1
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies
30
+ - @backstage/catalog-client@1.6.4-next.0
31
+ - @backstage/frontend-plugin-api@0.6.4-next.1
32
+ - @backstage/catalog-model@1.4.5
33
+ - @backstage/core-components@0.14.4-next.0
34
+ - @backstage/core-plugin-api@1.9.1
35
+ - @backstage/errors@1.2.4
36
+ - @backstage/integration-react@1.1.26-next.0
37
+ - @backstage/types@1.1.1
38
+ - @backstage/version-bridge@1.0.7
39
+ - @backstage/plugin-catalog-common@1.0.22
40
+ - @backstage/plugin-permission-common@0.7.13
41
+ - @backstage/plugin-permission-react@0.4.21
42
+
3
43
  ## 1.11.3-next.0
4
44
 
5
45
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "1.11.3-next.0",
3
+ "version": "1.11.3",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/index.d.ts CHANGED
@@ -8,7 +8,8 @@ import { Entity, CompoundEntityRef } from '@backstage/catalog-model';
8
8
  import { Observable } from '@backstage/types';
9
9
  import React, { PropsWithChildren, ReactNode, ComponentProps } from 'react';
10
10
  import { LinkProps, InfoCardVariants, TableColumn, TableOptions } from '@backstage/core-components';
11
- import { IconButton, TextFieldProps } from '@material-ui/core';
11
+ import IconButton from '@material-ui/core/IconButton';
12
+ import { TextFieldProps } from '@material-ui/core/TextField';
12
13
  import { Overrides } from '@material-ui/core/styles/overrides';
13
14
  import { StyleRules } from '@material-ui/core/styles/withStyles';
14
15
  import { scmIntegrationsApiRef } from '@backstage/integration-react';
package/dist/index.esm.js CHANGED
@@ -4,7 +4,13 @@ import { stringifyEntityRef, DEFAULT_NAMESPACE, ANNOTATION_SOURCE_LOCATION, pars
4
4
  import get from 'lodash/get';
5
5
  import React, { useState, useEffect, useMemo, createContext, useCallback, useContext, useRef, memo, Fragment, forwardRef, useLayoutEffect } from 'react';
6
6
  import ObservableImpl from 'zen-observable';
7
- import { Grid, useMediaQuery, useTheme, Button, Drawer, Box, Typography, FormControlLabel, Checkbox, makeStyles, TextField, Tooltip, Card, List, MenuItem, ListItemIcon, ListItemText as ListItemText$1, ListItemSecondaryAction, IconButton, CardContent, Chip, CardActions, Toolbar, FormControl, Input, InputAdornment, withStyles as withStyles$1, DialogContentText, ListSubheader as ListSubheader$1, ListItem, Dialog, DialogTitle, DialogContent, Tabs, Tab, DialogActions, Divider } from '@material-ui/core';
7
+ import Box from '@material-ui/core/Box';
8
+ import Button from '@material-ui/core/Button';
9
+ import Drawer from '@material-ui/core/Drawer';
10
+ import Grid from '@material-ui/core/Grid';
11
+ import Typography from '@material-ui/core/Typography';
12
+ import useMediaQuery from '@material-ui/core/useMediaQuery';
13
+ import { useTheme, makeStyles, withStyles } from '@material-ui/core/styles';
8
14
  import FilterListIcon from '@material-ui/icons/FilterList';
9
15
  import { Select, Link, ResponseErrorPanel, Progress, OverflowTooltip, Table, DependencyGraph, DependencyGraphTypes, CodeSnippet, CopyTextButton, EmptyState } from '@backstage/core-components';
10
16
  import { g as getEntityRelations, u as useEntity } from './esm/useEntity-DuPQWZpR.esm.js';
@@ -20,36 +26,59 @@ import isEqual$1 from 'lodash/isEqual';
20
26
  import sortBy from 'lodash/sortBy';
21
27
  import useObservable from 'react-use/esm/useObservable';
22
28
  import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
23
- import { Autocomplete, Alert } from '@material-ui/lab';
29
+ import Autocomplete from '@material-ui/lab/Autocomplete';
30
+ import Checkbox from '@material-ui/core/Checkbox';
31
+ import FormControlLabel from '@material-ui/core/FormControlLabel';
24
32
  import CheckBoxIcon from '@material-ui/icons/CheckBox';
25
33
  import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';
34
+ import TextField from '@material-ui/core/TextField';
26
35
  import classNames from 'classnames';
36
+ import Tooltip from '@material-ui/core/Tooltip';
27
37
  import { useMountEffect, useDebouncedEffect } from '@react-hookz/web';
28
38
  import PersonIcon from '@material-ui/icons/Person';
29
39
  import GroupIcon from '@material-ui/icons/Group';
30
- import { withStyles, makeStyles as makeStyles$1 } from '@material-ui/core/styles';
40
+ import Card from '@material-ui/core/Card';
41
+ import List from '@material-ui/core/List';
42
+ import ListItemIcon from '@material-ui/core/ListItemIcon';
43
+ import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
44
+ import ListItemText$1 from '@material-ui/core/ListItemText';
45
+ import MenuItem from '@material-ui/core/MenuItem';
31
46
  import SettingsIcon from '@material-ui/icons/Settings';
32
47
  import StarIcon from '@material-ui/icons/Star';
33
48
  import useDeepCompareEffect from 'react-use/esm/useDeepCompareEffect';
34
49
  import { getOrCreateGlobalSingleton } from '@backstage/version-bridge';
35
50
  import HoverPopover from 'material-ui-popup-state/HoverPopover';
36
51
  import { usePopupState, bindHover, bindPopover } from 'material-ui-popup-state/hooks';
52
+ import CardActions from '@material-ui/core/CardActions';
53
+ import CardContent from '@material-ui/core/CardContent';
54
+ import Chip from '@material-ui/core/Chip';
55
+ import IconButton from '@material-ui/core/IconButton';
37
56
  import InfoIcon from '@material-ui/icons/Info';
38
57
  import EmailIcon from '@material-ui/icons/Email';
58
+ import FormControl from '@material-ui/core/FormControl';
59
+ import Input from '@material-ui/core/Input';
60
+ import InputAdornment from '@material-ui/core/InputAdornment';
61
+ import Toolbar from '@material-ui/core/Toolbar';
39
62
  import Clear from '@material-ui/icons/Clear';
40
63
  import Search from '@material-ui/icons/Search';
41
64
  import useDebounce$1 from 'react-use/lib/useDebounce';
42
65
  import StarBorder from '@material-ui/icons/StarBorder';
66
+ import Dialog from '@material-ui/core/Dialog';
67
+ import DialogActions from '@material-ui/core/DialogActions';
68
+ import DialogContent from '@material-ui/core/DialogContent';
69
+ import DialogTitle from '@material-ui/core/DialogTitle';
70
+ import Tab from '@material-ui/core/Tab';
71
+ import Tabs from '@material-ui/core/Tabs';
72
+ import DialogContentText from '@material-ui/core/DialogContentText';
43
73
  import SvgIcon from '@material-ui/core/SvgIcon';
74
+ import ListItem from '@material-ui/core/ListItem';
75
+ import Alert from '@material-ui/lab/Alert';
76
+ import MuiListSubheader from '@material-ui/core/ListSubheader';
44
77
  import HelpOutlineIcon from '@material-ui/icons/HelpOutline';
45
78
  import groupBy from 'lodash/groupBy';
46
- import DialogContentText$1 from '@material-ui/core/DialogContentText';
47
79
  import YAML from 'yaml';
48
- import Alert$1 from '@material-ui/lab/Alert';
80
+ import Divider from '@material-ui/core/Divider';
49
81
  import { assertError } from '@backstage/errors';
50
- import Box$1 from '@material-ui/core/Box';
51
- import Button$1 from '@material-ui/core/Button';
52
- import Typography$1 from '@material-ui/core/Typography';
53
82
 
54
83
  const catalogApiRef = createApiRef({
55
84
  id: "plugin.catalog.service"
@@ -1119,8 +1148,6 @@ function EntityAutocompletePicker(props) {
1119
1148
  if (filter && typeof filter === "object" && !("values" in filter) || !availableOptions.length) {
1120
1149
  return null;
1121
1150
  }
1122
- if (availableOptions.length <= 1)
1123
- return null;
1124
1151
  return /* @__PURE__ */ React.createElement(Box, { className: classes.root, pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(Typography, { className: classes.label, variant: "button", component: "label" }, label, /* @__PURE__ */ React.createElement(
1125
1152
  Autocomplete,
1126
1153
  {
@@ -2497,7 +2524,7 @@ EntityTable.columns = columnFactories;
2497
2524
  EntityTable.systemEntityColumns = systemEntityColumns;
2498
2525
  EntityTable.componentEntityColumns = componentEntityColumns;
2499
2526
 
2500
- const YellowStar = withStyles$1({
2527
+ const YellowStar = withStyles({
2501
2528
  root: {
2502
2529
  color: "#f3ba37"
2503
2530
  }
@@ -2735,7 +2762,7 @@ function ListItemText(props) {
2735
2762
  }
2736
2763
  function ListSubheader(props) {
2737
2764
  const classes = useStyles$5();
2738
- return /* @__PURE__ */ React.createElement(ListSubheader$1, { className: classes.monospace }, props.children);
2765
+ return /* @__PURE__ */ React.createElement(MuiListSubheader, { className: classes.monospace }, props.children);
2739
2766
  }
2740
2767
  function Container(props) {
2741
2768
  return /* @__PURE__ */ React.createElement(Box, { mt: 2 }, /* @__PURE__ */ React.createElement(Card, { variant: "outlined" }, /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(Typography, { variant: "h6", gutterBottom: true }, props.title, props.helpLink && /* @__PURE__ */ React.createElement(HelpIcon, { to: props.helpLink })), props.children)));
@@ -2926,7 +2953,7 @@ function OverviewPage(props) {
2926
2953
  }
2927
2954
 
2928
2955
  function YamlPage(props) {
2929
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DialogContentText$1, { variant: "h2" }, "Entity as YAML"), /* @__PURE__ */ React.createElement(DialogContentText$1, null, "This is the raw entity data as received from the catalog, on YAML form."), /* @__PURE__ */ React.createElement(DialogContentText$1, null, /* @__PURE__ */ React.createElement("div", { style: { fontSize: "75%" }, "data-testid": "code-snippet" }, /* @__PURE__ */ React.createElement(
2956
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DialogContentText, { variant: "h2" }, "Entity as YAML"), /* @__PURE__ */ React.createElement(DialogContentText, null, "This is the raw entity data as received from the catalog, on YAML form."), /* @__PURE__ */ React.createElement(DialogContentText, null, /* @__PURE__ */ React.createElement("div", { style: { fontSize: "75%" }, "data-testid": "code-snippet" }, /* @__PURE__ */ React.createElement(
2930
2957
  CodeSnippet,
2931
2958
  {
2932
2959
  text: YAML.stringify(sortKeys(props.entity)),
@@ -3152,7 +3179,7 @@ const Contents = ({
3152
3179
  return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error: state.error });
3153
3180
  }
3154
3181
  if (state.type === "bootstrap") {
3155
- 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(
3182
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Alert, { 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(
3156
3183
  Button,
3157
3184
  {
3158
3185
  variant: "text",
@@ -3216,14 +3243,14 @@ const Contents = ({
3216
3243
  "Delete Entity"
3217
3244
  )));
3218
3245
  }
3219
- return /* @__PURE__ */ React.createElement(Alert$1, { severity: "error" }, "Internal error: Unknown state");
3246
+ return /* @__PURE__ */ React.createElement(Alert, { severity: "error" }, "Internal error: Unknown state");
3220
3247
  };
3221
3248
  const UnregisterEntityDialog = (props) => {
3222
3249
  const { open, onConfirm, onClose, entity } = props;
3223
3250
  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 })));
3224
3251
  };
3225
3252
 
3226
- const useStyles = makeStyles$1(
3253
+ const useStyles = makeStyles(
3227
3254
  (theme) => ({
3228
3255
  code: {
3229
3256
  borderRadius: 6,
@@ -3282,7 +3309,7 @@ function MissingAnnotationEmptyState(props) {
3282
3309
  missing: "field",
3283
3310
  title: "Missing Annotation",
3284
3311
  description: generateDescription(annotations, entityKind),
3285
- action: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography$1, { variant: "body1" }, "Add the annotation to your ", entityKind, " YAML as shown in the highlighted example below:"), /* @__PURE__ */ React.createElement(Box$1, { className: classes.code }, /* @__PURE__ */ React.createElement(
3312
+ action: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, "Add the annotation to your ", entityKind, " YAML as shown in the highlighted example below:"), /* @__PURE__ */ React.createElement(Box, { className: classes.code }, /* @__PURE__ */ React.createElement(
3286
3313
  CodeSnippet,
3287
3314
  {
3288
3315
  text: yamlText,
@@ -3291,7 +3318,7 @@ function MissingAnnotationEmptyState(props) {
3291
3318
  highlightedNumbers: lineNumbers,
3292
3319
  customStyle: { background: "inherit", fontSize: "115%" }
3293
3320
  }
3294
- )), /* @__PURE__ */ React.createElement(Button$1, { color: "primary", component: Link, to: url }, "Read more"))
3321
+ )), /* @__PURE__ */ React.createElement(Button, { color: "primary", component: Link, to: url }, "Read more"))
3295
3322
  }
3296
3323
  );
3297
3324
  }