@backstage/plugin-catalog-react 0.6.14-next.0 → 0.7.0

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,78 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3334ad47d4: Removed the deprecated `EntityContext` which have been replaced by `useEntity`, `EntityProvider` and `AsyncEntityProvider`.
8
+ - e2e0b6625c: Improved API documentation.
9
+
10
+ **BREAKING**: The individual table column factories (e.g. `createEntityRefColumn`) are now no longer available directly, but only through `EntityTable.columns`.
11
+
12
+ - c4276915c0: **BREAKING**: Deleted the deprecated `loadIdentityOwnerRefs` function which is replaced by `ownershipEntityRefs` from `identityApi.getBackstageIdentity()`.
13
+
14
+ Deprecated the `loadCatalogOwnerRefs` hook as membership references should be added as `ent` inside `claims` sections of the `SignInResolver` when issuing tokens. See https://backstage.io/docs/auth/identity-resolver for more details on how to prepare your `SignInResolver` if not done already. Usage of the `loadCatalogOwnerRefs` hook should be replaced by `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
15
+
16
+ ### Patch Changes
17
+
18
+ - a8331830f1: Deprecated the `useEntityKinds` hook due to low usage and utility value.
19
+ - 6e1cbc12a6: Updated according to the new `getEntityFacets` catalog API method
20
+ - b776ce5aab: Deprecated the `useEntityListProvider` hook which is now renamed to `useEntityList`
21
+ - b3ef24038b: Deprecated `reduceCatalogFilters` and `reduceEntityFilters` as these helper functions are used internally and provides low external value.
22
+ - 2d339b5f2c: Deprecated `useEntityFromUrl` and the `useEntityCompoundName` hooks as these have very low utility value.
23
+ - 96b8ae9a9e: Deprecated the `EntityTypeReturn` type and inlined the return type to `useEntityTypeFilter` as the type and function name does not align
24
+ - d4f67fa728: Deprecated the `useOwnedEntities` hook which is replaced by the IdentityAPI.
25
+ Deprecated the `useOwnUser` hook due to low external value.
26
+ - 919cf2f836: Minor updates to match the new `targetRef` field of relations, and to stop consuming the `target` field
27
+ - Updated dependencies
28
+ - @backstage/core-components@0.8.10
29
+ - @backstage/catalog-model@0.11.0
30
+ - @backstage/catalog-client@0.7.2
31
+ - @backstage/core-plugin-api@0.7.0
32
+ - @backstage/integration@0.7.5
33
+ - @backstage/plugin-permission-react@0.3.2
34
+
35
+ ## 0.6.15
36
+
37
+ ### Patch Changes
38
+
39
+ - 1ed305728b: Bump `node-fetch` to version 2.6.7 and `cross-fetch` to version 3.1.5
40
+ - c77c5c7eb6: Added `backstage.role` to `package.json`
41
+ - 538ca90790: Use updated type names from `@backstage/catalog-client`
42
+ - edbc03814a: Replace usage of `serializeEntityRef` with `stringifyEntityRef`
43
+ - 244d24ebc4: Import `Location` from the `@backstage/catalog-client` package.
44
+ - deaf6065db: Adapt to the new `CatalogApi.getLocationByRef`
45
+ - 216725b434: Updated to use new names for `parseLocationRef` and `stringifyLocationRef`
46
+ - e72d371296: Use `TemplateEntityV1beta2` from `@backstage/plugin-scaffolder-common` instead
47
+ of `@backstage/catalog-model`.
48
+ - 98d1aa1ea1: Fix CatalogPage showing all components when owned filter was pre-selected
49
+ - 27eccab216: Replaces use of deprecated catalog-model constants.
50
+ - 7aeb491394: Replace use of deprecated `ENTITY_DEFAULT_NAMESPACE` constant with `DEFAULT_NAMESPACE`.
51
+ - Updated dependencies
52
+ - @backstage/catalog-client@0.7.0
53
+ - @backstage/core-components@0.8.9
54
+ - @backstage/core-plugin-api@0.6.1
55
+ - @backstage/errors@0.2.1
56
+ - @backstage/integration@0.7.3
57
+ - @backstage/plugin-permission-common@0.5.0
58
+ - @backstage/plugin-permission-react@0.3.1
59
+ - @backstage/catalog-model@0.10.0
60
+ - @backstage/types@0.1.2
61
+ - @backstage/version-bridge@0.1.2
62
+
63
+ ## 0.6.14
64
+
65
+ ### Patch Changes
66
+
67
+ - 680e7c7452: Updated `useEntityListProvider` and catalog pickers to respond to external changes to query parameters in the URL, such as two sidebar links that apply different catalog filters.
68
+ - f8633307c4: Added an "inspect" entry in the entity three-dots menu, for lower level catalog
69
+ insights and debugging.
70
+ - 19155e0939: Updated React component type declarations to avoid exporting exotic component types.
71
+ - 7bb1bde7f6: Minor API cleanups
72
+ - Updated dependencies
73
+ - @backstage/catalog-client@0.6.0
74
+ - @backstage/core-components@0.8.8
75
+
3
76
  ## 0.6.14-next.0
