@backstage/plugin-catalog-react 1.1.4 → 1.2.0-next.1

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,46 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.2.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 4efadb6968: Implemented the visual parts of `EntityKindPicker` so that it can be shown alongside the other filters on the left side of your catalog pages.
8
+
9
+ ### Patch Changes
10
+
11
+ - 7939e743f5: Added two new `EntityRefLinks` props, the first being `getTitle` that allows for customization of the title used for each link. The second one is `fetchEntities`, which triggers a fetching of all entities so that the full entity definition is available in the `getTitle` callback.
12
+ - Updated dependencies
13
+ - @backstage/catalog-client@1.1.1-next.1
14
+ - @backstage/core-components@0.11.2-next.1
15
+ - @backstage/core-plugin-api@1.0.7-next.1
16
+ - @backstage/catalog-model@1.1.2-next.1
17
+ - @backstage/errors@1.1.2-next.1
18
+ - @backstage/integration@1.3.2-next.1
19
+ - @backstage/theme@0.2.16
20
+ - @backstage/types@1.0.0
21
+ - @backstage/version-bridge@1.0.1
22
+ - @backstage/plugin-catalog-common@1.0.7-next.1
23
+ - @backstage/plugin-permission-common@0.6.5-next.1
24
+ - @backstage/plugin-permission-react@0.4.6-next.1
25
+
26
+ ## 1.1.5-next.0
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies
31
+ - @backstage/catalog-model@1.1.2-next.0
32
+ - @backstage/core-components@0.11.2-next.0
33
+ - @backstage/catalog-client@1.1.1-next.0
34
+ - @backstage/core-plugin-api@1.0.7-next.0
35
+ - @backstage/errors@1.1.2-next.0
36
+ - @backstage/integration@1.3.2-next.0
37
+ - @backstage/theme@0.2.16
38
+ - @backstage/types@1.0.0
39
+ - @backstage/version-bridge@1.0.1
40
+ - @backstage/plugin-catalog-common@1.0.7-next.0
41
+ - @backstage/plugin-permission-common@0.6.5-next.0
42
+ - @backstage/plugin-permission-react@0.4.6-next.0
43
+
3
44
  ## 1.1.4
4
45
 
5
46
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "1.1.4",
3
+ "version": "1.2.0-next.1",
4
4
  "main": "../dist/index.esm.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
@@ -192,7 +192,7 @@ export declare const EntityKindPicker: (props: EntityKindPickerProps) => JSX.Ele
192
192
  */
193
193
  export declare interface EntityKindPickerProps {
194
194
  initialFilter?: string;
195
- hidden: boolean;
195
+ hidden?: boolean;
196
196
  }
197
197
 
198
198
  /**
@@ -325,17 +325,24 @@ export declare type EntityRefLinkProps = {
325
325
  *
326
326
  * @public
327
327
  */
328
- export declare function EntityRefLinks(props: EntityRefLinksProps): JSX.Element;
328
+ export declare function EntityRefLinks<TRef extends string | CompoundEntityRef | Entity>(props: EntityRefLinksProps<TRef>): JSX.Element;
329
329
 
330
330
  /**
331
331
  * Props for {@link EntityRefLink}.
332
332
  *
333
333
  * @public
334
334
  */
335
- export declare type EntityRefLinksProps = {
336
- entityRefs: (string | Entity | CompoundEntityRef)[];
335
+ export declare type EntityRefLinksProps<TRef extends string | CompoundEntityRef | Entity> = ({
337
336
  defaultKind?: string;
338
- } & Omit<LinkProps, 'to'>;
337
+ entityRefs: TRef[];
338
+ fetchEntities?: false;
339
+ getTitle?(entity: TRef): string | undefined;
340
+ } | {
341
+ defaultKind?: string;
342
+ entityRefs: TRef[];
343
+ fetchEntities: true;
344
+ getTitle(entity: Entity): string | undefined;
345
+ }) & Omit<LinkProps, 'to'>;
339
346
 
340
347
  /**
341
348
  * Utility function to get suitable route params for entityRoute, given an
@@ -192,7 +192,7 @@ export declare const EntityKindPicker: (props: EntityKindPickerProps) => JSX.Ele
192
192
  */
193
193
  export declare interface EntityKindPickerProps {
194
194
  initialFilter?: string;
195
- hidden: boolean;
195
+ hidden?: boolean;
196
196
  }
197
197
 
198
198
  /**
@@ -325,17 +325,24 @@ export declare type EntityRefLinkProps = {
325
325
  *
326
326
  * @public
327
327
  */
328
- export declare function EntityRefLinks(props: EntityRefLinksProps): JSX.Element;
328
+ export declare function EntityRefLinks<TRef extends string | CompoundEntityRef | Entity>(props: EntityRefLinksProps<TRef>): JSX.Element;
329
329
 
330
330
  /**
331
331
  * Props for {@link EntityRefLink}.
332
332
  *
333
333
  * @public
334
334
  */
335
- export declare type EntityRefLinksProps = {
336
- entityRefs: (string | Entity | CompoundEntityRef)[];
335
+ export declare type EntityRefLinksProps<TRef extends string | CompoundEntityRef | Entity> = ({
337
336
  defaultKind?: string;
338
- } & Omit<LinkProps, 'to'>;
337
+ entityRefs: TRef[];
338
+ fetchEntities?: false;
339
+ getTitle?(entity: TRef): string | undefined;
340
+ } | {
341
+ defaultKind?: string;
342
+ entityRefs: TRef[];
343
+ fetchEntities: true;
344
+ getTitle(entity: Entity): string | undefined;
345
+ }) & Omit<LinkProps, 'to'>;
339
346
 
340
347
  /**
341
348
  * Utility function to get suitable route params for entityRoute, given an
package/dist/index.d.ts CHANGED
@@ -192,7 +192,7 @@ export declare const EntityKindPicker: (props: EntityKindPickerProps) => JSX.Ele
192
192
  */
193
193
  export declare interface EntityKindPickerProps {
194
194
  initialFilter?: string;
195
- hidden: boolean;
195
+ hidden?: boolean;
196
196
  }
197
197
 
198
198
  /**
@@ -325,17 +325,24 @@ export declare type EntityRefLinkProps = {
325
325
  *
326
326
  * @public
327
327
  */
328
- export declare function EntityRefLinks(props: EntityRefLinksProps): JSX.Element;
328
+ export declare function EntityRefLinks<TRef extends string | CompoundEntityRef | Entity>(props: EntityRefLinksProps<TRef>): JSX.Element;
329
329
 
330
330
  /**
331
331
  * Props for {@link EntityRefLink}.
332
332
  *
333
333
  * @public
334
334
  */
335
- export declare type EntityRefLinksProps = {
336
- entityRefs: (string | Entity | CompoundEntityRef)[];
335
+ export declare type EntityRefLinksProps<TRef extends string | CompoundEntityRef | Entity> = ({
337
336
  defaultKind?: string;
338
- } & Omit<LinkProps, 'to'>;
337
+ entityRefs: TRef[];
338
+ fetchEntities?: false;
339
+ getTitle?(entity: TRef): string | undefined;
340
+ } | {
341
+ defaultKind?: string;
342
+ entityRefs: TRef[];
343
+ fetchEntities: true;
344
+ getTitle(entity: Entity): string | undefined;
345
+ }) & Omit<LinkProps, 'to'>;
339
346
 
340
347
  /**
341
348
  * Utility function to get suitable route params for entityRoute, given an