@backstage/plugin-catalog-react 1.4.1-next.1 → 1.5.0-next.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,62 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.5.0-next.3
4
+
5
+ ### Minor Changes
6
+
7
+ - a49fb39df5a: Attempt to load entity owner names in the EntityOwnerPicker through the `by-refs` endpoint. If `spec.profile.displayName` or `metadata.title` are populated, we now attempt to show those before showing the `humanizeEntityRef`'d version.
8
+
9
+ **BREAKING**: `EntityOwnerFilter` now uses the full entity ref instead of the `humanizeEntityRef`. If you rely on `EntityOwnerFilter.values` or the `queryParameters.owners` of `useEntityList`, you will need to adjust your code like the following.
10
+
11
+ ```tsx
12
+ const { queryParameters: { owners } } = useEntityList();
13
+ // or
14
+ const { filter: { owners } } = useEntityList();
15
+
16
+ // Instead of,
17
+ if (owners.some(ref => ref === humanizeEntityRef(myEntity))) ...
18
+
19
+ // You'll need to use,
20
+ if (owners.some(ref => ref === stringifyEntityRef(myEntity))) ...
21
+ ```
22
+
23
+ ### Patch Changes
24
+
25
+ - d1f5324dff7: Reverted the check if the selected options list is different than the query parameters list before invoking `setSelectedOptions` method. This was preventing updating list items when a query string was already present in the URL when loading the page.
26
+ - Updated dependencies
27
+ - @backstage/catalog-model@1.3.0-next.0
28
+ - @backstage/core-components@0.13.0-next.3
29
+ - @backstage/catalog-client@1.4.1-next.1
30
+ - @backstage/core-plugin-api@1.5.1-next.1
31
+ - @backstage/errors@1.1.5
32
+ - @backstage/integration@1.4.4-next.0
33
+ - @backstage/theme@0.2.19-next.0
34
+ - @backstage/types@1.0.2
35
+ - @backstage/version-bridge@1.0.4-next.0
36
+ - @backstage/plugin-catalog-common@1.0.13-next.1
37
+ - @backstage/plugin-permission-common@0.7.5-next.0
38
+ - @backstage/plugin-permission-react@0.4.12-next.1
39
+
40
+ ## 1.4.1-next.2
41
+
42
+ ### Patch Changes
43
+
44
+ - 81bee24c5de: Fixed bug in catalog filters where you could not click on the text to select a value.
45
+ - 2898b6c8d52: Minor type tweaks for TypeScript 5.0
46
+ - Updated dependencies
47
+ - @backstage/catalog-client@1.4.1-next.0
48
+ - @backstage/core-components@0.12.6-next.2
49
+ - @backstage/core-plugin-api@1.5.1-next.1
50
+ - @backstage/catalog-model@1.2.1
51
+ - @backstage/errors@1.1.5
52
+ - @backstage/integration@1.4.4-next.0
53
+ - @backstage/theme@0.2.19-next.0
54
+ - @backstage/types@1.0.2
55
+ - @backstage/version-bridge@1.0.4-next.0
56
+ - @backstage/plugin-catalog-common@1.0.13-next.0
57
+ - @backstage/plugin-permission-common@0.7.5-next.0
58
+ - @backstage/plugin-permission-react@0.4.12-next.1
59
+
3
60
  ## 1.4.1-next.1
4
61
 
