@backstage/plugin-scaffolder 1.25.0-next.2 → 1.25.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
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder
|
|
2
2
|
|
|
3
|
+
## 1.25.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/integration-react@1.1.32
|
|
9
|
+
- @backstage/plugin-catalog-react@1.13.1
|
|
10
|
+
- @backstage/core-compat-api@0.3.0
|
|
11
|
+
- @backstage/plugin-scaffolder-react@1.12.1
|
|
12
|
+
|
|
13
|
+
## 1.25.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 860ad3a: Expose styles for TemplateEditor, TemplateFormPreviewer and CustomFieldExplorer
|
|
18
|
+
- 4baad34: Added support for `omitExtraData` and `liveOmit` for rjsf in the scaffolder
|
|
19
|
+
- 5143616: Added EntityOwnerPicker component to the TemplateListPage to allow filtering on owner
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- fec8b57: Updated exports to use the new type parameters for extensions and extension blueprints.
|
|
24
|
+
- b0a5c9f: The `ui:options` for `OwnedEntityPicker` field are now passed to `EntityPicker`. This allows you to use any `ui:options` which `EntityPicker` accepts in the `OwnedEntityPicker` field including `allowArbitraryValues` and `defaultNamespace`.
|
|
25
|
+
- 836127c: Updated dependency `@testing-library/react` to `^16.0.0`.
|
|
26
|
+
- 0a50d44: Updated dependency `@rjsf/utils` to `5.21.1`.
|
|
27
|
+
Updated dependency `@rjsf/core` to `5.21.1`.
|
|
28
|
+
Updated dependency `@rjsf/material-ui` to `5.21.1`.
|
|
29
|
+
Updated dependency `@rjsf/validator-ajv8` to `5.21.1`.
|
|
30
|
+
- fa9d8da: Updated dependency `@rjsf/utils` to `5.20.1`.
|
|
31
|
+
Updated dependency `@rjsf/core` to `5.20.1`.
|
|
32
|
+
Updated dependency `@rjsf/material-ui` to `5.20.1`.
|
|
33
|
+
Updated dependency `@rjsf/validator-ajv8` to `5.20.1`.
|
|
34
|
+
- 0944334: Removed duplicated titles on Scaffolder `TemplateListPage` component
|
|
35
|
+
- 7976081: Added support for all request parameters in the Github create/update environment API in the Github environment create scaffolder action.
|
|
36
|
+
|
|
37
|
+
Disable MultiEntityPicker when `maxItems` limit is reached defined in `JSONSchema`
|
|
38
|
+
|
|
39
|
+
- Updated dependencies
|
|
40
|
+
- @backstage/core-components@0.15.0
|
|
41
|
+
- @backstage/plugin-catalog-react@1.13.0
|
|
42
|
+
- @backstage/frontend-plugin-api@0.8.0
|
|
43
|
+
- @backstage/core-compat-api@0.3.0
|
|
44
|
+
- @backstage/integration-react@1.1.31
|
|
45
|
+
- @backstage/catalog-model@1.7.0
|
|
46
|
+
- @backstage/plugin-scaffolder-react@1.12.0
|
|
47
|
+
- @backstage/catalog-client@1.7.0
|
|
48
|
+
- @backstage/plugin-catalog-common@1.1.0
|
|
49
|
+
- @backstage/integration@1.15.0
|
|
50
|
+
- @backstage/core-plugin-api@1.9.4
|
|
51
|
+
- @backstage/plugin-permission-react@0.4.26
|
|
52
|
+
- @backstage/errors@1.2.4
|
|
53
|
+
- @backstage/types@1.1.1
|
|
54
|
+
- @backstage/plugin-scaffolder-common@1.5.6
|
|
55
|
+
|
|
3
56
|
## 1.25.0-next.2
|
|
4
57
|
|
|
5
58
|
### Minor Changes
|
package/alpha/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { catalogApiRef, entityPresentationApiRef, EntityDisplayName } from '@bac
|
|
|
5
5
|
import TextField from '@material-ui/core/TextField';
|
|
6
6
|
import FormControl from '@material-ui/core/FormControl';
|
|
7
7
|
import Autocomplete from '@material-ui/lab/Autocomplete';
|
|
8
|
-
import React, { useCallback, useEffect } from 'react';
|
|
8
|
+
import React, { useState, useCallback, useEffect } from 'react';
|
|
9
9
|
import useAsync from 'react-use/esm/useAsync';
|
|
10
10
|
import { VirtualizedListbox } from '../VirtualizedListbox.esm.js';
|
|
11
11
|
export { MultiEntityPickerSchema } from './schema.esm.js';
|
|
@@ -23,6 +23,7 @@ const MultiEntityPicker = (props) => {
|
|
|
23
23
|
const catalogFilter = buildCatalogFilter(uiSchema);
|
|
24
24
|
const defaultKind = uiSchema["ui:options"]?.defaultKind;
|
|
25
25
|
const defaultNamespace = uiSchema["ui:options"]?.defaultNamespace || void 0;
|
|
26
|
+
const [noOfItemsSelected, setNoOfItemsSelected] = useState(0);
|
|
26
27
|
const catalogApi = useApi(catalogApiRef);
|
|
27
28
|
const entityPresentationApi = useApi(entityPresentationApiRef);
|
|
28
29
|
const { value: entities, loading } = useAsync(async () => {
|
|
@@ -40,6 +41,7 @@ const MultiEntityPicker = (props) => {
|
|
|
40
41
|
return { entities: items, entityRefToPresentation };
|
|
41
42
|
});
|
|
42
43
|
const allowArbitraryValues = uiSchema["ui:options"]?.allowArbitraryValues ?? true;
|
|
44
|
+
const maxItems = props.schema.maxItems;
|
|
43
45
|
const onSelect = useCallback(
|
|
44
46
|
(_, refs, reason) => {
|
|
45
47
|
const values = refs.map((ref) => {
|
|
@@ -63,6 +65,7 @@ const MultiEntityPicker = (props) => {
|
|
|
63
65
|
}
|
|
64
66
|
return void 0;
|
|
65
67
|
}).filter((ref) => ref !== void 0);
|
|
68
|
+
setNoOfItemsSelected(values.length);
|
|
66
69
|
onChange(values);
|
|
67
70
|
},
|
|
68
71
|
[onChange, formData, defaultKind, defaultNamespace, allowArbitraryValues]
|
|
@@ -94,6 +97,7 @@ const MultiEntityPicker = (props) => {
|
|
|
94
97
|
// option can be a string due to freeSolo.
|
|
95
98
|
typeof option === "string" ? option : entities?.entityRefToPresentation.get(stringifyEntityRef(option))?.entityRef
|
|
96
99
|
),
|
|
100
|
+
getOptionDisabled: (_options) => maxItems ? noOfItemsSelected >= maxItems : false,
|
|
97
101
|
autoSelect: true,
|
|
98
102
|
freeSolo: allowArbitraryValues,
|
|
99
103
|
renderInput: (params) => /* @__PURE__ */ React.createElement(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiEntityPicker.esm.js","sources":["../../../../src/components/fields/MultiEntityPicker/MultiEntityPicker.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 */\nimport {\n type EntityFilterQuery,\n CATALOG_FILTER_EXISTS,\n} from '@backstage/catalog-client';\nimport {\n Entity,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n entityPresentationApiRef,\n EntityDisplayName,\n EntityRefPresentationSnapshot,\n} from '@backstage/plugin-catalog-react';\nimport TextField from '@material-ui/core/TextField';\nimport FormControl from '@material-ui/core/FormControl';\nimport Autocomplete, {\n AutocompleteChangeReason,\n} from '@material-ui/lab/Autocomplete';\nimport React, { useCallback, useEffect } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { FieldValidation } from '@rjsf/utils';\nimport {\n MultiEntityPickerFilterQueryValue,\n MultiEntityPickerProps,\n MultiEntityPickerUiOptions,\n MultiEntityPickerFilterQuery,\n} from './schema';\nimport { VirtualizedListbox } from '../VirtualizedListbox';\n\nexport { MultiEntityPickerSchema } from './schema';\n\n/**\n * The underlying component that is rendered in the form for the `MultiEntityPicker`\n * field extension.\n */\nexport const MultiEntityPicker = (props: MultiEntityPickerProps) => {\n const {\n onChange,\n schema: { title = 'Entity', description = 'An entity from the catalog' },\n required,\n uiSchema,\n rawErrors,\n formData,\n idSchema,\n } = props;\n const catalogFilter = buildCatalogFilter(uiSchema);\n const defaultKind = uiSchema['ui:options']?.defaultKind;\n const defaultNamespace =\n uiSchema['ui:options']?.defaultNamespace || undefined;\n\n const catalogApi = useApi(catalogApiRef);\n const entityPresentationApi = useApi(entityPresentationApiRef);\n const { value: entities, loading } = useAsync(async () => {\n const { items } = await catalogApi.getEntities(\n catalogFilter ? { filter: catalogFilter } : undefined,\n );\n const entityRefToPresentation = new Map<\n string,\n EntityRefPresentationSnapshot\n >(\n await Promise.all(\n items.map(async item => {\n const presentation = await entityPresentationApi.forEntity(item)\n .promise;\n return [stringifyEntityRef(item), presentation] as [\n string,\n EntityRefPresentationSnapshot,\n ];\n }),\n ),\n );\n return { entities: items, entityRefToPresentation };\n });\n const allowArbitraryValues =\n uiSchema['ui:options']?.allowArbitraryValues ?? true;\n\n const onSelect = useCallback(\n (_: any, refs: (string | Entity)[], reason: AutocompleteChangeReason) => {\n const values = refs\n .map(ref => {\n if (typeof ref !== 'string') {\n // if ref does not exist: pass 'undefined' to trigger validation for required value\n return ref ? stringifyEntityRef(ref as Entity) : undefined;\n }\n if (reason === 'blur' || reason === 'create-option') {\n // Add in default namespace, etc.\n let entityRef = ref;\n try {\n // Attempt to parse the entity ref into it's full form.\n entityRef = stringifyEntityRef(\n parseEntityRef(ref as string, {\n defaultKind,\n defaultNamespace,\n }),\n );\n } catch (err) {\n // If the passed in value isn't an entity ref, do nothing.\n }\n\n // We need to check against formData here as that's the previous value for this field.\n if (formData?.includes(ref) || allowArbitraryValues) {\n return entityRef;\n }\n }\n\n return undefined;\n })\n .filter(ref => ref !== undefined) as string[];\n\n onChange(values);\n },\n [onChange, formData, defaultKind, defaultNamespace, allowArbitraryValues],\n );\n\n useEffect(() => {\n if (entities?.entities?.length === 1) {\n onChange([stringifyEntityRef(entities?.entities[0])]);\n }\n }, [entities, onChange]);\n\n return (\n <FormControl\n margin=\"normal\"\n required={required}\n error={rawErrors?.length > 0 && !formData}\n >\n <Autocomplete\n multiple\n filterSelectedOptions\n disabled={entities?.entities?.length === 1}\n id={idSchema?.$id}\n loading={loading}\n onChange={onSelect}\n options={entities?.entities || []}\n renderOption={option => <EntityDisplayName entityRef={option} />}\n getOptionLabel={option =>\n // option can be a string due to freeSolo.\n typeof option === 'string'\n ? option\n : entities?.entityRefToPresentation.get(stringifyEntityRef(option))\n ?.entityRef!\n }\n autoSelect\n freeSolo={allowArbitraryValues}\n renderInput={params => (\n <TextField\n {...params}\n label={title}\n margin=\"dense\"\n helperText={description}\n FormHelperTextProps={{\n margin: 'dense',\n style: { marginLeft: 0 },\n }}\n variant=\"outlined\"\n required={required}\n InputProps={{\n ...params.InputProps,\n required: formData?.length === 0 && required,\n }}\n />\n )}\n ListboxComponent={VirtualizedListbox}\n />\n </FormControl>\n );\n};\n\nexport const validateMultiEntityPickerValidation = (\n values: string[],\n validation: FieldValidation,\n) => {\n values.forEach(value => {\n try {\n parseEntityRef(value);\n } catch {\n validation.addError(`${value} is not a valid entity ref`);\n }\n });\n};\n\n/**\n * Converts a special `{exists: true}` value to the `CATALOG_FILTER_EXISTS` symbol.\n *\n * @param value - The value to convert.\n * @returns The converted value.\n */\nfunction convertOpsValues(\n value: Exclude<MultiEntityPickerFilterQueryValue, Array<any>>,\n): string | symbol {\n if (typeof value === 'object' && value.exists) {\n return CATALOG_FILTER_EXISTS;\n }\n return value?.toString();\n}\n\n/**\n * Converts schema filters to entity filter query, replacing `{exists:true}` values\n * with the constant `CATALOG_FILTER_EXISTS`.\n *\n * @param schemaFilters - An object containing schema filters with keys as filter names\n * and values as filter values.\n * @returns An object with the same keys as the input object, but with `{exists:true}` values\n * transformed to `CATALOG_FILTER_EXISTS` symbol.\n */\nfunction convertSchemaFiltersToQuery(\n schemaFilters: MultiEntityPickerFilterQuery,\n): Exclude<EntityFilterQuery, Array<any>> {\n const query: EntityFilterQuery = {};\n\n for (const [key, value] of Object.entries(schemaFilters)) {\n if (Array.isArray(value)) {\n query[key] = value;\n } else {\n query[key] = convertOpsValues(value);\n }\n }\n\n return query;\n}\n\n/**\n * Builds an `EntityFilterQuery` based on the `uiSchema` passed in.\n * If `catalogFilter` is specified in the `uiSchema`, it is converted to a `EntityFilterQuery`.\n *\n * @param uiSchema The `uiSchema` of an `EntityPicker` component.\n * @returns An `EntityFilterQuery` based on the `uiSchema`, or `undefined` if `catalogFilter` is not specified in the `uiSchema`.\n */\nfunction buildCatalogFilter(\n uiSchema: MultiEntityPickerProps['uiSchema'],\n): EntityFilterQuery | undefined {\n const catalogFilter: MultiEntityPickerUiOptions['catalogFilter'] | undefined =\n uiSchema['ui:options']?.catalogFilter;\n\n if (!catalogFilter) {\n return undefined;\n }\n\n if (Array.isArray(catalogFilter)) {\n return catalogFilter.map(convertSchemaFiltersToQuery);\n }\n\n return convertSchemaFiltersToQuery(catalogFilter);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAqDa,MAAA,iBAAA,GAAoB,CAAC,KAAkC,KAAA;AAClE,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,MAAQ,EAAA,EAAE,KAAQ,GAAA,QAAA,EAAU,cAAc,4BAA6B,EAAA;AAAA,IACvE,QAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,GACE,GAAA,KAAA,CAAA;AACJ,EAAM,MAAA,aAAA,GAAgB,mBAAmB,QAAQ,CAAA,CAAA;AACjD,EAAM,MAAA,WAAA,GAAc,QAAS,CAAA,YAAY,CAAG,EAAA,WAAA,CAAA;AAC5C,EAAA,MAAM,gBACJ,GAAA,QAAA,CAAS,YAAY,CAAA,EAAG,gBAAoB,IAAA,KAAA,CAAA,CAAA;AAE9C,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AACvC,EAAM,MAAA,qBAAA,GAAwB,OAAO,wBAAwB,CAAA,CAAA;AAC7D,EAAA,MAAM,EAAE,KAAO,EAAA,QAA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,EAAA,KAAK,CAA4B,0BAAA,CAAA,CAAA,CAAA;AAAA,KAC1D;AAAA,GACD,CAAA,CAAA;AACH,EAAA;AAQA,SAAS,iBACP,KACiB,EAAA;AACjB,EAAA,IAAI,OAAO,KAAA,KAAU,QAAY,IAAA,KAAA,CAAM,MAAQ,EAAA;AAC7C,IAAO,OAAA,qBAAA,CAAA;AAAA,GACT;AACA,EAAA,OAAO,OAAO,QAAS,EAAA,CAAA;AACzB,CAAA;AAWA,SAAS,4BACP,aACwC,EAAA;AACxC,EAAA,MAAM,QAA2B,EAAC,CAAA;AAElC,EAAA,KAAA,MAAW,CAAC,GAAK,EAAA,KAAK,KAAK,MAAO,CAAA,OAAA,CAAQ,aAAa,CAAG,EAAA;AACxD,IAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,KAAK,CAAG,EAAA;AACxB,MAAA,KAAA,CAAM,GAAG,CAAI,GAAA,KAAA,CAAA;AAAA,KACR,MAAA;AACL,MAAM,KAAA,CAAA,GAAG,CAAI,GAAA,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAAA,KACrC;AAAA,GACF;AAEA,EAAO,OAAA,KAAA,CAAA;AACT,CAAA;AASA,SAAS,mBACP,QAC+B,EAAA;AAC/B,EAAM,MAAA,aAAA,GACJ,QAAS,CAAA,YAAY,CAAG,EAAA,aAAA,CAAA;AAE1B,EAAA,IAAI,CAAC,aAAe,EAAA;AAClB,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AAEA,EAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,aAAa,CAAG,EAAA;AAChC,IAAO,OAAA,aAAA,CAAc,IAAI,2BAA2B,CAAA,CAAA;AAAA,GACtD;AAEA,EAAA,OAAO,4BAA4B,aAAa,CAAA,CAAA;AAClD;;;;"}
|
|
1
|
+
{"version":3,"file":"MultiEntityPicker.esm.js","sources":["../../../../src/components/fields/MultiEntityPicker/MultiEntityPicker.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 */\nimport {\n type EntityFilterQuery,\n CATALOG_FILTER_EXISTS,\n} from '@backstage/catalog-client';\nimport {\n Entity,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n entityPresentationApiRef,\n EntityDisplayName,\n EntityRefPresentationSnapshot,\n} from '@backstage/plugin-catalog-react';\nimport TextField from '@material-ui/core/TextField';\nimport FormControl from '@material-ui/core/FormControl';\nimport Autocomplete, {\n AutocompleteChangeReason,\n} from '@material-ui/lab/Autocomplete';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { FieldValidation } from '@rjsf/utils';\nimport {\n MultiEntityPickerFilterQueryValue,\n MultiEntityPickerProps,\n MultiEntityPickerUiOptions,\n MultiEntityPickerFilterQuery,\n} from './schema';\nimport { VirtualizedListbox } from '../VirtualizedListbox';\n\nexport { MultiEntityPickerSchema } from './schema';\n\n/**\n * The underlying component that is rendered in the form for the `MultiEntityPicker`\n * field extension.\n */\nexport const MultiEntityPicker = (props: MultiEntityPickerProps) => {\n const {\n onChange,\n schema: { title = 'Entity', description = 'An entity from the catalog' },\n required,\n uiSchema,\n rawErrors,\n formData,\n idSchema,\n } = props;\n const catalogFilter = buildCatalogFilter(uiSchema);\n const defaultKind = uiSchema['ui:options']?.defaultKind;\n const defaultNamespace =\n uiSchema['ui:options']?.defaultNamespace || undefined;\n const [noOfItemsSelected, setNoOfItemsSelected] = useState(0);\n\n const catalogApi = useApi(catalogApiRef);\n const entityPresentationApi = useApi(entityPresentationApiRef);\n const { value: entities, loading } = useAsync(async () => {\n const { items } = await catalogApi.getEntities(\n catalogFilter ? { filter: catalogFilter } : undefined,\n );\n const entityRefToPresentation = new Map<\n string,\n EntityRefPresentationSnapshot\n >(\n await Promise.all(\n items.map(async item => {\n const presentation = await entityPresentationApi.forEntity(item)\n .promise;\n return [stringifyEntityRef(item), presentation] as [\n string,\n EntityRefPresentationSnapshot,\n ];\n }),\n ),\n );\n return { entities: items, entityRefToPresentation };\n });\n const allowArbitraryValues =\n uiSchema['ui:options']?.allowArbitraryValues ?? true;\n\n // if not specified, maxItems defaults to undefined\n const maxItems = props.schema.maxItems;\n\n const onSelect = useCallback(\n (_: any, refs: (string | Entity)[], reason: AutocompleteChangeReason) => {\n const values = refs\n .map(ref => {\n if (typeof ref !== 'string') {\n // if ref does not exist: pass 'undefined' to trigger validation for required value\n return ref ? stringifyEntityRef(ref as Entity) : undefined;\n }\n if (reason === 'blur' || reason === 'create-option') {\n // Add in default namespace, etc.\n let entityRef = ref;\n try {\n // Attempt to parse the entity ref into it's full form.\n entityRef = stringifyEntityRef(\n parseEntityRef(ref as string, {\n defaultKind,\n defaultNamespace,\n }),\n );\n } catch (err) {\n // If the passed in value isn't an entity ref, do nothing.\n }\n\n // We need to check against formData here as that's the previous value for this field.\n if (formData?.includes(ref) || allowArbitraryValues) {\n return entityRef;\n }\n }\n\n return undefined;\n })\n .filter(ref => ref !== undefined) as string[];\n\n setNoOfItemsSelected(values.length);\n onChange(values);\n },\n [onChange, formData, defaultKind, defaultNamespace, allowArbitraryValues],\n );\n\n useEffect(() => {\n if (entities?.entities?.length === 1) {\n onChange([stringifyEntityRef(entities?.entities[0])]);\n }\n }, [entities, onChange]);\n\n return (\n <FormControl\n margin=\"normal\"\n required={required}\n error={rawErrors?.length > 0 && !formData}\n >\n <Autocomplete\n multiple\n filterSelectedOptions\n disabled={entities?.entities?.length === 1}\n id={idSchema?.$id}\n loading={loading}\n onChange={onSelect}\n options={entities?.entities || []}\n renderOption={option => <EntityDisplayName entityRef={option} />}\n getOptionLabel={option =>\n // option can be a string due to freeSolo.\n typeof option === 'string'\n ? option\n : entities?.entityRefToPresentation.get(stringifyEntityRef(option))\n ?.entityRef!\n }\n getOptionDisabled={_options =>\n maxItems ? noOfItemsSelected >= maxItems : false\n }\n autoSelect\n freeSolo={allowArbitraryValues}\n renderInput={params => (\n <TextField\n {...params}\n label={title}\n margin=\"dense\"\n helperText={description}\n FormHelperTextProps={{\n margin: 'dense',\n style: { marginLeft: 0 },\n }}\n variant=\"outlined\"\n required={required}\n InputProps={{\n ...params.InputProps,\n required: formData?.length === 0 && required,\n }}\n />\n )}\n ListboxComponent={VirtualizedListbox}\n />\n </FormControl>\n );\n};\n\nexport const validateMultiEntityPickerValidation = (\n values: string[],\n validation: FieldValidation,\n) => {\n values.forEach(value => {\n try {\n parseEntityRef(value);\n } catch {\n validation.addError(`${value} is not a valid entity ref`);\n }\n });\n};\n\n/**\n * Converts a special `{exists: true}` value to the `CATALOG_FILTER_EXISTS` symbol.\n *\n * @param value - The value to convert.\n * @returns The converted value.\n */\nfunction convertOpsValues(\n value: Exclude<MultiEntityPickerFilterQueryValue, Array<any>>,\n): string | symbol {\n if (typeof value === 'object' && value.exists) {\n return CATALOG_FILTER_EXISTS;\n }\n return value?.toString();\n}\n\n/**\n * Converts schema filters to entity filter query, replacing `{exists:true}` values\n * with the constant `CATALOG_FILTER_EXISTS`.\n *\n * @param schemaFilters - An object containing schema filters with keys as filter names\n * and values as filter values.\n * @returns An object with the same keys as the input object, but with `{exists:true}` values\n * transformed to `CATALOG_FILTER_EXISTS` symbol.\n */\nfunction convertSchemaFiltersToQuery(\n schemaFilters: MultiEntityPickerFilterQuery,\n): Exclude<EntityFilterQuery, Array<any>> {\n const query: EntityFilterQuery = {};\n\n for (const [key, value] of Object.entries(schemaFilters)) {\n if (Array.isArray(value)) {\n query[key] = value;\n } else {\n query[key] = convertOpsValues(value);\n }\n }\n\n return query;\n}\n\n/**\n * Builds an `EntityFilterQuery` based on the `uiSchema` passed in.\n * If `catalogFilter` is specified in the `uiSchema`, it is converted to a `EntityFilterQuery`.\n *\n * @param uiSchema The `uiSchema` of an `EntityPicker` component.\n * @returns An `EntityFilterQuery` based on the `uiSchema`, or `undefined` if `catalogFilter` is not specified in the `uiSchema`.\n */\nfunction buildCatalogFilter(\n uiSchema: MultiEntityPickerProps['uiSchema'],\n): EntityFilterQuery | undefined {\n const catalogFilter: MultiEntityPickerUiOptions['catalogFilter'] | undefined =\n uiSchema['ui:options']?.catalogFilter;\n\n if (!catalogFilter) {\n return undefined;\n }\n\n if (Array.isArray(catalogFilter)) {\n return catalogFilter.map(convertSchemaFiltersToQuery);\n }\n\n return convertSchemaFiltersToQuery(catalogFilter);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAqDa,MAAA,iBAAA,GAAoB,CAAC,KAAkC,KAAA;AAClE,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,MAAQ,EAAA,EAAE,KAAQ,GAAA,QAAA,EAAU,cAAc,4BAA6B,EAAA;AAAA,IACvE,QAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,GACE,GAAA,KAAA,CAAA;AACJ,EAAM,MAAA,aAAA,GAAgB,mBAAmB,QAAQ,CAAA,CAAA;AACjD,EAAM,MAAA,WAAA,GAAc,QAAS,CAAA,YAAY,CAAG,EAAA,WAAA,CAAA;AAC5C,EAAA,MAAM,gBACJ,GAAA,QAAA,CAAS,YAAY,CAAA,EAAG,gBAAoB,IAAA,KAAA,CAAA,CAAA;AAC9C,EAAA,MAAM,CAAC,iBAAA,EAAmB,oBAAoB,CAAA,GAAI,SAAS,CAAC,CAAA,CAAA;AAE5D,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AACvC,EAAM,MAAA,qBAAA,GAAwB,OAAO,wBAAwB,CAAA,CAAA;AAC7D,EAAA,MAAM,EAAE,KAAO,E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CAAA,CAAA;AAAA,GACtD;AAEA,EAAA,OAAO,4BAA4B,aAAa,CAAA,CAAA;AAClD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.1",
|
|
4
4
|
"description": "The Backstage plugin that helps you create new things",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -57,20 +57,20 @@
|
|
|
57
57
|
"test": "backstage-cli package test"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@backstage/catalog-client": "^1.7.0
|
|
61
|
-
"@backstage/catalog-model": "^1.
|
|
62
|
-
"@backstage/core-compat-api": "^0.3.0
|
|
63
|
-
"@backstage/core-components": "^0.
|
|
64
|
-
"@backstage/core-plugin-api": "^1.9.4
|
|
60
|
+
"@backstage/catalog-client": "^1.7.0",
|
|
61
|
+
"@backstage/catalog-model": "^1.7.0",
|
|
62
|
+
"@backstage/core-compat-api": "^0.3.0",
|
|
63
|
+
"@backstage/core-components": "^0.15.0",
|
|
64
|
+
"@backstage/core-plugin-api": "^1.9.4",
|
|
65
65
|
"@backstage/errors": "^1.2.4",
|
|
66
|
-
"@backstage/frontend-plugin-api": "^0.8.0
|
|
67
|
-
"@backstage/integration": "^1.15.0
|
|
68
|
-
"@backstage/integration-react": "^1.1.
|
|
69
|
-
"@backstage/plugin-catalog-common": "^1.0
|
|
70
|
-
"@backstage/plugin-catalog-react": "^1.13.
|
|
71
|
-
"@backstage/plugin-permission-react": "^0.4.26
|
|
72
|
-
"@backstage/plugin-scaffolder-common": "^1.5.
|
|
73
|
-
"@backstage/plugin-scaffolder-react": "^1.12.
|
|
66
|
+
"@backstage/frontend-plugin-api": "^0.8.0",
|
|
67
|
+
"@backstage/integration": "^1.15.0",
|
|
68
|
+
"@backstage/integration-react": "^1.1.32",
|
|
69
|
+
"@backstage/plugin-catalog-common": "^1.1.0",
|
|
70
|
+
"@backstage/plugin-catalog-react": "^1.13.1",
|
|
71
|
+
"@backstage/plugin-permission-react": "^0.4.26",
|
|
72
|
+
"@backstage/plugin-scaffolder-common": "^1.5.6",
|
|
73
|
+
"@backstage/plugin-scaffolder-react": "^1.12.1",
|
|
74
74
|
"@backstage/types": "^1.1.1",
|
|
75
75
|
"@codemirror/language": "^6.0.0",
|
|
76
76
|
"@codemirror/legacy-modes": "^6.1.0",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
81
81
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
82
82
|
"@react-hookz/web": "^24.0.0",
|
|
83
|
-
"@rjsf/core": "5.
|
|
84
|
-
"@rjsf/material-ui": "5.
|
|
85
|
-
"@rjsf/utils": "5.
|
|
86
|
-
"@rjsf/validator-ajv8": "5.
|
|
83
|
+
"@rjsf/core": "5.21.1",
|
|
84
|
+
"@rjsf/material-ui": "5.21.1",
|
|
85
|
+
"@rjsf/utils": "5.21.1",
|
|
86
|
+
"@rjsf/validator-ajv8": "5.21.1",
|
|
87
87
|
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
88
88
|
"@uiw/react-codemirror": "^4.9.3",
|
|
89
89
|
"classnames": "^2.2.6",
|
|
@@ -104,12 +104,12 @@
|
|
|
104
104
|
"zod-to-json-schema": "^3.20.4"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@backstage/cli": "^0.27.1
|
|
108
|
-
"@backstage/core-app-api": "^1.
|
|
109
|
-
"@backstage/dev-utils": "^1.1.
|
|
110
|
-
"@backstage/plugin-catalog": "^1.23.
|
|
107
|
+
"@backstage/cli": "^0.27.1",
|
|
108
|
+
"@backstage/core-app-api": "^1.15.0",
|
|
109
|
+
"@backstage/dev-utils": "^1.1.1",
|
|
110
|
+
"@backstage/plugin-catalog": "^1.23.1",
|
|
111
111
|
"@backstage/plugin-permission-common": "^0.8.1",
|
|
112
|
-
"@backstage/test-utils": "^1.6.0
|
|
112
|
+
"@backstage/test-utils": "^1.6.0",
|
|
113
113
|
"@testing-library/dom": "^10.0.0",
|
|
114
114
|
"@testing-library/jest-dom": "^6.0.0",
|
|
115
115
|
"@testing-library/react": "^16.0.0",
|