@backstage/plugin-catalog-react 0.0.0-nightly-20230214023046 → 0.0.0-nightly-20230218023213
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 +30 -8
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +4 -4
- package/dist/index.beta.d.ts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +97 -63
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20230218023213
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0a5b73b292: Add possibility to re-use EntityPicker for filters with multiple select.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/catalog-client@1.3.1
|
|
13
|
+
- @backstage/catalog-model@1.2.0
|
|
14
|
+
- @backstage/core-components@0.12.4
|
|
15
|
+
- @backstage/core-plugin-api@1.4.0
|
|
16
|
+
- @backstage/errors@1.1.4
|
|
17
|
+
- @backstage/integration@1.4.2
|
|
18
|
+
- @backstage/theme@0.2.17
|
|
19
|
+
- @backstage/types@1.0.2
|
|
20
|
+
- @backstage/version-bridge@1.0.3
|
|
21
|
+
- @backstage/plugin-catalog-common@1.0.11
|
|
22
|
+
- @backstage/plugin-permission-common@0.7.3
|
|
23
|
+
- @backstage/plugin-permission-react@0.4.10
|
|
24
|
+
|
|
25
|
+
## 1.3.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
6
28
|
|
|
@@ -10,18 +32,18 @@
|
|
|
10
32
|
### Patch Changes
|
|
11
33
|
|
|
12
34
|
- Updated dependencies
|
|
13
|
-
- @backstage/core-components@0.
|
|
14
|
-
- @backstage/catalog-model@
|
|
15
|
-
- @backstage/theme@0.
|
|
16
|
-
- @backstage/core-plugin-api@
|
|
17
|
-
- @backstage/catalog-client@
|
|
35
|
+
- @backstage/core-components@0.12.4
|
|
36
|
+
- @backstage/catalog-model@1.2.0
|
|
37
|
+
- @backstage/theme@0.2.17
|
|
38
|
+
- @backstage/core-plugin-api@1.4.0
|
|
39
|
+
- @backstage/catalog-client@1.3.1
|
|
18
40
|
- @backstage/errors@1.1.4
|
|
19
41
|
- @backstage/integration@1.4.2
|
|
20
42
|
- @backstage/types@1.0.2
|
|
21
43
|
- @backstage/version-bridge@1.0.3
|
|
22
|
-
- @backstage/plugin-catalog-common@
|
|
44
|
+
- @backstage/plugin-catalog-common@1.0.11
|
|
23
45
|
- @backstage/plugin-permission-common@0.7.3
|
|
24
|
-
- @backstage/plugin-permission-react@0.
|
|
46
|
+
- @backstage/plugin-permission-react@0.4.10
|
|
25
47
|
|
|
26
48
|
## 1.3.0-next.2
|
|
27
49
|
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -462,7 +462,7 @@ export declare class EntityTagFilter implements EntityFilter {
|
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
/** @public */
|
|
465
|
-
export declare const EntityTagPicker: (props: EntityTagPickerProps) => JSX.Element
|
|
465
|
+
export declare const EntityTagPicker: (props: EntityTagPickerProps) => JSX.Element;
|
|
466
466
|
|
|
467
467
|
/** @public */
|
|
468
468
|
export declare type EntityTagPickerProps = {
|
|
@@ -562,9 +562,9 @@ export declare function InspectEntityDialog(props: {
|
|
|
562
562
|
export declare function isOwnerOf(owner: Entity, entity: Entity): boolean;
|
|
563
563
|
|
|
564
564
|
/** @public */
|
|
565
|
-
export declare
|
|
566
|
-
value?: Partial<EntityListContextProps<
|
|
567
|
-
}>)
|
|
565
|
+
export declare function MockEntityListContextProvider<T extends DefaultEntityFilters = DefaultEntityFilters>({ children, value, }: PropsWithChildren<{
|
|
566
|
+
value?: Partial<EntityListContextProps<T>>;
|
|
567
|
+
}>): JSX.Element;
|
|
568
568
|
|
|
569
569
|
/**
|
|
570
570
|
* An in-memory mock implementation of the StarredEntitiesApi.
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -462,7 +462,7 @@ export declare class EntityTagFilter implements EntityFilter {
|
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
/** @public */
|
|
465
|
-
export declare const EntityTagPicker: (props: EntityTagPickerProps) => JSX.Element
|
|
465
|
+
export declare const EntityTagPicker: (props: EntityTagPickerProps) => JSX.Element;
|
|
466
466
|
|
|
467
467
|
/** @public */
|
|
468
468
|
export declare type EntityTagPickerProps = {
|
|
@@ -553,9 +553,9 @@ export declare function InspectEntityDialog(props: {
|
|
|
553
553
|
/* Excluded from this release type: isOwnerOf */
|
|
554
554
|
|
|
555
555
|
/** @public */
|
|
556
|
-
export declare
|
|
557
|
-
value?: Partial<EntityListContextProps<
|
|
558
|
-
}>)
|
|
556
|
+
export declare function MockEntityListContextProvider<T extends DefaultEntityFilters = DefaultEntityFilters>({ children, value, }: PropsWithChildren<{
|
|
557
|
+
value?: Partial<EntityListContextProps<T>>;
|
|
558
|
+
}>): JSX.Element;
|
|
559
559
|
|
|
560
560
|
/**
|
|
561
561
|
* An in-memory mock implementation of the StarredEntitiesApi.
|
package/dist/index.d.ts
CHANGED
|
@@ -462,7 +462,7 @@ export declare class EntityTagFilter implements EntityFilter {
|
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
/** @public */
|
|
465
|
-
export declare const EntityTagPicker: (props: EntityTagPickerProps) => JSX.Element
|
|
465
|
+
export declare const EntityTagPicker: (props: EntityTagPickerProps) => JSX.Element;
|
|
466
466
|
|
|
467
467
|
/** @public */
|
|
468
468
|
export declare type EntityTagPickerProps = {
|
|
@@ -553,9 +553,9 @@ export declare function InspectEntityDialog(props: {
|
|
|
553
553
|
/* Excluded from this release type: isOwnerOf */
|
|
554
554
|
|
|
555
555
|
/** @public */
|
|
556
|
-
export declare
|
|
557
|
-
value?: Partial<EntityListContextProps<
|
|
558
|
-
}>)
|
|
556
|
+
export declare function MockEntityListContextProvider<T extends DefaultEntityFilters = DefaultEntityFilters>({ children, value, }: PropsWithChildren<{
|
|
557
|
+
value?: Partial<EntityListContextProps<T>>;
|
|
558
|
+
}>): JSX.Element;
|
|
559
559
|
|
|
560
560
|
/**
|
|
561
561
|
* An in-memory mock implementation of the StarredEntitiesApi.
|
package/dist/index.esm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { CATALOG_FILTER_EXISTS } from '@backstage/catalog-client';
|
|
2
2
|
import { createApiRef, createRouteRef, useRouteRef, useApi, AnalyticsContext, identityApiRef, alertApiRef, useApiHolder, useApp, configApiRef } from '@backstage/core-plugin-api';
|
|
3
3
|
import ObservableImpl from 'zen-observable';
|
|
4
|
-
import React, { useState, forwardRef, createContext, useMemo, useCallback, useContext, useEffect, useRef, useLayoutEffect, Fragment } from 'react';
|
|
4
|
+
import React, { useState, forwardRef, createContext, useMemo, useCallback, useContext, useEffect, useRef, memo, useLayoutEffect, Fragment } from 'react';
|
|
5
5
|
import { Grid, useMediaQuery, useTheme, Button, Drawer, Box, Typography, Tooltip, makeStyles, FormControlLabel, Checkbox, TextField, IconButton, Card, CardContent, Chip, CardActions, Toolbar, FormControl, Input, InputAdornment, withStyles, DialogContentText, ListItemText as ListItemText$1, ListSubheader as ListSubheader$1, ListItem, ListItemIcon, List, Dialog, DialogTitle, DialogContent, Tabs, Tab, DialogActions, Divider, MenuItem, ListItemSecondaryAction } from '@material-ui/core';
|
|
6
6
|
import FilterListIcon from '@material-ui/icons/FilterList';
|
|
7
7
|
import { Link, Progress, ErrorPanel, Select, ResponseErrorPanel, OverflowTooltip, Table, DependencyGraph, DependencyGraphTypes, CodeSnippet } from '@backstage/core-components';
|
|
8
8
|
import { DEFAULT_NAMESPACE, parseEntityRef, ANNOTATION_SOURCE_LOCATION, parseLocationRef, RELATION_MEMBER_OF, getCompoundEntityRef, stringifyEntityRef, RELATION_OWNED_BY, isUserEntity, isGroupEntity, RELATION_PART_OF, ANNOTATION_LOCATION, ANNOTATION_ORIGIN_LOCATION } from '@backstage/catalog-model';
|
|
9
9
|
import { getOrCreateGlobalSingleton, createVersionedContext, createVersionedValueMap, useVersionedContext } from '@backstage/version-bridge';
|
|
10
10
|
import useAsync from 'react-use/lib/useAsync';
|
|
11
|
-
import { compact, isEqual, groupBy, chunk, debounce } from 'lodash';
|
|
11
|
+
import _, { compact, isEqual, groupBy, chunk, debounce } from 'lodash';
|
|
12
12
|
import qs from 'qs';
|
|
13
13
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
14
14
|
import useAsyncFn from 'react-use/lib/useAsyncFn';
|
|
@@ -28,9 +28,9 @@ import InfoIcon from '@material-ui/icons/Info';
|
|
|
28
28
|
import EmailIcon from '@material-ui/icons/Email';
|
|
29
29
|
import Clear from '@material-ui/icons/Clear';
|
|
30
30
|
import Search from '@material-ui/icons/Search';
|
|
31
|
+
import classNames from 'classnames';
|
|
31
32
|
import Star from '@material-ui/icons/Star';
|
|
32
33
|
import StarBorder from '@material-ui/icons/StarBorder';
|
|
33
|
-
import classNames from 'classnames';
|
|
34
34
|
import WorkIcon from '@material-ui/icons/Work';
|
|
35
35
|
import HelpOutlineIcon from '@material-ui/icons/HelpOutline';
|
|
36
36
|
import groupBy$1 from 'lodash/groupBy';
|
|
@@ -964,7 +964,7 @@ const EntityKindPicker = (props) => {
|
|
|
964
964
|
));
|
|
965
965
|
};
|
|
966
966
|
|
|
967
|
-
const useStyles$
|
|
967
|
+
const useStyles$e = makeStyles(
|
|
968
968
|
{
|
|
969
969
|
input: {}
|
|
970
970
|
},
|
|
@@ -977,7 +977,7 @@ const checkedIcon$3 = /* @__PURE__ */ React.createElement(CheckBoxIcon, { fontSi
|
|
|
977
977
|
const EntityLifecyclePicker = (props) => {
|
|
978
978
|
var _a, _b;
|
|
979
979
|
const { initialFilter = [] } = props;
|
|
980
|
-
const classes = useStyles$
|
|
980
|
+
const classes = useStyles$e();
|
|
981
981
|
const {
|
|
982
982
|
updateFilters,
|
|
983
983
|
backendEntities,
|
|
@@ -1049,7 +1049,7 @@ const EntityLifecyclePicker = (props) => {
|
|
|
1049
1049
|
)));
|
|
1050
1050
|
};
|
|
1051
1051
|
|
|
1052
|
-
const useStyles$
|
|
1052
|
+
const useStyles$d = makeStyles(
|
|
1053
1053
|
{
|
|
1054
1054
|
input: {}
|
|
1055
1055
|
},
|
|
@@ -1061,7 +1061,7 @@ const icon$2 = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, { f
|
|
|
1061
1061
|
const checkedIcon$2 = /* @__PURE__ */ React.createElement(CheckBoxIcon, { fontSize: "small" });
|
|
1062
1062
|
const EntityOwnerPicker = () => {
|
|
1063
1063
|
var _a, _b;
|
|
1064
|
-
const classes = useStyles$
|
|
1064
|
+
const classes = useStyles$d();
|
|
1065
1065
|
const {
|
|
1066
1066
|
updateFilters,
|
|
1067
1067
|
backendEntities,
|
|
@@ -1173,7 +1173,7 @@ const UserCardActions = (props) => {
|
|
|
1173
1173
|
return email ? /* @__PURE__ */ React.createElement(EmailCardAction, { email }) : null;
|
|
1174
1174
|
};
|
|
1175
1175
|
|
|
1176
|
-
const useStyles$
|
|
1176
|
+
const useStyles$c = makeStyles(() => {
|
|
1177
1177
|
return {
|
|
1178
1178
|
popoverPaper: {
|
|
1179
1179
|
width: "30em"
|
|
@@ -1191,7 +1191,7 @@ const maxTagChips = 4;
|
|
|
1191
1191
|
const EntityPeekAheadPopover = (props) => {
|
|
1192
1192
|
var _a, _b, _c;
|
|
1193
1193
|
const { entityRef, children, delayTime = 500 } = props;
|
|
1194
|
-
const classes = useStyles$
|
|
1194
|
+
const classes = useStyles$c();
|
|
1195
1195
|
const apiHolder = useApiHolder();
|
|
1196
1196
|
const popupState = usePopupState({
|
|
1197
1197
|
variant: "popover",
|
|
@@ -1260,7 +1260,7 @@ const EntityPeekAheadPopover = (props) => {
|
|
|
1260
1260
|
));
|
|
1261
1261
|
};
|
|
1262
1262
|
|
|
1263
|
-
const useStyles$
|
|
1263
|
+
const useStyles$b = makeStyles(
|
|
1264
1264
|
(_theme) => ({
|
|
1265
1265
|
searchToolbar: {
|
|
1266
1266
|
paddingLeft: 0,
|
|
@@ -1274,7 +1274,7 @@ const useStyles$a = makeStyles(
|
|
|
1274
1274
|
);
|
|
1275
1275
|
const EntitySearchBar = () => {
|
|
1276
1276
|
var _a, _b;
|
|
1277
|
-
const classes = useStyles$
|
|
1277
|
+
const classes = useStyles$b();
|
|
1278
1278
|
const { filters, updateFilters } = useEntityList();
|
|
1279
1279
|
const [search, setSearch] = useState((_b = (_a = filters.text) == null ? void 0 : _a.value) != null ? _b : "");
|
|
1280
1280
|
useDebounce(
|
|
@@ -1439,7 +1439,7 @@ const componentEntityColumns = [
|
|
|
1439
1439
|
columnFactories.createMetadataDescriptionColumn()
|
|
1440
1440
|
];
|
|
1441
1441
|
|
|
1442
|
-
const useStyles$
|
|
1442
|
+
const useStyles$a = makeStyles((theme) => ({
|
|
1443
1443
|
empty: {
|
|
1444
1444
|
padding: theme.spacing(2),
|
|
1445
1445
|
display: "flex",
|
|
@@ -1454,7 +1454,7 @@ const EntityTable = (props) => {
|
|
|
1454
1454
|
variant = "gridItem",
|
|
1455
1455
|
columns
|
|
1456
1456
|
} = props;
|
|
1457
|
-
const classes = useStyles$
|
|
1457
|
+
const classes = useStyles$a();
|
|
1458
1458
|
const tableStyle = {
|
|
1459
1459
|
minWidth: "0",
|
|
1460
1460
|
width: "100%"
|
|
@@ -1485,28 +1485,55 @@ EntityTable.columns = columnFactories;
|
|
|
1485
1485
|
EntityTable.systemEntityColumns = systemEntityColumns;
|
|
1486
1486
|
EntityTable.componentEntityColumns = componentEntityColumns;
|
|
1487
1487
|
|
|
1488
|
-
const
|
|
1488
|
+
const icon$1 = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, { fontSize: "small" });
|
|
1489
|
+
const checkedIcon$1 = /* @__PURE__ */ React.createElement(CheckBoxIcon, { fontSize: "small" });
|
|
1490
|
+
function OptionCheckbox({ selected }) {
|
|
1491
|
+
return /* @__PURE__ */ React.createElement(Checkbox, { icon: icon$1, checkedIcon: checkedIcon$1, checked: selected });
|
|
1492
|
+
}
|
|
1493
|
+
const EntityAutocompletePickerOption = memo((props) => {
|
|
1494
|
+
const { selected, value, availableOptions, showCounts } = props;
|
|
1495
|
+
const label = showCounts ? `${value} (${availableOptions == null ? void 0 : availableOptions[value]})` : value;
|
|
1496
|
+
return /* @__PURE__ */ React.createElement(
|
|
1497
|
+
FormControlLabel,
|
|
1498
|
+
{
|
|
1499
|
+
control: /* @__PURE__ */ React.createElement(OptionCheckbox, { selected }),
|
|
1500
|
+
label
|
|
1501
|
+
}
|
|
1502
|
+
);
|
|
1503
|
+
});
|
|
1504
|
+
|
|
1505
|
+
const useStyles$9 = makeStyles(
|
|
1489
1506
|
{
|
|
1490
1507
|
input: {}
|
|
1491
1508
|
},
|
|
1492
1509
|
{
|
|
1493
|
-
name: "
|
|
1510
|
+
name: "CatalogReactEntityAutocompletePickerInput"
|
|
1494
1511
|
}
|
|
1495
1512
|
);
|
|
1496
|
-
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1513
|
+
function EntityAutocompletePickerInput(params) {
|
|
1514
|
+
const classes = useStyles$9();
|
|
1515
|
+
return /* @__PURE__ */ React.createElement(
|
|
1516
|
+
TextField,
|
|
1517
|
+
{
|
|
1518
|
+
variant: "outlined",
|
|
1519
|
+
...params,
|
|
1520
|
+
className: classNames(classes.input, params.className)
|
|
1521
|
+
}
|
|
1522
|
+
);
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
function EntityAutocompletePicker(props) {
|
|
1499
1526
|
var _a, _b;
|
|
1500
|
-
const
|
|
1527
|
+
const { label, name, path, showCounts, Filter, InputProps } = props;
|
|
1501
1528
|
const {
|
|
1502
1529
|
updateFilters,
|
|
1503
1530
|
filters,
|
|
1504
|
-
queryParameters: {
|
|
1531
|
+
queryParameters: { [name]: queryParameter }
|
|
1505
1532
|
} = useEntityList();
|
|
1506
1533
|
const catalogApi = useApi(catalogApiRef);
|
|
1507
|
-
const { value:
|
|
1534
|
+
const { value: availableValues } = useAsync(async () => {
|
|
1508
1535
|
var _a2;
|
|
1509
|
-
const facet =
|
|
1536
|
+
const facet = path;
|
|
1510
1537
|
const { facets } = await catalogApi.getEntityFacets({
|
|
1511
1538
|
facets: [facet],
|
|
1512
1539
|
filter: (_a2 = filters.kind) == null ? void 0 : _a2.getCatalogFilters()
|
|
@@ -1515,59 +1542,68 @@ const EntityTagPicker = (props) => {
|
|
|
1515
1542
|
facets[facet].map(({ value, count }) => [value, count])
|
|
1516
1543
|
);
|
|
1517
1544
|
}, [filters.kind]);
|
|
1518
|
-
const
|
|
1519
|
-
() => [
|
|
1520
|
-
[
|
|
1545
|
+
const queryParameters = useMemo(
|
|
1546
|
+
() => [queryParameter].flat().filter(Boolean),
|
|
1547
|
+
[queryParameter]
|
|
1521
1548
|
);
|
|
1522
|
-
const [
|
|
1523
|
-
|
|
1549
|
+
const [selectedOptions, setSelectedOptions] = useState(
|
|
1550
|
+
queryParameters.length ? queryParameters : (_b = (_a = filters[name]) == null ? void 0 : _a.values) != null ? _b : []
|
|
1524
1551
|
);
|
|
1525
1552
|
useEffect(() => {
|
|
1526
|
-
if (
|
|
1527
|
-
|
|
1553
|
+
if (queryParameters.length && !_.isEqual(selectedOptions, queryParameters)) {
|
|
1554
|
+
setSelectedOptions(queryParameters);
|
|
1528
1555
|
}
|
|
1529
|
-
}, [
|
|
1556
|
+
}, [selectedOptions, queryParameters]);
|
|
1557
|
+
const availableOptions = Object.keys(availableValues != null ? availableValues : {});
|
|
1558
|
+
const shouldAddFilter = selectedOptions.length && availableOptions.length;
|
|
1530
1559
|
useEffect(() => {
|
|
1531
|
-
const tags = Object.keys(availableTags != null ? availableTags : {});
|
|
1532
1560
|
updateFilters({
|
|
1533
|
-
|
|
1561
|
+
[name]: shouldAddFilter ? new Filter(selectedOptions) : void 0
|
|
1534
1562
|
});
|
|
1535
|
-
}, [
|
|
1536
|
-
if (!
|
|
1563
|
+
}, [name, shouldAddFilter, selectedOptions, Filter, updateFilters]);
|
|
1564
|
+
if (filters[name] && !("values" in filters[name]) || !availableOptions.length) {
|
|
1537
1565
|
return null;
|
|
1538
|
-
|
|
1566
|
+
}
|
|
1567
|
+
return /* @__PURE__ */ React.createElement(Box, { pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(Typography, { variant: "button", component: "label" }, label, /* @__PURE__ */ React.createElement(
|
|
1539
1568
|
Autocomplete,
|
|
1540
1569
|
{
|
|
1541
1570
|
multiple: true,
|
|
1542
|
-
options:
|
|
1543
|
-
value:
|
|
1544
|
-
onChange: (
|
|
1571
|
+
options: availableOptions,
|
|
1572
|
+
value: selectedOptions,
|
|
1573
|
+
onChange: (_event, options) => setSelectedOptions(options),
|
|
1545
1574
|
renderOption: (option, { selected }) => /* @__PURE__ */ React.createElement(
|
|
1546
|
-
|
|
1575
|
+
EntityAutocompletePickerOption,
|
|
1547
1576
|
{
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
checkedIcon: checkedIcon$1,
|
|
1553
|
-
checked: selected
|
|
1554
|
-
}
|
|
1555
|
-
),
|
|
1556
|
-
label: props.showCounts ? `${option} (${availableTags == null ? void 0 : availableTags[option]})` : option
|
|
1577
|
+
selected,
|
|
1578
|
+
value: option,
|
|
1579
|
+
availableOptions: availableValues,
|
|
1580
|
+
showCounts: !!showCounts
|
|
1557
1581
|
}
|
|
1558
1582
|
),
|
|
1559
1583
|
size: "small",
|
|
1560
|
-
popupIcon: /* @__PURE__ */ React.createElement(ExpandMoreIcon, { "data-testid":
|
|
1561
|
-
renderInput: (params) => /* @__PURE__ */ React.createElement(
|
|
1562
|
-
TextField,
|
|
1563
|
-
{
|
|
1564
|
-
...params,
|
|
1565
|
-
className: classes.input,
|
|
1566
|
-
variant: "outlined"
|
|
1567
|
-
}
|
|
1568
|
-
)
|
|
1584
|
+
popupIcon: /* @__PURE__ */ React.createElement(ExpandMoreIcon, { "data-testid": `${String(name)}-picker-expand` }),
|
|
1585
|
+
renderInput: (params) => /* @__PURE__ */ React.createElement(EntityAutocompletePickerInput, { ...params, ...InputProps })
|
|
1569
1586
|
}
|
|
1570
1587
|
)));
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
const useStyles$8 = makeStyles(
|
|
1591
|
+
{ input: {} },
|
|
1592
|
+
{ name: "CatalogReactEntityTagPicker" }
|
|
1593
|
+
);
|
|
1594
|
+
const EntityTagPicker = (props) => {
|
|
1595
|
+
const classes = useStyles$8();
|
|
1596
|
+
return /* @__PURE__ */ React.createElement(
|
|
1597
|
+
EntityAutocompletePicker,
|
|
1598
|
+
{
|
|
1599
|
+
label: "Tags",
|
|
1600
|
+
name: "tags",
|
|
1601
|
+
path: "metadata.tags",
|
|
1602
|
+
Filter: EntityTagFilter,
|
|
1603
|
+
showCounts: props.showCounts,
|
|
1604
|
+
InputProps: { className: classes.input }
|
|
1605
|
+
}
|
|
1606
|
+
);
|
|
1571
1607
|
};
|
|
1572
1608
|
|
|
1573
1609
|
const EntityTypePicker = (props) => {
|
|
@@ -2548,14 +2584,12 @@ const EntityProcessingStatusPicker = () => {
|
|
|
2548
2584
|
)));
|
|
2549
2585
|
};
|
|
2550
2586
|
|
|
2551
|
-
|
|
2587
|
+
function MockEntityListContextProvider({
|
|
2552
2588
|
children,
|
|
2553
2589
|
value
|
|
2554
|
-
})
|
|
2590
|
+
}) {
|
|
2555
2591
|
var _a;
|
|
2556
|
-
const [filters, setFilters] = useState(
|
|
2557
|
-
(_a = value == null ? void 0 : value.filters) != null ? _a : {}
|
|
2558
|
-
);
|
|
2592
|
+
const [filters, setFilters] = useState((_a = value == null ? void 0 : value.filters) != null ? _a : {});
|
|
2559
2593
|
const updateFilters = useCallback(
|
|
2560
2594
|
(update) => {
|
|
2561
2595
|
setFilters((prevFilters) => {
|
|
@@ -2589,7 +2623,7 @@ const MockEntityListContextProvider = ({
|
|
|
2589
2623
|
[value, defaultValues, filters, updateFilters]
|
|
2590
2624
|
);
|
|
2591
2625
|
return /* @__PURE__ */ React.createElement(EntityListContext.Provider, { value: resolvedValue }, children);
|
|
2592
|
-
}
|
|
2626
|
+
}
|
|
2593
2627
|
|
|
2594
2628
|
export { AsyncEntityProvider, CatalogFilterLayout, EntityErrorFilter, EntityKindFilter, EntityKindPicker, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListProvider, EntityOrphanFilter, EntityOwnerFilter, EntityOwnerPicker, EntityPeekAheadPopover, EntityProcessingStatusPicker, EntityProvider, EntityRefLink, EntityRefLinks, EntitySearchBar, EntityTable, EntityTagFilter, EntityTagPicker, EntityTextFilter, EntityTypeFilter, EntityTypePicker, FavoriteEntity, InspectEntityDialog, MockEntityListContextProvider, MockStarredEntitiesApi, UnregisterEntityDialog, UserListFilter, UserListPicker, catalogApiRef, columnFactories, entityRouteParams, entityRouteRef, getEntityRelations, getEntitySourceLocation, humanizeEntityRef, isOwnerOf, starredEntitiesApiRef, useAsyncEntity, useEntity, useEntityList, useEntityOwnership, useEntityPermission, useEntityTypeFilter, useRelatedEntities, useStarredEntities, useStarredEntity };
|
|
2595
2629
|
//# sourceMappingURL=index.esm.js.map
|