4
77
 
5
78
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { CatalogApi, CatalogListResponse } from '@backstage/catalog-client';
2
+ import { CatalogApi, GetEntitiesResponse } from '@backstage/catalog-client';
3
3
  export { CATALOG_FILTER_EXISTS, CatalogApi } from '@backstage/catalog-client';
4
4
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
5
- import { ApiRef, StorageApi, IdentityApi } from '@backstage/core-plugin-api';
5
+ import { ApiRef, StorageApi } from '@backstage/core-plugin-api';
6
6
  import { Observable } from '@backstage/types';
7
7
  import * as _backstage_catalog_model from '@backstage/catalog-model';
8
8
  import { Entity, EntityName, UserEntity } from '@backstage/catalog-model';
9
- import React, { ReactNode, ComponentProps, Context, PropsWithChildren } from 'react';
9
+ import React, { ReactNode, ComponentProps, PropsWithChildren } from 'react';
10
10
  import { LinkProps, TableColumn } from '@backstage/core-components';
11
11
  import { IconButton } from '@material-ui/core';
12
12
  import { AsyncState } from 'react-use/lib/useAsync';
@@ -15,6 +15,10 @@ import { ScmIntegrationRegistry } from '@backstage/integration';
15
15
  import { Overrides } from '@material-ui/core/styles/overrides';
16
16
  import { StyleRules } from '@material-ui/core/styles/withStyles';
17
17
 
18
+ /**
19
+ * The API reference for the {@link @backstage/catalog-client#CatalogApi}.
20
+ * @public
21
+ */
18
22
  declare const catalogApiRef: _backstage_core_plugin_api.ApiRef<CatalogApi>;
19
23
 
20
24
  /**
@@ -88,7 +92,7 @@ declare const EntityOwnerPicker: () => JSX.Element | null;
88
92
  * @public
89
93
  */
