Rename EntityAutocompletePickerInput styling name
Signed-off-by: Ilya Savich <isavich@box.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
'@backstage/plugin-catalog-react': minor
|
||||
---
|
||||
|
||||
Add possibility to re-use EntityPicker for filters with multiple select
|
||||
Add possibility to re-use EntityPicker for filters with multiple select.
|
||||
**BREAKING** Style name `CatalogReactEntityTagPicker` was changed to `EntityAutocompletePickerInput`
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/integration": "workspace:^",
|
||||
"@backstage/plugin-catalog-common": "workspace:^",
|
||||
"@backstage/plugin-catalog-react": "workspace:^",
|
||||
"@backstage/plugin-permission-common": "workspace:^",
|
||||
"@backstage/plugin-permission-react": "workspace:^",
|
||||
"@backstage/theme": "workspace:^",
|
||||
|
||||
+9
-9
@@ -46,7 +46,7 @@ class EntityOptionFilter implements EntityFilter {
|
||||
}
|
||||
|
||||
describe('<EntityAutocompletePicker/>', () => {
|
||||
const mockCatalogApiRef = {
|
||||
const mockCatalogApi = {
|
||||
getEntityFacets: async () => ({
|
||||
facets: {
|
||||
'spec.options': options.map((value, idx) => ({ value, count: idx })),
|
||||
@@ -56,7 +56,7 @@ describe('<EntityAutocompletePicker/>', () => {
|
||||
|
||||
it('renders all options', async () => {
|
||||
render(
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApiRef]]}>
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApi]]}>
|
||||
<MockEntityListContextProvider value={{}}>
|
||||
<EntityAutocompletePicker<EntityFilters>
|
||||
label="Options"
|
||||
@@ -79,7 +79,7 @@ describe('<EntityAutocompletePicker/>', () => {
|
||||
|
||||
it('renders unique options in alphabetical order', async () => {
|
||||
render(
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApiRef]]}>
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApi]]}>
|
||||
<MockEntityListContextProvider value={{}}>
|
||||
<EntityAutocompletePicker<EntityFilters>
|
||||
label="Options"
|
||||
@@ -106,7 +106,7 @@ describe('<EntityAutocompletePicker/>', () => {
|
||||
|
||||
it('renders options with counts', async () => {
|
||||
render(
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApiRef]]}>
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApi]]}>
|
||||
<MockEntityListContextProvider value={{}}>
|
||||
<EntityAutocompletePicker<EntityFilters>
|
||||
label="Options"
|
||||
@@ -136,7 +136,7 @@ describe('<EntityAutocompletePicker/>', () => {
|
||||
const updateFilters = jest.fn();
|
||||
const queryParameters = { options: ['option3'] };
|
||||
render(
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApiRef]]}>
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApi]]}>
|
||||
<MockEntityListContextProvider<EntityFilters>
|
||||
value={{
|
||||
updateFilters,
|
||||
@@ -163,7 +163,7 @@ describe('<EntityAutocompletePicker/>', () => {
|
||||
it('adds options to filters', async () => {
|
||||
const updateFilters = jest.fn();
|
||||
render(
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApiRef]]}>
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApi]]}>
|
||||
<MockEntityListContextProvider
|
||||
value={{
|
||||
updateFilters,
|
||||
@@ -194,7 +194,7 @@ describe('<EntityAutocompletePicker/>', () => {
|
||||
it('removes options from filters', async () => {
|
||||
const updateFilters = jest.fn();
|
||||
render(
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApiRef]]}>
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApi]]}>
|
||||
<MockEntityListContextProvider<EntityFilters>
|
||||
value={{
|
||||
updateFilters,
|
||||
@@ -227,7 +227,7 @@ describe('<EntityAutocompletePicker/>', () => {
|
||||
it('responds to external queryParameters changes', async () => {
|
||||
const updateFilters = jest.fn();
|
||||
const rendered = render(
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApiRef]]}>
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApi]]}>
|
||||
<MockEntityListContextProvider<EntityFilters>
|
||||
value={{
|
||||
updateFilters,
|
||||
@@ -249,7 +249,7 @@ describe('<EntityAutocompletePicker/>', () => {
|
||||
}),
|
||||
);
|
||||
rendered.rerender(
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApiRef]]}>
|
||||
<TestApiProvider apis={[[catalogApiRef, mockCatalogApi]]}>
|
||||
<MockEntityListContextProvider<EntityFilters>
|
||||
value={{
|
||||
updateFilters,
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import useAsync from 'react-use/lib/useAsync';
|
||||
import { catalogApiRef } from '../../api';
|
||||
import { EntityAutocompletePickerOption } from './EntityAutocompletePickerOption';
|
||||
import { EntityAutocompletePickerInput } from './EntityAutocompletePickerInput';
|
||||
import { EntityFilter } from '@backstage/plugin-catalog-react';
|
||||
import { EntityFilter } from '../../types';
|
||||
|
||||
type KeysMatchingCondition<T, V, K> = T extends V ? K : never;
|
||||
type KeysMatching<T, V> = {
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ const useStyles = makeStyles(
|
||||
input: {},
|
||||
},
|
||||
{
|
||||
name: 'CatalogReactEntityTagPicker',
|
||||
name: 'EntityAutocompletePickerInput',
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -5425,7 +5425,6 @@ __metadata:
|
||||
"@backstage/errors": "workspace:^"
|
||||
"@backstage/integration": "workspace:^"
|
||||
"@backstage/plugin-catalog-common": "workspace:^"
|
||||
"@backstage/plugin-catalog-react": "workspace:^"
|
||||
"@backstage/plugin-permission-common": "workspace:^"
|
||||
"@backstage/plugin-permission-react": "workspace:^"
|
||||
"@backstage/plugin-scaffolder-common": "workspace:^"
|
||||
|
||||
Reference in New Issue
Block a user