@backstage/plugin-catalog-react 1.8.3 → 1.8.4-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -14
- package/alpha/package.json +1 -1
- package/dist/index.d.ts +99 -79
- package/dist/index.esm.js +9 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
-
## 1.8.
|
|
3
|
+
## 1.8.4-next.1
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
+
- bd817209ddd7: Export the `EntityAutocompletePicker` component.
|
|
8
|
+
- 7029ba1ce0af: Added delete alert popup when user delete the entity
|
|
7
9
|
- Updated dependencies
|
|
8
|
-
- @backstage/
|
|
9
|
-
- @backstage/
|
|
10
|
-
- @backstage/catalog-model@1.4.
|
|
11
|
-
- @backstage/core-
|
|
12
|
-
- @backstage/
|
|
10
|
+
- @backstage/core-components@0.13.5-next.1
|
|
11
|
+
- @backstage/integration@1.7.0-next.1
|
|
12
|
+
- @backstage/catalog-model@1.4.2-next.0
|
|
13
|
+
- @backstage/core-plugin-api@1.6.0-next.1
|
|
14
|
+
- @backstage/plugin-permission-common@0.7.8-next.0
|
|
15
|
+
- @backstage/plugin-permission-react@0.4.15-next.1
|
|
16
|
+
- @backstage/catalog-client@1.4.4-next.0
|
|
17
|
+
- @backstage/plugin-catalog-common@1.0.16-next.0
|
|
13
18
|
- @backstage/errors@1.2.1
|
|
14
19
|
- @backstage/theme@0.4.1
|
|
15
20
|
- @backstage/types@1.1.0
|
|
16
21
|
- @backstage/version-bridge@1.0.4
|
|
17
|
-
- @backstage/plugin-catalog-common@1.0.15
|
|
18
|
-
- @backstage/plugin-permission-common@0.7.7
|
|
19
|
-
- @backstage/plugin-permission-react@0.4.14
|
|
20
22
|
|
|
21
|
-
## 1.8.
|
|
23
|
+
## 1.8.3-next.0
|
|
22
24
|
|
|
23
25
|
### Patch Changes
|
|
24
26
|
|
|
25
27
|
- Updated dependencies
|
|
26
|
-
- @backstage/integration@1.
|
|
28
|
+
- @backstage/integration@1.7.0-next.0
|
|
29
|
+
- @backstage/core-plugin-api@1.6.0-next.0
|
|
30
|
+
- @backstage/core-components@0.13.5-next.0
|
|
27
31
|
- @backstage/catalog-client@1.4.3
|
|
28
32
|
- @backstage/catalog-model@1.4.1
|
|
29
|
-
- @backstage/core-components@0.13.4
|
|
30
|
-
- @backstage/core-plugin-api@1.5.3
|
|
31
33
|
- @backstage/errors@1.2.1
|
|
32
34
|
- @backstage/theme@0.4.1
|
|
33
35
|
- @backstage/types@1.1.0
|
|
34
36
|
- @backstage/version-bridge@1.0.4
|
|
35
37
|
- @backstage/plugin-catalog-common@1.0.15
|
|
36
38
|
- @backstage/plugin-permission-common@0.7.7
|
|
37
|
-
- @backstage/plugin-permission-react@0.4.
|
|
39
|
+
- @backstage/plugin-permission-react@0.4.15-next.0
|
|
38
40
|
|
|
39
41
|
## 1.8.1
|
|
40
42
|
|
package/alpha/package.json
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CatalogApi } from '@backstage/catalog-client';
|
|
3
2
|
export { CATALOG_FILTER_EXISTS, CatalogApi } from '@backstage/catalog-client';
|
|
4
3
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
@@ -8,7 +7,7 @@ import React, { PropsWithChildren, ReactNode, ComponentProps } from 'react';
|
|
|
8
7
|
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
9
8
|
import { Entity, CompoundEntityRef } from '@backstage/catalog-model';
|
|
10
9
|
import { LinkProps, InfoCardVariants, TableColumn, TableOptions } from '@backstage/core-components';
|
|
11
|
-
import { IconButton } from '@material-ui/core';
|
|
10
|
+
import { IconButton, TextFieldProps } from '@material-ui/core';
|
|
12
11
|
import { Overrides } from '@material-ui/core/styles/overrides';
|
|
13
12
|
import { StyleRules } from '@material-ui/core/styles/withStyles';
|
|
14
13
|
import { ScmIntegrationRegistry } from '@backstage/integration';
|
|
@@ -60,17 +59,17 @@ declare class MockStarredEntitiesApi implements StarredEntitiesApi {
|
|
|
60
59
|
declare const CatalogFilterLayout: {
|
|
61
60
|
(props: {
|
|
62
61
|
children: React.ReactNode;
|
|
63
|
-
}): JSX.Element;
|
|
62
|
+
}): React.JSX.Element;
|
|
64
63
|
Filters: (props: {
|
|
65
64
|
children: React.ReactNode;
|
|
66
65
|
options?: {
|
|
67
66
|
drawerBreakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
68
67
|
drawerAnchor?: 'left' | 'right' | 'top' | 'bottom';
|
|
69
68
|
};
|
|
70
|
-
}) => JSX.Element;
|
|
69
|
+
}) => React.JSX.Element;
|
|
71
70
|
Content: (props: {
|
|
72
71
|
children: React.ReactNode;
|
|
73
|
-
}) => JSX.Element;
|
|
72
|
+
}) => React.JSX.Element;
|
|
74
73
|
};
|
|
75
74
|
|
|
76
75
|
/**
|
|
@@ -88,14 +87,14 @@ interface EntityKindPickerProps {
|
|
|
88
87
|
hidden?: boolean;
|
|
89
88
|
}
|
|
90
89
|
/** @public */
|
|
91
|
-
declare const EntityKindPicker: (props: EntityKindPickerProps) => JSX.Element | null;
|
|
90
|
+
declare const EntityKindPicker: (props: EntityKindPickerProps) => React.JSX.Element | null;
|
|
92
91
|
|
|
93
92
|
/** @public */
|
|
94
93
|
type CatalogReactEntityLifecyclePickerClassKey = 'input';
|
|
95
94
|
/** @public */
|
|
96
95
|
declare const EntityLifecyclePicker: (props: {
|
|
97
96
|
initialFilter?: string[];
|
|
98
|
-
}) => JSX.Element;
|
|
97
|
+
}) => React.JSX.Element;
|
|
99
98
|
|
|
100
99
|
/** @public */
|
|
101
100
|
type CatalogReactEntityOwnerPickerClassKey = 'input';
|
|
@@ -106,7 +105,7 @@ type EntityOwnerPickerProps = {
|
|
|
106
105
|
mode?: 'owners-only' | 'all';
|
|
107
106
|
};
|
|
108
107
|
/** @public */
|
|
109
|
-
declare const EntityOwnerPicker: (props?: EntityOwnerPickerProps) => JSX.Element | null;
|
|
108
|
+
declare const EntityOwnerPicker: (props?: EntityOwnerPickerProps) => React.JSX.Element | null;
|
|
110
109
|
|
|
111
110
|
/**
|
|
112
111
|
* Props for {@link EntityRefLink}.
|
|
@@ -147,7 +146,7 @@ type EntityRefLinksProps<TRef extends string | CompoundEntityRef | Entity> = ({
|
|
|
147
146
|
*
|
|
148
147
|
* @public
|
|
149
148
|
*/
|
|
150
|
-
declare function EntityRefLinks<TRef extends string | CompoundEntityRef | Entity>(props: EntityRefLinksProps<TRef>): JSX.Element;
|
|
149
|
+
declare function EntityRefLinks<TRef extends string | CompoundEntityRef | Entity>(props: EntityRefLinksProps<TRef>): React.JSX.Element;
|
|
151
150
|
|
|
152
151
|
/**
|
|
153
152
|
* @param defaultNamespace - if set to false then namespace is never omitted,
|
|
@@ -174,7 +173,7 @@ type EntityPeekAheadPopoverProps = PropsWithChildren<{
|
|
|
174
173
|
*
|
|
175
174
|
* @public
|
|
176
175
|
*/
|
|
177
|
-
declare const EntityPeekAheadPopover: (props: EntityPeekAheadPopoverProps) => JSX.Element;
|
|
176
|
+
declare const EntityPeekAheadPopover: (props: EntityPeekAheadPopoverProps) => React.JSX.Element;
|
|
178
177
|
|
|
179
178
|
/** @public */
|
|
180
179
|
type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
|
|
@@ -182,7 +181,7 @@ type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
|
|
|
182
181
|
* Renders search bar for filtering the entity list.
|
|
183
182
|
* @public
|
|
184
183
|
*/
|
|
185
|
-
declare const EntitySearchBar: () => JSX.Element;
|
|
184
|
+
declare const EntitySearchBar: () => React.JSX.Element;
|
|
186
185
|
|
|
187
186
|
/**
|
|
188
187
|
* Props for {@link EntityTable}.
|
|
@@ -204,7 +203,7 @@ interface EntityTableProps<T extends Entity> {
|
|
|
204
203
|
* @public
|
|
205
204
|
*/
|
|
206
205
|
declare const EntityTable: {
|
|
207
|
-
<T extends Entity>(props: EntityTableProps<T>): JSX.Element;
|
|
206
|
+
<T extends Entity>(props: EntityTableProps<T>): React.JSX.Element;
|
|
208
207
|
columns: Readonly<{
|
|
209
208
|
createEntityRefColumn<T_1 extends Entity>(options: {
|
|
210
209
|
defaultKind?: string | undefined;
|
|
@@ -256,7 +255,7 @@ type EntityTagPickerProps = {
|
|
|
256
255
|
showCounts?: boolean;
|
|
257
256
|
};
|
|
258
257
|
/** @public */
|
|
259
|
-
declare const EntityTagPicker: (props: EntityTagPickerProps) => JSX.Element;
|
|
258
|
+
declare const EntityTagPicker: (props: EntityTagPickerProps) => React.JSX.Element;
|
|
260
259
|
|
|
261
260
|
/**
|
|
262
261
|
* Props for {@link EntityTypePicker}.
|
|
@@ -268,7 +267,7 @@ interface EntityTypePickerProps {
|
|
|
268
267
|
hidden?: boolean;
|
|
269
268
|
}
|
|
270
269
|
/** @public */
|
|
271
|
-
declare const EntityTypePicker: (props: EntityTypePickerProps) => JSX.Element | null;
|
|
270
|
+
declare const EntityTypePicker: (props: EntityTypePickerProps) => React.JSX.Element | null;
|
|
272
271
|
|
|
273
272
|
/** @public */
|
|
274
273
|
type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
|
|
@@ -279,7 +278,7 @@ type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
|
|
|
279
278
|
* @param props - MaterialUI IconButton props extended by required `entity` prop
|
|
280
279
|
* @public
|
|
281
280
|
*/
|
|
282
|
-
declare const FavoriteEntity: (props: FavoriteEntityProps) => JSX.Element;
|
|
281
|
+
declare const FavoriteEntity: (props: FavoriteEntityProps) => React.JSX.Element;
|
|
283
282
|
|
|
284
283
|
/**
|
|
285
284
|
* A dialog that lets users inspect the low level details of their entities.
|
|
@@ -290,7 +289,7 @@ declare function InspectEntityDialog(props: {
|
|
|
290
289
|
open: boolean;
|
|
291
290
|
entity: Entity;
|
|
292
291
|
onClose: () => void;
|
|
293
|
-
}): JSX.Element | null;
|
|
292
|
+
}): React.JSX.Element | null;
|
|
294
293
|
|
|
295
294
|
/** @public */
|
|
296
295
|
type UnregisterEntityDialogProps = {
|
|
@@ -300,7 +299,7 @@ type UnregisterEntityDialogProps = {
|
|
|
300
299
|
entity: Entity;
|
|
301
300
|
};
|
|
302
301
|
/** @public */
|
|
303
|
-
declare const UnregisterEntityDialog: (props: UnregisterEntityDialogProps) => JSX.Element;
|
|
302
|
+
declare const UnregisterEntityDialog: (props: UnregisterEntityDialogProps) => React.JSX.Element;
|
|
304
303
|
|
|
305
304
|
/** @public */
|
|
306
305
|
type EntityFilter = {
|
|
@@ -335,73 +334,17 @@ type UserListPickerProps = {
|
|
|
335
334
|
availableFilters?: UserListFilterKind[];
|
|
336
335
|
};
|
|
337
336
|
/** @public */
|
|
338
|
-
declare const UserListPicker: (props: UserListPickerProps) => JSX.Element;
|
|
337
|
+
declare const UserListPicker: (props: UserListPickerProps) => React.JSX.Element;
|
|
339
338
|
|
|
340
339
|
/** @public */
|
|
341
340
|
type CatalogReactEntityProcessingStatusPickerClassKey = 'input';
|
|
342
341
|
/** @public */
|
|
343
|
-
declare const EntityProcessingStatusPicker: () => JSX.Element;
|
|
342
|
+
declare const EntityProcessingStatusPicker: () => React.JSX.Element;
|
|
344
343
|
|
|
345
344
|
/** @public */
|
|
346
345
|
type CatalogReactEntityNamespacePickerClassKey = 'input';
|
|
347
346
|
/** @public */
|
|
348
|
-
declare const EntityNamespacePicker: () => JSX.Element;
|
|
349
|
-
|
|
350
|
-
/** @public */
|
|
351
|
-
type EntityLoadingStatus<TEntity extends Entity = Entity> = {
|
|
352
|
-
entity?: TEntity;
|
|
353
|
-
loading: boolean;
|
|
354
|
-
error?: Error;
|
|
355
|
-
refresh?: VoidFunction;
|
|
356
|
-
};
|
|
357
|
-
/**
|
|
358
|
-
* Properties for the AsyncEntityProvider component.
|
|
359
|
-
*
|
|
360
|
-
* @public
|
|
361
|
-
*/
|
|
362
|
-
interface AsyncEntityProviderProps {
|
|
363
|
-
children: ReactNode;
|
|
364
|
-
entity?: Entity;
|
|
365
|
-
loading: boolean;
|
|
366
|
-
error?: Error;
|
|
367
|
-
refresh?: VoidFunction;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Provides a loaded entity to be picked up by the `useEntity` hook.
|
|
371
|
-
*
|
|
372
|
-
* @public
|
|
373
|
-
*/
|
|
374
|
-
declare const AsyncEntityProvider: (props: AsyncEntityProviderProps) => JSX.Element;
|
|
375
|
-
/**
|
|
376
|
-
* Properties for the EntityProvider component.
|
|
377
|
-
*
|
|
378
|
-
* @public
|
|
379
|
-
*/
|
|
380
|
-
interface EntityProviderProps {
|
|
381
|
-
children: ReactNode;
|
|
382
|
-
entity?: Entity;
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Provides an entity to be picked up by the `useEntity` hook.
|
|
386
|
-
*
|
|
387
|
-
* @public
|
|
388
|
-
*/
|
|
389
|
-
declare const EntityProvider: (props: EntityProviderProps) => JSX.Element;
|
|
390
|
-
/**
|
|
391
|
-
* Grab the current entity from the context, throws if the entity has not yet been loaded
|
|
392
|
-
* or is not available.
|
|
393
|
-
*
|
|
394
|
-
* @public
|
|
395
|
-
*/
|
|
396
|
-
declare function useEntity<TEntity extends Entity = Entity>(): {
|
|
397
|
-
entity: TEntity;
|
|
398
|
-
};
|
|
399
|
-
/**
|
|
400
|
-
* Grab the current entity from the context, provides loading state and errors, and the ability to refresh.
|
|
401
|
-
*
|
|
402
|
-
* @public
|
|
403
|
-
*/
|
|
404
|
-
declare function useAsyncEntity<TEntity extends Entity = Entity>(): EntityLoadingStatus<TEntity>;
|
|
347
|
+
declare const EntityNamespacePicker: () => React.JSX.Element;
|
|
405
348
|
|
|
406
349
|
/**
|
|
407
350
|
* Filter entities based on Kind.
|
|
@@ -560,13 +503,90 @@ declare const EntityListContext: React.Context<EntityListContextProps<any> | und
|
|
|
560
503
|
* Provides entities and filters for a catalog listing.
|
|
561
504
|
* @public
|
|
562
505
|
*/
|
|
563
|
-
declare const EntityListProvider: <EntityFilters extends DefaultEntityFilters>(props: PropsWithChildren<{}>) => JSX.Element;
|
|
506
|
+
declare const EntityListProvider: <EntityFilters extends DefaultEntityFilters>(props: PropsWithChildren<{}>) => React.JSX.Element;
|
|
564
507
|
/**
|
|
565
508
|
* Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
|
|
566
509
|
* @public
|
|
567
510
|
*/
|
|
568
511
|
declare function useEntityList<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
|
|
569
512
|
|
|
513
|
+
/** @public */
|
|
514
|
+
type AllowedEntityFilters<T extends DefaultEntityFilters> = {
|
|
515
|
+
[K in keyof T]-?: NonNullable<T[K]> extends EntityFilter & {
|
|
516
|
+
values: string[];
|
|
517
|
+
} ? K : never;
|
|
518
|
+
}[keyof T];
|
|
519
|
+
/** @public */
|
|
520
|
+
type EntityAutocompletePickerProps<T extends DefaultEntityFilters = DefaultEntityFilters, Name extends AllowedEntityFilters<T> = AllowedEntityFilters<T>> = {
|
|
521
|
+
label: string;
|
|
522
|
+
name: Name;
|
|
523
|
+
path: string;
|
|
524
|
+
showCounts?: boolean;
|
|
525
|
+
Filter: {
|
|
526
|
+
new (values: string[]): NonNullable<T[Name]>;
|
|
527
|
+
};
|
|
528
|
+
InputProps?: TextFieldProps;
|
|
529
|
+
initialSelectedOptions?: string[];
|
|
530
|
+
};
|
|
531
|
+
/** @public */
|
|
532
|
+
declare function EntityAutocompletePicker<T extends DefaultEntityFilters = DefaultEntityFilters, Name extends AllowedEntityFilters<T> = AllowedEntityFilters<T>>(props: EntityAutocompletePickerProps<T, Name>): React.JSX.Element | null;
|
|
533
|
+
|
|
534
|
+
/** @public */
|
|
535
|
+
type EntityLoadingStatus<TEntity extends Entity = Entity> = {
|
|
536
|
+
entity?: TEntity;
|
|
537
|
+
loading: boolean;
|
|
538
|
+
error?: Error;
|
|
539
|
+
refresh?: VoidFunction;
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* Properties for the AsyncEntityProvider component.
|
|
543
|
+
*
|
|
544
|
+
* @public
|
|
545
|
+
*/
|
|
546
|
+
interface AsyncEntityProviderProps {
|
|
547
|
+
children: ReactNode;
|
|
548
|
+
entity?: Entity;
|
|
549
|
+
loading: boolean;
|
|
550
|
+
error?: Error;
|
|
551
|
+
refresh?: VoidFunction;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Provides a loaded entity to be picked up by the `useEntity` hook.
|
|
555
|
+
*
|
|
556
|
+
* @public
|
|
557
|
+
*/
|
|
558
|
+
declare const AsyncEntityProvider: (props: AsyncEntityProviderProps) => React.JSX.Element;
|
|
559
|
+
/**
|
|
560
|
+
* Properties for the EntityProvider component.
|
|
561
|
+
*
|
|
562
|
+
* @public
|
|
563
|
+
*/
|
|
564
|
+
interface EntityProviderProps {
|
|
565
|
+
children: ReactNode;
|
|
566
|
+
entity?: Entity;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Provides an entity to be picked up by the `useEntity` hook.
|
|
570
|
+
*
|
|
571
|
+
* @public
|
|
572
|
+
*/
|
|
573
|
+
declare const EntityProvider: (props: EntityProviderProps) => React.JSX.Element;
|
|
574
|
+
/**
|
|
575
|
+
* Grab the current entity from the context, throws if the entity has not yet been loaded
|
|
576
|
+
* or is not available.
|
|
577
|
+
*
|
|
578
|
+
* @public
|
|
579
|
+
*/
|
|
580
|
+
declare function useEntity<TEntity extends Entity = Entity>(): {
|
|
581
|
+
entity: TEntity;
|
|
582
|
+
};
|
|
583
|
+
/**
|
|
584
|
+
* Grab the current entity from the context, provides loading state and errors, and the ability to refresh.
|
|
585
|
+
*
|
|
586
|
+
* @public
|
|
587
|
+
*/
|
|
588
|
+
declare function useAsyncEntity<TEntity extends Entity = Entity>(): EntityLoadingStatus<TEntity>;
|
|
589
|
+
|
|
570
590
|
/**
|
|
571
591
|
* A hook built on top of `useEntityList` for enabling selection of valid `spec.type` values
|
|
572
592
|
* based on the selected EntityKindFilter.
|
|
@@ -651,7 +671,7 @@ declare function entityRouteParams(entity: Entity): {
|
|
|
651
671
|
/** @public */
|
|
652
672
|
declare function MockEntityListContextProvider<T extends DefaultEntityFilters = DefaultEntityFilters>(props: PropsWithChildren<{
|
|
653
673
|
value?: Partial<EntityListContextProps<T>>;
|
|
654
|
-
}>): JSX.Element;
|
|
674
|
+
}>): React.JSX.Element;
|
|
655
675
|
|
|
656
676
|
/** @public */
|
|
657
677
|
type CatalogReactComponentsNameToClassKey = {
|
|
@@ -684,4 +704,4 @@ type EntitySourceLocation = {
|
|
|
684
704
|
/** @public */
|
|
685
705
|
declare function getEntitySourceLocation(entity: Entity, scmIntegrationsApi: ScmIntegrationRegistry): EntitySourceLocation | undefined;
|
|
686
706
|
|
|
687
|
-
export { AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogFilterLayout, CatalogReactComponentsNameToClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityNamespacePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntityProcessingStatusPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, EntityErrorFilter, EntityFilter, EntityKindFilter, EntityKindPicker, EntityKindPickerProps, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListContextProps, EntityListProvider, EntityLoadingStatus, EntityNamespaceFilter, EntityNamespacePicker, EntityOrphanFilter, EntityOwnerFilter, EntityOwnerPicker, EntityOwnerPickerProps, EntityPeekAheadPopover, EntityPeekAheadPopoverProps, EntityProcessingStatusPicker, EntityProvider, EntityProviderProps, EntityRefLink, EntityRefLinkProps, EntityRefLinks, EntityRefLinksProps, EntitySearchBar, EntitySourceLocation, EntityTable, EntityTableProps, EntityTagFilter, EntityTagPicker, EntityTagPickerProps, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityTypePickerProps, FavoriteEntity, FavoriteEntityProps, InspectEntityDialog, MockEntityListContextProvider, MockStarredEntitiesApi, StarredEntitiesApi, UnregisterEntityDialog, UnregisterEntityDialogProps, UserListFilter, UserListFilterKind, UserListPicker, UserListPickerProps, catalogApiRef, columnFactories, entityRouteParams, entityRouteRef, getEntityRelations, getEntitySourceLocation, humanizeEntityRef, starredEntitiesApiRef, useAsyncEntity, useEntity, useEntityList, useEntityOwnership, useEntityTypeFilter, useRelatedEntities, useStarredEntities, useStarredEntity };
|
|
707
|
+
export { AllowedEntityFilters, AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogFilterLayout, CatalogReactComponentsNameToClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityNamespacePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntityProcessingStatusPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, EntityAutocompletePicker, EntityAutocompletePickerProps, EntityErrorFilter, EntityFilter, EntityKindFilter, EntityKindPicker, EntityKindPickerProps, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListContextProps, EntityListProvider, EntityLoadingStatus, EntityNamespaceFilter, EntityNamespacePicker, EntityOrphanFilter, EntityOwnerFilter, EntityOwnerPicker, EntityOwnerPickerProps, EntityPeekAheadPopover, EntityPeekAheadPopoverProps, EntityProcessingStatusPicker, EntityProvider, EntityProviderProps, EntityRefLink, EntityRefLinkProps, EntityRefLinks, EntityRefLinksProps, EntitySearchBar, EntitySourceLocation, EntityTable, EntityTableProps, EntityTagFilter, EntityTagPicker, EntityTagPickerProps, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityTypePickerProps, FavoriteEntity, FavoriteEntityProps, InspectEntityDialog, MockEntityListContextProvider, MockStarredEntitiesApi, StarredEntitiesApi, UnregisterEntityDialog, UnregisterEntityDialogProps, UserListFilter, UserListFilterKind, UserListPicker, UserListPickerProps, catalogApiRef, columnFactories, entityRouteParams, entityRouteRef, getEntityRelations, getEntitySourceLocation, humanizeEntityRef, starredEntitiesApiRef, useAsyncEntity, useEntity, useEntityList, useEntityOwnership, useEntityTypeFilter, useRelatedEntities, useStarredEntities, useStarredEntity };
|
package/dist/index.esm.js
CHANGED
|
@@ -2340,11 +2340,18 @@ const Contents = ({
|
|
|
2340
2340
|
);
|
|
2341
2341
|
const onDelete = useCallback(
|
|
2342
2342
|
async function onDeleteFn() {
|
|
2343
|
+
var _a2;
|
|
2343
2344
|
if ("deleteEntity" in state) {
|
|
2344
2345
|
setBusy(true);
|
|
2345
2346
|
try {
|
|
2346
2347
|
await state.deleteEntity();
|
|
2348
|
+
const entityName = (_a2 = entity.metadata.title) != null ? _a2 : entity.metadata.name;
|
|
2347
2349
|
onConfirm();
|
|
2350
|
+
alertApi.post({
|
|
2351
|
+
message: `Removed entity ${entityName}`,
|
|
2352
|
+
severity: "success",
|
|
2353
|
+
display: "transient"
|
|
2354
|
+
});
|
|
2348
2355
|
} catch (err) {
|
|
2349
2356
|
assertError(err);
|
|
2350
2357
|
alertApi.post({ message: err.message });
|
|
@@ -2353,7 +2360,7 @@ const Contents = ({
|
|
|
2353
2360
|
}
|
|
2354
2361
|
}
|
|
2355
2362
|
},
|
|
2356
|
-
[alertApi, onConfirm, state]
|
|
2363
|
+
[alertApi, onConfirm, state, entity]
|
|
2357
2364
|
);
|
|
2358
2365
|
const DialogActionsPanel = () => /* @__PURE__ */ React.createElement(DialogActions, { className: classes.dialogActions }, /* @__PURE__ */ React.createElement(Button, { onClick: onClose, color: "primary" }, "Cancel"));
|
|
2359
2366
|
if (state.type === "loading") {
|
|
@@ -2731,5 +2738,5 @@ function MockEntityListContextProvider(props) {
|
|
|
2731
2738
|
return /* @__PURE__ */ React.createElement(EntityListContext.Provider, { value: resolvedValue }, children);
|
|
2732
2739
|
}
|
|
2733
2740
|
|
|
2734
|
-
export { CatalogFilterLayout, EntityErrorFilter, EntityKindFilter, EntityKindPicker, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListProvider, EntityNamespaceFilter, EntityNamespacePicker, EntityOrphanFilter, EntityOwnerFilter, EntityOwnerPicker, EntityPeekAheadPopover, EntityProcessingStatusPicker, EntityRefLink, EntityRefLinks, EntitySearchBar, EntityTable, EntityTagFilter, EntityTagPicker, EntityTextFilter, EntityTypeFilter, EntityTypePicker, FavoriteEntity, InspectEntityDialog, MockEntityListContextProvider, MockStarredEntitiesApi, UnregisterEntityDialog, UserListFilter, UserListPicker, catalogApiRef, columnFactories, entityRouteParams, entityRouteRef, getEntitySourceLocation, humanizeEntityRef, starredEntitiesApiRef, useEntityList, useEntityOwnership, useEntityTypeFilter, useRelatedEntities, useStarredEntities, useStarredEntity };
|
|
2741
|
+
export { CatalogFilterLayout, EntityAutocompletePicker, EntityErrorFilter, EntityKindFilter, EntityKindPicker, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListProvider, EntityNamespaceFilter, EntityNamespacePicker, EntityOrphanFilter, EntityOwnerFilter, EntityOwnerPicker, EntityPeekAheadPopover, EntityProcessingStatusPicker, EntityRefLink, EntityRefLinks, EntitySearchBar, EntityTable, EntityTagFilter, EntityTagPicker, EntityTextFilter, EntityTypeFilter, EntityTypePicker, FavoriteEntity, InspectEntityDialog, MockEntityListContextProvider, MockStarredEntitiesApi, UnregisterEntityDialog, UserListFilter, UserListPicker, catalogApiRef, columnFactories, entityRouteParams, entityRouteRef, getEntitySourceLocation, humanizeEntityRef, starredEntitiesApiRef, useEntityList, useEntityOwnership, useEntityTypeFilter, useRelatedEntities, useStarredEntities, useStarredEntity };
|
|
2735
2742
|
//# sourceMappingURL=index.esm.js.map
|