90
94
  declare type EntityRefLinkProps = {
91
- entityRef: Entity | EntityName;
95
+ entityRef: Entity | EntityName | string;
92
96
  defaultKind?: string;
93
97
  title?: string;
94
98
  children?: React.ReactNode;
@@ -98,7 +102,7 @@ declare type EntityRefLinkProps = {
98
102
  *
99
103
  * @public
100
104
  */
101
- declare const EntityRefLink: React.ForwardRefExoticComponent<Pick<EntityRefLinkProps, "replace" | "type" | "key" | "id" | "media" | "state" | "color" | "display" | "translate" | "hidden" | "dir" | "slot" | "style" | "title" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "tabIndex" | "underline" | "download" | "href" | "hrefLang" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "rel" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "ping" | "referrerPolicy" | "align" | "variant" | "component" | "classes" | "innerRef" | "noWrap" | "gutterBottom" | "paragraph" | "variantMapping" | "noTrack" | "TypographyClasses" | "entityRef" | "defaultKind"> & React.RefAttributes<any>>;
105
+ declare const EntityRefLink: (props: EntityRefLinkProps) => JSX.Element;
102
106
 
103
107
  /**
104
108
  * Props for {@link EntityRefLink}.
@@ -116,62 +120,19 @@ declare type EntityRefLinksProps = {
116
120
  */
117
121
  declare const EntityRefLinks: ({ entityRefs, defaultKind, ...linkProps }: EntityRefLinksProps) => JSX.Element;
118
122
 
123
+ /** @public */
119
124
  declare function formatEntityRefTitle(entityRef: Entity | EntityName, opts?: {
120
125
  defaultKind?: string;
121
126
  }): string;
122
127
 
123
128
  /** @public */
124
129
  declare type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
125
- /** @public */
130
+ /**
131
+ * Renders search bar for filtering the entity list.
132
+ * @public
133
+ */
126
134
  declare const EntitySearchBar: () => JSX.Element;
127
135
 
128
- /** @public */
129
- declare function createEntityRefColumn<T extends Entity>(options: {
130
- defaultKind?: string;
131
- }): TableColumn<T>;
132
- /** @public */
133
- declare function createEntityRelationColumn<T extends Entity>({ title, relation, defaultKind, filter: entityFilter, }: {
134
- title: string;
135
- relation: string;
136
- defaultKind?: string;
137
- filter?: {
138
- kind: string;
139
- };
140
- }): TableColumn<T>;
141
- /** @public */
142
- declare function createOwnerColumn<T extends Entity>(): TableColumn<T>;
143
- /** @public */
144
- declare function createDomainColumn<T extends Entity>(): TableColumn<T>;
145
- /** @public */
146
- declare function createSystemColumn<T extends Entity>(): TableColumn<T>;
147
- /** @public */
148
- declare function createMetadataDescriptionColumn<T extends Entity>(): TableColumn<T>;
149
- /** @public */
150
- declare function createSpecLifecycleColumn<T extends Entity>(): TableColumn<T>;
151
- /** @public */
152
- declare function createSpecTypeColumn<T extends Entity>(): TableColumn<T>;
153
-
154
- declare const columnFactories_createEntityRefColumn: typeof createEntityRefColumn;
155
- declare const columnFactories_createEntityRelationColumn: typeof createEntityRelationColumn;
156
- declare const columnFactories_createOwnerColumn: typeof createOwnerColumn;
157
- declare const columnFactories_createDomainColumn: typeof createDomainColumn;
158
- declare const columnFactories_createSystemColumn: typeof createSystemColumn;
159
- declare const columnFactories_createMetadataDescriptionColumn: typeof createMetadataDescriptionColumn;
160
- declare const columnFactories_createSpecLifecycleColumn: typeof createSpecLifecycleColumn;
161
- declare const columnFactories_createSpecTypeColumn: typeof createSpecTypeColumn;
162
- declare namespace columnFactories {
163
- export {
164
- columnFactories_createEntityRefColumn as createEntityRefColumn,
165
- columnFactories_createEntityRelationColumn as createEntityRelationColumn,
166
- columnFactories_createOwnerColumn as createOwnerColumn,
167
- columnFactories_createDomainColumn as createDomainColumn,
168
- columnFactories_createSystemColumn as createSystemColumn,
169
- columnFactories_createMetadataDescriptionColumn as createMetadataDescriptionColumn,
170
- columnFactories_createSpecLifecycleColumn as createSpecLifecycleColumn,
171
- columnFactories_createSpecTypeColumn as createSpecTypeColumn,
172
- };
173
- }
174
-
175
136
  /**
176
137
  * Props for {@link EntityTable}.
177
138
  *
@@ -190,12 +151,51 @@ interface EntityTableProps<T extends Entity> {
190
151
  *
191
152
  * @public
192
153
  */
193
- declare function EntityTable<T extends Entity>(props: EntityTableProps<T>): JSX.Element;
194
- declare namespace EntityTable {
195
- var columns: typeof columnFactories;
196
- var systemEntityColumns: TableColumn<_backstage_catalog_model.SystemEntity>[];
197
- var componentEntityColumns: TableColumn<_backstage_catalog_model.ComponentEntity>[];
198
- }
154
+ declare const EntityTable: {
155
+ <T extends Entity>(props: EntityTableProps<T>): JSX.Element;
156
+ columns: Readonly<{
157
+ createEntityRefColumn<T_1 extends Entity>(options: {
158
+ defaultKind?: string | undefined;
159
+ }): TableColumn<T_1>;
160
+ createEntityRelationColumn<T_2 extends Entity>({ title, relation, defaultKind, filter: entityFilter, }: {
161
+ title: string;
162
+ relation: string;
163
+ defaultKind?: string | undefined;
164
+ filter?: {
165
+ kind: string;
166
+ } | undefined;
167
+ }): TableColumn<T_2>;
168
+ createOwnerColumn<T_3 extends Entity>(): TableColumn<T_3>;
169
+ createDomainColumn<T_4 extends Entity>(): TableColumn<T_4>;
170
+ createSystemColumn<T_5 extends Entity>(): TableColumn<T_5>;
171
+ createMetadataDescriptionColumn<T_6 extends Entity>(): TableColumn<T_6>;
172
+ createSpecLifecycleColumn<T_7 extends Entity>(): TableColumn<T_7>;
173
+ createSpecTypeColumn<T_8 extends Entity>(): TableColumn<T_8>;
174
+ }>;
175
+ systemEntityColumns: TableColumn<_backstage_catalog_model.SystemEntity>[];
176
+ componentEntityColumns: TableColumn<_backstage_catalog_model.ComponentEntity>[];
177
+ };
178
+
179
+ /** @public */
180
+ declare const columnFactories: Readonly<{
181
+ createEntityRefColumn<T extends Entity>(options: {
182
+ defaultKind?: string;
183
+ }): TableColumn<T>;
184
+ createEntityRelationColumn<T_1 extends Entity>({ title, relation, defaultKind, filter: entityFilter, }: {
185
+ title: string;
186
+ relation: string;
187
+ defaultKind?: string | undefined;
188
+ filter?: {
189
+ kind: string;
190
+ } | undefined;
191
+ }): TableColumn<T_1>;
192
+ createOwnerColumn<T_2 extends Entity>(): TableColumn<T_2>;
193
+ createDomainColumn<T_3 extends Entity>(): TableColumn<T_3>;
194
+ createSystemColumn<T_4 extends Entity>(): TableColumn<T_4>;
195
+ createMetadataDescriptionColumn<T_5 extends Entity>(): TableColumn<T_5>;
196
+ createSpecLifecycleColumn<T_6 extends Entity>(): TableColumn<T_6>;
197
+ createSpecTypeColumn<T_7 extends Entity>(): TableColumn<T_7>;
198
+ }>;
199
199
 
200
200
  /** @public */
201
201
  declare type CatalogReactEntityTagPickerClassKey = 'input';
@@ -214,25 +214,43 @@ interface EntityTypePickerProps {
214
214
  /** @public */
215
215
  declare const EntityTypePicker: (props: EntityTypePickerProps) => JSX.Element | null;
216
216
 
217
- declare type Props$1 = ComponentProps<typeof IconButton> & {
217
+ /** @public */
218
+ declare type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
218
219
  entity: Entity;
219
220
  };
221
+ /** @public */
220
222
  declare const favoriteEntityTooltip: (isStarred: boolean) => "Remove from favorites" | "Add to favorites";
223
+ /** @public */
221
224
  declare const favoriteEntityIcon: (isStarred: boolean) => JSX.Element;
222
225
  /**
223
226
  * IconButton for showing if a current entity is starred and adding/removing it from the favorite entities
224
227
  * @param props - MaterialUI IconButton props extended by required `entity` prop
228
+ * @public
225
229
  */
226
- declare const FavoriteEntity: (props: Props$1) => JSX.Element;
230
+ declare const FavoriteEntity: (props: FavoriteEntityProps) => JSX.Element;
231
+
232
+ /**
233
+ * A dialog that lets users inspect the low level details of their entities.
234
+ *
235
+ * @public
236
+ */
237
+ declare function InspectEntityDialog(props: {
238
+ open: boolean;
239
+ entity: Entity;
240
+ onClose: () => void;
241
+ }): JSX.Element | null;
227
242
 
228
- declare type Props = {
243
+ /** @public */
244
+ declare type UnregisterEntityDialogProps = {
229
245
  open: boolean;
230
246
  onConfirm: () => any;
231
247
  onClose: () => any;
232
248
  entity: Entity;
233
249
  };
234
- declare const UnregisterEntityDialog: ({ open, onConfirm, onClose, entity, }: Props) => JSX.Element;
250
+ /** @public */
251
+ declare const UnregisterEntityDialog: (props: UnregisterEntityDialogProps) => JSX.Element;
235
252
 
253
+ /** @public */
236
254
  declare type EntityFilter = {
237
255
  /**
238
256
  * Get filters to add to the catalog-backend request. These are a dot-delimited field with
@@ -249,32 +267,31 @@ declare type EntityFilter = {
249
267
  filterEntity?: (entity: Entity) => boolean;
250
268
  /**
251
269
  * Serialize the filter value to a string for query params. The UI component responsible for
252
- * handling this filter should retrieve this from useEntityListProvider.queryParameters. The
270
+ * handling this filter should retrieve this from useEntityList.queryParameters. The
253
271
  * value restored should be in the precedence: queryParameters `>` initialValue prop `>` default.
254
272
  */
255
273
  toQueryValue?: () => string | string[];
256
274
  };
275
+ /** @public */
257
276
  declare type UserListFilterKind = 'owned' | 'starred' | 'all';
258
277
 
259
278
  /** @public */
260
279
  declare type CatalogReactUserListPickerClassKey = 'root' | 'title' | 'listIcon' | 'menuItem' | 'groupWrapper';
280
+ /** @public */
261
281
  declare type UserListPickerProps = {
262
282
  initialFilter?: UserListFilterKind;
263
283
  availableFilters?: UserListFilterKind[];
264
284
  };
265
- declare const UserListPicker: ({ initialFilter, availableFilters, }: UserListPickerProps) => JSX.Element;
285
+ /** @public */
286
+ declare const UserListPicker: (props: UserListPickerProps) => JSX.Element;
266
287
 
288
+ /** @public */
267
289
  declare type EntityLoadingStatus = {
268
290
  entity?: Entity;
269
291
  loading: boolean;
270
292
  error?: Error;
271
293
  refresh?: VoidFunction;
272
294
  };
273
- /**
274
- * @public
275
- * @deprecated use `useEntity` and `EntityProvider` or `AsyncEntityProvider` instead.
276
- */
277
- declare const EntityContext: Context<EntityLoadingStatus>;
278
295
  /**
279
296
  * Properties for the AsyncEntityProvider component.
280
297
  *
@@ -308,6 +325,9 @@ interface EntityProviderProps {
308
325
  * @public
309
326
  */
310
327
  declare const EntityProvider: ({ entity, children }: EntityProviderProps) => JSX.Element;
328
+ /** @public
329
+ * @deprecated will be deleted shortly due to low external usage, re-implement if needed.
330
+ */
311
331
  declare const useEntityFromUrl: () => EntityLoadingStatus;
312
332
  /**
313
333
  * Grab the current entity from the context and its current loading state.
@@ -323,6 +343,8 @@ declare function useEntity<T extends Entity = Entity>(): {
323
343
 
324
344
  /**
325
345
  * Grabs entity kind, namespace, and name from the location
346
+ * @public
347
+ * @deprecated use {@link @backstage/core-plugin-api#useRouteRefParams} instead
326
348
  */
327
349
  declare const useEntityCompoundName: () => {
328
350
  kind: string;
@@ -330,12 +352,20 @@ declare const useEntityCompoundName: () => {
330
352
  name: string;
331
353
  };
332
354
 
355
+ /**
356
+ * Filter entities based on Kind.
357
+ * @public
358
+ */
333
359
  declare class EntityKindFilter implements EntityFilter {
334
360
  readonly value: string;
335
361
  constructor(value: string);
336
362
  getCatalogFilters(): Record<string, string | string[]>;
337
363
  toQueryValue(): string;
338
364
  }
365
+ /**
366
+ * Filters entities based on type
367
+ * @public
368
+ */
339
369
  declare class EntityTypeFilter implements EntityFilter {
340
370
  readonly value: string | string[];
341
371
  constructor(value: string | string[]);
@@ -343,29 +373,49 @@ declare class EntityTypeFilter implements EntityFilter {
343
373
  getCatalogFilters(): Record<string, string | string[]>;
344
374
  toQueryValue(): string[];
345
375
  }
376
+ /**
377
+ * Filters entities based on tag.
378
+ * @public
379
+ */
346
380
  declare class EntityTagFilter implements EntityFilter {
347
381
  readonly values: string[];
348
382
  constructor(values: string[]);
349
383
  filterEntity(entity: Entity): boolean;
350
384
  toQueryValue(): string[];
351
385
  }
386
+ /**
387
+ * Filters entities where the text matches spec, title or tags.
388
+ * @public
389
+ */
352
390
  declare class EntityTextFilter implements EntityFilter {
353
391
  readonly value: string;
354
392
  constructor(value: string);
355
393
  filterEntity(entity: Entity): boolean;
356
394
  }
395
+ /**
396
+ * Filter matching entities that are owned by group.
397
+ * @public
398
+ */
357
399
  declare class EntityOwnerFilter implements EntityFilter {
358
400
  readonly values: string[];
359
401
  constructor(values: string[]);
360
402
  filterEntity(entity: Entity): boolean;
361
403
  toQueryValue(): string[];
362
404
  }
405
+ /**
406
+ * Filters entities on lifecycle.
407
+ * @public
408
+ */
363
409
  declare class EntityLifecycleFilter implements EntityFilter {
364
410
  readonly values: string[];
365
411
  constructor(values: string[]);
366
412
  filterEntity(entity: Entity): boolean;
367
413
  toQueryValue(): string[];
368
414
  }
415
+ /**
416
+ * Filters entities based on whatever the user has starred or owns them.
417
+ * @public
418
+ */
369
419
  declare class UserListFilter implements EntityFilter {
370
420
  readonly value: UserListFilterKind;
371
421
  readonly isOwnedEntity: (entity: Entity) => boolean;
@@ -375,6 +425,7 @@ declare class UserListFilter implements EntityFilter {
375
425
  toQueryValue(): string;
376
426
  }
377
427
 
428
+ /** @public */
378
429
  declare type DefaultEntityFilters = {
379
430
  kind?: EntityKindFilter;
380
431
  type?: EntityTypeFilter;
@@ -384,6 +435,7 @@ declare type DefaultEntityFilters = {
384
435
  tags?: EntityTagFilter;
385
436
  text?: EntityTextFilter;
386
437
  };
438
+ /** @public */
387
439
  declare type EntityListContextProps<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters> = {
388
440
  /**
389
441
  * The currently registered filters, adhering to the shape of DefaultEntityFilters or an extension
@@ -410,10 +462,31 @@ declare type EntityListContextProps<EntityFilters extends DefaultEntityFilters =
410
462
  loading: boolean;
411
463
  error?: Error;
412
464
  };
465
+ /**
466
+ * Creates new context for entity listing and filtering.
467
+ * @public
468
+ */
413
469
  declare const EntityListContext: React.Context<EntityListContextProps<any> | undefined>;
470
+ /**
471
+ * Provides entities and filters for a catalog listing.
472
+ * @public
473
+ */
414
474
  declare const EntityListProvider: <EntityFilters extends DefaultEntityFilters>({ children, }: PropsWithChildren<{}>) => JSX.Element;
475
+ /**
476
+ * Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
477
+ * @public
478
+ * @deprecated use {@link useEntityList} instead.
479
+ */
415
480
  declare function useEntityListProvider<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
481
+ /**
482
+ * Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
483
+ * @public
484
+ */
485
+ declare function useEntityList<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
416
486
 
487
+ /** @public
488
+ * @deprecated type inlined with {@link useEntityTypeFilter}.
489
+ */
417
490
  declare type EntityTypeReturn = {
418
491
  loading: boolean;
419
492
  error?: Error;
@@ -422,11 +495,23 @@ declare type EntityTypeReturn = {
422
495
  setSelectedTypes: (types: string[]) => void;
423
496
  };
424
497
  /**
425
- * A hook built on top of `useEntityListProvider` for enabling selection of valid `spec.type` values
498
+ * A hook built on top of `useEntityList` for enabling selection of valid `spec.type` values
426
499
  * based on the selected EntityKindFilter.
500
+ * @public
427
501
  */
428
- declare function useEntityTypeFilter(): EntityTypeReturn;
502
+ declare function useEntityTypeFilter(): {
503
+ loading: boolean;
504
+ error?: Error;
505
+ availableTypes: string[];
506
+ selectedTypes: string[];
507
+ setSelectedTypes: (types: string[]) => void;
508
+ };
429
509
 
510
+ /**
511
+ * Retrieve a list of unique entity kinds present in the catalog
512
+ * @public
513
+ * @deprecated and will be removed due to low utility value.
514
+ */
430
515
  declare function useEntityKinds(): {
431
516
  error: Error | undefined;
432
517
  loading: boolean;
@@ -435,10 +520,13 @@ declare function useEntityKinds(): {
435
520
 
436
521
  /**
437
522
  * Get the catalog User entity (if any) that matches the logged-in user.
523
+ * @public
524
+ * @deprecated due to low external usage.
438
525
  */
439
526
  declare function useOwnUser(): AsyncState<UserEntity | undefined>;
440
527
 
441
- declare function useRelatedEntities(entity: Entity, { type, kind }: {
528
+ /** @public */
529
+ declare function useRelatedEntities(entity: Entity, relationFilter: {
442
530
  type?: string;
443
531
  kind?: string;
444
532
  }): {
@@ -447,29 +535,19 @@ declare function useRelatedEntities(entity: Entity, { type, kind }: {
447
535
  error: Error | undefined;
448
536
  };
449
537
 
538
+ /** @public */
450
539
  declare function useStarredEntities(): {
451
540
  starredEntities: Set<string>;
452
541
  toggleStarredEntity: (entityOrRef: Entity | EntityName | string) => void;
453
542
  isStarredEntity: (entityOrRef: Entity | EntityName | string) => boolean;
454
543
  };
455
544
 
545
+ /** @public */
456
546
  declare function useStarredEntity(entityOrRef: Entity | EntityName | string): {
457
547
  toggleStarredEntity: () => void;
458
548
  isStarredEntity: boolean;
459
549
  };
460
550
 
461
- /**
462
- * Takes the relevant parts of the Backstage identity, and translates them into
463
- * a list of entity refs on string form that represent the user's ownership
464
- * connections.
465
- *
466
- * @public
467
- * @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
468
- *
469
- * @param identityApi - The IdentityApi implementation
470
- * @returns IdentityOwner refs as a string array
471
- */
472
- declare function loadIdentityOwnerRefs(identityApi: IdentityApi): Promise<string[]>;
473
551
  /**
474
552
  * Takes the relevant parts of the User entity corresponding to the Backstage
475
553
  * identity, and translates them into a list of entity refs on string form that
@@ -480,6 +558,7 @@ declare function loadIdentityOwnerRefs(identityApi: IdentityApi): Promise<string
480
558
  * @param catalogApi - The Catalog API implementation
481
559
  * @param identityOwnerRefs - List of identity owner refs as strings
482
560
  * @returns OwnerRefs as a string array
561
+ * @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
483
562
  */
484
563
  declare function loadCatalogOwnerRefs(catalogApi: CatalogApi, identityOwnerRefs: string[]): Promise<string[]>;
485
564
  /**
@@ -505,11 +584,11 @@ declare function useEntityOwnership(): {
505
584
  * @public
506
585
  *
507
586
  * @param allowedKinds - Array of allowed kinds to filter the entities
508
- * @returns CatalogListResponse<Entity>
587
+ * @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
509
588
  */
510
589
  declare function useOwnedEntities(allowedKinds?: string[]): {
511
590
  loading: boolean;
512
- ownedEntities: CatalogListResponse<Entity> | undefined;
591
+ ownedEntities: GetEntitiesResponse | undefined;
513
592
  };
514
593
 
515
594
  /**
@@ -531,10 +610,12 @@ declare function useEntityPermission(permission: Permission): {
531
610
 
532
611
  /**
533
612
  * @deprecated Use an `ExternalRouteRef` instead, which can point to `catalogPlugin.routes.catalogIndex`.
613
+ * @public
534
614
  */
535
615
  declare const rootRoute: _backstage_core_plugin_api.RouteRef<undefined>;
536
616
  /**
537
617
  * @deprecated Use an `ExternalRouteRef` instead, which can point to `catalogPlugin.routes.catalogIndex`.
618
+ * @public
538
619
  */
539
620
  declare const catalogRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
540
621
  /**
@@ -545,6 +626,7 @@ declare const catalogRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
545
626
  *
546
627
  * If you want to replace the `EntityPage` from `@backstage/catalog-plugin` in your app,
547
628
  * you need to use the `entityRouteRef` as the mount point instead of your own.
629
+ * @public
548
630
  */
549
631
  declare const entityRouteRef: _backstage_core_plugin_api.RouteRef<{
550
632
  name: string;
@@ -553,43 +635,64 @@ declare const entityRouteRef: _backstage_core_plugin_api.RouteRef<{
553
635
  }>;
554
636
  /**
555
637
  * @deprecated use `entityRouteRef` instead.
638
+ * @public
556
639
  */
557
640
  declare const entityRoute: _backstage_core_plugin_api.RouteRef<{
558
641
  name: string;
559
642
  kind: string;
560
643
  namespace: string;
561
644
  }>;
645
+ /**
646
+ * Utility function to get suitable route params for entityRoute, given an
647
+ * @public
648
+ */
562
649
  declare function entityRouteParams(entity: Entity): {
563
650
  readonly kind: string;
564
651
  readonly namespace: string;
565
652
  readonly name: string;
566
653
  };
567
654
 
655
+ /** @public */
568
656
  declare const MockEntityListContextProvider: ({ children, value, }: React.PropsWithChildren<{
569
657
  value?: Partial<EntityListContextProps<DefaultEntityFilters>> | undefined;
570
658
  }>) => JSX.Element;
571
659
 
660
+ /**
661
+ * @public
662
+ * @deprecated will be made private.
663
+ */
572
664
  declare function reduceCatalogFilters(filters: EntityFilter[]): Record<string, string | symbol | (string | symbol)[]>;
665
+ /**
666
+ * @public
667
+ * @deprecated will be made private.
668
+ */
573
669
  declare function reduceEntityFilters(filters: EntityFilter[]): (entity: Entity) => boolean;
574
670
 
671
+ /** @public */
575
672
  declare function getEntityMetadataViewUrl(entity: Entity): string | undefined;
673
+ /** @public */
576
674
  declare function getEntityMetadataEditUrl(entity: Entity): string | undefined;
577
675
 
578
676
  /**
579
677
  * Get the related entity references.
678
+ *
679
+ * @public
580
680
  */
581
681
  declare function getEntityRelations(entity: Entity | undefined, relationType: string, filter?: {
582
682
  kind: string;
583
683
  }): EntityName[];
584
684
 
685
+ /** @public */
585
686
  declare type EntitySourceLocation = {
586
687
  locationTargetUrl: string;
587
688
  integrationType?: string;
588
689
  };
690
+ /** @public */
589
691
  declare function getEntitySourceLocation(entity: Entity, scmIntegrationsApi: ScmIntegrationRegistry): EntitySourceLocation | undefined;
590
692
 
591
693
  /**
592
694
  * Get the related entity references.
695
+ * @public
593
696
  */
594
697
  declare function isOwnerOf(owner: Entity, owned: Entity): boolean;
595
698
 
@@ -606,4 +709,4 @@ declare type BackstageOverrides = Overrides & {
606
709
  [Name in keyof CatalogReactComponentsNameToClassKey]?: Partial<StyleRules<CatalogReactComponentsNameToClassKey[Name]>>;
607
710
  };
608
711
 
609
- export { AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogReactComponentsNameToClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, DefaultStarredEntitiesApi, EntityContext, EntityFilter, EntityKindFilter, EntityKindPicker, EntityKindPickerProps, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListProvider, EntityOwnerFilter, EntityOwnerPicker, EntityProvider, EntityProviderProps, EntityRefLink, EntityRefLinkProps, EntityRefLinks, EntityRefLinksProps, EntitySearchBar, EntitySourceLocation, EntityTable, EntityTableProps, EntityTagFilter, EntityTagPicker, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityTypePickerProps, FavoriteEntity, MockEntityListContextProvider, StarredEntitiesApi, UnregisterEntityDialog, UserListFilter, UserListFilterKind, UserListPicker, catalogApiRef, catalogRouteRef, entityRoute, entityRouteParams, entityRouteRef, favoriteEntityIcon, favoriteEntityTooltip, formatEntityRefTitle, getEntityMetadataEditUrl, getEntityMetadataViewUrl, getEntityRelations, getEntitySourceLocation, isOwnerOf, loadCatalogOwnerRefs, loadIdentityOwnerRefs, reduceCatalogFilters, reduceEntityFilters, rootRoute, starredEntitiesApiRef, useEntity, useEntityCompoundName, useEntityFromUrl, useEntityKinds, useEntityListProvider, useEntityOwnership, useEntityPermission, useEntityTypeFilter, useOwnUser, useOwnedEntities, useRelatedEntities, useStarredEntities, useStarredEntity };
712
+ export { AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogReactComponentsNameToClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, DefaultStarredEntitiesApi, EntityFilter, EntityKindFilter, EntityKindPicker, EntityKindPickerProps, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListContextProps, EntityListProvider, EntityLoadingStatus, EntityOwnerFilter, EntityOwnerPicker, EntityProvider, EntityProviderProps, EntityRefLink, EntityRefLinkProps, EntityRefLinks, EntityRefLinksProps, EntitySearchBar, EntitySourceLocation, EntityTable, EntityTableProps, EntityTagFilter, EntityTagPicker, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityTypePickerProps, EntityTypeReturn, FavoriteEntity, FavoriteEntityProps, InspectEntityDialog, MockEntityListContextProvider, StarredEntitiesApi, UnregisterEntityDialog, UnregisterEntityDialogProps, UserListFilter, UserListFilterKind, UserListPicker, UserListPickerProps, catalogApiRef, catalogRouteRef, columnFactories, entityRoute, entityRouteParams, entityRouteRef, favoriteEntityIcon, favoriteEntityTooltip, formatEntityRefTitle, getEntityMetadataEditUrl, getEntityMetadataViewUrl, getEntityRelations, getEntitySourceLocation, isOwnerOf, loadCatalogOwnerRefs, reduceCatalogFilters, reduceEntityFilters, rootRoute, starredEntitiesApiRef, useEntity, useEntityCompoundName, useEntityFromUrl, useEntityKinds, useEntityList, useEntityListProvider, useEntityOwnership, useEntityPermission, useEntityTypeFilter, useOwnUser, useOwnedEntities, useRelatedEntities, useStarredEntities, useStarredEntity };