@backstage/plugin-catalog-react 0.0.0-nightly-20240119021656 → 0.0.0-nightly-20240120021525
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 +3 -2
- package/alpha/package.json +1 -1
- package/dist/index.esm.js +43 -23
- package/dist/index.esm.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20240120021525
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
+
- 71c6d7a: Overflowing labels in OwnerPicker (Catalog) are now truncated. Hovering over them shows the full label
|
|
7
8
|
- Updated dependencies
|
|
8
|
-
- @backstage/frontend-plugin-api@0.0.0-nightly-
|
|
9
|
+
- @backstage/frontend-plugin-api@0.0.0-nightly-20240120021525
|
|
9
10
|
- @backstage/catalog-client@1.5.2
|
|
10
11
|
- @backstage/catalog-model@1.4.3
|
|
11
12
|
- @backstage/core-components@0.13.10
|
package/alpha/package.json
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ 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, forwardRef, useLayoutEffect, Fragment } from 'react';
|
|
6
6
|
import ObservableImpl from 'zen-observable';
|
|
7
|
-
import { Grid, useMediaQuery, useTheme, Button, Drawer, Box, Typography, FormControlLabel, Checkbox, makeStyles, TextField, Tooltip, IconButton, Card, CardContent, Chip, CardActions, Toolbar, FormControl, Input, InputAdornment, withStyles, DialogContentText, ListItemText as ListItemText$1, ListSubheader as ListSubheader$1, ListItem, ListItemIcon, List, ListItemSecondaryAction, Dialog, DialogTitle, DialogContent, Tabs, Tab, DialogActions, Divider, MenuItem } from '@material-ui/core';
|
|
7
|
+
import { Grid, useMediaQuery, useTheme, Button, Drawer, Box, Typography, FormControlLabel, Checkbox, makeStyles, TextField, Tooltip, IconButton, Card, CardContent, Chip, CardActions, Toolbar, FormControl, Input, InputAdornment, withStyles as withStyles$1, DialogContentText, ListItemText as ListItemText$1, ListSubheader as ListSubheader$1, ListItem, ListItemIcon, List, ListItemSecondaryAction, Dialog, DialogTitle, DialogContent, Tabs, Tab, DialogActions, Divider, MenuItem } from '@material-ui/core';
|
|
8
8
|
import FilterListIcon from '@material-ui/icons/FilterList';
|
|
9
9
|
import { Select, Link, ResponseErrorPanel, Progress, OverflowTooltip, Table, DependencyGraph, DependencyGraphTypes, CodeSnippet, CopyTextButton, EmptyState } from '@backstage/core-components';
|
|
10
10
|
import { g as getEntityRelations, u as useEntity } from './esm/useEntity-de64059a.esm.js';
|
|
@@ -27,6 +27,7 @@ import classNames from 'classnames';
|
|
|
27
27
|
import { useMountEffect, useDebouncedEffect } from '@react-hookz/web';
|
|
28
28
|
import PersonIcon from '@material-ui/icons/Person';
|
|
29
29
|
import GroupIcon from '@material-ui/icons/Group';
|
|
30
|
+
import { withStyles, makeStyles as makeStyles$1 } from '@material-ui/core/styles';
|
|
30
31
|
import { getOrCreateGlobalSingleton } from '@backstage/version-bridge';
|
|
31
32
|
import HoverPopover from 'material-ui-popup-state/HoverPopover';
|
|
32
33
|
import { usePopupState, bindHover, bindPopover } from 'material-ui-popup-state/hooks';
|
|
@@ -47,7 +48,6 @@ import SettingsIcon from '@material-ui/icons/Settings';
|
|
|
47
48
|
import useDeepCompareEffect from 'react-use/lib/useDeepCompareEffect';
|
|
48
49
|
import Box$1 from '@material-ui/core/Box';
|
|
49
50
|
import Button$1 from '@material-ui/core/Button';
|
|
50
|
-
import { makeStyles as makeStyles$1 } from '@material-ui/core/styles';
|
|
51
51
|
import Typography$1 from '@material-ui/core/Typography';
|
|
52
52
|
|
|
53
53
|
const catalogApiRef = createApiRef({
|
|
@@ -1339,14 +1339,52 @@ function useSelectedOwners({
|
|
|
1339
1339
|
|
|
1340
1340
|
const useStyles$f = makeStyles(
|
|
1341
1341
|
{
|
|
1342
|
-
input: {}
|
|
1342
|
+
input: {},
|
|
1343
|
+
fullWidth: { width: "100%" },
|
|
1344
|
+
boxLabel: {
|
|
1345
|
+
width: "100%",
|
|
1346
|
+
textOverflow: "ellipsis",
|
|
1347
|
+
overflow: "hidden"
|
|
1348
|
+
}
|
|
1343
1349
|
},
|
|
1344
1350
|
{
|
|
1345
1351
|
name: "CatalogReactEntityOwnerPicker"
|
|
1346
1352
|
}
|
|
1347
1353
|
);
|
|
1354
|
+
const FixedWidthFormControlLabel = withStyles(
|
|
1355
|
+
(_theme) => ({
|
|
1356
|
+
label: {
|
|
1357
|
+
width: "100%"
|
|
1358
|
+
},
|
|
1359
|
+
root: {
|
|
1360
|
+
width: "90%"
|
|
1361
|
+
}
|
|
1362
|
+
}),
|
|
1363
|
+
{ name: "FixedWidthFormControlLabel" }
|
|
1364
|
+
)(FormControlLabel);
|
|
1348
1365
|
const icon$1 = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, { fontSize: "small" });
|
|
1349
1366
|
const checkedIcon$1 = /* @__PURE__ */ React.createElement(CheckBoxIcon, { fontSize: "small" });
|
|
1367
|
+
function RenderOptionLabel(props) {
|
|
1368
|
+
const classes = useStyles$f();
|
|
1369
|
+
const isGroup = props.entity.kind.toLocaleLowerCase("en-US") === "group";
|
|
1370
|
+
const { primaryTitle: title } = useEntityPresentation(props.entity);
|
|
1371
|
+
return /* @__PURE__ */ React.createElement(Box, { className: classes.fullWidth }, /* @__PURE__ */ React.createElement(
|
|
1372
|
+
FixedWidthFormControlLabel,
|
|
1373
|
+
{
|
|
1374
|
+
className: classes.fullWidth,
|
|
1375
|
+
control: /* @__PURE__ */ React.createElement(
|
|
1376
|
+
Checkbox,
|
|
1377
|
+
{
|
|
1378
|
+
icon: icon$1,
|
|
1379
|
+
checkedIcon: checkedIcon$1,
|
|
1380
|
+
checked: props.isSelected
|
|
1381
|
+
}
|
|
1382
|
+
),
|
|
1383
|
+
onClick: (event) => event.preventDefault(),
|
|
1384
|
+
label: /* @__PURE__ */ React.createElement(Tooltip, { title }, /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, isGroup ? /* @__PURE__ */ React.createElement(GroupIcon, { fontSize: "small" }) : /* @__PURE__ */ React.createElement(PersonIcon, { fontSize: "small" }), "\xA0", /* @__PURE__ */ React.createElement(Box, { className: classes.boxLabel }, /* @__PURE__ */ React.createElement(Typography, { noWrap: true }, title))))
|
|
1385
|
+
}
|
|
1386
|
+
));
|
|
1387
|
+
}
|
|
1350
1388
|
const EntityOwnerPicker = (props) => {
|
|
1351
1389
|
var _a, _b, _c;
|
|
1352
1390
|
const classes = useStyles$f();
|
|
@@ -1421,25 +1459,7 @@ const EntityOwnerPicker = (props) => {
|
|
|
1421
1459
|
},
|
|
1422
1460
|
filterOptions: (x) => x,
|
|
1423
1461
|
renderOption: (entity, { selected }) => {
|
|
1424
|
-
|
|
1425
|
-
return /* @__PURE__ */ React.createElement(
|
|
1426
|
-
FormControlLabel,
|
|
1427
|
-
{
|
|
1428
|
-
control: /* @__PURE__ */ React.createElement(
|
|
1429
|
-
Checkbox,
|
|
1430
|
-
{
|
|
1431
|
-
icon: icon$1,
|
|
1432
|
-
checkedIcon: checkedIcon$1,
|
|
1433
|
-
checked: selected
|
|
1434
|
-
}
|
|
1435
|
-
),
|
|
1436
|
-
onClick: (event) => event.preventDefault(),
|
|
1437
|
-
label: /* @__PURE__ */ React.createElement(Box, { display: "flex", flexWrap: "wrap", alignItems: "center" }, isGroup ? /* @__PURE__ */ React.createElement(GroupIcon, { fontSize: "small" }) : /* @__PURE__ */ React.createElement(PersonIcon, { fontSize: "small" }), "\xA0", humanizeEntity(
|
|
1438
|
-
entity,
|
|
1439
|
-
humanizeEntityRef(entity, { defaultKind: entity.kind })
|
|
1440
|
-
))
|
|
1441
|
-
}
|
|
1442
|
-
);
|
|
1462
|
+
return /* @__PURE__ */ React.createElement(RenderOptionLabel, { entity, isSelected: selected });
|
|
1443
1463
|
},
|
|
1444
1464
|
size: "small",
|
|
1445
1465
|
popupIcon: /* @__PURE__ */ React.createElement(ExpandMoreIcon, { "data-testid": "owner-picker-expand" }),
|
|
@@ -1986,7 +2006,7 @@ const EntityTypePicker = (props) => {
|
|
|
1986
2006
|
));
|
|
1987
2007
|
};
|
|
1988
2008
|
|
|
1989
|
-
const YellowStar = withStyles({
|
|
2009
|
+
const YellowStar = withStyles$1({
|
|
1990
2010
|
root: {
|
|
1991
2011
|
color: "#f3ba37"
|
|
1992
2012
|
}
|