5
62
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "1.4.1-next.1",
3
+ "version": "1.5.0-next.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
@@ -87,14 +87,14 @@ interface EntityKindPickerProps {
87
87
  declare const EntityKindPicker: (props: EntityKindPickerProps) => JSX.Element | null;
88
88
 
89
89
  /** @public */
90
- declare type CatalogReactEntityLifecyclePickerClassKey = 'input';
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
- declare type CatalogReactEntityOwnerPickerClassKey = 'input';
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
- declare type EntityRefLinkProps = {
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
- declare type EntityRefLinksProps<TRef extends string | CompoundEntityRef | Entity> = ({
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
- declare type EntityPeekAheadPopoverProps = PropsWithChildren<{
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
- declare type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
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
- declare type CatalogReactEntityTagPickerClassKey = 'input';
241
+ type CatalogReactEntityTagPickerClassKey = 'input';
242
242
  /** @public */
243
- declare type EntityTagPickerProps = {
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
- declare type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
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
- declare type UnregisterEntityDialogProps = {
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
- declare type EntityFilter = {
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
- declare type UserListFilterKind = 'owned' | 'starred' | 'all';
316
+ type UserListFilterKind = 'owned' | 'starred' | 'all';
317
317
 
318
318
  /** @public */
319
- declare type CatalogReactUserListPickerClassKey = 'root' | 'title' | 'listIcon' | 'menuItem' | 'groupWrapper';
319
+ type CatalogReactUserListPickerClassKey = 'root' | 'title' | 'listIcon' | 'menuItem' | 'groupWrapper';
320
320
  /** @public */
321
- declare type UserListPickerProps = {
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
- declare type CatalogReactEntityProcessingStatusPickerClassKey = 'input';
329
+ type CatalogReactEntityProcessingStatusPickerClassKey = 'input';
330
330
  /** @public */
331
331
  declare const EntityProcessingStatusPicker: () => JSX.Element;
332
332
 
333
333
  /** @public */
334
- declare type EntityLoadingStatus<TEntity extends Entity = Entity> = {
334
+ type EntityLoadingStatus<TEntity extends Entity = Entity> = {
335
335
  entity?: TEntity;
336
336
  loading: boolean;
337
337
  error?: Error;
@@ -430,11 +430,17 @@ declare class EntityTextFilter implements EntityFilter {
430
430
  /**
431
431
  * Filter matching entities that are owned by group.
432
432
  * @public
433
+ *
434
+ * CAUTION: This class may contain both full and partial entity refs.
433
435
  */
434
436
  declare class EntityOwnerFilter implements EntityFilter {
435
437
  readonly values: string[];
436
438
  constructor(values: string[]);
437
439
  filterEntity(entity: Entity): boolean;
440
+ /**
441
+ * Get the URL query parameter value. May be a mix of full and humanized entity refs.
442
+ * @returns list of entity refs.
443
+ */
438
444
  toQueryValue(): string[];
439
445
  }
440
446
  /**
@@ -479,7 +485,7 @@ declare class EntityErrorFilter implements EntityFilter {
479
485
  }
480
486
 
481
487
  /** @public */
482
- declare type DefaultEntityFilters = {
488
+ type DefaultEntityFilters = {
483
489
  kind?: EntityKindFilter;
484
490
  type?: EntityTypeFilter;
485
491
  user?: UserListFilter;
@@ -491,7 +497,7 @@ declare type DefaultEntityFilters = {
491
497
  error?: EntityErrorFilter;
492
498
  };
493
499
  /** @public */
494
- declare type EntityListContextProps<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters> = {
500
+ type EntityListContextProps<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters> = {
495
501
  /**
496
502
  * The currently registered filters, adhering to the shape of DefaultEntityFilters or an extension
497
503
  * of that default (to add custom filter types).
@@ -615,7 +621,7 @@ declare function MockEntityListContextProvider<T extends DefaultEntityFilters =
615
621
  }>): JSX.Element;
616
622
 
617
623
  /** @public */
618
- declare type CatalogReactComponentsNameToClassKey = {
624
+ type CatalogReactComponentsNameToClassKey = {
619
625
  CatalogReactUserListPicker: CatalogReactUserListPickerClassKey;
620
626
  CatalogReactEntityLifecyclePicker: CatalogReactEntityLifecyclePickerClassKey;
621
627
  CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey;
@@ -624,7 +630,7 @@ declare type CatalogReactComponentsNameToClassKey = {
624
630
  CatalogReactEntityProcessingStatusPicker: CatalogReactEntityProcessingStatusPickerClassKey;
625
631
  };
626
632
  /** @public */
627
- declare type BackstageOverrides = Overrides & {
633
+ type BackstageOverrides = Overrides & {
628
634
  [Name in keyof CatalogReactComponentsNameToClassKey]?: Partial<StyleRules<CatalogReactComponentsNameToClassKey[Name]>>;
629
635
  };
630
636
 
@@ -638,7 +644,7 @@ declare function getEntityRelations(entity: Entity | undefined, relationType: st
638
644
  }): CompoundEntityRef[];
639
645
 
640
646
  /** @public */
641
- declare type EntitySourceLocation = {
647
+ type EntitySourceLocation = {
642
648
  locationTargetUrl: string;
643
649
  integrationType?: string;
644
650
  };