@backstage/plugin-catalog-react 0.0.0-nightly-20260616032439 → 0.0.0-nightly-20260619032606
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,9 +1,31 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20260619032606
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/ui@0.0.0-nightly-20260619032606
|
|
9
|
+
- @backstage/filter-predicates@0.0.0-nightly-20260619032606
|
|
10
|
+
- @backstage/core-compat-api@0.0.0-nightly-20260619032606
|
|
11
|
+
- @backstage/frontend-plugin-api@0.0.0-nightly-20260619032606
|
|
12
|
+
- @backstage/frontend-test-utils@0.0.0-nightly-20260619032606
|
|
13
|
+
- @backstage/catalog-client@0.0.0-nightly-20260619032606
|
|
14
|
+
- @backstage/core-components@0.0.0-nightly-20260619032606
|
|
15
|
+
- @backstage/core-plugin-api@0.0.0-nightly-20260619032606
|
|
16
|
+
- @backstage/integration-react@0.0.0-nightly-20260619032606
|
|
17
|
+
- @backstage/plugin-permission-react@0.0.0-nightly-20260619032606
|
|
18
|
+
- @backstage/catalog-model@1.9.0
|
|
19
|
+
- @backstage/errors@1.3.1
|
|
20
|
+
- @backstage/types@1.2.2
|
|
21
|
+
- @backstage/version-bridge@1.0.12
|
|
22
|
+
- @backstage/plugin-permission-common@0.9.9
|
|
23
|
+
|
|
24
|
+
## 3.1.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
6
27
|
|
|
28
|
+
- b6d6551: Added optional `getOptionLabel` and `renderOption` props to `EntityAutocompletePicker`, allowing consumers to customize how option labels and option rendering are displayed in the autocomplete dropdown.
|
|
7
29
|
- 5dd532d: Added a `refresh` function to the `useEntityList` hook.
|
|
8
30
|
- 4212b78: Allow full text searching of Location target URLs in catalog tables
|
|
9
31
|
|
|
@@ -16,21 +38,14 @@
|
|
|
16
38
|
- e0889a3: chore(deps): bump `qs` from 6.15.1 to 6.15.2
|
|
17
39
|
- 7c20545: Fixed redundant API calls during entity list initialization. Filter components that register their initial state in quick succession (e.g. `EntityKindPicker`, `UserListPicker`, `EntityTagPicker`) no longer trigger multiple identical fetches. Frontend-only filter changes such as toggling the user list are now applied synchronously without a network round-trip.
|
|
18
40
|
- Updated dependencies
|
|
19
|
-
- @backstage/catalog-client@
|
|
20
|
-
- @backstage/core-components@0.
|
|
21
|
-
- @backstage/frontend-plugin-api@0.
|
|
22
|
-
- @backstage/ui@0.
|
|
23
|
-
- @backstage/
|
|
24
|
-
- @backstage/core-
|
|
25
|
-
- @backstage/
|
|
26
|
-
- @backstage/
|
|
27
|
-
- @backstage/errors@1.3.1
|
|
28
|
-
- @backstage/filter-predicates@0.1.3
|
|
29
|
-
- @backstage/integration-react@0.0.0-nightly-20260616032439
|
|
30
|
-
- @backstage/types@1.2.2
|
|
31
|
-
- @backstage/version-bridge@1.0.12
|
|
32
|
-
- @backstage/plugin-permission-common@0.9.9
|
|
33
|
-
- @backstage/plugin-permission-react@0.0.0-nightly-20260616032439
|
|
41
|
+
- @backstage/catalog-client@1.16.0
|
|
42
|
+
- @backstage/core-components@0.18.11
|
|
43
|
+
- @backstage/frontend-plugin-api@0.17.2
|
|
44
|
+
- @backstage/ui@0.16.0
|
|
45
|
+
- @backstage/core-compat-api@0.5.12
|
|
46
|
+
- @backstage/core-plugin-api@1.12.7
|
|
47
|
+
- @backstage/integration-react@1.2.19
|
|
48
|
+
- @backstage/plugin-permission-react@0.5.2
|
|
34
49
|
|
|
35
50
|
## 3.0.1-next.1
|
|
36
51
|
|
|
@@ -31,7 +31,9 @@ function EntityAutocompletePicker(props) {
|
|
|
31
31
|
InputProps,
|
|
32
32
|
initialSelectedOptions = [],
|
|
33
33
|
filtersForAvailableValues = ["kind"],
|
|
34
|
-
hidden
|
|
34
|
+
hidden,
|
|
35
|
+
getOptionLabel,
|
|
36
|
+
renderOption
|
|
35
37
|
} = props;
|
|
36
38
|
const classes = useStyles();
|
|
37
39
|
const {
|
|
@@ -97,7 +99,8 @@ function EntityAutocompletePicker(props) {
|
|
|
97
99
|
value: selectedOptions,
|
|
98
100
|
TextFieldProps: InputProps,
|
|
99
101
|
onChange: (_event, options) => setSelectedOptions(options),
|
|
100
|
-
|
|
102
|
+
...getOptionLabel && { getOptionLabel },
|
|
103
|
+
renderOption: renderOption ?? ((option, { selected }) => /* @__PURE__ */ jsx(
|
|
101
104
|
EntityAutocompletePickerOption,
|
|
102
105
|
{
|
|
103
106
|
selected,
|
|
@@ -105,7 +108,7 @@ function EntityAutocompletePicker(props) {
|
|
|
105
108
|
availableOptions: availableValues,
|
|
106
109
|
showCounts: !!showCounts
|
|
107
110
|
}
|
|
108
|
-
)
|
|
111
|
+
))
|
|
109
112
|
}
|
|
110
113
|
) });
|
|
111
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityAutocompletePicker.esm.js","sources":["../../../src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport { TextFieldProps } from '@material-ui/core/TextField';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { catalogApiRef } from '../../api';\nimport { EntityAutocompletePickerOption } from './EntityAutocompletePickerOption';\nimport {\n DefaultEntityFilters,\n useEntityList,\n} from '../../hooks/useEntityListProvider';\nimport { EntityFilter } from '../../types';\nimport { reduceBackendCatalogFilters } from '../../utils/filters';\nimport { CatalogAutocomplete } from '../CatalogAutocomplete';\nimport { isEqual } from 'lodash';\n\n/** @public */\nexport type AllowedEntityFilters<T extends DefaultEntityFilters> = {\n [K in keyof T]-?: NonNullable<T[K]> extends EntityFilter & {\n values: string[];\n }\n ? K\n : never;\n}[keyof T];\n\n/** @public */\nexport type EntityAutocompletePickerProps<\n T extends DefaultEntityFilters = DefaultEntityFilters,\n Name extends AllowedEntityFilters<T> = AllowedEntityFilters<T>,\n> = {\n label: string;\n name: Name;\n path: string;\n showCounts?: boolean;\n Filter: { new (values: string[]): NonNullable<T[Name]> };\n InputProps?: TextFieldProps;\n initialSelectedOptions?: string[];\n filtersForAvailableValues?: Array<keyof T>;\n hidden?: boolean;\n};\n\n/** @public */\nexport type CatalogReactEntityAutocompletePickerClassKey = 'root' | 'label';\n\nconst useStyles = makeStyles(\n {\n root: {},\n label: {\n textTransform: 'none',\n fontWeight: 'bold',\n },\n },\n { name: 'CatalogReactEntityAutocompletePicker' },\n);\n\n/** @public */\nexport function EntityAutocompletePicker<\n T extends DefaultEntityFilters = DefaultEntityFilters,\n Name extends AllowedEntityFilters<T> = AllowedEntityFilters<T>,\n>(props: EntityAutocompletePickerProps<T, Name>) {\n const {\n label,\n name,\n path,\n showCounts,\n Filter,\n InputProps,\n initialSelectedOptions = [],\n filtersForAvailableValues = ['kind'],\n hidden,\n } = props;\n const classes = useStyles();\n\n const {\n updateFilters,\n filters,\n queryParameters: { [name]: queryParameter },\n } = useEntityList<T>();\n\n const catalogApi = useApi(catalogApiRef);\n const availableValuesFilters = filtersForAvailableValues.map(\n f => filters[f] as EntityFilter | undefined,\n );\n const { value: availableValues } = useAsync(async () => {\n const facet = path;\n const { facets } = await catalogApi.getEntityFacets({\n facets: [facet],\n filter: reduceBackendCatalogFilters(\n availableValuesFilters.filter(Boolean) as EntityFilter[],\n ),\n });\n\n return Object.fromEntries(\n facets[facet].map(({ value, count }) => [value, count]),\n );\n }, [...availableValuesFilters]);\n\n const queryParameters = useMemo(\n () => [queryParameter].flat().filter(Boolean) as string[],\n [queryParameter],\n );\n\n const filteredOptions = (filters[name] as unknown as { values: string[] })\n ?.values;\n\n const [selectedOptions, setSelectedOptions] = useState(\n queryParameters.length\n ? queryParameters\n : filteredOptions ?? initialSelectedOptions,\n );\n\n // Set selected options on query parameter updates; this happens at initial page load and from\n // external updates to the page location\n useEffect(() => {\n if (queryParameters.length) {\n setSelectedOptions(queryParameters);\n }\n }, [queryParameters]);\n\n const availableOptions = Object.keys(availableValues ?? {});\n const shouldAddFilter = selectedOptions.length && availableOptions.length;\n\n // Update filter value when selectedOptions change\n useEffect(() => {\n updateFilters({\n [name]: shouldAddFilter ? new Filter(selectedOptions) : undefined,\n } as Partial<T>);\n }, [name, shouldAddFilter, selectedOptions, Filter, updateFilters]);\n\n // Update selected options when filter value changes\n useEffect(() => {\n if (!shouldAddFilter) return;\n\n const newSelectedOptions = filteredOptions ?? [];\n\n // Check value is actually different (not just a different reference) to prevent selectedOptions <> filters loop\n if (!isEqual(newSelectedOptions, selectedOptions)) {\n setSelectedOptions(newSelectedOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- Don't re-set filter value when selectedOptions changes\n }, [filteredOptions]);\n\n const filter = filters[name];\n if (\n (filter && typeof filter === 'object' && !('values' in filter)) ||\n !availableOptions.length\n ) {\n return null;\n }\n\n return hidden ? null : (\n <Box className={classes.root} pb={1} pt={1}>\n <CatalogAutocomplete<string, true>\n multiple\n disableCloseOnSelect\n label={label}\n name={`${String(name)}-picker`}\n options={availableOptions}\n value={selectedOptions}\n TextFieldProps={InputProps}\n onChange={(_event: object, options: string[]) =>\n setSelectedOptions(options)\n }\n renderOption={(option, { selected }) => (\n
|
|
1
|
+
{"version":3,"file":"EntityAutocompletePicker.esm.js","sources":["../../../src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport { TextFieldProps } from '@material-ui/core/TextField';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ReactNode, useEffect, useMemo, useState } from 'react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { catalogApiRef } from '../../api';\nimport { EntityAutocompletePickerOption } from './EntityAutocompletePickerOption';\nimport {\n DefaultEntityFilters,\n useEntityList,\n} from '../../hooks/useEntityListProvider';\nimport { EntityFilter } from '../../types';\nimport { reduceBackendCatalogFilters } from '../../utils/filters';\nimport { CatalogAutocomplete } from '../CatalogAutocomplete';\nimport { AutocompleteRenderOptionState } from '@material-ui/lab/Autocomplete';\nimport { isEqual } from 'lodash';\n\n/** @public */\nexport type AllowedEntityFilters<T extends DefaultEntityFilters> = {\n [K in keyof T]-?: NonNullable<T[K]> extends EntityFilter & {\n values: string[];\n }\n ? K\n : never;\n}[keyof T];\n\n/** @public */\nexport type EntityAutocompletePickerProps<\n T extends DefaultEntityFilters = DefaultEntityFilters,\n Name extends AllowedEntityFilters<T> = AllowedEntityFilters<T>,\n> = {\n label: string;\n name: Name;\n path: string;\n showCounts?: boolean;\n Filter: { new (values: string[]): NonNullable<T[Name]> };\n InputProps?: TextFieldProps;\n initialSelectedOptions?: string[];\n filtersForAvailableValues?: Array<keyof T>;\n hidden?: boolean;\n getOptionLabel?: (option: string) => string;\n renderOption?: (\n option: string,\n state: AutocompleteRenderOptionState,\n ) => ReactNode;\n};\n\n/** @public */\nexport type CatalogReactEntityAutocompletePickerClassKey = 'root' | 'label';\n\nconst useStyles = makeStyles(\n {\n root: {},\n label: {\n textTransform: 'none',\n fontWeight: 'bold',\n },\n },\n { name: 'CatalogReactEntityAutocompletePicker' },\n);\n\n/** @public */\nexport function EntityAutocompletePicker<\n T extends DefaultEntityFilters = DefaultEntityFilters,\n Name extends AllowedEntityFilters<T> = AllowedEntityFilters<T>,\n>(props: EntityAutocompletePickerProps<T, Name>) {\n const {\n label,\n name,\n path,\n showCounts,\n Filter,\n InputProps,\n initialSelectedOptions = [],\n filtersForAvailableValues = ['kind'],\n hidden,\n getOptionLabel,\n renderOption,\n } = props;\n const classes = useStyles();\n\n const {\n updateFilters,\n filters,\n queryParameters: { [name]: queryParameter },\n } = useEntityList<T>();\n\n const catalogApi = useApi(catalogApiRef);\n const availableValuesFilters = filtersForAvailableValues.map(\n f => filters[f] as EntityFilter | undefined,\n );\n const { value: availableValues } = useAsync(async () => {\n const facet = path;\n const { facets } = await catalogApi.getEntityFacets({\n facets: [facet],\n filter: reduceBackendCatalogFilters(\n availableValuesFilters.filter(Boolean) as EntityFilter[],\n ),\n });\n\n return Object.fromEntries(\n facets[facet].map(({ value, count }) => [value, count]),\n );\n }, [...availableValuesFilters]);\n\n const queryParameters = useMemo(\n () => [queryParameter].flat().filter(Boolean) as string[],\n [queryParameter],\n );\n\n const filteredOptions = (filters[name] as unknown as { values: string[] })\n ?.values;\n\n const [selectedOptions, setSelectedOptions] = useState(\n queryParameters.length\n ? queryParameters\n : filteredOptions ?? initialSelectedOptions,\n );\n\n // Set selected options on query parameter updates; this happens at initial page load and from\n // external updates to the page location\n useEffect(() => {\n if (queryParameters.length) {\n setSelectedOptions(queryParameters);\n }\n }, [queryParameters]);\n\n const availableOptions = Object.keys(availableValues ?? {});\n const shouldAddFilter = selectedOptions.length && availableOptions.length;\n\n // Update filter value when selectedOptions change\n useEffect(() => {\n updateFilters({\n [name]: shouldAddFilter ? new Filter(selectedOptions) : undefined,\n } as Partial<T>);\n }, [name, shouldAddFilter, selectedOptions, Filter, updateFilters]);\n\n // Update selected options when filter value changes\n useEffect(() => {\n if (!shouldAddFilter) return;\n\n const newSelectedOptions = filteredOptions ?? [];\n\n // Check value is actually different (not just a different reference) to prevent selectedOptions <> filters loop\n if (!isEqual(newSelectedOptions, selectedOptions)) {\n setSelectedOptions(newSelectedOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- Don't re-set filter value when selectedOptions changes\n }, [filteredOptions]);\n\n const filter = filters[name];\n if (\n (filter && typeof filter === 'object' && !('values' in filter)) ||\n !availableOptions.length\n ) {\n return null;\n }\n\n return hidden ? null : (\n <Box className={classes.root} pb={1} pt={1}>\n <CatalogAutocomplete<string, true>\n multiple\n disableCloseOnSelect\n label={label}\n name={`${String(name)}-picker`}\n options={availableOptions}\n value={selectedOptions}\n TextFieldProps={InputProps}\n onChange={(_event: object, options: string[]) =>\n setSelectedOptions(options)\n }\n {...(getOptionLabel && { getOptionLabel })}\n renderOption={\n renderOption ??\n ((option, { selected }) => (\n <EntityAutocompletePickerOption\n selected={selected}\n value={option}\n availableOptions={availableValues}\n showCounts={!!showCounts}\n />\n ))\n }\n />\n </Box>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAmEA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB;AAAA,IACE,MAAM,EAAC;AAAA,IACP,KAAA,EAAO;AAAA,MACL,aAAA,EAAe,MAAA;AAAA,MACf,UAAA,EAAY;AAAA;AACd,GACF;AAAA,EACA,EAAE,MAAM,sCAAA;AACV,CAAA;AAGO,SAAS,yBAGd,KAAA,EAA+C;AAC/C,EAAA,MAAM;AAAA,IACJ,KAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,IACA,yBAAyB,EAAC;AAAA,IAC1B,yB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,IAAA,EAAM,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,CAAA,EACvC,QAAA,kBAAA,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,QAAA,EAAQ,IAAA;AAAA,MACR,oBAAA,EAAoB,IAAA;AAAA,MACpB,KAAA;AAAA,MACA,IAAA,EAAM,CAAA,EAAG,MAAA,CAAO,IAAI,CAAC,CAAA,OAAA,CAAA;AAAA,MACrB,OAAA,EAAS,gBAAA;AAAA,MACT,KAAA,EAAO,eAAA;AAAA,MACP,cAAA,EAAgB,UAAA;AAAA,MAChB,QAAA,EAAU,CAAC,MAAA,EAAgB,OAAA,KACzB,mBAAmB,OAAO,CAAA;AAAA,MAE3B,GAAI,cAAA,IAAkB,EAAE,cAAA,EAAe;AAAA,MACxC,cACE,YAAA,KACC,CAAC,MAAA,EAAQ,EAAE,UAAS,qBACnB,GAAA;AAAA,QAAC,8BAAA;AAAA,QAAA;AAAA,UACC,QAAA;AAAA,UACA,KAAA,EAAO,MAAA;AAAA,UACP,gBAAA,EAAkB,eAAA;AAAA,UAClB,UAAA,EAAY,CAAC,CAAC;AAAA;AAAA,OAChB;AAAA;AAAA,GAGN,EACF,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Observable } from '@backstage/types';
|
|
|
9
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
10
|
import { TypographyProps } from '@material-ui/core/Typography';
|
|
11
11
|
import { OutlinedTextFieldProps, TextFieldProps } from '@material-ui/core/TextField';
|
|
12
|
-
import { AutocompleteProps } from '@material-ui/lab/Autocomplete';
|
|
12
|
+
import { AutocompleteProps, AutocompleteRenderOptionState } from '@material-ui/lab/Autocomplete';
|
|
13
13
|
import * as react from 'react';
|
|
14
14
|
import { ReactNode, PropsWithChildren, ComponentProps } from 'react';
|
|
15
15
|
import { LinkProps, InfoCardVariants, TableColumn, TableOptions } from '@backstage/core-components';
|
|
@@ -927,6 +927,8 @@ type EntityAutocompletePickerProps<T extends DefaultEntityFilters = DefaultEntit
|
|
|
927
927
|
initialSelectedOptions?: string[];
|
|
928
928
|
filtersForAvailableValues?: Array<keyof T>;
|
|
929
929
|
hidden?: boolean;
|
|
930
|
+
getOptionLabel?: (option: string) => string;
|
|
931
|
+
renderOption?: (option: string, state: AutocompleteRenderOptionState) => ReactNode;
|
|
930
932
|
};
|
|
931
933
|
/** @public */
|
|
932
934
|
type CatalogReactEntityAutocompletePickerClassKey = 'root' | 'label';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-react",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20260619032606",
|
|
4
4
|
"description": "A frontend library that helps other Backstage plugins interact with the catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
"test": "backstage-cli package test"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@backstage/catalog-client": "0.0.0-nightly-
|
|
76
|
+
"@backstage/catalog-client": "0.0.0-nightly-20260619032606",
|
|
77
77
|
"@backstage/catalog-model": "1.9.0",
|
|
78
|
-
"@backstage/core-compat-api": "0.0.0-nightly-
|
|
79
|
-
"@backstage/core-components": "0.0.0-nightly-
|
|
80
|
-
"@backstage/core-plugin-api": "0.0.0-nightly-
|
|
78
|
+
"@backstage/core-compat-api": "0.0.0-nightly-20260619032606",
|
|
79
|
+
"@backstage/core-components": "0.0.0-nightly-20260619032606",
|
|
80
|
+
"@backstage/core-plugin-api": "0.0.0-nightly-20260619032606",
|
|
81
81
|
"@backstage/errors": "1.3.1",
|
|
82
|
-
"@backstage/filter-predicates": "0.
|
|
83
|
-
"@backstage/frontend-plugin-api": "0.0.0-nightly-
|
|
84
|
-
"@backstage/integration-react": "0.0.0-nightly-
|
|
82
|
+
"@backstage/filter-predicates": "0.0.0-nightly-20260619032606",
|
|
83
|
+
"@backstage/frontend-plugin-api": "0.0.0-nightly-20260619032606",
|
|
84
|
+
"@backstage/integration-react": "0.0.0-nightly-20260619032606",
|
|
85
85
|
"@backstage/plugin-permission-common": "0.9.9",
|
|
86
|
-
"@backstage/plugin-permission-react": "0.0.0-nightly-
|
|
86
|
+
"@backstage/plugin-permission-react": "0.0.0-nightly-20260619032606",
|
|
87
87
|
"@backstage/types": "1.2.2",
|
|
88
|
-
"@backstage/ui": "0.0.0-nightly-
|
|
88
|
+
"@backstage/ui": "0.0.0-nightly-20260619032606",
|
|
89
89
|
"@backstage/version-bridge": "1.0.12",
|
|
90
90
|
"@material-ui/core": "^4.12.2",
|
|
91
91
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
"zod": "^4.0.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@backstage/cli": "0.0.0-nightly-
|
|
106
|
-
"@backstage/core-app-api": "0.0.0-nightly-
|
|
107
|
-
"@backstage/frontend-test-utils": "0.0.0-nightly-
|
|
105
|
+
"@backstage/cli": "0.0.0-nightly-20260619032606",
|
|
106
|
+
"@backstage/core-app-api": "0.0.0-nightly-20260619032606",
|
|
107
|
+
"@backstage/frontend-test-utils": "0.0.0-nightly-20260619032606",
|
|
108
108
|
"@backstage/plugin-catalog-common": "1.1.10",
|
|
109
|
-
"@backstage/plugin-scaffolder-common": "
|
|
110
|
-
"@backstage/test-utils": "0.0.0-nightly-
|
|
109
|
+
"@backstage/plugin-scaffolder-common": "2.2.1",
|
|
110
|
+
"@backstage/test-utils": "0.0.0-nightly-20260619032606",
|
|
111
111
|
"@testing-library/dom": "^10.0.0",
|
|
112
112
|
"@testing-library/jest-dom": "^6.0.0",
|
|
113
113
|
"@testing-library/react": "^16.0.0",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"react-test-renderer": "^16.13.1"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
|
-
"@backstage/frontend-test-utils": "0.0.0-nightly-
|
|
123
|
+
"@backstage/frontend-test-utils": "0.0.0-nightly-20260619032606",
|
|
124
124
|
"@types/react": "^17.0.0 || ^18.0.0",
|
|
125
125
|
"react": "^17.0.0 || ^18.0.0",
|
|
126
126
|
"react-dom": "^17.0.0 || ^18.0.0",
|