@backstage/plugin-catalog-react 0.0.0-nightly-20230829023907 → 0.0.0-nightly-20230830021355

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,23 +1,44 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
- ## 0.0.0-nightly-20230829023907
3
+ ## 0.0.0-nightly-20230830021355
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - bd817209ddd7: Export the `EntityAutocompletePicker` component.
7
8
  - 7029ba1ce0af: Added delete alert popup when user delete the entity
8
9
  - Updated dependencies
9
- - @backstage/core-components@0.0.0-nightly-20230829023907
10
- - @backstage/integration@0.0.0-nightly-20230829023907
11
- - @backstage/core-plugin-api@0.0.0-nightly-20230829023907
12
- - @backstage/catalog-client@1.4.3
13
- - @backstage/catalog-model@1.4.1
10
+ - @backstage/core-components@0.0.0-nightly-20230830021355
11
+ - @backstage/integration@0.0.0-nightly-20230830021355
12
+ - @backstage/core-plugin-api@0.0.0-nightly-20230830021355
13
+ - @backstage/catalog-client@0.0.0-nightly-20230830021355
14
+ - @backstage/catalog-model@0.0.0-nightly-20230830021355
15
+ - @backstage/errors@1.2.1
16
+ - @backstage/theme@0.4.1
17
+ - @backstage/types@1.1.0
18
+ - @backstage/version-bridge@1.0.4
19
+ - @backstage/plugin-catalog-common@0.0.0-nightly-20230830021355
20
+ - @backstage/plugin-permission-common@0.0.0-nightly-20230830021355
21
+ - @backstage/plugin-permission-react@0.0.0-nightly-20230830021355
22
+
23
+ ## 1.8.4-next.1
24
+
25
+ ### Patch Changes
26
+
27
+ - bd817209ddd7: Export the `EntityAutocompletePicker` component.
28
+ - 7029ba1ce0af: Added delete alert popup when user delete the entity
29
+ - Updated dependencies
30
+ - @backstage/core-components@0.13.5-next.1
31
+ - @backstage/integration@1.7.0-next.1
32
+ - @backstage/catalog-model@1.4.2-next.0
33
+ - @backstage/core-plugin-api@1.6.0-next.1
34
+ - @backstage/plugin-permission-common@0.7.8-next.0
35
+ - @backstage/plugin-permission-react@0.4.15-next.1
36
+ - @backstage/catalog-client@1.4.4-next.0
37
+ - @backstage/plugin-catalog-common@1.0.16-next.0
14
38
  - @backstage/errors@1.2.1
15
39
  - @backstage/theme@0.4.1
16
40
  - @backstage/types@1.1.0
17
41
  - @backstage/version-bridge@1.0.4
18
- - @backstage/plugin-catalog-common@1.0.15
19
- - @backstage/plugin-permission-common@0.7.7
20
- - @backstage/plugin-permission-react@0.0.0-nightly-20230829023907
21
42
 
22
43
  ## 1.8.3-next.0
23
44
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "0.0.0-nightly-20230829023907",
3
+ "version": "0.0.0-nightly-20230830021355",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import React, { PropsWithChildren, ReactNode, ComponentProps } from 'react';
7
7
  import * as _backstage_catalog_model from '@backstage/catalog-model';
8
8
  import { Entity, CompoundEntityRef } from '@backstage/catalog-model';
9
9
  import { LinkProps, InfoCardVariants, TableColumn, TableOptions } from '@backstage/core-components';
10
- import { IconButton } from '@material-ui/core';
10
+ import { IconButton, TextFieldProps } from '@material-ui/core';
11
11
  import { Overrides } from '@material-ui/core/styles/overrides';
12
12
  import { StyleRules } from '@material-ui/core/styles/withStyles';
13
13
  import { ScmIntegrationRegistry } from '@backstage/integration';
@@ -346,62 +346,6 @@ type CatalogReactEntityNamespacePickerClassKey = 'input';
346
346
  /** @public */
347
347
  declare const EntityNamespacePicker: () => React.JSX.Element;
348
348
 
349
- /** @public */
350
- type EntityLoadingStatus<TEntity extends Entity = Entity> = {
351
- entity?: TEntity;
352
- loading: boolean;
353
- error?: Error;
354
- refresh?: VoidFunction;
355
- };
356
- /**
357
- * Properties for the AsyncEntityProvider component.
358
- *
359
- * @public
360
- */
361
- interface AsyncEntityProviderProps {
362
- children: ReactNode;
363
- entity?: Entity;
364
- loading: boolean;
365
- error?: Error;
366
- refresh?: VoidFunction;
367
- }
368
- /**
369
- * Provides a loaded entity to be picked up by the `useEntity` hook.
370
- *
371
- * @public
372
- */
373
- declare const AsyncEntityProvider: (props: AsyncEntityProviderProps) => React.JSX.Element;
374
- /**
375
- * Properties for the EntityProvider component.
376
- *
377
- * @public
378
- */
379
- interface EntityProviderProps {
380
- children: ReactNode;
381
- entity?: Entity;
382
- }
383
- /**
384
- * Provides an entity to be picked up by the `useEntity` hook.
385
- *
386
- * @public
387
- */
388
- declare const EntityProvider: (props: EntityProviderProps) => React.JSX.Element;
389
- /**
390
- * Grab the current entity from the context, throws if the entity has not yet been loaded
391
- * or is not available.
392
- *
393
- * @public
394
- */
395
- declare function useEntity<TEntity extends Entity = Entity>(): {
396
- entity: TEntity;
397
- };
398
- /**
399
- * Grab the current entity from the context, provides loading state and errors, and the ability to refresh.
400
- *
401
- * @public
402
- */
403
- declare function useAsyncEntity<TEntity extends Entity = Entity>(): EntityLoadingStatus<TEntity>;
404
-
405
349
  /**
406
350
  * Filter entities based on Kind.
407
351
  * @public
@@ -566,6 +510,83 @@ declare const EntityListProvider: <EntityFilters extends DefaultEntityFilters>(p
566
510
  */
567
511
  declare function useEntityList<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
568
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
+
569
590
  /**
570
591
  * A hook built on top of `useEntityList` for enabling selection of valid `spec.type` values
571
592
  * based on the selected EntityKindFilter.
@@ -683,4 +704,4 @@ type EntitySourceLocation = {
683
704
  /** @public */
684
705
  declare function getEntitySourceLocation(entity: Entity, scmIntegrationsApi: ScmIntegrationRegistry): EntitySourceLocation | undefined;
685
706
 
686
- 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
@@ -2738,5 +2738,5 @@ function MockEntityListContextProvider(props) {
2738
2738
  return /* @__PURE__ */ React.createElement(EntityListContext.Provider, { value: resolvedValue }, children);
2739
2739
  }
2740
2740
 
2741
- 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 };
2742
2742
  //# sourceMappingURL=index.esm.js.map