@backstage/plugin-catalog-react 0.0.0-nightly-20230328022219 → 0.0.0-nightly-20230330022134
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 -9
- package/alpha/package.json +1 -1
- package/dist/index.d.ts +21 -21
- package/dist/index.esm.js +7 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +17 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,23 +1,44 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20230330022134
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs)
|
|
8
|
+
- 2898b6c8d52: Minor type tweaks for TypeScript 5.0
|
|
9
|
+
- e0c6e8b9c3c: Update peer dependencies
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- @backstage/core-components@0.0.0-nightly-20230330022134
|
|
12
|
+
- @backstage/plugin-permission-common@0.0.0-nightly-20230330022134
|
|
13
|
+
- @backstage/core-plugin-api@0.0.0-nightly-20230330022134
|
|
14
|
+
- @backstage/plugin-permission-react@0.0.0-nightly-20230330022134
|
|
15
|
+
- @backstage/version-bridge@0.0.0-nightly-20230330022134
|
|
16
|
+
- @backstage/integration@0.0.0-nightly-20230330022134
|
|
17
|
+
- @backstage/theme@0.0.0-nightly-20230330022134
|
|
18
|
+
- @backstage/catalog-client@1.4.0
|
|
19
|
+
- @backstage/catalog-model@1.2.1
|
|
20
|
+
- @backstage/errors@1.1.5
|
|
21
|
+
- @backstage/types@1.0.2
|
|
22
|
+
- @backstage/plugin-catalog-common@0.0.0-nightly-20230330022134
|
|
23
|
+
|
|
24
|
+
## 1.4.1-next.1
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- e0c6e8b9c3c: Update peer dependencies
|
|
8
29
|
- Updated dependencies
|
|
9
|
-
- @backstage/core-components@0.
|
|
10
|
-
- @backstage/plugin-permission-common@0.
|
|
30
|
+
- @backstage/core-components@0.12.6-next.1
|
|
31
|
+
- @backstage/plugin-permission-common@0.7.5-next.0
|
|
32
|
+
- @backstage/core-plugin-api@1.5.1-next.0
|
|
33
|
+
- @backstage/plugin-permission-react@0.4.12-next.0
|
|
34
|
+
- @backstage/version-bridge@1.0.4-next.0
|
|
35
|
+
- @backstage/integration@1.4.4-next.0
|
|
36
|
+
- @backstage/theme@0.2.19-next.0
|
|
11
37
|
- @backstage/catalog-client@1.4.0
|
|
12
38
|
- @backstage/catalog-model@1.2.1
|
|
13
|
-
- @backstage/core-plugin-api@1.5.0
|
|
14
39
|
- @backstage/errors@1.1.5
|
|
15
|
-
- @backstage/integration@1.4.3
|
|
16
|
-
- @backstage/theme@0.2.18
|
|
17
40
|
- @backstage/types@1.0.2
|
|
18
|
-
- @backstage/
|
|
19
|
-
- @backstage/plugin-catalog-common@0.0.0-nightly-20230328022219
|
|
20
|
-
- @backstage/plugin-permission-react@0.0.0-nightly-20230328022219
|
|
41
|
+
- @backstage/plugin-catalog-common@1.0.13-next.0
|
|
21
42
|
|
|
22
43
|
## 1.4.1-next.0
|
|
23
44
|
|
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({
|
|
@@ -1446,7 +1449,8 @@ function EntityAutocompletePicker(props) {
|
|
|
1446
1449
|
[name]: shouldAddFilter ? new Filter(selectedOptions) : void 0
|
|
1447
1450
|
});
|
|
1448
1451
|
}, [name, shouldAddFilter, selectedOptions, Filter, updateFilters]);
|
|
1449
|
-
|
|
1452
|
+
const filter = filters[name];
|
|
1453
|
+
if (filter && typeof filter === "object" && !("values" in filter) || !availableOptions.length) {
|
|
1450
1454
|
return null;
|
|
1451
1455
|
}
|
|
1452
1456
|
return /* @__PURE__ */ React.createElement(Box, { pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(Typography, { variant: "button", component: "label" }, label, /* @__PURE__ */ React.createElement(
|