@backstage/plugin-catalog-react 1.4.1-next.1 → 1.4.1-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 +20 -0
- package/alpha/package.json +1 -1
- package/dist/index.d.ts +21 -21
- package/dist/index.esm.js +12 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 1.4.1-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 81bee24c5de: Fixed bug in catalog filters where you could not click on the text to select a value.
|
|
8
|
+
- 2898b6c8d52: Minor type tweaks for TypeScript 5.0
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/catalog-client@1.4.1-next.0
|
|
11
|
+
- @backstage/core-components@0.12.6-next.2
|
|
12
|
+
- @backstage/core-plugin-api@1.5.1-next.1
|
|
13
|
+
- @backstage/catalog-model@1.2.1
|
|
14
|
+
- @backstage/errors@1.1.5
|
|
15
|
+
- @backstage/integration@1.4.4-next.0
|
|
16
|
+
- @backstage/theme@0.2.19-next.0
|
|
17
|
+
- @backstage/types@1.0.2
|
|
18
|
+
- @backstage/version-bridge@1.0.4-next.0
|
|
19
|
+
- @backstage/plugin-catalog-common@1.0.13-next.0
|
|
20
|
+
- @backstage/plugin-permission-common@0.7.5-next.0
|
|
21
|
+
- @backstage/plugin-permission-react@0.4.12-next.1
|
|
22
|
+
|
|
3
23
|
## 1.4.1-next.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -87,14 +87,14 @@ interface EntityKindPickerProps {
|
|
|
87
87
|
declare const EntityKindPicker: (props: EntityKindPickerProps) => JSX.Element | null;
|
|
88
88
|
|
|
89
89
|
/** @public */
|
|
90
|
-
|
|
90
|
+
type CatalogReactEntityLifecyclePickerClassKey = 'input';
|
|
91
91
|
/** @public */
|
|
92
92
|
declare const EntityLifecyclePicker: (props: {
|
|
93
93
|
initialFilter?: string[];
|
|
94
94
|
}) => JSX.Element | null;
|
|
95
95
|
|
|
96
96
|
/** @public */
|
|
97
|
-
|
|
97
|
+
type CatalogReactEntityOwnerPickerClassKey = 'input';
|
|
98
98
|
/** @public */
|
|
99
99
|
declare const EntityOwnerPicker: () => JSX.Element | null;
|
|
100
100
|
|
|
@@ -103,7 +103,7 @@ declare const EntityOwnerPicker: () => JSX.Element | null;
|
|
|
103
103
|
*
|
|
104
104
|
* @public
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
type EntityRefLinkProps = {
|
|
107
107
|
entityRef: Entity | CompoundEntityRef | string;
|
|
108
108
|
defaultKind?: string;
|
|
109
109
|
title?: string;
|
|
@@ -121,7 +121,7 @@ declare const EntityRefLink: (props: EntityRefLinkProps) => JSX.Element;
|
|
|
121
121
|
*
|
|
122
122
|
* @public
|
|
123
123
|
*/
|
|
124
|
-
|
|
124
|
+
type EntityRefLinksProps<TRef extends string | CompoundEntityRef | Entity> = ({
|
|
125
125
|
defaultKind?: string;
|
|
126
126
|
entityRefs: TRef[];
|
|
127
127
|
fetchEntities?: false;
|
|
@@ -154,7 +154,7 @@ declare function humanizeEntityRef(entityRef: Entity | CompoundEntityRef, opts?:
|
|
|
154
154
|
*
|
|
155
155
|
* @public
|
|
156
156
|
*/
|
|
157
|
-
|
|
157
|
+
type EntityPeekAheadPopoverProps = PropsWithChildren<{
|
|
158
158
|
entityRef: string;
|
|
159
159
|
delayTime?: number;
|
|
160
160
|
}>;
|
|
@@ -166,7 +166,7 @@ declare type EntityPeekAheadPopoverProps = PropsWithChildren<{
|
|
|
166
166
|
declare const EntityPeekAheadPopover: (props: EntityPeekAheadPopoverProps) => JSX.Element;
|
|
167
167
|
|
|
168
168
|
/** @public */
|
|
169
|
-
|
|
169
|
+
type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
|
|
170
170
|
/**
|
|
171
171
|
* Renders search bar for filtering the entity list.
|
|
172
172
|
* @public
|
|
@@ -238,9 +238,9 @@ declare const columnFactories: Readonly<{
|
|
|
238
238
|
}>;
|
|
239
239
|
|
|
240
240
|
/** @public */
|
|
241
|
-
|
|
241
|
+
type CatalogReactEntityTagPickerClassKey = 'input';
|
|
242
242
|
/** @public */
|
|
243
|
-
|
|
243
|
+
type EntityTagPickerProps = {
|
|
244
244
|
showCounts?: boolean;
|
|
245
245
|
};
|
|
246
246
|
/** @public */
|
|
@@ -259,7 +259,7 @@ interface EntityTypePickerProps {
|
|
|
259
259
|
declare const EntityTypePicker: (props: EntityTypePickerProps) => JSX.Element | null;
|
|
260
260
|
|
|
261
261
|
/** @public */
|
|
262
|
-
|
|
262
|
+
type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
|
|
263
263
|
entity: Entity;
|
|
264
264
|
};
|
|
265
265
|
/**
|
|
@@ -281,7 +281,7 @@ declare function InspectEntityDialog(props: {
|
|
|
281
281
|
}): JSX.Element | null;
|
|
282
282
|
|
|
283
283
|
/** @public */
|
|
284
|
-
|
|
284
|
+
type UnregisterEntityDialogProps = {
|
|
285
285
|
open: boolean;
|
|
286
286
|
onConfirm: () => any;
|
|
287
287
|
onClose: () => any;
|
|
@@ -291,7 +291,7 @@ declare type UnregisterEntityDialogProps = {
|
|
|
291
291
|
declare const UnregisterEntityDialog: (props: UnregisterEntityDialogProps) => JSX.Element;
|
|
292
292
|
|
|
293
293
|
/** @public */
|
|
294
|
-
|
|
294
|
+
type EntityFilter = {
|
|
295
295
|
/**
|
|
296
296
|
* Get filters to add to the catalog-backend request. These are a dot-delimited field with
|
|
297
297
|
* value(s) to accept, extracted on the backend by parseEntityFilterParams. For example:
|
|
@@ -313,12 +313,12 @@ declare type EntityFilter = {
|
|
|
313
313
|
toQueryValue?: () => string | string[];
|
|
314
314
|
};
|
|
315
315
|
/** @public */
|
|
316
|
-
|
|
316
|
+
type UserListFilterKind = 'owned' | 'starred' | 'all';
|
|
317
317
|
|
|
318
318
|
/** @public */
|
|
319
|
-
|
|
319
|
+
type CatalogReactUserListPickerClassKey = 'root' | 'title' | 'listIcon' | 'menuItem' | 'groupWrapper';
|
|
320
320
|
/** @public */
|
|
321
|
-
|
|
321
|
+
type UserListPickerProps = {
|
|
322
322
|
initialFilter?: UserListFilterKind;
|
|
323
323
|
availableFilters?: UserListFilterKind[];
|
|
324
324
|
};
|
|
@@ -326,12 +326,12 @@ declare type UserListPickerProps = {
|
|
|
326
326
|
declare const UserListPicker: (props: UserListPickerProps) => JSX.Element;
|
|
327
327
|
|
|
328
328
|
/** @public */
|
|
329
|
-
|
|
329
|
+
type CatalogReactEntityProcessingStatusPickerClassKey = 'input';
|
|
330
330
|
/** @public */
|
|
331
331
|
declare const EntityProcessingStatusPicker: () => JSX.Element;
|
|
332
332
|
|
|
333
333
|
/** @public */
|
|
334
|
-
|
|
334
|
+
type EntityLoadingStatus<TEntity extends Entity = Entity> = {
|
|
335
335
|
entity?: TEntity;
|
|
336
336
|
loading: boolean;
|
|
337
337
|
error?: Error;
|
|
@@ -479,7 +479,7 @@ declare class EntityErrorFilter implements EntityFilter {
|
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
/** @public */
|
|
482
|
-
|
|
482
|
+
type DefaultEntityFilters = {
|
|
483
483
|
kind?: EntityKindFilter;
|
|
484
484
|
type?: EntityTypeFilter;
|
|
485
485
|
user?: UserListFilter;
|
|
@@ -491,7 +491,7 @@ declare type DefaultEntityFilters = {
|
|
|
491
491
|
error?: EntityErrorFilter;
|
|
492
492
|
};
|
|
493
493
|
/** @public */
|
|
494
|
-
|
|
494
|
+
type EntityListContextProps<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters> = {
|
|
495
495
|
/**
|
|
496
496
|
* The currently registered filters, adhering to the shape of DefaultEntityFilters or an extension
|
|
497
497
|
* of that default (to add custom filter types).
|
|
@@ -615,7 +615,7 @@ declare function MockEntityListContextProvider<T extends DefaultEntityFilters =
|
|
|
615
615
|
}>): JSX.Element;
|
|
616
616
|
|
|
617
617
|
/** @public */
|
|
618
|
-
|
|
618
|
+
type CatalogReactComponentsNameToClassKey = {
|
|
619
619
|
CatalogReactUserListPicker: CatalogReactUserListPickerClassKey;
|
|
620
620
|
CatalogReactEntityLifecyclePicker: CatalogReactEntityLifecyclePickerClassKey;
|
|
621
621
|
CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey;
|
|
@@ -624,7 +624,7 @@ declare type CatalogReactComponentsNameToClassKey = {
|
|
|
624
624
|
CatalogReactEntityProcessingStatusPicker: CatalogReactEntityProcessingStatusPickerClassKey;
|
|
625
625
|
};
|
|
626
626
|
/** @public */
|
|
627
|
-
|
|
627
|
+
type BackstageOverrides = Overrides & {
|
|
628
628
|
[Name in keyof CatalogReactComponentsNameToClassKey]?: Partial<StyleRules<CatalogReactComponentsNameToClassKey[Name]>>;
|
|
629
629
|
};
|
|
630
630
|
|
|
@@ -638,7 +638,7 @@ declare function getEntityRelations(entity: Entity | undefined, relationType: st
|
|
|
638
638
|
}): CompoundEntityRef[];
|
|
639
639
|
|
|
640
640
|
/** @public */
|
|
641
|
-
|
|
641
|
+
type EntitySourceLocation = {
|
|
642
642
|
locationTargetUrl: string;
|
|
643
643
|
integrationType?: string;
|
|
644
644
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -206,10 +206,13 @@ function FetchedEntityRefLinks(props) {
|
|
|
206
206
|
error
|
|
207
207
|
} = useAsync(async () => {
|
|
208
208
|
const refs = entityRefs.reduce((acc, current) => {
|
|
209
|
-
|
|
209
|
+
if (typeof current === "object" && "metadata" in current) {
|
|
210
|
+
return acc;
|
|
211
|
+
}
|
|
212
|
+
return [...acc, parseEntityRef(current)];
|
|
210
213
|
}, new Array());
|
|
211
214
|
const pureEntities = entityRefs.filter(
|
|
212
|
-
(ref) => "metadata" in ref
|
|
215
|
+
(ref) => typeof ref === "object" && "metadata" in ref
|
|
213
216
|
);
|
|
214
217
|
return refs.length > 0 ? [
|
|
215
218
|
...(await catalogApi.getEntities({
|
|
@@ -916,6 +919,7 @@ const EntityLifecyclePicker = (props) => {
|
|
|
916
919
|
checked: selected
|
|
917
920
|
}
|
|
918
921
|
),
|
|
922
|
+
onClick: (event) => event.preventDefault(),
|
|
919
923
|
label: option
|
|
920
924
|
}
|
|
921
925
|
),
|
|
@@ -1002,6 +1006,7 @@ const EntityOwnerPicker = () => {
|
|
|
1002
1006
|
checked: selected
|
|
1003
1007
|
}
|
|
1004
1008
|
),
|
|
1009
|
+
onClick: (event) => event.preventDefault(),
|
|
1005
1010
|
label: option
|
|
1006
1011
|
}
|
|
1007
1012
|
),
|
|
@@ -1382,7 +1387,8 @@ const EntityAutocompletePickerOption = memo((props) => {
|
|
|
1382
1387
|
FormControlLabel,
|
|
1383
1388
|
{
|
|
1384
1389
|
control: /* @__PURE__ */ React.createElement(OptionCheckbox, { selected }),
|
|
1385
|
-
label
|
|
1390
|
+
label,
|
|
1391
|
+
onClick: (event) => event.preventDefault()
|
|
1386
1392
|
}
|
|
1387
1393
|
);
|
|
1388
1394
|
});
|
|
@@ -1446,7 +1452,8 @@ function EntityAutocompletePicker(props) {
|
|
|
1446
1452
|
[name]: shouldAddFilter ? new Filter(selectedOptions) : void 0
|
|
1447
1453
|
});
|
|
1448
1454
|
}, [name, shouldAddFilter, selectedOptions, Filter, updateFilters]);
|
|
1449
|
-
|
|
1455
|
+
const filter = filters[name];
|
|
1456
|
+
if (filter && typeof filter === "object" && !("values" in filter) || !availableOptions.length) {
|
|
1450
1457
|
return null;
|
|
1451
1458
|
}
|
|
1452
1459
|
return /* @__PURE__ */ React.createElement(Box, { pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(Typography, { variant: "button", component: "label" }, label, /* @__PURE__ */ React.createElement(
|
|
@@ -2454,6 +2461,7 @@ const EntityProcessingStatusPicker = () => {
|
|
|
2454
2461
|
checked: selected
|
|
2455
2462
|
}
|
|
2456
2463
|
),
|
|
2464
|
+
onClick: (event) => event.preventDefault(),
|
|
2457
2465
|
label: option
|
|
2458
2466
|
}
|
|
2459
2467
|
),
|