@backstage/plugin-catalog-react 1.10.1-next.0 → 1.11.0-next.2
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 +43 -0
- package/alpha/package.json +1 -1
- package/dist/index.d.ts +62 -38
- package/dist/index.esm.js +1560 -1530
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 1.11.0-next.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 72b8827: Number of results is now directly added as the field `totalItems` on `useEntityList`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 298953b: Added support for providing an `initiallySelectedNamespaces` which accepts an array of Namespaces to have selected by default
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/core-components@0.14.1-next.2
|
|
14
|
+
- @backstage/catalog-client@1.6.1-next.1
|
|
15
|
+
- @backstage/integration-react@1.1.25-next.2
|
|
16
|
+
- @backstage/frontend-plugin-api@0.6.1-next.2
|
|
17
|
+
- @backstage/catalog-model@1.4.5-next.0
|
|
18
|
+
- @backstage/core-plugin-api@1.9.1-next.1
|
|
19
|
+
- @backstage/errors@1.2.4-next.0
|
|
20
|
+
- @backstage/types@1.1.1
|
|
21
|
+
- @backstage/version-bridge@1.0.7
|
|
22
|
+
- @backstage/plugin-catalog-common@1.0.22-next.1
|
|
23
|
+
- @backstage/plugin-permission-common@0.7.13-next.1
|
|
24
|
+
- @backstage/plugin-permission-react@0.4.21-next.1
|
|
25
|
+
|
|
26
|
+
## 1.10.1-next.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- b2a9926: Adds an argument for which filters should be applied when fetching/counting available values
|
|
31
|
+
- a6e237f: Added `DefaultFilters` component
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
- @backstage/core-components@0.14.1-next.1
|
|
34
|
+
- @backstage/core-plugin-api@1.9.1-next.1
|
|
35
|
+
- @backstage/integration-react@1.1.25-next.1
|
|
36
|
+
- @backstage/plugin-permission-common@0.7.13-next.1
|
|
37
|
+
- @backstage/plugin-permission-react@0.4.21-next.1
|
|
38
|
+
- @backstage/frontend-plugin-api@0.6.1-next.1
|
|
39
|
+
- @backstage/catalog-client@1.6.1-next.0
|
|
40
|
+
- @backstage/catalog-model@1.4.5-next.0
|
|
41
|
+
- @backstage/errors@1.2.4-next.0
|
|
42
|
+
- @backstage/types@1.1.1
|
|
43
|
+
- @backstage/version-bridge@1.0.7
|
|
44
|
+
- @backstage/plugin-catalog-common@1.0.22-next.1
|
|
45
|
+
|
|
3
46
|
## 1.10.1-next.0
|
|
4
47
|
|
|
5
48
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -210,6 +210,56 @@ declare const CatalogFilterLayout: {
|
|
|
210
210
|
}) => React.JSX.Element;
|
|
211
211
|
};
|
|
212
212
|
|
|
213
|
+
/** @public */
|
|
214
|
+
type EntityFilter = {
|
|
215
|
+
/**
|
|
216
|
+
* Get filters to add to the catalog-backend request. These are a dot-delimited field with
|
|
217
|
+
* value(s) to accept, extracted on the backend by parseEntityFilterParams. For example:
|
|
218
|
+
* `{ field: 'kind', values: ['component'] }`
|
|
219
|
+
* `{ field: 'metadata.name', values: ['component-1', 'component-2'] }`
|
|
220
|
+
*/
|
|
221
|
+
getCatalogFilters?: () => Record<string, string | symbol | (string | symbol)[]>;
|
|
222
|
+
/**
|
|
223
|
+
* Filter entities on the frontend after a catalog-backend request. This function will be called
|
|
224
|
+
* with each backend-resolved entity. This is used when frontend information is required for
|
|
225
|
+
* filtering, such as a user's starred entities.
|
|
226
|
+
*/
|
|
227
|
+
filterEntity?: (entity: Entity) => boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Serialize the filter value to a string for query params. The UI component responsible for
|
|
230
|
+
* handling this filter should retrieve this from useEntityList.queryParameters. The
|
|
231
|
+
* value restored should be in the precedence: queryParameters `>` initialValue prop `>` default.
|
|
232
|
+
*/
|
|
233
|
+
toQueryValue?: () => string | string[];
|
|
234
|
+
};
|
|
235
|
+
/** @public */
|
|
236
|
+
type UserListFilterKind = 'owned' | 'starred' | 'all';
|
|
237
|
+
|
|
238
|
+
/** @public */
|
|
239
|
+
type CatalogReactEntityOwnerPickerClassKey = 'input';
|
|
240
|
+
/**
|
|
241
|
+
* @public
|
|
242
|
+
*/
|
|
243
|
+
type EntityOwnerPickerProps = {
|
|
244
|
+
mode?: 'owners-only' | 'all';
|
|
245
|
+
};
|
|
246
|
+
/** @public */
|
|
247
|
+
declare const EntityOwnerPicker: (props?: EntityOwnerPickerProps) => React.JSX.Element | null;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Props for default filters.
|
|
251
|
+
*
|
|
252
|
+
* @public
|
|
253
|
+
*/
|
|
254
|
+
type DefaultFiltersProps = {
|
|
255
|
+
initialKind?: string;
|
|
256
|
+
initiallySelectedFilter?: UserListFilterKind;
|
|
257
|
+
ownerPickerMode?: EntityOwnerPickerProps['mode'];
|
|
258
|
+
initiallySelectedNamespaces?: string[];
|
|
259
|
+
};
|
|
260
|
+
/** @public */
|
|
261
|
+
declare const DefaultFilters: (props: DefaultFiltersProps) => React.JSX.Element;
|
|
262
|
+
|
|
213
263
|
/**
|
|
214
264
|
* Props for {@link EntityKindPicker}.
|
|
215
265
|
*
|
|
@@ -234,17 +284,6 @@ declare const EntityLifecyclePicker: (props: {
|
|
|
234
284
|
initialFilter?: string[];
|
|
235
285
|
}) => React.JSX.Element;
|
|
236
286
|
|
|
237
|
-
/** @public */
|
|
238
|
-
type CatalogReactEntityOwnerPickerClassKey = 'input';
|
|
239
|
-
/**
|
|
240
|
-
* @public
|
|
241
|
-
*/
|
|
242
|
-
type EntityOwnerPickerProps = {
|
|
243
|
-
mode?: 'owners-only' | 'all';
|
|
244
|
-
};
|
|
245
|
-
/** @public */
|
|
246
|
-
declare const EntityOwnerPicker: (props?: EntityOwnerPickerProps) => React.JSX.Element | null;
|
|
247
|
-
|
|
248
287
|
/**
|
|
249
288
|
* The available style class keys for {@link EntityDisplayName}, under the name
|
|
250
289
|
* "CatalogReactEntityDisplayName".
|
|
@@ -466,31 +505,6 @@ type UnregisterEntityDialogProps = {
|
|
|
466
505
|
/** @public */
|
|
467
506
|
declare const UnregisterEntityDialog: (props: UnregisterEntityDialogProps) => React.JSX.Element;
|
|
468
507
|
|
|
469
|
-
/** @public */
|
|
470
|
-
type EntityFilter = {
|
|
471
|
-
/**
|
|
472
|
-
* Get filters to add to the catalog-backend request. These are a dot-delimited field with
|
|
473
|
-
* value(s) to accept, extracted on the backend by parseEntityFilterParams. For example:
|
|
474
|
-
* `{ field: 'kind', values: ['component'] }`
|
|
475
|
-
* `{ field: 'metadata.name', values: ['component-1', 'component-2'] }`
|
|
476
|
-
*/
|
|
477
|
-
getCatalogFilters?: () => Record<string, string | symbol | (string | symbol)[]>;
|
|
478
|
-
/**
|
|
479
|
-
* Filter entities on the frontend after a catalog-backend request. This function will be called
|
|
480
|
-
* with each backend-resolved entity. This is used when frontend information is required for
|
|
481
|
-
* filtering, such as a user's starred entities.
|
|
482
|
-
*/
|
|
483
|
-
filterEntity?: (entity: Entity) => boolean;
|
|
484
|
-
/**
|
|
485
|
-
* Serialize the filter value to a string for query params. The UI component responsible for
|
|
486
|
-
* handling this filter should retrieve this from useEntityList.queryParameters. The
|
|
487
|
-
* value restored should be in the precedence: queryParameters `>` initialValue prop `>` default.
|
|
488
|
-
*/
|
|
489
|
-
toQueryValue?: () => string | string[];
|
|
490
|
-
};
|
|
491
|
-
/** @public */
|
|
492
|
-
type UserListFilterKind = 'owned' | 'starred' | 'all';
|
|
493
|
-
|
|
494
508
|
/** @public */
|
|
495
509
|
type CatalogReactUserListPickerClassKey = 'root' | 'title' | 'listIcon' | 'menuItem' | 'groupWrapper';
|
|
496
510
|
/** @public */
|
|
@@ -508,8 +522,16 @@ declare const EntityProcessingStatusPicker: () => React.JSX.Element;
|
|
|
508
522
|
|
|
509
523
|
/** @public */
|
|
510
524
|
type CatalogReactEntityNamespacePickerClassKey = 'input';
|
|
525
|
+
/**
|
|
526
|
+
* Props for {@link EntityNamespacePicker}.
|
|
527
|
+
*
|
|
528
|
+
* @public
|
|
529
|
+
*/
|
|
530
|
+
interface EntityNamespacePickerProps {
|
|
531
|
+
initiallySelectedNamespaces?: string[];
|
|
532
|
+
}
|
|
511
533
|
/** @public */
|
|
512
|
-
declare const EntityNamespacePicker: () => React.JSX.Element;
|
|
534
|
+
declare const EntityNamespacePicker: (props: EntityNamespacePickerProps) => React.JSX.Element;
|
|
513
535
|
|
|
514
536
|
/**
|
|
515
537
|
* Filter entities based on Kind.
|
|
@@ -686,6 +708,7 @@ type EntityListContextProps<EntityFilters extends DefaultEntityFilters = Default
|
|
|
686
708
|
next?: () => void;
|
|
687
709
|
prev?: () => void;
|
|
688
710
|
};
|
|
711
|
+
totalItems?: number;
|
|
689
712
|
};
|
|
690
713
|
/**
|
|
691
714
|
* Creates new context for entity listing and filtering.
|
|
@@ -728,6 +751,7 @@ type EntityAutocompletePickerProps<T extends DefaultEntityFilters = DefaultEntit
|
|
|
728
751
|
};
|
|
729
752
|
InputProps?: TextFieldProps;
|
|
730
753
|
initialSelectedOptions?: string[];
|
|
754
|
+
filtersForAvailableValues?: Array<keyof T>;
|
|
731
755
|
};
|
|
732
756
|
/** @public */
|
|
733
757
|
type CatalogReactEntityAutocompletePickerClassKey = 'root' | 'label';
|
|
@@ -924,4 +948,4 @@ type EntitySourceLocation = {
|
|
|
924
948
|
/** @public */
|
|
925
949
|
declare function getEntitySourceLocation(entity: Entity, scmIntegrationsApi: typeof scmIntegrationsApiRef.T): EntitySourceLocation | undefined;
|
|
926
950
|
|
|
927
|
-
export { AllowedEntityFilters, AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogFilterLayout, CatalogReactComponentsNameToClassKey, CatalogReactEntityAutocompletePickerClassKey, CatalogReactEntityDisplayNameClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityNamespacePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntityProcessingStatusPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, EntityAutocompletePicker, EntityAutocompletePickerProps, EntityDisplayName, EntityDisplayNameProps, EntityErrorFilter, EntityFilter, EntityKindFilter, EntityKindPicker, EntityKindPickerProps, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListContextProps, EntityListProvider, EntityListProviderProps, EntityLoadingStatus, EntityNamespaceFilter, EntityNamespacePicker, EntityOrphanFilter, EntityOwnerFilter, EntityOwnerPicker, EntityOwnerPickerProps, EntityPeekAheadPopover, EntityPeekAheadPopoverProps, EntityPresentationApi, EntityProcessingStatusPicker, EntityProvider, EntityProviderProps, EntityRefLink, EntityRefLinkProps, EntityRefLinks, EntityRefLinksProps, EntityRefPresentation, EntityRefPresentationSnapshot, EntitySearchBar, EntitySourceLocation, EntityTable, EntityTableProps, EntityTagFilter, EntityTagPicker, EntityTagPickerProps, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityTypePickerProps, EntityUserFilter, FavoriteEntity, FavoriteEntityProps, InspectEntityDialog, MissingAnnotationEmptyState, MissingAnnotationEmptyStateClassKey, MockEntityListContextProvider, MockStarredEntitiesApi, StarredEntitiesApi, UnregisterEntityDialog, UnregisterEntityDialogProps, UserListFilter, UserListFilterKind, UserListPicker, UserListPickerProps, catalogApiRef, columnFactories, defaultEntityPresentation, entityPresentationApiRef, entityRouteParams, entityRouteRef, getEntityRelations, getEntitySourceLocation, humanizeEntityRef, starredEntitiesApiRef, useAsyncEntity, useEntity, useEntityList, useEntityOwnership, useEntityPresentation, useEntityTypeFilter, useRelatedEntities, useStarredEntities, useStarredEntity };
|
|
951
|
+
export { AllowedEntityFilters, AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogFilterLayout, CatalogReactComponentsNameToClassKey, CatalogReactEntityAutocompletePickerClassKey, CatalogReactEntityDisplayNameClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityNamespacePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntityProcessingStatusPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, DefaultFilters, DefaultFiltersProps, EntityAutocompletePicker, EntityAutocompletePickerProps, EntityDisplayName, EntityDisplayNameProps, EntityErrorFilter, EntityFilter, EntityKindFilter, EntityKindPicker, EntityKindPickerProps, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListContextProps, EntityListProvider, EntityListProviderProps, EntityLoadingStatus, EntityNamespaceFilter, EntityNamespacePicker, EntityNamespacePickerProps, EntityOrphanFilter, EntityOwnerFilter, EntityOwnerPicker, EntityOwnerPickerProps, EntityPeekAheadPopover, EntityPeekAheadPopoverProps, EntityPresentationApi, EntityProcessingStatusPicker, EntityProvider, EntityProviderProps, EntityRefLink, EntityRefLinkProps, EntityRefLinks, EntityRefLinksProps, EntityRefPresentation, EntityRefPresentationSnapshot, EntitySearchBar, EntitySourceLocation, EntityTable, EntityTableProps, EntityTagFilter, EntityTagPicker, EntityTagPickerProps, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityTypePickerProps, EntityUserFilter, FavoriteEntity, FavoriteEntityProps, InspectEntityDialog, MissingAnnotationEmptyState, MissingAnnotationEmptyStateClassKey, MockEntityListContextProvider, MockStarredEntitiesApi, StarredEntitiesApi, UnregisterEntityDialog, UnregisterEntityDialogProps, UserListFilter, UserListFilterKind, UserListPicker, UserListPickerProps, catalogApiRef, columnFactories, defaultEntityPresentation, entityPresentationApiRef, entityRouteParams, entityRouteRef, getEntityRelations, getEntitySourceLocation, humanizeEntityRef, starredEntitiesApiRef, useAsyncEntity, useEntity, useEntityList, useEntityOwnership, useEntityPresentation, useEntityTypeFilter, useRelatedEntities, useStarredEntities, useStarredEntity };
|