@backstage/plugin-catalog-react 0.8.1 → 1.0.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 +103 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +13 -128
- package/dist/index.beta.d.ts +13 -128
- package/dist/index.d.ts +13 -128
- package/dist/index.esm.js +70 -137
- package/dist/index.esm.js.map +1 -1
- package/package.json +19 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,108 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- b58c70c223: This package has been promoted to v1.0! To understand how this change affects the package, please check out our [versioning policy](https://backstage.io/docs/overview/versioning-policy).
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- f7fb7295e6: **BREAKING**: Removed the deprecated `favoriteEntityTooltip` and `favoriteEntityIcon` functions.
|
|
12
|
+
- 4cd92028b8: **BREAKING**: The following deprecated annotation reading helper functions were removed:
|
|
13
|
+
|
|
14
|
+
- `getEntityMetadataViewUrl`, use `entity.metadata.annotations?.[ANNOTATION_VIEW_URL]` instead.
|
|
15
|
+
- `getEntityMetadataEditUrl`, use `entity.metadata.annotations?.[ANNOTATION_EDIT_URL]` instead.
|
|
16
|
+
|
|
17
|
+
- 1f2757bb07: **BREAKING**: The `useEntity` hook no longer returns loading or error states, and will throw an error if the entity is not immediately available. In practice this means that `useEntity` can only be used in contexts where the entity is guaranteed to have been loaded, for example inside an `EntityLayout`. To access the loading state of the entity, use `useAsyncEntity` instead.
|
|
18
|
+
- 0f3520d499: **BREAKING**: Removed the deprecated `formatEntityRefTitle`, use `humanizeEntityRef` instead.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- a422d7ce5e: chore(deps): bump `@testing-library/react` from 11.2.6 to 12.1.3
|
|
23
|
+
- c689d7a94c: Added `CatalogFilterLayout`, which replaces `FilteredEntityLayout` from `@backstage/plugin-catalog`, as well as `FilterContainer` and `EntityListContainer`. It is used like this:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
<CatalogFilterLayout>
|
|
27
|
+
<CatalogFilterLayout.Filters>
|
|
28
|
+
{/* filter drawer, for example <EntityTypePicker /> and friends */}
|
|
29
|
+
</CatalogFilterLayout.Filters>
|
|
30
|
+
<CatalogFilterLayout.Content>
|
|
31
|
+
{/* content view, for example a <CatalogTable /> */}
|
|
32
|
+
</CatalogFilterLayout.Content>
|
|
33
|
+
</CatalogFilterLayout>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
- @backstage/core-components@0.9.2
|
|
38
|
+
- @backstage/core-plugin-api@1.0.0
|
|
39
|
+
- @backstage/version-bridge@1.0.0
|
|
40
|
+
- @backstage/plugin-permission-react@0.3.4
|
|
41
|
+
- @backstage/catalog-model@1.0.0
|
|
42
|
+
- @backstage/integration@1.0.0
|
|
43
|
+
- @backstage/catalog-client@1.0.0
|
|
44
|
+
- @backstage/errors@1.0.0
|
|
45
|
+
- @backstage/types@1.0.0
|
|
46
|
+
- @backstage/plugin-permission-common@0.5.3
|
|
47
|
+
|
|
48
|
+
## 0.9.0
|
|
49
|
+
|
|
50
|
+
### Minor Changes
|
|
51
|
+
|
|
52
|
+
- b0af81726d: **BREAKING**: Removed `reduceCatalogFilters` and `reduceEntityFilters` due to low external utility value.
|
|
53
|
+
- 7ffb2c73c9: **BREAKING**: Removed the deprecated `loadCatalogOwnerRefs` function. Usages of this function can be directly replaced with `ownershipEntityRefs` from `identityApi.getBackstageIdentity()`.
|
|
54
|
+
|
|
55
|
+
This also affects the `useEntityOwnership` hook in that it no longer uses `loadCatalogOwnerRefs`, meaning it will no longer load in additional relations and instead only rely on the `ownershipEntityRefs` from the `IdentityApi`.
|
|
56
|
+
|
|
57
|
+
- dd88d1e3ac: **BREAKING**: Removed `useEntityFromUrl`.
|
|
58
|
+
- 9844d4d2bd: **BREAKING**: Removed `useEntityCompoundName`, use `useRouteRefParams(entityRouteRef)` instead.
|
|
59
|
+
- 2b8c986ce0: **BREAKING**: Removed `useEntityListProvider` use `useEntityList` instead.
|
|
60
|
+
- f3a7a9de6d: **BREAKING**: Removed `useOwnedEntities` and moved its usage internally to the scaffolder-backend where it's used.
|
|
61
|
+
|
|
62
|
+
**BREAKING**: Removed `EntityTypeReturn` type which is now inlined.
|
|
63
|
+
|
|
64
|
+
- cf1ff5b438: **BREAKING**: Removed the `useEntityKinds` hook, use `catalogApi.getEntityFacets({ facets: ['kind'] })` instead.
|
|
65
|
+
- fc6290a76d: **BREAKING**: Removed the deprecated `useOwnUser` hook. Existing usage can be replaced with `identityApi.getBackstageIdentity()`, followed by a call to `catalogClient.getEntityByRef(identity.userEntityRef)`.
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- b1aacbf96a: Applied the fix for the `/alpha` entry point resolution that was part of the `v0.70.1` release of Backstage.
|
|
70
|
+
- 2986f8e09d: Fixed EntityOwnerPicker and OwnershipCard url filter issue with more than 21 owners
|
|
71
|
+
- f3a7a9de6d: Internalized usage of `useOwnedEntities` hook.
|
|
72
|
+
- Updated dependencies
|
|
73
|
+
- @backstage/core-components@0.9.1
|
|
74
|
+
- @backstage/catalog-model@0.13.0
|
|
75
|
+
- @backstage/catalog-client@0.9.0
|
|
76
|
+
|
|
77
|
+
## 0.9.0-next.0
|
|
78
|
+
|
|
79
|
+
### Minor Changes
|
|
80
|
+
|
|
81
|
+
- b0af81726d: **BREAKING**: Removed `reduceCatalogFilters` and `reduceEntityFilters` due to low external utility value.
|
|
82
|
+
- 7ffb2c73c9: **BREAKING**: Removed the deprecated `loadCatalogOwnerRefs` function. Usages of this function can be directly replaced with `ownershipEntityRefs` from `identityApi.getBackstageIdentity()`.
|
|
83
|
+
|
|
84
|
+
This also affects the `useEntityOwnership` hook in that it no longer uses `loadCatalogOwnerRefs`, meaning it will no longer load in additional relations and instead only rely on the `ownershipEntityRefs` from the `IdentityApi`.
|
|
85
|
+
|
|
86
|
+
- dd88d1e3ac: **BREAKING**: Removed `useEntityFromUrl`.
|
|
87
|
+
- 9844d4d2bd: **BREAKING**: Removed `useEntityCompoundName`, use `useRouteRefParams(entityRouteRef)` instead.
|
|
88
|
+
- 2b8c986ce0: **BREAKING**: Removed `useEntityListProvider` use `useEntityList` instead.
|
|
89
|
+
- f3a7a9de6d: **BREAKING**: Removed `useOwnedEntities` and moved its usage internally to the scaffolder-backend where it's used.
|
|
90
|
+
|
|
91
|
+
**BREAKING**: Removed `EntityTypeReturn` type which is now inlined.
|
|
92
|
+
|
|
93
|
+
- cf1ff5b438: **BREAKING**: Removed the `useEntityKinds` hook, use `catalogApi.getEntityFacets({ facets: ['kind'] })` instead.
|
|
94
|
+
- fc6290a76d: **BREAKING**: Removed the deprecated `useOwnUser` hook. Existing usage can be replaced with `identityApi.getBackstageIdentity()`, followed by a call to `catalogClient.getEntityByRef(identity.userEntityRef)`.
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- b1aacbf96a: Applied the fix for the `/alpha` entry point resolution that was part of the `v0.70.1` release of Backstage.
|
|
99
|
+
- 2986f8e09d: Fixed EntityOwnerPicker and OwnershipCard url filter issue with more than 21 owners
|
|
100
|
+
- f3a7a9de6d: Internalized usage of `useOwnedEntities` hook.
|
|
101
|
+
- Updated dependencies
|
|
102
|
+
- @backstage/core-components@0.9.1-next.0
|
|
103
|
+
- @backstage/catalog-model@0.13.0-next.0
|
|
104
|
+
- @backstage/catalog-client@0.9.0-next.0
|
|
105
|
+
|
|
3
106
|
## 0.8.1
|
|
4
107
|
|
|
5
108
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
/// <reference types="react" />
|
|
8
8
|
|
|
9
9
|
import { ApiRef } from '@backstage/core-plugin-api';
|
|
10
|
-
import { AsyncState } from 'react-use/lib/useAsync';
|
|
11
10
|
import { CATALOG_FILTER_EXISTS } from '@backstage/catalog-client';
|
|
12
11
|
import { CatalogApi } from '@backstage/catalog-client';
|
|
13
12
|
import { ComponentEntity } from '@backstage/catalog-model';
|
|
14
13
|
import { ComponentProps } from 'react';
|
|
15
14
|
import { CompoundEntityRef } from '@backstage/catalog-model';
|
|
16
15
|
import { Entity } from '@backstage/catalog-model';
|
|
17
|
-
import { GetEntitiesResponse } from '@backstage/catalog-client';
|
|
18
16
|
import { IconButton } from '@material-ui/core';
|
|
19
17
|
import { LinkProps } from '@backstage/core-components';
|
|
20
18
|
import { Observable } from '@backstage/types';
|
|
@@ -28,7 +26,6 @@ import { ScmIntegrationRegistry } from '@backstage/integration';
|
|
|
28
26
|
import { StyleRules } from '@material-ui/core/styles/withStyles';
|
|
29
27
|
import { SystemEntity } from '@backstage/catalog-model';
|
|
30
28
|
import { TableColumn } from '@backstage/core-components';
|
|
31
|
-
import { UserEntity } from '@backstage/catalog-model';
|
|
32
29
|
|
|
33
30
|
/**
|
|
34
31
|
* Provides a loaded entity to be picked up by the `useEntity` hook.
|
|
@@ -65,6 +62,19 @@ export { CatalogApi }
|
|
|
65
62
|
*/
|
|
66
63
|
export declare const catalogApiRef: ApiRef<CatalogApi>;
|
|
67
64
|
|
|
65
|
+
/** @public */
|
|
66
|
+
export declare const CatalogFilterLayout: {
|
|
67
|
+
(props: {
|
|
68
|
+
children: React_2.ReactNode;
|
|
69
|
+
}): JSX.Element;
|
|
70
|
+
Filters: (props: {
|
|
71
|
+
children: React_2.ReactNode;
|
|
72
|
+
}) => JSX.Element;
|
|
73
|
+
Content: (props: {
|
|
74
|
+
children: React_2.ReactNode;
|
|
75
|
+
}) => JSX.Element;
|
|
76
|
+
};
|
|
77
|
+
|
|
68
78
|
/** @public */
|
|
69
79
|
export declare type CatalogReactComponentsNameToClassKey = {
|
|
70
80
|
CatalogReactUserListPicker: CatalogReactUserListPickerClassKey;
|
|
@@ -428,17 +438,6 @@ export declare interface EntityTypePickerProps {
|
|
|
428
438
|
hidden?: boolean;
|
|
429
439
|
}
|
|
430
440
|
|
|
431
|
-
/** @public
|
|
432
|
-
* @deprecated type inlined with {@link useEntityTypeFilter}.
|
|
433
|
-
*/
|
|
434
|
-
export declare type EntityTypeReturn = {
|
|
435
|
-
loading: boolean;
|
|
436
|
-
error?: Error;
|
|
437
|
-
availableTypes: string[];
|
|
438
|
-
selectedTypes: string[];
|
|
439
|
-
setSelectedTypes: (types: string[]) => void;
|
|
440
|
-
};
|
|
441
|
-
|
|
442
441
|
/**
|
|
443
442
|
* IconButton for showing if a current entity is starred and adding/removing it from the favorite entities
|
|
444
443
|
* @param props - MaterialUI IconButton props extended by required `entity` prop
|
|
@@ -446,37 +445,11 @@ export declare type EntityTypeReturn = {
|
|
|
446
445
|
*/
|
|
447
446
|
export declare const FavoriteEntity: (props: FavoriteEntityProps) => JSX.Element;
|
|
448
447
|
|
|
449
|
-
/**
|
|
450
|
-
* @public
|
|
451
|
-
* @deprecated due to low utility value.
|
|
452
|
-
*/
|
|
453
|
-
export declare const favoriteEntityIcon: (isStarred: boolean) => JSX.Element;
|
|
454
|
-
|
|
455
448
|
/** @public */
|
|
456
449
|
export declare type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
|
|
457
450
|
entity: Entity;
|
|
458
451
|
};
|
|
459
452
|
|
|
460
|
-
/**
|
|
461
|
-
* @public
|
|
462
|
-
* @deprecated due to low utility value.
|
|
463
|
-
*/
|
|
464
|
-
export declare const favoriteEntityTooltip: (isStarred: boolean) => "Remove from favorites" | "Add to favorites";
|
|
465
|
-
|
|
466
|
-
/** @public @deprecated please use {@link humanizeEntityRef} instead */
|
|
467
|
-
export declare const formatEntityRefTitle: typeof humanizeEntityRef;
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* @public
|
|
471
|
-
* @deprecated use entity.metadata.annotations?.[ANNOTATION_EDIT_URL] instead.
|
|
472
|
-
*/
|
|
473
|
-
export declare function getEntityMetadataEditUrl(entity: Entity): string | undefined;
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* @public
|
|
477
|
-
* @deprecated use entity.metadata.annotations?.[ANNOTATION_VIEW_URL] instead. */
|
|
478
|
-
export declare function getEntityMetadataViewUrl(entity: Entity): string | undefined;
|
|
479
|
-
|
|
480
453
|
/**
|
|
481
454
|
* Get the related entity references.
|
|
482
455
|
*
|
|
@@ -516,20 +489,6 @@ export declare function InspectEntityDialog(props: {
|
|
|
516
489
|
*/
|
|
517
490
|
export declare function isOwnerOf(owner: Entity, entity: Entity): boolean;
|
|
518
491
|
|
|
519
|
-
/**
|
|
520
|
-
* Takes the relevant parts of the User entity corresponding to the Backstage
|
|
521
|
-
* identity, and translates them into a list of entity refs on string form that
|
|
522
|
-
* represent the user's ownership connections.
|
|
523
|
-
*
|
|
524
|
-
* @public
|
|
525
|
-
*
|
|
526
|
-
* @param catalogApi - The Catalog API implementation
|
|
527
|
-
* @param identityOwnerRefs - List of identity owner refs as strings
|
|
528
|
-
* @returns OwnerRefs as a string array
|
|
529
|
-
* @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
|
|
530
|
-
*/
|
|
531
|
-
export declare function loadCatalogOwnerRefs(catalogApi: CatalogApi, identityOwnerRefs: string[]): Promise<string[]>;
|
|
532
|
-
|
|
533
492
|
/** @public */
|
|
534
493
|
export declare const MockEntityListContextProvider: ({ children, value, }: React_2.PropsWithChildren<{
|
|
535
494
|
value?: Partial<EntityListContextProps<DefaultEntityFilters>> | undefined;
|
|
@@ -548,18 +507,6 @@ export declare class MockStarredEntitiesApi implements StarredEntitiesApi {
|
|
|
548
507
|
starredEntitie$(): Observable<Set<string>>;
|
|
549
508
|
}
|
|
550
509
|
|
|
551
|
-
/**
|
|
552
|
-
* @public
|
|
553
|
-
* @deprecated will be made private.
|
|
554
|
-
*/
|
|
555
|
-
export declare function reduceCatalogFilters(filters: EntityFilter[]): Record<string, string | symbol | (string | symbol)[]>;
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* @public
|
|
559
|
-
* @deprecated will be made private.
|
|
560
|
-
*/
|
|
561
|
-
export declare function reduceEntityFilters(filters: EntityFilter[]): (entity: Entity) => boolean;
|
|
562
|
-
|
|
563
510
|
/**
|
|
564
511
|
* An API to store and retrieve starred entities
|
|
565
512
|
*
|
|
@@ -611,39 +558,6 @@ export declare function useAsyncEntity<TEntity extends Entity = Entity>(): Entit
|
|
|
611
558
|
*/
|
|
612
559
|
export declare function useEntity<TEntity extends Entity = Entity>(): {
|
|
613
560
|
entity: TEntity;
|
|
614
|
-
/** @deprecated use {@link useAsyncEntity} instead */
|
|
615
|
-
loading: boolean;
|
|
616
|
-
/** @deprecated use {@link useAsyncEntity} instead */
|
|
617
|
-
error?: Error;
|
|
618
|
-
/** @deprecated use {@link useAsyncEntity} instead */
|
|
619
|
-
refresh?: VoidFunction;
|
|
620
|
-
};
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Grabs entity kind, namespace, and name from the location
|
|
624
|
-
* @public
|
|
625
|
-
* @deprecated use {@link @backstage/core-plugin-api#useRouteRefParams} instead
|
|
626
|
-
*/
|
|
627
|
-
export declare const useEntityCompoundName: () => {
|
|
628
|
-
kind: string;
|
|
629
|
-
namespace: string;
|
|
630
|
-
name: string;
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
/** @public
|
|
634
|
-
* @deprecated will be deleted shortly due to low external usage, re-implement if needed.
|
|
635
|
-
*/
|
|
636
|
-
export declare const useEntityFromUrl: () => EntityLoadingStatus;
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* Retrieve a list of unique entity kinds present in the catalog
|
|
640
|
-
* @public
|
|
641
|
-
* @deprecated and will be removed due to low utility value.
|
|
642
|
-
*/
|
|
643
|
-
export declare function useEntityKinds(): {
|
|
644
|
-
error: Error | undefined;
|
|
645
|
-
loading: boolean;
|
|
646
|
-
kinds: string[] | undefined;
|
|
647
561
|
};
|
|
648
562
|
|
|
649
563
|
/**
|
|
@@ -652,13 +566,6 @@ export declare function useEntityKinds(): {
|
|
|
652
566
|
*/
|
|
653
567
|
export declare function useEntityList<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
|
|
654
568
|
|
|
655
|
-
/**
|
|
656
|
-
* Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
|
|
657
|
-
* @public
|
|
658
|
-
* @deprecated use {@link useEntityList} instead.
|
|
659
|
-
*/
|
|
660
|
-
export declare function useEntityListProvider<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
|
|
661
|
-
|
|
662
569
|
/**
|
|
663
570
|
* Returns a function that checks whether the currently signed-in user is an
|
|
664
571
|
* owner of a given entity. When the hook is initially mounted, the loading
|
|
@@ -704,28 +611,6 @@ export declare function useEntityTypeFilter(): {
|
|
|
704
611
|
setSelectedTypes: (types: string[]) => void;
|
|
705
612
|
};
|
|
706
613
|
|
|
707
|
-
/**
|
|
708
|
-
* Takes the relevant parts of the Backstage identity, and translates them into
|
|
709
|
-
* a list of entities which are owned by the user. Takes an optional parameter
|
|
710
|
-
* to filter the entities based on allowedKinds
|
|
711
|
-
*
|
|
712
|
-
* @public
|
|
713
|
-
*
|
|
714
|
-
* @param allowedKinds - Array of allowed kinds to filter the entities
|
|
715
|
-
* @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
|
|
716
|
-
*/
|
|
717
|
-
export declare function useOwnedEntities(allowedKinds?: string[]): {
|
|
718
|
-
loading: boolean;
|
|
719
|
-
ownedEntities: GetEntitiesResponse | undefined;
|
|
720
|
-
};
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* Get the catalog User entity (if any) that matches the logged-in user.
|
|
724
|
-
* @public
|
|
725
|
-
* @deprecated due to low external usage.
|
|
726
|
-
*/
|
|
727
|
-
export declare function useOwnUser(): AsyncState<UserEntity | undefined>;
|
|
728
|
-
|
|
729
614
|
/** @public */
|
|
730
615
|
export declare function useRelatedEntities(entity: Entity, relationFilter: {
|
|
731
616
|
type?: string;
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
/// <reference types="react" />
|
|
8
8
|
|
|
9
9
|
import { ApiRef } from '@backstage/core-plugin-api';
|
|
10
|
-
import { AsyncState } from 'react-use/lib/useAsync';
|
|
11
10
|
import { CATALOG_FILTER_EXISTS } from '@backstage/catalog-client';
|
|
12
11
|
import { CatalogApi } from '@backstage/catalog-client';
|
|
13
12
|
import { ComponentEntity } from '@backstage/catalog-model';
|
|
14
13
|
import { ComponentProps } from 'react';
|
|
15
14
|
import { CompoundEntityRef } from '@backstage/catalog-model';
|
|
16
15
|
import { Entity } from '@backstage/catalog-model';
|
|
17
|
-
import { GetEntitiesResponse } from '@backstage/catalog-client';
|
|
18
16
|
import { IconButton } from '@material-ui/core';
|
|
19
17
|
import { LinkProps } from '@backstage/core-components';
|
|
20
18
|
import { Observable } from '@backstage/types';
|
|
@@ -28,7 +26,6 @@ import { ScmIntegrationRegistry } from '@backstage/integration';
|
|
|
28
26
|
import { StyleRules } from '@material-ui/core/styles/withStyles';
|
|
29
27
|
import { SystemEntity } from '@backstage/catalog-model';
|
|
30
28
|
import { TableColumn } from '@backstage/core-components';
|
|
31
|
-
import { UserEntity } from '@backstage/catalog-model';
|
|
32
29
|
|
|
33
30
|
/**
|
|
34
31
|
* Provides a loaded entity to be picked up by the `useEntity` hook.
|
|
@@ -65,6 +62,19 @@ export { CatalogApi }
|
|
|
65
62
|
*/
|
|
66
63
|
export declare const catalogApiRef: ApiRef<CatalogApi>;
|
|
67
64
|
|
|
65
|
+
/** @public */
|
|
66
|
+
export declare const CatalogFilterLayout: {
|
|
67
|
+
(props: {
|
|
68
|
+
children: React_2.ReactNode;
|
|
69
|
+
}): JSX.Element;
|
|
70
|
+
Filters: (props: {
|
|
71
|
+
children: React_2.ReactNode;
|
|
72
|
+
}) => JSX.Element;
|
|
73
|
+
Content: (props: {
|
|
74
|
+
children: React_2.ReactNode;
|
|
75
|
+
}) => JSX.Element;
|
|
76
|
+
};
|
|
77
|
+
|
|
68
78
|
/** @public */
|
|
69
79
|
export declare type CatalogReactComponentsNameToClassKey = {
|
|
70
80
|
CatalogReactUserListPicker: CatalogReactUserListPickerClassKey;
|
|
@@ -428,17 +438,6 @@ export declare interface EntityTypePickerProps {
|
|
|
428
438
|
hidden?: boolean;
|
|
429
439
|
}
|
|
430
440
|
|
|
431
|
-
/** @public
|
|
432
|
-
* @deprecated type inlined with {@link useEntityTypeFilter}.
|
|
433
|
-
*/
|
|
434
|
-
export declare type EntityTypeReturn = {
|
|
435
|
-
loading: boolean;
|
|
436
|
-
error?: Error;
|
|
437
|
-
availableTypes: string[];
|
|
438
|
-
selectedTypes: string[];
|
|
439
|
-
setSelectedTypes: (types: string[]) => void;
|
|
440
|
-
};
|
|
441
|
-
|
|
442
441
|
/**
|
|
443
442
|
* IconButton for showing if a current entity is starred and adding/removing it from the favorite entities
|
|
444
443
|
* @param props - MaterialUI IconButton props extended by required `entity` prop
|
|
@@ -446,37 +445,11 @@ export declare type EntityTypeReturn = {
|
|
|
446
445
|
*/
|
|
447
446
|
export declare const FavoriteEntity: (props: FavoriteEntityProps) => JSX.Element;
|
|
448
447
|
|
|
449
|
-
/**
|
|
450
|
-
* @public
|
|
451
|
-
* @deprecated due to low utility value.
|
|
452
|
-
*/
|
|
453
|
-
export declare const favoriteEntityIcon: (isStarred: boolean) => JSX.Element;
|
|
454
|
-
|
|
455
448
|
/** @public */
|
|
456
449
|
export declare type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
|
|
457
450
|
entity: Entity;
|
|
458
451
|
};
|
|
459
452
|
|
|
460
|
-
/**
|
|
461
|
-
* @public
|
|
462
|
-
* @deprecated due to low utility value.
|
|
463
|
-
*/
|
|
464
|
-
export declare const favoriteEntityTooltip: (isStarred: boolean) => "Remove from favorites" | "Add to favorites";
|
|
465
|
-
|
|
466
|
-
/** @public @deprecated please use {@link humanizeEntityRef} instead */
|
|
467
|
-
export declare const formatEntityRefTitle: typeof humanizeEntityRef;
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* @public
|
|
471
|
-
* @deprecated use entity.metadata.annotations?.[ANNOTATION_EDIT_URL] instead.
|
|
472
|
-
*/
|
|
473
|
-
export declare function getEntityMetadataEditUrl(entity: Entity): string | undefined;
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* @public
|
|
477
|
-
* @deprecated use entity.metadata.annotations?.[ANNOTATION_VIEW_URL] instead. */
|
|
478
|
-
export declare function getEntityMetadataViewUrl(entity: Entity): string | undefined;
|
|
479
|
-
|
|
480
453
|
/**
|
|
481
454
|
* Get the related entity references.
|
|
482
455
|
*
|
|
@@ -507,20 +480,6 @@ export declare function InspectEntityDialog(props: {
|
|
|
507
480
|
|
|
508
481
|
/* Excluded from this release type: isOwnerOf */
|
|
509
482
|
|
|
510
|
-
/**
|
|
511
|
-
* Takes the relevant parts of the User entity corresponding to the Backstage
|
|
512
|
-
* identity, and translates them into a list of entity refs on string form that
|
|
513
|
-
* represent the user's ownership connections.
|
|
514
|
-
*
|
|
515
|
-
* @public
|
|
516
|
-
*
|
|
517
|
-
* @param catalogApi - The Catalog API implementation
|
|
518
|
-
* @param identityOwnerRefs - List of identity owner refs as strings
|
|
519
|
-
* @returns OwnerRefs as a string array
|
|
520
|
-
* @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
|
|
521
|
-
*/
|
|
522
|
-
export declare function loadCatalogOwnerRefs(catalogApi: CatalogApi, identityOwnerRefs: string[]): Promise<string[]>;
|
|
523
|
-
|
|
524
483
|
/** @public */
|
|
525
484
|
export declare const MockEntityListContextProvider: ({ children, value, }: React_2.PropsWithChildren<{
|
|
526
485
|
value?: Partial<EntityListContextProps<DefaultEntityFilters>> | undefined;
|
|
@@ -539,18 +498,6 @@ export declare class MockStarredEntitiesApi implements StarredEntitiesApi {
|
|
|
539
498
|
starredEntitie$(): Observable<Set<string>>;
|
|
540
499
|
}
|
|
541
500
|
|
|
542
|
-
/**
|
|
543
|
-
* @public
|
|
544
|
-
* @deprecated will be made private.
|
|
545
|
-
*/
|
|
546
|
-
export declare function reduceCatalogFilters(filters: EntityFilter[]): Record<string, string | symbol | (string | symbol)[]>;
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* @public
|
|
550
|
-
* @deprecated will be made private.
|
|
551
|
-
*/
|
|
552
|
-
export declare function reduceEntityFilters(filters: EntityFilter[]): (entity: Entity) => boolean;
|
|
553
|
-
|
|
554
501
|
/**
|
|
555
502
|
* An API to store and retrieve starred entities
|
|
556
503
|
*
|
|
@@ -602,39 +549,6 @@ export declare function useAsyncEntity<TEntity extends Entity = Entity>(): Entit
|
|
|
602
549
|
*/
|
|
603
550
|
export declare function useEntity<TEntity extends Entity = Entity>(): {
|
|
604
551
|
entity: TEntity;
|
|
605
|
-
/** @deprecated use {@link useAsyncEntity} instead */
|
|
606
|
-
loading: boolean;
|
|
607
|
-
/** @deprecated use {@link useAsyncEntity} instead */
|
|
608
|
-
error?: Error;
|
|
609
|
-
/** @deprecated use {@link useAsyncEntity} instead */
|
|
610
|
-
refresh?: VoidFunction;
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* Grabs entity kind, namespace, and name from the location
|
|
615
|
-
* @public
|
|
616
|
-
* @deprecated use {@link @backstage/core-plugin-api#useRouteRefParams} instead
|
|
617
|
-
*/
|
|
618
|
-
export declare const useEntityCompoundName: () => {
|
|
619
|
-
kind: string;
|
|
620
|
-
namespace: string;
|
|
621
|
-
name: string;
|
|
622
|
-
};
|
|
623
|
-
|
|
624
|
-
/** @public
|
|
625
|
-
* @deprecated will be deleted shortly due to low external usage, re-implement if needed.
|
|
626
|
-
*/
|
|
627
|
-
export declare const useEntityFromUrl: () => EntityLoadingStatus;
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* Retrieve a list of unique entity kinds present in the catalog
|
|
631
|
-
* @public
|
|
632
|
-
* @deprecated and will be removed due to low utility value.
|
|
633
|
-
*/
|
|
634
|
-
export declare function useEntityKinds(): {
|
|
635
|
-
error: Error | undefined;
|
|
636
|
-
loading: boolean;
|
|
637
|
-
kinds: string[] | undefined;
|
|
638
552
|
};
|
|
639
553
|
|
|
640
554
|
/**
|
|
@@ -643,13 +557,6 @@ export declare function useEntityKinds(): {
|
|
|
643
557
|
*/
|
|
644
558
|
export declare function useEntityList<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
|
|
645
559
|
|
|
646
|
-
/**
|
|
647
|
-
* Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
|
|
648
|
-
* @public
|
|
649
|
-
* @deprecated use {@link useEntityList} instead.
|
|
650
|
-
*/
|
|
651
|
-
export declare function useEntityListProvider<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
|
|
652
|
-
|
|
653
560
|
/**
|
|
654
561
|
* Returns a function that checks whether the currently signed-in user is an
|
|
655
562
|
* owner of a given entity. When the hook is initially mounted, the loading
|
|
@@ -680,28 +587,6 @@ export declare function useEntityTypeFilter(): {
|
|
|
680
587
|
setSelectedTypes: (types: string[]) => void;
|
|
681
588
|
};
|
|
682
589
|
|
|
683
|
-
/**
|
|
684
|
-
* Takes the relevant parts of the Backstage identity, and translates them into
|
|
685
|
-
* a list of entities which are owned by the user. Takes an optional parameter
|
|
686
|
-
* to filter the entities based on allowedKinds
|
|
687
|
-
*
|
|
688
|
-
* @public
|
|
689
|
-
*
|
|
690
|
-
* @param allowedKinds - Array of allowed kinds to filter the entities
|
|
691
|
-
* @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
|
|
692
|
-
*/
|
|
693
|
-
export declare function useOwnedEntities(allowedKinds?: string[]): {
|
|
694
|
-
loading: boolean;
|
|
695
|
-
ownedEntities: GetEntitiesResponse | undefined;
|
|
696
|
-
};
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* Get the catalog User entity (if any) that matches the logged-in user.
|
|
700
|
-
* @public
|
|
701
|
-
* @deprecated due to low external usage.
|
|
702
|
-
*/
|
|
703
|
-
export declare function useOwnUser(): AsyncState<UserEntity | undefined>;
|
|
704
|
-
|
|
705
590
|
/** @public */
|
|
706
591
|
export declare function useRelatedEntities(entity: Entity, relationFilter: {
|
|
707
592
|
type?: string;
|