@backstage/plugin-catalog-react 0.0.0-nightly-20220217022146 → 0.0.0-nightly-20220218022735
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 +19 -11
- package/dist/index.d.ts +142 -60
- package/dist/index.esm.js +131 -145
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20220218022735
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e2e0b6625c: Improved API documentation.
|
|
8
|
+
|
|
9
|
+
**BREAKING**: The individual table column factories (e.g. `createEntityRefColumn`) are now no longer available directly, but only through `EntityTable.columns`.
|
|
10
|
+
|
|
11
|
+
## 0.6.15
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
6
14
|
|
|
@@ -17,16 +25,16 @@
|
|
|
17
25
|
- 27eccab216: Replaces use of deprecated catalog-model constants.
|
|
18
26
|
- 7aeb491394: Replace use of deprecated `ENTITY_DEFAULT_NAMESPACE` constant with `DEFAULT_NAMESPACE`.
|
|
19
27
|
- Updated dependencies
|
|
20
|
-
- @backstage/catalog-client@0.
|
|
21
|
-
- @backstage/core-components@0.
|
|
22
|
-
- @backstage/core-plugin-api@0.
|
|
23
|
-
- @backstage/errors@0.
|
|
24
|
-
- @backstage/integration@0.
|
|
25
|
-
- @backstage/plugin-permission-common@0.
|
|
26
|
-
- @backstage/plugin-permission-react@0.
|
|
27
|
-
- @backstage/catalog-model@0.
|
|
28
|
-
- @backstage/types@0.
|
|
29
|
-
- @backstage/version-bridge@0.
|
|
28
|
+
- @backstage/catalog-client@0.7.0
|
|
29
|
+
- @backstage/core-components@0.8.9
|
|
30
|
+
- @backstage/core-plugin-api@0.6.1
|
|
31
|
+
- @backstage/errors@0.2.1
|
|
32
|
+
- @backstage/integration@0.7.3
|
|
33
|
+
- @backstage/plugin-permission-common@0.5.0
|
|
34
|
+
- @backstage/plugin-permission-react@0.3.1
|
|
35
|
+
- @backstage/catalog-model@0.10.0
|
|
36
|
+
- @backstage/types@0.1.2
|
|
37
|
+
- @backstage/version-bridge@0.1.2
|
|
30
38
|
|
|
31
39
|
## 0.6.14
|
|
32
40
|
|
package/dist/index.d.ts
CHANGED
|
@@ -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
|
/**
|
|
@@ -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
|
-
/**
|
|
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
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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,16 +214,20 @@ interface EntityTypePickerProps {
|
|
|
214
214
|
/** @public */
|
|
215
215
|
declare const EntityTypePicker: (props: EntityTypePickerProps) => JSX.Element | null;
|
|
216
216
|
|
|
217
|
-
|
|
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:
|
|
230
|
+
declare const FavoriteEntity: (props: FavoriteEntityProps) => JSX.Element;
|
|
227
231
|
|
|
228
232
|
/**
|
|
229
233
|
* A dialog that lets users inspect the low level details of their entities.
|
|
@@ -236,14 +240,17 @@ declare function InspectEntityDialog(props: {
|
|
|
236
240
|
onClose: () => void;
|
|
237
241
|
}): JSX.Element | null;
|
|
238
242
|
|
|
239
|
-
|
|
243
|
+
/** @public */
|
|
244
|
+
declare type UnregisterEntityDialogProps = {
|
|
240
245
|
open: boolean;
|
|
241
246
|
onConfirm: () => any;
|
|
242
247
|
onClose: () => any;
|
|
243
248
|
entity: Entity;
|
|
244
249
|
};
|
|
245
|
-
|
|
250
|
+
/** @public */
|
|
251
|
+
declare const UnregisterEntityDialog: (props: UnregisterEntityDialogProps) => JSX.Element;
|
|
246
252
|
|
|
253
|
+
/** @public */
|
|
247
254
|
declare type EntityFilter = {
|
|
248
255
|
/**
|
|
249
256
|
* Get filters to add to the catalog-backend request. These are a dot-delimited field with
|
|
@@ -265,16 +272,20 @@ declare type EntityFilter = {
|
|
|
265
272
|
*/
|
|
266
273
|
toQueryValue?: () => string | string[];
|
|
267
274
|
};
|
|
275
|
+
/** @public */
|
|
268
276
|
declare type UserListFilterKind = 'owned' | 'starred' | 'all';
|
|
269
277
|
|
|
270
278
|
/** @public */
|
|
271
279
|
declare type CatalogReactUserListPickerClassKey = 'root' | 'title' | 'listIcon' | 'menuItem' | 'groupWrapper';
|
|
280
|
+
/** @public */
|
|
272
281
|
declare type UserListPickerProps = {
|
|
273
282
|
initialFilter?: UserListFilterKind;
|
|
274
283
|
availableFilters?: UserListFilterKind[];
|
|
275
284
|
};
|
|
276
|
-
|
|
285
|
+
/** @public */
|
|
286
|
+
declare const UserListPicker: (props: UserListPickerProps) => JSX.Element;
|
|
277
287
|
|
|
288
|
+
/** @public */
|
|
278
289
|
declare type EntityLoadingStatus = {
|
|
279
290
|
entity?: Entity;
|
|
280
291
|
loading: boolean;
|
|
@@ -319,6 +330,7 @@ interface EntityProviderProps {
|
|
|
319
330
|
* @public
|
|
320
331
|
*/
|
|
321
332
|
declare const EntityProvider: ({ entity, children }: EntityProviderProps) => JSX.Element;
|
|
333
|
+
/** @public */
|
|
322
334
|
declare const useEntityFromUrl: () => EntityLoadingStatus;
|
|
323
335
|
/**
|
|
324
336
|
* Grab the current entity from the context and its current loading state.
|
|
@@ -334,6 +346,7 @@ declare function useEntity<T extends Entity = Entity>(): {
|
|
|
334
346
|
|
|
335
347
|
/**
|
|
336
348
|
* Grabs entity kind, namespace, and name from the location
|
|
349
|
+
* @public
|
|
337
350
|
*/
|
|
338
351
|
declare const useEntityCompoundName: () => {
|
|
339
352
|
kind: string;
|
|
@@ -341,12 +354,20 @@ declare const useEntityCompoundName: () => {
|
|
|
341
354
|
name: string;
|
|
342
355
|
};
|
|
343
356
|
|
|
357
|
+
/**
|
|
358
|
+
* Filter entities based on Kind.
|
|
359
|
+
* @public
|
|
360
|
+
*/
|
|
344
361
|
declare class EntityKindFilter implements EntityFilter {
|
|
345
362
|
readonly value: string;
|
|
346
363
|
constructor(value: string);
|
|
347
364
|
getCatalogFilters(): Record<string, string | string[]>;
|
|
348
365
|
toQueryValue(): string;
|
|
349
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* Filters entities based on type
|
|
369
|
+
* @public
|
|
370
|
+
*/
|
|
350
371
|
declare class EntityTypeFilter implements EntityFilter {
|
|
351
372
|
readonly value: string | string[];
|
|
352
373
|
constructor(value: string | string[]);
|
|
@@ -354,29 +375,49 @@ declare class EntityTypeFilter implements EntityFilter {
|
|
|
354
375
|
getCatalogFilters(): Record<string, string | string[]>;
|
|
355
376
|
toQueryValue(): string[];
|
|
356
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* Filters entities based on tag.
|
|
380
|
+
* @public
|
|
381
|
+
*/
|
|
357
382
|
declare class EntityTagFilter implements EntityFilter {
|
|
358
383
|
readonly values: string[];
|
|
359
384
|
constructor(values: string[]);
|
|
360
385
|
filterEntity(entity: Entity): boolean;
|
|
361
386
|
toQueryValue(): string[];
|
|
362
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
* Filters entities where the text matches spec, title or tags.
|
|
390
|
+
* @public
|
|
391
|
+
*/
|
|
363
392
|
declare class EntityTextFilter implements EntityFilter {
|
|
364
393
|
readonly value: string;
|
|
365
394
|
constructor(value: string);
|
|
366
395
|
filterEntity(entity: Entity): boolean;
|
|
367
396
|
}
|
|
397
|
+
/**
|
|
398
|
+
* Filter matching entities that are owned by group.
|
|
399
|
+
* @public
|
|
400
|
+
*/
|
|
368
401
|
declare class EntityOwnerFilter implements EntityFilter {
|
|
369
402
|
readonly values: string[];
|
|
370
403
|
constructor(values: string[]);
|
|
371
404
|
filterEntity(entity: Entity): boolean;
|
|
372
405
|
toQueryValue(): string[];
|
|
373
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* Filters entities on lifecycle.
|
|
409
|
+
* @public
|
|
410
|
+
*/
|
|
374
411
|
declare class EntityLifecycleFilter implements EntityFilter {
|
|
375
412
|
readonly values: string[];
|
|
376
413
|
constructor(values: string[]);
|
|
377
414
|
filterEntity(entity: Entity): boolean;
|
|
378
415
|
toQueryValue(): string[];
|
|
379
416
|
}
|
|
417
|
+
/**
|
|
418
|
+
* Filters entities based on whatever the user has starred or owns them.
|
|
419
|
+
* @public
|
|
420
|
+
*/
|
|
380
421
|
declare class UserListFilter implements EntityFilter {
|
|
381
422
|
readonly value: UserListFilterKind;
|
|
382
423
|
readonly isOwnedEntity: (entity: Entity) => boolean;
|
|
@@ -386,6 +427,7 @@ declare class UserListFilter implements EntityFilter {
|
|
|
386
427
|
toQueryValue(): string;
|
|
387
428
|
}
|
|
388
429
|
|
|
430
|
+
/** @public */
|
|
389
431
|
declare type DefaultEntityFilters = {
|
|
390
432
|
kind?: EntityKindFilter;
|
|
391
433
|
type?: EntityTypeFilter;
|
|
@@ -395,6 +437,7 @@ declare type DefaultEntityFilters = {
|
|
|
395
437
|
tags?: EntityTagFilter;
|
|
396
438
|
text?: EntityTextFilter;
|
|
397
439
|
};
|
|
440
|
+
/** @public */
|
|
398
441
|
declare type EntityListContextProps<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters> = {
|
|
399
442
|
/**
|
|
400
443
|
* The currently registered filters, adhering to the shape of DefaultEntityFilters or an extension
|
|
@@ -421,10 +464,23 @@ declare type EntityListContextProps<EntityFilters extends DefaultEntityFilters =
|
|
|
421
464
|
loading: boolean;
|
|
422
465
|
error?: Error;
|
|
423
466
|
};
|
|
467
|
+
/**
|
|
468
|
+
* Creates new context for entity listing and filtering.
|
|
469
|
+
* @public
|
|
470
|
+
*/
|
|
424
471
|
declare const EntityListContext: React.Context<EntityListContextProps<any> | undefined>;
|
|
472
|
+
/**
|
|
473
|
+
* Provides entities and filters for a catalog listing.
|
|
474
|
+
* @public
|
|
475
|
+
*/
|
|
425
476
|
declare const EntityListProvider: <EntityFilters extends DefaultEntityFilters>({ children, }: PropsWithChildren<{}>) => JSX.Element;
|
|
477
|
+
/**
|
|
478
|
+
* Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
|
|
479
|
+
* @public
|
|
480
|
+
*/
|
|
426
481
|
declare function useEntityListProvider<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
|
|
427
482
|
|
|
483
|
+
/** @public */
|
|
428
484
|
declare type EntityTypeReturn = {
|
|
429
485
|
loading: boolean;
|
|
430
486
|
error?: Error;
|
|
@@ -435,9 +491,14 @@ declare type EntityTypeReturn = {
|
|
|
435
491
|
/**
|
|
436
492
|
* A hook built on top of `useEntityListProvider` for enabling selection of valid `spec.type` values
|
|
437
493
|
* based on the selected EntityKindFilter.
|
|
494
|
+
* @public
|
|
438
495
|
*/
|
|
439
496
|
declare function useEntityTypeFilter(): EntityTypeReturn;
|
|
440
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Retrieve a list of unique entity kinds present in the catalog
|
|
500
|
+
* @public
|
|
501
|
+
*/
|
|
441
502
|
declare function useEntityKinds(): {
|
|
442
503
|
error: Error | undefined;
|
|
443
504
|
loading: boolean;
|
|
@@ -446,9 +507,11 @@ declare function useEntityKinds(): {
|
|
|
446
507
|
|
|
447
508
|
/**
|
|
448
509
|
* Get the catalog User entity (if any) that matches the logged-in user.
|
|
510
|
+
* @public
|
|
449
511
|
*/
|
|
450
512
|
declare function useOwnUser(): AsyncState<UserEntity | undefined>;
|
|
451
513
|
|
|
514
|
+
/** @public */
|
|
452
515
|
declare function useRelatedEntities(entity: Entity, { type, kind }: {
|
|
453
516
|
type?: string;
|
|
454
517
|
kind?: string;
|
|
@@ -458,12 +521,14 @@ declare function useRelatedEntities(entity: Entity, { type, kind }: {
|
|
|
458
521
|
error: Error | undefined;
|
|
459
522
|
};
|
|
460
523
|
|
|
524
|
+
/** @public */
|
|
461
525
|
declare function useStarredEntities(): {
|
|
462
526
|
starredEntities: Set<string>;
|
|
463
527
|
toggleStarredEntity: (entityOrRef: Entity | EntityName | string) => void;
|
|
464
528
|
isStarredEntity: (entityOrRef: Entity | EntityName | string) => boolean;
|
|
465
529
|
};
|
|
466
530
|
|
|
531
|
+
/** @public */
|
|
467
532
|
declare function useStarredEntity(entityOrRef: Entity | EntityName | string): {
|
|
468
533
|
toggleStarredEntity: () => void;
|
|
469
534
|
isStarredEntity: boolean;
|
|
@@ -541,10 +606,12 @@ declare function useEntityPermission(permission: Permission): {
|
|
|
541
606
|
|
|
542
607
|
/**
|
|
543
608
|
* @deprecated Use an `ExternalRouteRef` instead, which can point to `catalogPlugin.routes.catalogIndex`.
|
|
609
|
+
* @public
|
|
544
610
|
*/
|
|
545
611
|
declare const rootRoute: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
546
612
|
/**
|
|
547
613
|
* @deprecated Use an `ExternalRouteRef` instead, which can point to `catalogPlugin.routes.catalogIndex`.
|
|
614
|
+
* @public
|
|
548
615
|
*/
|
|
549
616
|
declare const catalogRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
550
617
|
/**
|
|
@@ -555,6 +622,7 @@ declare const catalogRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
|
555
622
|
*
|
|
556
623
|
* If you want to replace the `EntityPage` from `@backstage/catalog-plugin` in your app,
|
|
557
624
|
* you need to use the `entityRouteRef` as the mount point instead of your own.
|
|
625
|
+
* @public
|
|
558
626
|
*/
|
|
559
627
|
declare const entityRouteRef: _backstage_core_plugin_api.RouteRef<{
|
|
560
628
|
name: string;
|
|
@@ -563,43 +631,57 @@ declare const entityRouteRef: _backstage_core_plugin_api.RouteRef<{
|
|
|
563
631
|
}>;
|
|
564
632
|
/**
|
|
565
633
|
* @deprecated use `entityRouteRef` instead.
|
|
634
|
+
* @public
|
|
566
635
|
*/
|
|
567
636
|
declare const entityRoute: _backstage_core_plugin_api.RouteRef<{
|
|
568
637
|
name: string;
|
|
569
638
|
kind: string;
|
|
570
639
|
namespace: string;
|
|
571
640
|
}>;
|
|
641
|
+
/**
|
|
642
|
+
* Utility function to get suitable route params for entityRoute, given an
|
|
643
|
+
* @public
|
|
644
|
+
*/
|
|
572
645
|
declare function entityRouteParams(entity: Entity): {
|
|
573
646
|
readonly kind: string;
|
|
574
647
|
readonly namespace: string;
|
|
575
648
|
readonly name: string;
|
|
576
649
|
};
|
|
577
650
|
|
|
651
|
+
/** @public */
|
|
578
652
|
declare const MockEntityListContextProvider: ({ children, value, }: React.PropsWithChildren<{
|
|
579
653
|
value?: Partial<EntityListContextProps<DefaultEntityFilters>> | undefined;
|
|
580
654
|
}>) => JSX.Element;
|
|
581
655
|
|
|
656
|
+
/** @public */
|
|
582
657
|
declare function reduceCatalogFilters(filters: EntityFilter[]): Record<string, string | symbol | (string | symbol)[]>;
|
|
658
|
+
/** @public */
|
|
583
659
|
declare function reduceEntityFilters(filters: EntityFilter[]): (entity: Entity) => boolean;
|
|
584
660
|
|
|
661
|
+
/** @public */
|
|
585
662
|
declare function getEntityMetadataViewUrl(entity: Entity): string | undefined;
|
|
663
|
+
/** @public */
|
|
586
664
|
declare function getEntityMetadataEditUrl(entity: Entity): string | undefined;
|
|
587
665
|
|
|
588
666
|
/**
|
|
589
667
|
* Get the related entity references.
|
|
668
|
+
* @public
|
|
590
669
|
*/
|
|
591
670
|
declare function getEntityRelations(entity: Entity | undefined, relationType: string, filter?: {
|
|
592
671
|
kind: string;
|
|
593
672
|
}): EntityName[];
|
|
594
673
|
|
|
674
|
+
/** @public */
|
|
595
675
|
declare type EntitySourceLocation = {
|
|
596
676
|
locationTargetUrl: string;
|
|
597
677
|
integrationType?: string;
|
|
598
678
|
};
|
|
679
|
+
/** @public */
|
|
599
680
|
declare function getEntitySourceLocation(entity: Entity, scmIntegrationsApi: ScmIntegrationRegistry): EntitySourceLocation | undefined;
|
|
600
681
|
|
|
601
682
|
/**
|
|
602
683
|
* Get the related entity references.
|
|
684
|
+
* @public
|
|
603
685
|
*/
|
|
604
686
|
declare function isOwnerOf(owner: Entity, owned: Entity): boolean;
|
|
605
687
|
|
|
@@ -616,4 +698,4 @@ declare type BackstageOverrides = Overrides & {
|
|
|
616
698
|
[Name in keyof CatalogReactComponentsNameToClassKey]?: Partial<StyleRules<CatalogReactComponentsNameToClassKey[Name]>>;
|
|
617
699
|
};
|
|
618
700
|
|
|
619
|
-
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, InspectEntityDialog, 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 };
|
|
701
|
+
export { AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogReactComponentsNameToClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, DefaultStarredEntitiesApi, EntityContext, 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, loadIdentityOwnerRefs, reduceCatalogFilters, reduceEntityFilters, rootRoute, starredEntitiesApiRef, useEntity, useEntityCompoundName, useEntityFromUrl, useEntityKinds, useEntityListProvider, useEntityOwnership, useEntityPermission, useEntityTypeFilter, useOwnUser, useOwnedEntities, useRelatedEntities, useStarredEntities, useStarredEntity };
|