@backstage/plugin-scaffolder 1.30.1 → 1.31.0-next.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +46 -4
  2. package/dist/alpha/components/TemplateEditorPage/{CustomFieldPlaygroud.esm.js → CustomFieldPlayground.esm.js} +3 -3
  3. package/dist/alpha/components/TemplateEditorPage/CustomFieldPlayground.esm.js.map +1 -0
  4. package/dist/alpha/components/TemplateEditorPage/TemplateEditorToolbar.esm.js +24 -2
  5. package/dist/alpha/components/TemplateEditorPage/TemplateEditorToolbar.esm.js.map +1 -1
  6. package/dist/alpha/components/TemplateEditorPage/TemplateFormPreviewer.esm.js +1 -1
  7. package/dist/alpha/components/TemplateEditorPage/TemplateFormPreviewer.esm.js.map +1 -1
  8. package/dist/alpha/components/TemplateListPage/TemplateListPage.esm.js +4 -2
  9. package/dist/alpha/components/TemplateListPage/TemplateListPage.esm.js.map +1 -1
  10. package/dist/alpha/plugin.esm.js +4 -3
  11. package/dist/alpha/plugin.esm.js.map +1 -1
  12. package/dist/alpha.d.ts +23 -0
  13. package/dist/api.esm.js +1 -1
  14. package/dist/api.esm.js.map +1 -1
  15. package/dist/components/ActionsPage/ActionsPage.esm.js +4 -2
  16. package/dist/components/ActionsPage/ActionsPage.esm.js.map +1 -1
  17. package/dist/components/FileBrowser/FileBrowser.esm.js +3 -3
  18. package/dist/components/FileBrowser/FileBrowser.esm.js.map +1 -1
  19. package/dist/components/ListTasksPage/ListTasksPage.esm.js +4 -2
  20. package/dist/components/ListTasksPage/ListTasksPage.esm.js.map +1 -1
  21. package/dist/components/RenderSchema/RenderSchema.esm.js.map +1 -1
  22. package/dist/components/Router/Router.esm.js +9 -1
  23. package/dist/components/Router/Router.esm.js.map +1 -1
  24. package/dist/components/TemplatingExtensionsPage/TemplateFilters.esm.js +132 -0
  25. package/dist/components/TemplatingExtensionsPage/TemplateFilters.esm.js.map +1 -0
  26. package/dist/components/TemplatingExtensionsPage/TemplateGlobals.esm.js +168 -0
  27. package/dist/components/TemplatingExtensionsPage/TemplateGlobals.esm.js.map +1 -0
  28. package/dist/components/TemplatingExtensionsPage/TemplatingExtensionsPage.esm.js +250 -0
  29. package/dist/components/TemplatingExtensionsPage/TemplatingExtensionsPage.esm.js.map +1 -0
  30. package/dist/components/TemplatingExtensionsPage/functionArgs.esm.js +19 -0
  31. package/dist/components/TemplatingExtensionsPage/functionArgs.esm.js.map +1 -0
  32. package/dist/components/TemplatingExtensionsPage/navigation.esm.js +24 -0
  33. package/dist/components/TemplatingExtensionsPage/navigation.esm.js.map +1 -0
  34. package/dist/components/fields/EntityPicker/EntityPicker.esm.js +4 -1
  35. package/dist/components/fields/EntityPicker/EntityPicker.esm.js.map +1 -1
  36. package/dist/index.d.ts +1 -0
  37. package/dist/plugin.esm.js +3 -2
  38. package/dist/plugin.esm.js.map +1 -1
  39. package/dist/routes.esm.js +6 -1
  40. package/dist/routes.esm.js.map +1 -1
  41. package/dist/translation.esm.js +37 -0
  42. package/dist/translation.esm.js.map +1 -1
  43. package/package.json +22 -22
  44. package/dist/alpha/components/TemplateEditorPage/CustomFieldPlaygroud.esm.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ function isSchema(d) {
2
+ return typeof d === "object";
3
+ }
4
+ function inspectFunctionArgSchema(schema) {
5
+ const hasOnlyKey = (k) => (o) => k in o && Object.keys(o).every((ok) => ok.startsWith("$") || ok === k);
6
+ if (isSchema(schema) && hasOnlyKey("anyOf")(schema) && schema.anyOf?.length === 2) {
7
+ const alt0 = schema.anyOf[0];
8
+ if (isSchema(alt0) && hasOnlyKey("not")(alt0)) {
9
+ const not = alt0.not;
10
+ if (isSchema(not) && !Object.keys(not).length) {
11
+ return [schema.anyOf[1], false];
12
+ }
13
+ }
14
+ }
15
+ return [schema, true];
16
+ }
17
+
18
+ export { inspectFunctionArgSchema };
19
+ //# sourceMappingURL=functionArgs.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functionArgs.esm.js","sources":["../../../src/components/TemplatingExtensionsPage/functionArgs.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { JSONSchema7, JSONSchema7Definition } from 'json-schema';\n\nfunction isSchema(d: JSONSchema7Definition): d is JSONSchema7 {\n return typeof d === 'object';\n}\n\nexport function inspectFunctionArgSchema(\n schema: JSONSchema7Definition,\n): [schema: JSONSchema7Definition, required: boolean] {\n const hasOnlyKey = (k: string) => (o: any) =>\n k in o && Object.keys(o).every(ok => ok.startsWith('$') || ok === k);\n\n if (\n isSchema(schema) &&\n hasOnlyKey('anyOf')(schema) &&\n schema.anyOf?.length === 2\n ) {\n const alt0 = schema.anyOf[0];\n if (isSchema(alt0) && hasOnlyKey('not')(alt0)) {\n const not = alt0.not!;\n if (isSchema(not) && !Object.keys(not).length) {\n return [schema.anyOf[1], false];\n }\n }\n }\n return [schema, true];\n}\n"],"names":[],"mappings":"AAiBA,SAAS,SAAS,CAA4C,EAAA;AAC5D,EAAA,OAAO,OAAO,CAAM,KAAA,QAAA;AACtB;AAEO,SAAS,yBACd,MACoD,EAAA;AACpD,EAAA,MAAM,aAAa,CAAC,CAAA,KAAc,CAAC,CACjC,KAAA,CAAA,IAAK,KAAK,MAAO,CAAA,IAAA,CAAK,CAAC,CAAA,CAAE,MAAM,CAAM,EAAA,KAAA,EAAA,CAAG,WAAW,GAAG,CAAA,IAAK,OAAO,CAAC,CAAA;AAErE,EACE,IAAA,QAAA,CAAS,MAAM,CAAA,IACf,UAAW,CAAA,OAAO,CAAE,CAAA,MAAM,CAC1B,IAAA,MAAA,CAAO,KAAO,EAAA,MAAA,KAAW,CACzB,EAAA;AACA,IAAM,MAAA,IAAA,GAAO,MAAO,CAAA,KAAA,CAAM,CAAC,CAAA;AAC3B,IAAA,IAAI,SAAS,IAAI,CAAA,IAAK,WAAW,KAAK,CAAA,CAAE,IAAI,CAAG,EAAA;AAC7C,MAAA,MAAM,MAAM,IAAK,CAAA,GAAA;AACjB,MAAI,IAAA,QAAA,CAAS,GAAG,CAAK,IAAA,CAAC,OAAO,IAAK,CAAA,GAAG,EAAE,MAAQ,EAAA;AAC7C,QAAA,OAAO,CAAC,MAAA,CAAO,KAAM,CAAA,CAAC,GAAG,KAAK,CAAA;AAAA;AAChC;AACF;AAEF,EAAO,OAAA,CAAC,QAAQ,IAAI,CAAA;AACtB;;;;"}
@@ -0,0 +1,24 @@
1
+ const kinds = ["filter", "function", "value"];
2
+ const listTemplatingExtensions = (data) => {
3
+ const exts = (kind, record) => record ? Object.keys(record).map((name) => ({ kind, name })) : [];
4
+ return [
5
+ ...exts("filter", data.filters),
6
+ ...exts("function", data.globals?.functions),
7
+ ...exts("value", data.globals?.values)
8
+ ];
9
+ };
10
+ const renderFragment = (e) => `${e.kind}_${e.name}`;
11
+ const parseFragment = (fragment) => {
12
+ const [k, name] = fragment.split("_", 2);
13
+ const kind = k;
14
+ if (kinds.includes(kind)) {
15
+ return {
16
+ kind,
17
+ name
18
+ };
19
+ }
20
+ throw Error(fragment);
21
+ };
22
+
23
+ export { listTemplatingExtensions, parseFragment, renderFragment };
24
+ //# sourceMappingURL=navigation.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.esm.js","sources":["../../../src/components/TemplatingExtensionsPage/navigation.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { ListTemplatingExtensionsResponse } from '@backstage/plugin-scaffolder-react';\n\nconst kinds = ['filter', 'function', 'value'] as const;\n\nexport type ExtensionKind = (typeof kinds)[number];\n\nexport type Extension = {\n kind: ExtensionKind;\n name: string;\n};\n\nexport const listTemplatingExtensions = (\n data: Partial<Pick<ListTemplatingExtensionsResponse, 'filters'>> &\n Partial<{ globals: Partial<ListTemplatingExtensionsResponse['globals']> }>,\n): Extension[] => {\n const exts = (\n kind: ExtensionKind,\n record: Record<string, any> | undefined,\n ): Extension[] =>\n record ? Object.keys(record).map((name: string) => ({ kind, name })) : [];\n\n return [\n ...exts('filter', data.filters),\n ...exts('function', data.globals?.functions),\n ...exts('value', data.globals?.values),\n ];\n};\n\nexport const renderFragment = (e: Extension) => `${e.kind}_${e.name}`;\n\nexport const parseFragment = (fragment: string): Extension => {\n const [k, name] = fragment.split('_', 2);\n const kind = k as ExtensionKind;\n if (kinds.includes(kind)) {\n return {\n kind,\n name,\n };\n }\n throw Error(fragment);\n};\n"],"names":[],"mappings":"AAiBA,MAAM,KAAQ,GAAA,CAAC,QAAU,EAAA,UAAA,EAAY,OAAO,CAAA;AAS/B,MAAA,wBAAA,GAA2B,CACtC,IAEgB,KAAA;AAChB,EAAA,MAAM,OAAO,CACX,IAAA,EACA,MAEA,KAAA,MAAA,GAAS,OAAO,IAAK,CAAA,MAAM,CAAE,CAAA,GAAA,CAAI,CAAC,IAAkB,MAAA,EAAE,MAAM,IAAK,EAAA,CAAE,IAAI,EAAC;AAE1E,EAAO,OAAA;AAAA,IACL,GAAG,IAAA,CAAK,QAAU,EAAA,IAAA,CAAK,OAAO,CAAA;AAAA,IAC9B,GAAG,IAAA,CAAK,UAAY,EAAA,IAAA,CAAK,SAAS,SAAS,CAAA;AAAA,IAC3C,GAAG,IAAA,CAAK,OAAS,EAAA,IAAA,CAAK,SAAS,MAAM;AAAA,GACvC;AACF;AAEa,MAAA,cAAA,GAAiB,CAAC,CAAiB,KAAA,CAAA,EAAG,EAAE,IAAI,CAAA,CAAA,EAAI,EAAE,IAAI,CAAA;AAEtD,MAAA,aAAA,GAAgB,CAAC,QAAgC,KAAA;AAC5D,EAAA,MAAM,CAAC,CAAG,EAAA,IAAI,IAAI,QAAS,CAAA,KAAA,CAAM,KAAK,CAAC,CAAA;AACvC,EAAA,MAAM,IAAO,GAAA,CAAA;AACb,EAAI,IAAA,KAAA,CAAM,QAAS,CAAA,IAAI,CAAG,EAAA;AACxB,IAAO,OAAA;AAAA,MACL,IAAA;AAAA,MACA;AAAA,KACF;AAAA;AAEF,EAAA,MAAM,MAAM,QAAQ,CAAA;AACtB;;;;"}
@@ -36,10 +36,13 @@ const EntityPicker = (props) => {
36
36
  const entityPresentationApi = useApi(entityPresentationApiRef);
37
37
  const { value: entities, loading } = useAsync(async () => {
38
38
  const fields = [
39
+ "kind",
39
40
  "metadata.name",
40
41
  "metadata.namespace",
41
42
  "metadata.title",
42
- "kind"
43
+ "metadata.description",
44
+ "spec.profile.displayName",
45
+ "spec.type"
43
46
  ];
44
47
  const { items } = await catalogApi.getEntities(
45
48
  catalogFilter ? { filter: catalogFilter, fields } : { filter: void 0, fields }
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPicker.esm.js","sources":["../../../../src/components/fields/EntityPicker/EntityPicker.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 EntityDisplayName,\n EntityRefPresentationSnapshot,\n catalogApiRef,\n entityPresentationApiRef,\n} from '@backstage/plugin-catalog-react';\nimport TextField from '@material-ui/core/TextField';\nimport Autocomplete, {\n AutocompleteChangeReason,\n createFilterOptions,\n} from '@material-ui/lab/Autocomplete';\nimport { useCallback, useEffect } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n EntityPickerFilterQueryValue,\n EntityPickerProps,\n EntityPickerUiOptions,\n EntityPickerFilterQuery,\n} from './schema';\nimport { VirtualizedListbox } from '../VirtualizedListbox';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { scaffolderTranslationRef } from '../../../translation';\nimport { ScaffolderField } from '@backstage/plugin-scaffolder-react/alpha';\n\nexport { EntityPickerSchema } from './schema';\n\n/**\n * The underlying component that is rendered in the form for the `EntityPicker`\n * field extension.\n *\n * @public\n */\nexport const EntityPicker = (props: EntityPickerProps) => {\n const { t } = useTranslationRef(scaffolderTranslationRef);\n const {\n onChange,\n schema: {\n title = t('fields.entityPicker.title'),\n description = t('fields.entityPicker.description'),\n },\n required,\n uiSchema,\n rawErrors,\n formData,\n idSchema,\n errors,\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 isDisabled = uiSchema?.['ui:disabled'] ?? false;\n\n const catalogApi = useApi(catalogApiRef);\n const entityPresentationApi = useApi(entityPresentationApiRef);\n\n const { value: entities, loading } = useAsync(async () => {\n const fields = [\n 'metadata.name',\n 'metadata.namespace',\n 'metadata.title',\n 'kind',\n ];\n const { items } = await catalogApi.getEntities(\n catalogFilter\n ? { filter: catalogFilter, fields }\n : { filter: undefined, fields },\n );\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\n return { catalogEntities: items, entityRefToPresentation };\n });\n\n const allowArbitraryValues =\n uiSchema['ui:options']?.allowArbitraryValues ?? true;\n\n const getLabel = useCallback(\n (freeSoloValue: string) => {\n try {\n // Will throw if defaultKind or defaultNamespace are not set\n const parsedRef = parseEntityRef(freeSoloValue, {\n defaultKind,\n defaultNamespace,\n });\n\n return stringifyEntityRef(parsedRef);\n } catch (err) {\n return freeSoloValue;\n }\n },\n [defaultKind, defaultNamespace],\n );\n\n const onSelect = useCallback(\n (_: any, ref: string | Entity | null, reason: AutocompleteChangeReason) => {\n // ref can either be a string from free solo entry or\n if (typeof ref !== 'string') {\n // if ref does not exist: pass 'undefined' to trigger validation for required value\n onChange(ref ? stringifyEntityRef(ref as Entity) : undefined);\n } else {\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 // We need to check against formData here as that's the previous value for this field.\n if (formData !== ref || allowArbitraryValues) {\n onChange(entityRef);\n }\n }\n }\n },\n [onChange, formData, defaultKind, defaultNamespace, allowArbitraryValues],\n );\n\n // Since free solo can be enabled, attempt to parse as a full entity ref first, then fall\n // back to the given value.\n const selectedEntity =\n entities?.catalogEntities.find(e => stringifyEntityRef(e) === formData) ??\n (allowArbitraryValues && formData ? getLabel(formData) : '');\n\n useEffect(() => {\n if (\n required &&\n !allowArbitraryValues &&\n entities?.catalogEntities.length === 1 &&\n selectedEntity === ''\n ) {\n onChange(stringifyEntityRef(entities.catalogEntities[0]));\n }\n }, [entities, onChange, selectedEntity, required, allowArbitraryValues]);\n\n return (\n <ScaffolderField\n rawErrors={rawErrors}\n rawDescription={description}\n required={required}\n disabled={isDisabled}\n errors={errors}\n >\n <Autocomplete\n disabled={\n isDisabled ||\n (required &&\n !allowArbitraryValues &&\n entities?.catalogEntities.length === 1)\n }\n id={idSchema?.$id}\n value={selectedEntity}\n loading={loading}\n onChange={onSelect}\n options={entities?.catalogEntities || []}\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 variant=\"outlined\"\n required={required}\n disabled={isDisabled}\n InputProps={params.InputProps}\n />\n )}\n renderOption={option => <EntityDisplayName entityRef={option} />}\n filterOptions={createFilterOptions<Entity>({\n stringify: option =>\n entities?.entityRefToPresentation.get(stringifyEntityRef(option))\n ?.primaryTitle!,\n })}\n ListboxComponent={VirtualizedListbox}\n />\n </ScaffolderField>\n );\n};\n\n/**\n * Converts a especial `{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<EntityPickerFilterQueryValue, 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: EntityPickerFilterQuery,\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 * If `allowedKinds` is specified in the `uiSchema` will support the legacy `allowedKinds` option.\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: EntityPickerProps['uiSchema'],\n): EntityFilterQuery | undefined {\n const allowedKinds = uiSchema['ui:options']?.allowedKinds;\n\n const catalogFilter: EntityPickerUiOptions['catalogFilter'] | undefined =\n uiSchema['ui:options']?.catalogFilter ||\n (allowedKinds && { kind: allowedKinds });\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":";;;;;;;;;;;;;;;AAyDa,MAAA,YAAA,GAAe,CAAC,KAA6B,KAAA;AACxD,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AACxD,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,KAAA,GAAQ,EAAE,2BAA2B,CAAA;AAAA,MACrC,WAAA,GAAc,EAAE,iCAAiC;AAAA,KACnD;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACE,GAAA,KAAA;AACJ,EAAM,MAAA,aAAA,GAAgB,mBAAmB,QAAQ,CAAA;AACjD,EAAM,MAAA,WAAA,GAAc,QAAS,CAAA,YAAY,CAAG,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AA;AAAA;AAGtD,EAAA,OAAO,4BAA4B,aAAa,CAAA;AAClD;;;;"}
1
+ {"version":3,"file":"EntityPicker.esm.js","sources":["../../../../src/components/fields/EntityPicker/EntityPicker.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 EntityDisplayName,\n EntityRefPresentationSnapshot,\n catalogApiRef,\n entityPresentationApiRef,\n} from '@backstage/plugin-catalog-react';\nimport TextField from '@material-ui/core/TextField';\nimport Autocomplete, {\n AutocompleteChangeReason,\n createFilterOptions,\n} from '@material-ui/lab/Autocomplete';\nimport { useCallback, useEffect } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n EntityPickerFilterQueryValue,\n EntityPickerProps,\n EntityPickerUiOptions,\n EntityPickerFilterQuery,\n} from './schema';\nimport { VirtualizedListbox } from '../VirtualizedListbox';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { scaffolderTranslationRef } from '../../../translation';\nimport { ScaffolderField } from '@backstage/plugin-scaffolder-react/alpha';\n\nexport { EntityPickerSchema } from './schema';\n\n/**\n * The underlying component that is rendered in the form for the `EntityPicker`\n * field extension.\n *\n * @public\n */\nexport const EntityPicker = (props: EntityPickerProps) => {\n const { t } = useTranslationRef(scaffolderTranslationRef);\n const {\n onChange,\n schema: {\n title = t('fields.entityPicker.title'),\n description = t('fields.entityPicker.description'),\n },\n required,\n uiSchema,\n rawErrors,\n formData,\n idSchema,\n errors,\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 isDisabled = uiSchema?.['ui:disabled'] ?? false;\n\n const catalogApi = useApi(catalogApiRef);\n const entityPresentationApi = useApi(entityPresentationApiRef);\n\n const { value: entities, loading } = useAsync(async () => {\n const fields = [\n 'kind',\n 'metadata.name',\n 'metadata.namespace',\n 'metadata.title',\n 'metadata.description',\n 'spec.profile.displayName',\n 'spec.type',\n ];\n const { items } = await catalogApi.getEntities(\n catalogFilter\n ? { filter: catalogFilter, fields }\n : { filter: undefined, fields },\n );\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\n return { catalogEntities: items, entityRefToPresentation };\n });\n\n const allowArbitraryValues =\n uiSchema['ui:options']?.allowArbitraryValues ?? true;\n\n const getLabel = useCallback(\n (freeSoloValue: string) => {\n try {\n // Will throw if defaultKind or defaultNamespace are not set\n const parsedRef = parseEntityRef(freeSoloValue, {\n defaultKind,\n defaultNamespace,\n });\n\n return stringifyEntityRef(parsedRef);\n } catch (err) {\n return freeSoloValue;\n }\n },\n [defaultKind, defaultNamespace],\n );\n\n const onSelect = useCallback(\n (_: any, ref: string | Entity | null, reason: AutocompleteChangeReason) => {\n // ref can either be a string from free solo entry or\n if (typeof ref !== 'string') {\n // if ref does not exist: pass 'undefined' to trigger validation for required value\n onChange(ref ? stringifyEntityRef(ref as Entity) : undefined);\n } else {\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 // We need to check against formData here as that's the previous value for this field.\n if (formData !== ref || allowArbitraryValues) {\n onChange(entityRef);\n }\n }\n }\n },\n [onChange, formData, defaultKind, defaultNamespace, allowArbitraryValues],\n );\n\n // Since free solo can be enabled, attempt to parse as a full entity ref first, then fall\n // back to the given value.\n const selectedEntity =\n entities?.catalogEntities.find(e => stringifyEntityRef(e) === formData) ??\n (allowArbitraryValues && formData ? getLabel(formData) : '');\n\n useEffect(() => {\n if (\n required &&\n !allowArbitraryValues &&\n entities?.catalogEntities.length === 1 &&\n selectedEntity === ''\n ) {\n onChange(stringifyEntityRef(entities.catalogEntities[0]));\n }\n }, [entities, onChange, selectedEntity, required, allowArbitraryValues]);\n\n return (\n <ScaffolderField\n rawErrors={rawErrors}\n rawDescription={description}\n required={required}\n disabled={isDisabled}\n errors={errors}\n >\n <Autocomplete\n disabled={\n isDisabled ||\n (required &&\n !allowArbitraryValues &&\n entities?.catalogEntities.length === 1)\n }\n id={idSchema?.$id}\n value={selectedEntity}\n loading={loading}\n onChange={onSelect}\n options={entities?.catalogEntities || []}\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 variant=\"outlined\"\n required={required}\n disabled={isDisabled}\n InputProps={params.InputProps}\n />\n )}\n renderOption={option => <EntityDisplayName entityRef={option} />}\n filterOptions={createFilterOptions<Entity>({\n stringify: option =>\n entities?.entityRefToPresentation.get(stringifyEntityRef(option))\n ?.primaryTitle!,\n })}\n ListboxComponent={VirtualizedListbox}\n />\n </ScaffolderField>\n );\n};\n\n/**\n * Converts a especial `{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<EntityPickerFilterQueryValue, 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: EntityPickerFilterQuery,\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 * If `allowedKinds` is specified in the `uiSchema` will support the legacy `allowedKinds` option.\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: EntityPickerProps['uiSchema'],\n): EntityFilterQuery | undefined {\n const allowedKinds = uiSchema['ui:options']?.allowedKinds;\n\n const catalogFilter: EntityPickerUiOptions['catalogFilter'] | undefined =\n uiSchema['ui:options']?.catalogFilter ||\n (allowedKinds && { kind: allowedKinds });\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":";;;;;;;;;;;;;;;AAyDa,MAAA,YAAA,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,GAAG,CAAI,GAAA,KAAA;AAAA,KACR,MAAA;AACL,MAAM,KAAA,CAAA,GAAG,CAAI,GAAA,gBAAA,CAAiB,KAAK,CAAA;AAAA;AACrC;AAGF,EAAO,OAAA,KAAA;AACT;AAUA,SAAS,mBACP,QAC+B,EAAA;AAC/B,EAAM,MAAA,YAAA,GAAe,QAAS,CAAA,YAAY,CAAG,EAAA,YAAA;AAE7C,EAAM,MAAA,aAAA,GACJ,SAAS,YAAY,CAAA,EAAG,iBACvB,YAAgB,IAAA,EAAE,MAAM,YAAa,EAAA;AAExC,EAAA,IAAI,CAAC,aAAe,EAAA;AAClB,IAAO,OAAA,KAAA,CAAA;AAAA;AAGT,EAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,aAAa,CAAG,EAAA;AAChC,IAAO,OAAA,aAAA,CAAc,IAAI,2BAA2B,CAAA;AAAA;AAGtD,EAAA,OAAO,4BAA4B,aAAa,CAAA;AAClD;;;;"}
package/dist/index.d.ts CHANGED
@@ -117,6 +117,7 @@ declare const scaffolderPlugin: _backstage_core_plugin_api.BackstagePlugin<{
117
117
  editor: _backstage_core_plugin_api.SubRouteRef<undefined>;
118
118
  customFields: _backstage_core_plugin_api.SubRouteRef<undefined>;
119
119
  templateForm: _backstage_core_plugin_api.SubRouteRef<undefined>;
120
+ templatingExtensions: _backstage_core_plugin_api.SubRouteRef<undefined>;
120
121
  }, {
121
122
  registerComponent: _backstage_core_plugin_api.ExternalRouteRef<undefined, true>;
122
123
  viewTechDoc: _backstage_core_plugin_api.ExternalRouteRef<{
@@ -12,7 +12,7 @@ import { RepoUrlPicker } from './components/fields/RepoUrlPicker/RepoUrlPicker.e
12
12
  import { createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, identityApiRef, createRoutableExtension } from '@backstage/core-plugin-api';
13
13
  import { OwnedEntityPicker } from './components/fields/OwnedEntityPicker/OwnedEntityPicker.esm.js';
14
14
  import { EntityTagsPicker } from './components/fields/EntityTagsPicker/EntityTagsPicker.esm.js';
15
- import { rootRouteRef, selectedTemplateRouteRef, scaffolderTaskRouteRef, actionsRouteRef, scaffolderListTaskRouteRef, editRouteRef, editorRouteRef, customFieldsRouteRef, templateFormRouteRef, registerComponentRouteRef, viewTechDocRouteRef } from './routes.esm.js';
15
+ import { rootRouteRef, selectedTemplateRouteRef, scaffolderTaskRouteRef, actionsRouteRef, scaffolderListTaskRouteRef, editRouteRef, editorRouteRef, customFieldsRouteRef, templateFormRouteRef, templatingExtensionsRouteRef, registerComponentRouteRef, viewTechDocRouteRef } from './routes.esm.js';
16
16
  import { MyGroupsPicker } from './components/fields/MyGroupsPicker/MyGroupsPicker.esm.js';
17
17
  import { RepoBranchPicker } from './components/fields/RepoBranchPicker/RepoBranchPicker.esm.js';
18
18
  import { RepoBranchPickerSchema } from './components/fields/RepoBranchPicker/schema.esm.js';
@@ -65,7 +65,8 @@ const scaffolderPlugin = createPlugin({
65
65
  edit: editRouteRef,
66
66
  editor: editorRouteRef,
67
67
  customFields: customFieldsRouteRef,
68
- templateForm: templateFormRouteRef
68
+ templateForm: templateFormRouteRef,
69
+ templatingExtensions: templatingExtensionsRouteRef
69
70
  },
70
71
  externalRoutes: {
71
72
  registerComponent: registerComponentRouteRef,
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 { scmIntegrationsApiRef } from '@backstage/integration-react';\nimport {\n createScaffolderFieldExtension,\n scaffolderApiRef,\n} from '@backstage/plugin-scaffolder-react';\nimport { ScaffolderClient } from './api';\nimport {\n EntityPicker,\n EntityPickerSchema,\n} from './components/fields/EntityPicker/EntityPicker';\nimport { entityNamePickerValidation } from './components/fields/EntityNamePicker';\nimport {\n EntityNamePicker,\n EntityNamePickerSchema,\n} from './components/fields/EntityNamePicker/EntityNamePicker';\nimport {\n OwnerPicker,\n OwnerPickerSchema,\n} from './components/fields/OwnerPicker/OwnerPicker';\nimport {\n MultiEntityPicker,\n MultiEntityPickerSchema,\n validateMultiEntityPickerValidation,\n} from './components/fields/MultiEntityPicker/MultiEntityPicker';\nimport { repoPickerValidation } from './components/fields/RepoUrlPicker';\nimport {\n RepoUrlPicker,\n RepoUrlPickerSchema,\n} from './components/fields/RepoUrlPicker/RepoUrlPicker';\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n OwnedEntityPicker,\n OwnedEntityPickerSchema,\n} from './components/fields/OwnedEntityPicker/OwnedEntityPicker';\nimport {\n EntityTagsPicker,\n EntityTagsPickerSchema,\n} from './components/fields/EntityTagsPicker/EntityTagsPicker';\nimport {\n registerComponentRouteRef,\n rootRouteRef,\n viewTechDocRouteRef,\n selectedTemplateRouteRef,\n scaffolderTaskRouteRef,\n scaffolderListTaskRouteRef,\n actionsRouteRef,\n editRouteRef,\n editorRouteRef,\n customFieldsRouteRef,\n templateFormRouteRef,\n} from './routes';\nimport {\n MyGroupsPicker,\n MyGroupsPickerSchema,\n} from './components/fields/MyGroupsPicker/MyGroupsPicker';\nimport { RepoBranchPicker } from './components/fields/RepoBranchPicker/RepoBranchPicker';\nimport { RepoBranchPickerSchema } from './components/fields/RepoBranchPicker/schema';\nimport { formDecoratorsApiRef } from './alpha/api/ref';\nimport { DefaultScaffolderFormDecoratorsApi } from './alpha/api/FormDecoratorsApi';\nimport { formFieldsApiRef } from '@backstage/plugin-scaffolder-react/alpha';\n\n/**\n * The main plugin export for the scaffolder.\n * @public\n */\nexport const scaffolderPlugin = createPlugin({\n id: 'scaffolder',\n apis: [\n createApiFactory({\n api: scaffolderApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n scmIntegrationsApi: scmIntegrationsApiRef,\n fetchApi: fetchApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, scmIntegrationsApi, fetchApi, identityApi }) =>\n new ScaffolderClient({\n discoveryApi,\n scmIntegrationsApi,\n fetchApi,\n identityApi,\n }),\n }),\n createApiFactory({\n api: formDecoratorsApiRef,\n deps: {},\n factory: () => DefaultScaffolderFormDecoratorsApi.create(),\n }),\n createApiFactory({\n api: formFieldsApiRef,\n deps: {},\n factory: () => ({ getFormFields: async () => [] }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n selectedTemplate: selectedTemplateRouteRef,\n ongoingTask: scaffolderTaskRouteRef,\n actions: actionsRouteRef,\n listTasks: scaffolderListTaskRouteRef,\n edit: editRouteRef,\n editor: editorRouteRef,\n customFields: customFieldsRouteRef,\n templateForm: templateFormRouteRef,\n },\n externalRoutes: {\n registerComponent: registerComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n },\n});\n\n/**\n * A field extension for selecting an Entity that exists in the Catalog.\n *\n * @public\n */\nexport const EntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityPicker,\n name: 'EntityPicker',\n schema: EntityPickerSchema,\n }),\n);\n\n/**\n * The field extension for selecting a name for a new Entity in the Catalog.\n *\n * @public\n */\nexport const EntityNamePickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityNamePicker,\n name: 'EntityNamePicker',\n validation: entityNamePickerValidation,\n schema: EntityNamePickerSchema,\n }),\n);\n\n/**\n * A field extension for selecting multiple entities that exists in the Catalog.\n *\n * @public\n */\nexport const MultiEntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: MultiEntityPicker,\n name: 'MultiEntityPicker',\n schema: MultiEntityPickerSchema,\n validation: validateMultiEntityPickerValidation,\n }),\n);\n\n/**\n * The field extension which provides the ability to select a RepositoryUrl.\n * Currently, this is an encoded URL that looks something like the following `github.com?repo=myRepoName&owner=backstage`.\n *\n * @public\n */\nexport const RepoUrlPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: RepoUrlPicker,\n name: 'RepoUrlPicker',\n validation: repoPickerValidation,\n schema: RepoUrlPickerSchema,\n }),\n);\n\n/**\n * A field extension for picking users and groups out of the Catalog.\n *\n * @public\n */\nexport const OwnerPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: OwnerPicker,\n name: 'OwnerPicker',\n schema: OwnerPickerSchema,\n }),\n);\n\n/**\n * A field extension for picking groups a user belongs to out of the catalog.\n *\n * @public\n */\nexport const MyGroupsPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: MyGroupsPicker,\n name: 'MyGroupsPicker',\n schema: MyGroupsPickerSchema,\n }),\n);\n\n/**\n * The Router and main entrypoint to the Scaffolder plugin.\n *\n * @public\n */\nexport const ScaffolderPage = scaffolderPlugin.provide(\n createRoutableExtension({\n name: 'ScaffolderPage',\n component: () => import('./components/Router').then(m => m.Router),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * A field extension to show all the Entities that are owned by the current logged-in User for use in templates.\n *\n * @public\n */\nexport const OwnedEntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: OwnedEntityPicker,\n name: 'OwnedEntityPicker',\n schema: OwnedEntityPickerSchema,\n }),\n);\n\n/**\n * EntityTagsPickerFieldExtension\n * @public\n */\nexport const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityTagsPicker,\n name: 'EntityTagsPicker',\n schema: EntityTagsPickerSchema,\n }),\n);\n\n/**\n * A field extension to select a branch from a repository.\n *\n * @public\n */\nexport const RepoBranchPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: RepoB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C7C,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,gBAAA;AAAA,IACN,SAAA,EAAW,MAAM,OAAO,kCAAqB,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,MAAM,CAAA;AAAA,IACjE,UAAY,EAAA;AAAA,GACb;AACH;AAOO,MAAM,kCAAkC,gBAAiB,CAAA,OAAA;AAAA,EAC9D,8BAA+B,CAAA;AAAA,IAC7B,SAAW,EAAA,iBAAA;AAAA,IACX,IAAM,EAAA,mBAAA;AAAA,IACN,MAAQ,EAAA;AAAA,GACT;AACH;AAMO,MAAM,iCAAiC,gBAAiB,CAAA,OAAA;AAAA,EAC7D,8BAA+B,CAAA;AAAA,IAC7B,SAAW,EAAA,gBAAA;AAAA,IACX,IAAM,EAAA,kBAAA;AAAA,IACN,MAAQ,EAAA;AAAA,GACT;AACH;AAOO,MAAM,iCAAiC,gBAAiB,CAAA,OAAA;AAAA,EAC7D,8BAA+B,CAAA;AAAA,IAC7B,SAAW,EAAA,gBAAA;AAAA,IACX,IAAM,EAAA,kBAAA;AAAA,IACN,MAAQ,EAAA;AAAA,GACT;AACH;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 { scmIntegrationsApiRef } from '@backstage/integration-react';\nimport {\n createScaffolderFieldExtension,\n scaffolderApiRef,\n} from '@backstage/plugin-scaffolder-react';\nimport { ScaffolderClient } from './api';\nimport {\n EntityPicker,\n EntityPickerSchema,\n} from './components/fields/EntityPicker/EntityPicker';\nimport { entityNamePickerValidation } from './components/fields/EntityNamePicker';\nimport {\n EntityNamePicker,\n EntityNamePickerSchema,\n} from './components/fields/EntityNamePicker/EntityNamePicker';\nimport {\n OwnerPicker,\n OwnerPickerSchema,\n} from './components/fields/OwnerPicker/OwnerPicker';\nimport {\n MultiEntityPicker,\n MultiEntityPickerSchema,\n validateMultiEntityPickerValidation,\n} from './components/fields/MultiEntityPicker/MultiEntityPicker';\nimport { repoPickerValidation } from './components/fields/RepoUrlPicker';\nimport {\n RepoUrlPicker,\n RepoUrlPickerSchema,\n} from './components/fields/RepoUrlPicker/RepoUrlPicker';\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n OwnedEntityPicker,\n OwnedEntityPickerSchema,\n} from './components/fields/OwnedEntityPicker/OwnedEntityPicker';\nimport {\n EntityTagsPicker,\n EntityTagsPickerSchema,\n} from './components/fields/EntityTagsPicker/EntityTagsPicker';\nimport {\n registerComponentRouteRef,\n rootRouteRef,\n viewTechDocRouteRef,\n selectedTemplateRouteRef,\n scaffolderTaskRouteRef,\n scaffolderListTaskRouteRef,\n actionsRouteRef,\n editRouteRef,\n editorRouteRef,\n customFieldsRouteRef,\n templateFormRouteRef,\n templatingExtensionsRouteRef,\n} from './routes';\nimport {\n MyGroupsPicker,\n MyGroupsPickerSchema,\n} from './components/fields/MyGroupsPicker/MyGroupsPicker';\nimport { RepoBranchPicker } from './components/fields/RepoBranchPicker/RepoBranchPicker';\nimport { RepoBranchPickerSchema } from './components/fields/RepoBranchPicker/schema';\nimport { formDecoratorsApiRef } from './alpha/api/ref';\nimport { DefaultScaffolderFormDecoratorsApi } from './alpha/api/FormDecoratorsApi';\nimport { formFieldsApiRef } from '@backstage/plugin-scaffolder-react/alpha';\n\n/**\n * The main plugin export for the scaffolder.\n * @public\n */\nexport const scaffolderPlugin = createPlugin({\n id: 'scaffolder',\n apis: [\n createApiFactory({\n api: scaffolderApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n scmIntegrationsApi: scmIntegrationsApiRef,\n fetchApi: fetchApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, scmIntegrationsApi, fetchApi, identityApi }) =>\n new ScaffolderClient({\n discoveryApi,\n scmIntegrationsApi,\n fetchApi,\n identityApi,\n }),\n }),\n createApiFactory({\n api: formDecoratorsApiRef,\n deps: {},\n factory: () => DefaultScaffolderFormDecoratorsApi.create(),\n }),\n createApiFactory({\n api: formFieldsApiRef,\n deps: {},\n factory: () => ({ getFormFields: async () => [] }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n selectedTemplate: selectedTemplateRouteRef,\n ongoingTask: scaffolderTaskRouteRef,\n actions: actionsRouteRef,\n listTasks: scaffolderListTaskRouteRef,\n edit: editRouteRef,\n editor: editorRouteRef,\n customFields: customFieldsRouteRef,\n templateForm: templateFormRouteRef,\n templatingExtensions: templatingExtensionsRouteRef,\n },\n externalRoutes: {\n registerComponent: registerComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n },\n});\n\n/**\n * A field extension for selecting an Entity that exists in the Catalog.\n *\n * @public\n */\nexport const EntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityPicker,\n name: 'EntityPicker',\n schema: EntityPickerSchema,\n }),\n);\n\n/**\n * The field extension for selecting a name for a new Entity in the Catalog.\n *\n * @public\n */\nexport const EntityNamePickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityNamePicker,\n name: 'EntityNamePicker',\n validation: entityNamePickerValidation,\n schema: EntityNamePickerSchema,\n }),\n);\n\n/**\n * A field extension for selecting multiple entities that exists in the Catalog.\n *\n * @public\n */\nexport const MultiEntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: MultiEntityPicker,\n name: 'MultiEntityPicker',\n schema: MultiEntityPickerSchema,\n validation: validateMultiEntityPickerValidation,\n }),\n);\n\n/**\n * The field extension which provides the ability to select a RepositoryUrl.\n * Currently, this is an encoded URL that looks something like the following `github.com?repo=myRepoName&owner=backstage`.\n *\n * @public\n */\nexport const RepoUrlPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: RepoUrlPicker,\n name: 'RepoUrlPicker',\n validation: repoPickerValidation,\n schema: RepoUrlPickerSchema,\n }),\n);\n\n/**\n * A field extension for picking users and groups out of the Catalog.\n *\n * @public\n */\nexport const OwnerPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: OwnerPicker,\n name: 'OwnerPicker',\n schema: OwnerPickerSchema,\n }),\n);\n\n/**\n * A field extension for picking groups a user belongs to out of the catalog.\n *\n * @public\n */\nexport const MyGroupsPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: MyGroupsPicker,\n name: 'MyGroupsPicker',\n schema: MyGroupsPickerSchema,\n }),\n);\n\n/**\n * The Router and main entrypoint to the Scaffolder plugin.\n *\n * @public\n */\nexport const ScaffolderPage = scaffolderPlugin.provide(\n createRoutableExtension({\n name: 'ScaffolderPage',\n component: () => import('./components/Router').then(m => m.Router),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * A field extension to show all the Entities that are owned by the current logged-in User for use in templates.\n *\n * @public\n */\nexport const OwnedEntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: OwnedEntityPicker,\n name: 'OwnedEntityPicker',\n schema: OwnedEntityPickerSchema,\n }),\n);\n\n/**\n * EntityTagsPickerFieldExtension\n * @public\n */\nexport const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityTagsPicker,\n name: 'EntityTagsPicker',\n schema: EntityTagsPickerSchema,\n }),\n);\n\n/**\n * A field extension to select a branch from a repository.\n *\n * @public\n */\nexport const RepoBranchPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: RepoBranchPicker,\n name: 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AAA,OAAA;AAAA,EAC7C,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,gBAAA;AAAA,IACN,SAAA,EAAW,MAAM,OAAO,kCAAqB,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,MAAM,CAAA;AAAA,IACjE,UAAY,EAAA;AAAA,GACb;AACH;AAOO,MAAM,kCAAkC,gBAAiB,CAAA,OAAA;AAAA,EAC9D,8BAA+B,CAAA;AAAA,IAC7B,SAAW,EAAA,iBAAA;AAAA,IACX,IAAM,EAAA,mBAAA;AAAA,IACN,MAAQ,EAAA;AAAA,GACT;AACH;AAMO,MAAM,iCAAiC,gBAAiB,CAAA,OAAA;AAAA,EAC7D,8BAA+B,CAAA;AAAA,IAC7B,SAAW,EAAA,gBAAA;AAAA,IACX,IAAM,EAAA,kBAAA;AAAA,IACN,MAAQ,EAAA;AAAA,GACT;AACH;AAOO,MAAM,iCAAiC,gBAAiB,CAAA,OAAA;AAAA,EAC7D,8BAA+B,CAAA;AAAA,IAC7B,SAAW,EAAA,gBAAA;AAAA,IACX,IAAM,EAAA,kBAAA;AAAA,IACN,MAAQ,EAAA;AAAA,GACT;AACH;;;;"}
@@ -59,6 +59,11 @@ const templateFormRouteRef = createSubRouteRef({
59
59
  parent: rootRouteRef,
60
60
  path: "/template-form"
61
61
  });
62
+ const templatingExtensionsRouteRef = createSubRouteRef({
63
+ id: "scaffolder/templating-extensions",
64
+ parent: rootRouteRef,
65
+ path: "/templating-extensions"
66
+ });
62
67
 
63
- export { actionsRouteRef, customFieldsRouteRef, editRouteRef, editorRouteRef, registerComponentRouteRef, rootRouteRef, scaffolderListTaskRouteRef, scaffolderTaskRouteRef, selectedTemplateRouteRef, templateFormRouteRef, viewTechDocRouteRef };
68
+ export { actionsRouteRef, customFieldsRouteRef, editRouteRef, editorRouteRef, registerComponentRouteRef, rootRouteRef, scaffolderListTaskRouteRef, scaffolderTaskRouteRef, selectedTemplateRouteRef, templateFormRouteRef, templatingExtensionsRouteRef, viewTechDocRouteRef };
64
69
  //# sourceMappingURL=routes.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2020 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 createExternalRouteRef,\n createRouteRef,\n createSubRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\n defaultTarget: 'catalog-import.importPage',\n});\n\nexport const viewTechDocRouteRef = createExternalRouteRef({\n id: 'view-techdoc',\n optional: true,\n params: ['namespace', 'kind', 'name'],\n defaultTarget: 'techdocs.docRoot',\n});\n\n/**\n * @public\n */\nexport const rootRouteRef = createRouteRef({\n id: 'scaffolder',\n});\n\n/**\n * @deprecated This is the old template route, can be deleted before next major release\n * @public\n */\nexport const legacySelectedTemplateRouteRef = createSubRouteRef({\n id: 'scaffolder/legacy/selected-template',\n parent: rootRouteRef,\n path: '/templates/:templateName',\n});\n\nexport const selectedTemplateRouteRef = createSubRouteRef({\n id: 'scaffolder/selected-template',\n parent: rootRouteRef,\n path: '/templates/:namespace/:templateName',\n});\n\nexport const scaffolderTaskRouteRef = createSubRouteRef({\n id: 'scaffolder/task',\n parent: rootRouteRef,\n path: '/tasks/:taskId',\n});\n\nexport const scaffolderListTaskRouteRef = createSubRouteRef({\n id: 'scaffolder/list-tasks',\n parent: rootRouteRef,\n path: '/tasks',\n});\n\nexport const actionsRouteRef = createSubRouteRef({\n id: 'scaffolder/actions',\n parent: rootRouteRef,\n path: '/actions',\n});\n\nexport const editRouteRef = createSubRouteRef({\n id: 'scaffolder/edit',\n parent: rootRouteRef,\n path: '/edit',\n});\n\nexport const editorRouteRef = createSubRouteRef({\n id: 'scaffolder/editor',\n parent: rootRouteRef,\n path: '/template',\n});\n\nexport const customFieldsRouteRef = createSubRouteRef({\n id: 'scaffolder/customFields',\n parent: rootRouteRef,\n path: '/custom-fields',\n});\n\nexport const templateFormRouteRef = createSubRouteRef({\n id: 'scaffolder/editorForm',\n parent: rootRouteRef,\n path: '/template-form',\n});\n"],"names":[],"mappings":";;AAqBO,MAAM,4BAA4B,sBAAuB,CAAA;AAAA,EAC9D,EAAI,EAAA,oBAAA;AAAA,EACJ,QAAU,EAAA,IAAA;AAAA,EACV,aAAe,EAAA;AACjB,CAAC;AAEM,MAAM,sBAAsB,sBAAuB,CAAA;AAAA,EACxD,EAAI,EAAA,cAAA;AAAA,EACJ,QAAU,EAAA,IAAA;AAAA,EACV,MAAQ,EAAA,CAAC,WAAa,EAAA,MAAA,EAAQ,MAAM,CAAA;AAAA,EACpC,aAAe,EAAA;AACjB,CAAC;AAKM,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;AAM6C,iBAAkB,CAAA;AAAA,EAC9D,EAAI,EAAA,qCAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,2BAA2B,iBAAkB,CAAA;AAAA,EACxD,EAAI,EAAA,8BAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,yBAAyB,iBAAkB,CAAA;AAAA,EACtD,EAAI,EAAA,iBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,6BAA6B,iBAAkB,CAAA;AAAA,EAC1D,EAAI,EAAA,uBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,kBAAkB,iBAAkB,CAAA;AAAA,EAC/C,EAAI,EAAA,oBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,eAAe,iBAAkB,CAAA;AAAA,EAC5C,EAAI,EAAA,iBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,iBAAiB,iBAAkB,CAAA;AAAA,EAC9C,EAAI,EAAA,mBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,uBAAuB,iBAAkB,CAAA;AAAA,EACpD,EAAI,EAAA,yBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,uBAAuB,iBAAkB,CAAA;AAAA,EACpD,EAAI,EAAA,uBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;;;;"}
1
+ {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2020 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 createExternalRouteRef,\n createRouteRef,\n createSubRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\n defaultTarget: 'catalog-import.importPage',\n});\n\nexport const viewTechDocRouteRef = createExternalRouteRef({\n id: 'view-techdoc',\n optional: true,\n params: ['namespace', 'kind', 'name'],\n defaultTarget: 'techdocs.docRoot',\n});\n\n/**\n * @public\n */\nexport const rootRouteRef = createRouteRef({\n id: 'scaffolder',\n});\n\n/**\n * @deprecated This is the old template route, can be deleted before next major release\n * @public\n */\nexport const legacySelectedTemplateRouteRef = createSubRouteRef({\n id: 'scaffolder/legacy/selected-template',\n parent: rootRouteRef,\n path: '/templates/:templateName',\n});\n\nexport const selectedTemplateRouteRef = createSubRouteRef({\n id: 'scaffolder/selected-template',\n parent: rootRouteRef,\n path: '/templates/:namespace/:templateName',\n});\n\nexport const scaffolderTaskRouteRef = createSubRouteRef({\n id: 'scaffolder/task',\n parent: rootRouteRef,\n path: '/tasks/:taskId',\n});\n\nexport const scaffolderListTaskRouteRef = createSubRouteRef({\n id: 'scaffolder/list-tasks',\n parent: rootRouteRef,\n path: '/tasks',\n});\n\nexport const actionsRouteRef = createSubRouteRef({\n id: 'scaffolder/actions',\n parent: rootRouteRef,\n path: '/actions',\n});\n\nexport const editRouteRef = createSubRouteRef({\n id: 'scaffolder/edit',\n parent: rootRouteRef,\n path: '/edit',\n});\n\nexport const editorRouteRef = createSubRouteRef({\n id: 'scaffolder/editor',\n parent: rootRouteRef,\n path: '/template',\n});\n\nexport const customFieldsRouteRef = createSubRouteRef({\n id: 'scaffolder/customFields',\n parent: rootRouteRef,\n path: '/custom-fields',\n});\n\nexport const templateFormRouteRef = createSubRouteRef({\n id: 'scaffolder/editorForm',\n parent: rootRouteRef,\n path: '/template-form',\n});\n\nexport const templatingExtensionsRouteRef = createSubRouteRef({\n id: 'scaffolder/templating-extensions',\n parent: rootRouteRef,\n path: '/templating-extensions',\n});\n"],"names":[],"mappings":";;AAqBO,MAAM,4BAA4B,sBAAuB,CAAA;AAAA,EAC9D,EAAI,EAAA,oBAAA;AAAA,EACJ,QAAU,EAAA,IAAA;AAAA,EACV,aAAe,EAAA;AACjB,CAAC;AAEM,MAAM,sBAAsB,sBAAuB,CAAA;AAAA,EACxD,EAAI,EAAA,cAAA;AAAA,EAC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EM,MAAM,uBAAuB,iBAAkB,CAAA;AAAA,EACpD,EAAI,EAAA,uBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,+BAA+B,iBAAkB,CAAA;AAAA,EAC5D,EAAI,EAAA,kCAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;;;;"}
@@ -172,6 +172,42 @@ const scaffolderTranslationRef = createTranslationRef({
172
172
  },
173
173
  undefined: "No schema defined"
174
174
  },
175
+ templatingExtensions: {
176
+ title: "Templating Extensions",
177
+ pageTitle: "Templating Extensions",
178
+ subtitle: "This is the collection of available templating extensions",
179
+ content: {
180
+ emptyState: {
181
+ title: "No information to display",
182
+ description: "There are no templating extensions available or there was an issue communicating with the backend."
183
+ },
184
+ searchFieldPlaceholder: "Search for an extension",
185
+ filters: {
186
+ title: "Filters",
187
+ notAvailable: "There are no template filters defined.",
188
+ metadataAbsent: "Filter metadata unavailable",
189
+ schema: {
190
+ input: "Input",
191
+ arguments: "Arguments",
192
+ output: "Output"
193
+ },
194
+ examples: "Examples"
195
+ },
196
+ functions: {
197
+ title: "Functions",
198
+ notAvailable: "There are no global template functions defined.",
199
+ schema: {
200
+ arguments: "Arguments",
201
+ output: "Output"
202
+ },
203
+ examples: "Examples"
204
+ },
205
+ values: {
206
+ title: "Values",
207
+ notAvailable: "There are no global template values defined."
208
+ }
209
+ }
210
+ },
175
211
  templateTypePicker: {
176
212
  title: "Categories"
177
213
  },
@@ -284,6 +320,7 @@ const scaffolderTranslationRef = createTranslationRef({
284
320
  templateEditorToolbar: {
285
321
  customFieldExplorerTooltip: "Custom Fields Explorer",
286
322
  installedActionsDocumentationTooltip: "Installed Actions Documentation",
323
+ templatingExtensionsDocumentationTooltip: "Templating Extensions Documentation",
287
324
  addToCatalogButton: "Publish",
288
325
  addToCatalogDialogTitle: "Publish changes",
289
326
  addToCatalogDialogContent: {
@@ -1 +1 @@
1
- {"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const scaffolderTranslationRef = createTranslationRef({\n id: 'scaffolder',\n messages: {\n actionsPage: {\n title: 'Installed actions',\n pageTitle: 'Create a New Component',\n subtitle: 'This is the collection of all installed actions',\n content: {\n emptyState: {\n title: 'No information to display',\n description:\n 'There are no actions installed or there was an issue communicating with backend.',\n },\n searchFieldPlaceholder: 'Search for an action',\n },\n action: {\n input: 'Input',\n output: 'Output',\n examples: 'Examples',\n },\n },\n fields: {\n entityNamePicker: {\n title: 'Name',\n description: 'Unique name of the component',\n },\n entityPicker: {\n title: 'Entity',\n description: 'An entity from the catalog',\n },\n entityTagsPicker: {\n title: 'Tags',\n description:\n \"Add any relevant tags, hit 'Enter' to add new tags. Valid format: [a-z0-9+#] separated by [-], at most 63 characters\",\n },\n myGroupsPicker: {\n title: 'Entity',\n description: 'An entity from the catalog',\n },\n ownedEntityPicker: {\n title: 'Entity',\n description: 'An entity from the catalog',\n },\n ownerPicker: {\n title: 'Owner',\n description: 'The owner of the component',\n },\n azureRepoPicker: {\n organization: {\n title: 'Organization',\n description: 'The Organization that this repo will belong to',\n },\n project: {\n title: 'Project',\n description: 'The Project that this repo will belong to',\n },\n },\n bitbucketRepoPicker: {\n workspaces: {\n title: 'Allowed Workspaces',\n inputTitle: 'Workspaces',\n description: 'The Workspace that this repo will belong to',\n },\n project: {\n title: 'Allowed Projects',\n inputTitle: 'Projects',\n description: 'The Project that this repo will belong to',\n },\n },\n gerritRepoPicker: {\n owner: {\n title: 'Owner',\n description: 'The owner of the project (optional)',\n },\n parent: {\n title: 'Parent',\n description: 'The project parent that the repo will belong to',\n },\n },\n giteaRepoPicker: {\n owner: {\n title: 'Owner Available',\n inputTitle: 'Owner',\n description:\n 'Gitea namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.',\n },\n },\n githubRepoPicker: {\n owner: {\n title: 'Owner Available',\n inputTitle: 'Owner',\n description:\n 'The organization, user or project that this repo will belong to',\n },\n },\n gitlabRepoPicker: {\n owner: {\n title: 'Owner Available',\n inputTitle: 'Owner',\n description:\n 'GitLab namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.',\n },\n },\n repoUrlPicker: {\n host: {\n title: 'Host',\n description: 'The host where the repository will be created',\n },\n repository: {\n title: 'Repositories Available',\n inputTitle: 'Repository',\n description: 'The name of the repository',\n },\n },\n },\n listTaskPage: {\n title: 'List template tasks',\n pageTitle: 'Templates Tasks',\n subtitle: 'All tasks that have been started',\n content: {\n emptyState: {\n title: 'No information to display',\n description:\n 'There are no tasks or there was an issue communicating with backend.',\n },\n tableTitle: 'Tasks',\n tableCell: {\n taskID: 'Task ID',\n template: 'Template',\n created: 'Created',\n owner: 'Owner',\n status: 'Status',\n },\n },\n },\n ownerListPicker: {\n title: 'Task Owner',\n options: {\n owned: 'Owned',\n all: 'All',\n },\n },\n ongoingTask: {\n title: 'Run of',\n pageTitle: {\n hasTemplateName: 'Run of {{templateName}}',\n noTemplateName: 'Scaffolder Run',\n },\n subtitle: 'Task {{taskId}}',\n cancelButtonTitle: 'Cancel',\n retryButtonTitle: 'Retry',\n startOverButtonTitle: 'Start Over',\n hideLogsButtonTitle: 'Hide Logs',\n showLogsButtonTitle: 'Show Logs',\n contextMenu: {\n hideLogs: 'Hide Logs',\n showLogs: 'Show Logs',\n hideButtonBar: 'Hide Button Bar',\n retry: 'Retry',\n showButtonBar: 'Show Button Bar',\n startOver: 'Start Over',\n cancel: 'Cancel',\n },\n },\n templateEditorForm: {\n stepper: {\n emptyText: 'There are no spec parameters in the template to preview.',\n },\n },\n renderSchema: {\n tableCell: {\n name: 'Name',\n title: 'Title',\n description: 'Description',\n type: 'Type',\n },\n undefined: 'No schema defined',\n },\n templateTypePicker: {\n title: 'Categories',\n },\n templateIntroPage: {\n title: 'Manage Templates',\n subtitle:\n 'Edit, preview, and try out templates, forms, and custom fields',\n },\n templateFormPage: {\n title: 'Template Editor',\n subtitle: 'Edit, preview, and try out templates forms',\n },\n templateCustomFieldPage: {\n title: 'Custom Field Explorer',\n subtitle: 'Edit, preview, and try out custom fields',\n },\n templateEditorPage: {\n title: 'Template Editor',\n subtitle: 'Edit, preview, and try out templates and template forms',\n dryRunResults: {\n title: 'Dry-run results',\n },\n dryRunResultsList: {\n title: 'Result {{resultId}}',\n downloadButtonTitle: 'Download as .zip',\n deleteButtonTitle: 'Delete result',\n },\n dryRunResultsView: {\n tab: {\n files: 'Files',\n log: 'Log',\n output: 'Output',\n },\n },\n taskStatusStepper: {\n skippedStepTitle: 'Skipped',\n },\n customFieldExplorer: {\n selectFieldLabel: 'Choose Custom Field Extension',\n fieldForm: {\n title: 'Field Options',\n applyButtonTitle: 'Apply',\n },\n fieldPreview: {\n title: 'Field Preview',\n },\n preview: {\n title: 'Template Spec',\n },\n },\n templateEditorBrowser: {\n closeConfirmMessage: 'Are you sure? Unsaved changes will be lost',\n saveIconTooltip: 'Save all files',\n reloadIconTooltip: 'Reload directory',\n closeIconTooltip: 'Close directory',\n },\n templateEditorIntro: {\n title: 'Get started by choosing one of the options below',\n loadLocal: {\n title: 'Load Template Directory',\n description:\n 'Load a local template directory, allowing you to both edit and try executing your own template.',\n unsupportedTooltip:\n 'Only supported in some Chromium-based browsers with the page loaded over HTTPS',\n },\n createLocal: {\n title: 'Create New Template',\n description:\n 'Create a local template directory, allowing you to both edit and try executing your own template.',\n unsupportedTooltip:\n 'Only supported in some Chromium-based browsers with the page loaded over HTTPS',\n },\n formEditor: {\n title: 'Template Form Playground',\n description:\n 'Preview and edit a template form, either using a sample template or by loading a template from the catalog.',\n },\n fieldExplorer: {\n title: 'Custom Field Explorer',\n description:\n 'View and play around with available installed custom field extensions.',\n },\n },\n templateEditorTextArea: {\n saveIconTooltip: 'Save file',\n refreshIconTooltip: 'Reload file',\n emptyStateParagraph: 'Please select an action on the file menu.',\n },\n templateFormPreviewer: {\n title: 'Load Existing Template',\n },\n },\n templateListPage: {\n title: 'Create a new component',\n subtitle:\n 'Create new software components using standard templates in your organization',\n pageTitle: 'Create a new component',\n templateGroups: {\n defaultTitle: 'Templates',\n otherTitle: 'Other Templates',\n },\n contentHeader: {\n registerExistingButtonTitle: 'Register Existing Component',\n supportButtonTitle:\n 'Create new software components using standard templates. Different templates create different kinds of components (services, websites, documentation, ...).',\n },\n additionalLinksForEntity: {\n viewTechDocsTitle: 'View TechDocs',\n },\n },\n templateWizardPage: {\n title: 'Create a new component',\n subtitle:\n 'Create new software components using standard templates in your organization',\n pageTitle: 'Create a new component',\n pageContextMenu: {\n editConfigurationTitle: 'Edit Configuration',\n },\n },\n templateEditorToolbar: {\n customFieldExplorerTooltip: 'Custom Fields Explorer',\n installedActionsDocumentationTooltip: 'Installed Actions Documentation',\n addToCatalogButton: 'Publish',\n addToCatalogDialogTitle: 'Publish changes',\n addToCatalogDialogContent: {\n stepsIntroduction:\n 'Follow the instructions below to create or update a template:',\n stepsListItems:\n 'Save the template files in a local directory\\nCreate a pull request to a new or existing git repository\\nIf the template already exists, the changes will be reflected in the software catalog once the pull request gets merged\\nBut if you are creating a new template, follow the documentation linked below to register the new template repository in software catalog',\n },\n addToCatalogDialogActions: {\n documentationButton: 'Go to the documentation',\n documentationUrl:\n 'https://backstage.io/docs/features/software-templates/adding-templates/',\n },\n },\n templateEditorToolbarFileMenu: {\n button: 'File',\n options: {\n openDirectory: 'Open template directory',\n createDirectory: 'Create template directory',\n closeEditor: 'Close template editor',\n },\n },\n template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BAAoB,EAAA;AAAA,MAClB,KAAO,EAAA,wBAAA;AAAA,MACP,QACE,EAAA,8EAAA;AAAA,MACF,SAAW,EAAA,wBAAA;AAAA,MACX,eAAiB,EAAA;AAAA,QACf,sBAAwB,EAAA;AAAA;AAC1B,KACF;AAAA,IACA,qBAAuB,EAAA;AAAA,MACrB,0BAA4B,EAAA,wBAAA;AAAA,MAC5B,oCAAsC,EAAA,iCAAA;AAAA,MACtC,kBAAoB,EAAA,SAAA;AAAA,MACpB,uBAAyB,EAAA,iBAAA;AAAA,MACzB,yBAA2B,EAAA;AAAA,QACzB,iBACE,EAAA,+DAAA;AAAA,QACF,cACE,EAAA;AAAA,OACJ;AAAA,MACA,yBAA2B,EAAA;AAAA,QACzB,mBAAqB,EAAA,yBAAA;AAAA,QACrB,gBACE,EAAA;AAAA;AACJ,KACF;AAAA,IACA,6BAA+B,EAAA;AAAA,MAC7B,MAAQ,EAAA,MAAA;AAAA,MACR,OAAS,EAAA;AAAA,QACP,aAAe,EAAA,yBAAA;AAAA,QACf,eAAiB,EAAA,2BAAA;AAAA,QACjB,WAAa,EAAA;AAAA;AACf,KACF;AAAA,IACA,kCAAoC,EAAA;AAAA,MAClC,MAAQ,EAAA;AAAA;AACV;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const scaffolderTranslationRef = createTranslationRef({\n id: 'scaffolder',\n messages: {\n actionsPage: {\n title: 'Installed actions',\n pageTitle: 'Create a New Component',\n subtitle: 'This is the collection of all installed actions',\n content: {\n emptyState: {\n title: 'No information to display',\n description:\n 'There are no actions installed or there was an issue communicating with backend.',\n },\n searchFieldPlaceholder: 'Search for an action',\n },\n action: {\n input: 'Input',\n output: 'Output',\n examples: 'Examples',\n },\n },\n fields: {\n entityNamePicker: {\n title: 'Name',\n description: 'Unique name of the component',\n },\n entityPicker: {\n title: 'Entity',\n description: 'An entity from the catalog',\n },\n entityTagsPicker: {\n title: 'Tags',\n description:\n \"Add any relevant tags, hit 'Enter' to add new tags. Valid format: [a-z0-9+#] separated by [-], at most 63 characters\",\n },\n myGroupsPicker: {\n title: 'Entity',\n description: 'An entity from the catalog',\n },\n ownedEntityPicker: {\n title: 'Entity',\n description: 'An entity from the catalog',\n },\n ownerPicker: {\n title: 'Owner',\n description: 'The owner of the component',\n },\n azureRepoPicker: {\n organization: {\n title: 'Organization',\n description: 'The Organization that this repo will belong to',\n },\n project: {\n title: 'Project',\n description: 'The Project that this repo will belong to',\n },\n },\n bitbucketRepoPicker: {\n workspaces: {\n title: 'Allowed Workspaces',\n inputTitle: 'Workspaces',\n description: 'The Workspace that this repo will belong to',\n },\n project: {\n title: 'Allowed Projects',\n inputTitle: 'Projects',\n description: 'The Project that this repo will belong to',\n },\n },\n gerritRepoPicker: {\n owner: {\n title: 'Owner',\n description: 'The owner of the project (optional)',\n },\n parent: {\n title: 'Parent',\n description: 'The project parent that the repo will belong to',\n },\n },\n giteaRepoPicker: {\n owner: {\n title: 'Owner Available',\n inputTitle: 'Owner',\n description:\n 'Gitea namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.',\n },\n },\n githubRepoPicker: {\n owner: {\n title: 'Owner Available',\n inputTitle: 'Owner',\n description:\n 'The organization, user or project that this repo will belong to',\n },\n },\n gitlabRepoPicker: {\n owner: {\n title: 'Owner Available',\n inputTitle: 'Owner',\n description:\n 'GitLab namespace where this repository will belong to. It can be the name of organization, group, subgroup, user, or the project.',\n },\n },\n repoUrlPicker: {\n host: {\n title: 'Host',\n description: 'The host where the repository will be created',\n },\n repository: {\n title: 'Repositories Available',\n inputTitle: 'Repository',\n description: 'The name of the repository',\n },\n },\n },\n listTaskPage: {\n title: 'List template tasks',\n pageTitle: 'Templates Tasks',\n subtitle: 'All tasks that have been started',\n content: {\n emptyState: {\n title: 'No information to display',\n description:\n 'There are no tasks or there was an issue communicating with backend.',\n },\n tableTitle: 'Tasks',\n tableCell: {\n taskID: 'Task ID',\n template: 'Template',\n created: 'Created',\n owner: 'Owner',\n status: 'Status',\n },\n },\n },\n ownerListPicker: {\n title: 'Task Owner',\n options: {\n owned: 'Owned',\n all: 'All',\n },\n },\n ongoingTask: {\n title: 'Run of',\n pageTitle: {\n hasTemplateName: 'Run of {{templateName}}',\n noTemplateName: 'Scaffolder Run',\n },\n subtitle: 'Task {{taskId}}',\n cancelButtonTitle: 'Cancel',\n retryButtonTitle: 'Retry',\n startOverButtonTitle: 'Start Over',\n hideLogsButtonTitle: 'Hide Logs',\n showLogsButtonTitle: 'Show Logs',\n contextMenu: {\n hideLogs: 'Hide Logs',\n showLogs: 'Show Logs',\n hideButtonBar: 'Hide Button Bar',\n retry: 'Retry',\n showButtonBar: 'Show Button Bar',\n startOver: 'Start Over',\n cancel: 'Cancel',\n },\n },\n templateEditorForm: {\n stepper: {\n emptyText: 'There are no spec parameters in the template to preview.',\n },\n },\n renderSchema: {\n tableCell: {\n name: 'Name',\n title: 'Title',\n description: 'Description',\n type: 'Type',\n },\n undefined: 'No schema defined',\n },\n templatingExtensions: {\n title: 'Templating Extensions',\n pageTitle: 'Templating Extensions',\n subtitle: 'This is the collection of available templating extensions',\n content: {\n emptyState: {\n title: 'No information to display',\n description:\n 'There are no templating extensions available or there was an issue communicating with the backend.',\n },\n searchFieldPlaceholder: 'Search for an extension',\n filters: {\n title: 'Filters',\n notAvailable: 'There are no template filters defined.',\n metadataAbsent: 'Filter metadata unavailable',\n schema: {\n input: 'Input',\n arguments: 'Arguments',\n output: 'Output',\n },\n examples: 'Examples',\n },\n functions: {\n title: 'Functions',\n notAvailable: 'There are no global template functions defined.',\n schema: {\n arguments: 'Arguments',\n output: 'Output',\n },\n examples: 'Examples',\n },\n values: {\n title: 'Values',\n notAvailable: 'There are no global template values defined.',\n },\n },\n },\n templateTypePicker: {\n title: 'Categories',\n },\n templateIntroPage: {\n title: 'Manage Templates',\n subtitle:\n 'Edit, preview, and try out templates, forms, and custom fields',\n },\n templateFormPage: {\n title: 'Template Editor',\n subtitle: 'Edit, preview, and try out templates forms',\n },\n templateCustomFieldPage: {\n title: 'Custom Field Explorer',\n subtitle: 'Edit, preview, and try out custom fields',\n },\n templateEditorPage: {\n title: 'Template Editor',\n subtitle: 'Edit, preview, and try out templates and template forms',\n dryRunResults: {\n title: 'Dry-run results',\n },\n dryRunResultsList: {\n title: 'Result {{resultId}}',\n downloadButtonTitle: 'Download as .zip',\n deleteButtonTitle: 'Delete result',\n },\n dryRunResultsView: {\n tab: {\n files: 'Files',\n log: 'Log',\n output: 'Output',\n },\n },\n taskStatusStepper: {\n skippedStepTitle: 'Skipped',\n },\n customFieldExplorer: {\n selectFieldLabel: 'Choose Custom Field Extension',\n fieldForm: {\n title: 'Field Options',\n applyButtonTitle: 'Apply',\n },\n fieldPreview: {\n title: 'Field Preview',\n },\n preview: {\n title: 'Template Spec',\n },\n },\n templateEditorBrowser: {\n closeConfirmMessage: 'Are you sure? Unsaved changes will be lost',\n saveIconTooltip: 'Save all files',\n reloadIconTooltip: 'Reload directory',\n closeIconTooltip: 'Close directory',\n },\n templateEditorIntro: {\n title: 'Get started by choosing one of the options below',\n loadLocal: {\n title: 'Load Template Directory',\n description:\n 'Load a local template directory, allowing you to both edit and try executing your own template.',\n unsupportedTooltip:\n 'Only supported in some Chromium-based browsers with the page loaded over HTTPS',\n },\n createLocal: {\n title: 'Create New Template',\n description:\n 'Create a local template directory, allowing you to both edit and try executing your own template.',\n unsupportedTooltip:\n 'Only supported in some Chromium-based browsers with the page loaded over HTTPS',\n },\n formEditor: {\n title: 'Template Form Playground',\n description:\n 'Preview and edit a template form, either using a sample template or by loading a template from the catalog.',\n },\n fieldExplorer: {\n title: 'Custom Field Explorer',\n description:\n 'View and play around with available installed custom field extensions.',\n },\n },\n templateEditorTextArea: {\n saveIconTooltip: 'Save file',\n refreshIconTooltip: 'Reload file',\n emptyStateParagraph: 'Please select an action on the file menu.',\n },\n templateFormPreviewer: {\n title: 'Load Existing Template',\n },\n },\n templateListPage: {\n title: 'Create a new component',\n subtitle:\n 'Create new software components using standard templates in your organization',\n pageTitle: 'Create a new component',\n templateGroups: {\n defaultTitle: 'Templates',\n otherTitle: 'Other Templates',\n },\n contentHeader: {\n registerExistingButtonTitle: 'Register Existing Component',\n supportButtonTitle:\n 'Create new software components using standard templates. Different templates create different kinds of components (services, websites, documentation, ...).',\n },\n additionalLinksForEntity: {\n viewTechDocsTitle: 'View TechDocs',\n },\n },\n templateWizardPage: {\n title: 'Create a new component',\n subtitle:\n 'Create new software components using standard templates in your organization',\n pageTitle: 'Create a new component',\n pageContextMenu: {\n editConfigurationTitle: 'Edit Configuration',\n },\n },\n templateEditorToolbar: {\n customFieldExplorerTooltip: 'Custom Fields Explorer',\n installedActionsDocumentationTooltip: 'Installed Actions Documentation',\n templatingExtensionsDocumentationTooltip:\n 'Templating Extensions Documentation',\n addToCatalogButton: 'Publish',\n addToCatalogDialogTitle: 'Publish changes',\n addToCatalogDialogContent: {\n stepsIntroduction:\n 'Follow the instructions below to create or update a template:',\n stepsListItems:\n 'Save the template files in a local directory\\nCreate a pull request to a new or existing git repository\\nIf the template already exists, the changes will be reflected in the software catalog once the pull request gets merged\\nBut if you are creating a new template, follow the documentation linked below to register the new template repository in software catalog',\n },\n addToCatalogDialogActions: {\n documentationButton: 'Go to the documentation',\n documentationUrl:\n 'https://backstage.io/docs/features/software-templates/adding-templates/',\n },\n },\n templateEditorToolbarFileMenu: {\n button: 'File',\n options: {\n openDirectory: 'Open template directory',\n createDirectory: 'Create template directory',\n closeEditor: 'Close template editor',\n },\n },\n templateEditorToolbarTemplatesMenu: {\n button: 'Templates',\n },\n },\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,2BAA2B,oBAAqB,CAAA;AAAA,EAC3D,EAAI,EAAA,YAAA;AAAA,EACJ,QAAU,EAAA;AAAA,IACR,WAAa,EAAA;AAAA,MACX,KAAO,EAAA,mBAAA;AAAA,MACP,SAAW,EAAA,wBAAA;AAAA,MACX,QAAU,EAAA,iDAAA;AAAA,MACV,OAAS,EAAA;AAAA,QACP,UAAY,EAAA;AAAA,UACV,KAAO,EAAA,2BAAA;AAAA,UACP,WACE,EAAA;AAAA,SACJ;AAAA,QACA,sBAAwB,EAAA;AAAA,OAC1B;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,KAAO,EAAA,OAAA;AAAA,QACP,MAAQ,EAAA,QAAA;AAAA,QACR,QAAU,EAAA;AAAA;AACZ,KACF;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,gBAAkB,EAAA;AAAA,QAChB,KAAO,EAAA,MAAA;AAAA,QACP,WAAa,EAAA;AAAA,OACf;AAAA,MACA,YAAc,EAAA;AAAA,QACZ,KAAO,EAAA,QAAA;AAAA,QACP,WAAa,EAAA;AAAA,OACf;AAAA,MACA,gBAAkB,EAAA;AAAA,QAChB,KAAO,EAAA,MAAA;AAAA,QACP,WACE,EAAA;AAAA,OACJ;AAAA,MACA,cAAgB,EAAA;AAAA,QACd,KAAO,EAAA,QAAA;AAAA,QACP,WAAa,EAAA;AAAA,OACf;AAAA,MACA,iBAAmB,EAAA;AAAA,QACjB,KAAO,EAAA,QAAA;AAAA,QACP,WAAa,EAAA;AAAA,OACf;AAAA,MACA,WAAa,EAAA;AAAA,QACX,KAAO,EAAA,OAAA;AAAA,QACP,WAAa,EAAA;AAAA,OACf;AAAA,MACA,eAAiB,EAAA;AAAA,QACf,YAAc,EAAA;AAAA,UACZ,KAAO,EAAA,cAAA;AAAA,UACP,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EAAA,iBAAA;AAAA,MACzB,yBAA2B,EAAA;AAAA,QACzB,iBACE,EAAA,+DAAA;AAAA,QACF,cACE,EAAA;AAAA,OACJ;AAAA,MACA,yBAA2B,EAAA;AAAA,QACzB,mBAAqB,EAAA,yBAAA;AAAA,QACrB,gBACE,EAAA;AAAA;AACJ,KACF;AAAA,IACA,6BAA+B,EAAA;AAAA,MAC7B,MAAQ,EAAA,MAAA;AAAA,MACR,OAAS,EAAA;AAAA,QACP,aAAe,EAAA,yBAAA;AAAA,QACf,eAAiB,EAAA,2BAAA;AAAA,QACjB,WAAa,EAAA;AAAA;AACf,KACF;AAAA,IACA,kCAAoC,EAAA;AAAA,MAClC,MAAQ,EAAA;AAAA;AACV;AAEJ,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder",
3
- "version": "1.30.1",
3
+ "version": "1.31.0-next.1",
4
4
  "description": "The Backstage plugin that helps you create new things",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -70,21 +70,21 @@
70
70
  "test": "backstage-cli package test"
71
71
  },
72
72
  "dependencies": {
73
- "@backstage/catalog-client": "^1.9.1",
74
- "@backstage/catalog-model": "^1.7.3",
75
- "@backstage/core-compat-api": "^0.4.1",
76
- "@backstage/core-components": "^0.17.1",
77
- "@backstage/core-plugin-api": "^1.10.6",
78
- "@backstage/errors": "^1.2.7",
79
- "@backstage/frontend-plugin-api": "^0.10.1",
80
- "@backstage/integration": "^1.16.3",
81
- "@backstage/integration-react": "^1.2.6",
82
- "@backstage/plugin-catalog-common": "^1.1.3",
83
- "@backstage/plugin-catalog-react": "^1.17.0",
84
- "@backstage/plugin-permission-react": "^0.4.33",
85
- "@backstage/plugin-scaffolder-common": "^1.5.10",
86
- "@backstage/plugin-scaffolder-react": "^1.15.1",
87
- "@backstage/types": "^1.2.1",
73
+ "@backstage/catalog-client": "1.10.0-next.0",
74
+ "@backstage/catalog-model": "1.7.3",
75
+ "@backstage/core-compat-api": "0.4.2-next.1",
76
+ "@backstage/core-components": "0.17.2-next.0",
77
+ "@backstage/core-plugin-api": "1.10.6",
78
+ "@backstage/errors": "1.2.7",
79
+ "@backstage/frontend-plugin-api": "0.10.2-next.0",
80
+ "@backstage/integration": "1.16.4-next.1",
81
+ "@backstage/integration-react": "1.2.7-next.1",
82
+ "@backstage/plugin-catalog-common": "1.1.4-next.0",
83
+ "@backstage/plugin-catalog-react": "1.18.0-next.1",
84
+ "@backstage/plugin-permission-react": "0.4.34-next.0",
85
+ "@backstage/plugin-scaffolder-common": "1.5.11-next.0",
86
+ "@backstage/plugin-scaffolder-react": "1.16.0-next.1",
87
+ "@backstage/types": "1.2.1",
88
88
  "@codemirror/language": "^6.0.0",
89
89
  "@codemirror/legacy-modes": "^6.1.0",
90
90
  "@codemirror/view": "^6.0.0",
@@ -117,12 +117,12 @@
117
117
  "zod-to-json-schema": "^3.20.4"
118
118
  },
119
119
  "devDependencies": {
120
- "@backstage/cli": "^0.32.0",
121
- "@backstage/core-app-api": "^1.16.1",
122
- "@backstage/dev-utils": "^1.1.9",
123
- "@backstage/plugin-catalog": "^1.29.0",
124
- "@backstage/plugin-permission-common": "^0.8.4",
125
- "@backstage/test-utils": "^1.7.7",
120
+ "@backstage/cli": "0.32.1-next.1",
121
+ "@backstage/core-app-api": "1.16.1",
122
+ "@backstage/dev-utils": "1.1.10-next.1",
123
+ "@backstage/plugin-catalog": "1.29.1-next.1",
124
+ "@backstage/plugin-permission-common": "0.9.0-next.0",
125
+ "@backstage/test-utils": "1.7.8-next.0",
126
126
  "@testing-library/dom": "^10.0.0",
127
127
  "@testing-library/jest-dom": "^6.0.0",
128
128
  "@testing-library/react": "^16.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomFieldPlaygroud.esm.js","sources":["../../../../src/alpha/components/TemplateEditorPage/CustomFieldPlaygroud.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 { useCallback, useMemo, useState } from 'react';\nimport yaml from 'yaml';\nimport validator from '@rjsf/validator-ajv8';\nimport CodeMirror from '@uiw/react-codemirror';\nimport { StreamLanguage } from '@codemirror/language';\nimport { yaml as yamlSupport } from '@codemirror/legacy-modes/mode/yaml';\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport Accordion from '@material-ui/core/Accordion';\nimport AccordionSummary from '@material-ui/core/AccordionSummary';\nimport AccordionDetails from '@material-ui/core/AccordionDetails';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport TextField from '@material-ui/core/TextField';\nimport Button from '@material-ui/core/Button';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport Typography from '@material-ui/core/Typography';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport SearchIcon from '@material-ui/icons/Search';\n\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { Form } from '@backstage/plugin-scaffolder-react/alpha';\nimport { FieldExtensionOptions } from '@backstage/plugin-scaffolder-react';\n\nimport { scaffolderTranslationRef } from '../../../translation';\nimport { TemplateEditorForm } from './TemplateEditorForm';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n gridArea: 'pageContent',\n display: 'grid',\n gridTemplateRows: 'auto 1fr',\n },\n controls: {\n marginBottom: theme.spacing(3),\n },\n code: {\n width: '100%',\n },\n }),\n { name: 'ScaffolderCustomFieldExtensionsPlaygroud' },\n);\n\nexport const CustomFieldPlaygroud = ({\n fieldExtensions = [],\n}: {\n fieldExtensions?: FieldExtensionOptions<any, any>[];\n}) => {\n const classes = useStyles();\n const { t } = useTranslationRef(scaffolderTranslationRef);\n const fieldOptions = fieldExtensions.filter(field => !!field.schema);\n const [refreshKey, setRefreshKey] = useState(Date.now());\n const [fieldFormState, setFieldFormState] = useState({});\n const [selectedField, setSelectedField] = useState(fieldOptions[0]);\n const sampleFieldTemplate = useMemo(\n () =>\n yaml.stringify({\n parameters: [\n {\n title: `${selectedField.name} Example`,\n properties: {\n [selectedField.name]: {\n type: selectedField.schema?.returnValue?.type,\n 'ui:field': selectedField.name,\n 'ui:options': fieldFormState,\n },\n },\n },\n ],\n }),\n [fieldFormState, selectedField],\n );\n\n const fieldComponents = useMemo(() => {\n return Object.fromEntries(\n fieldExtensions.map(({ name, component }) => [name, component]),\n );\n }, [fieldExtensions]);\n\n const handleSelectionChange = useCallback(\n (selection: FieldExtensionOptions) => {\n setSelectedField(selection);\n setFieldFormState({});\n },\n [setFieldFormState, setSelectedField],\n );\n\n const handleFieldConfigChange = useCallback(\n (state: {}) => {\n setFieldFormState(state);\n // Force TemplateEditorForm to re-render since some fields\n // may not be responsive to ui:option changes\n setRefreshKey(Date.now());\n },\n [setFieldFormState, setRefreshKey],\n );\n\n return (\n <main className={classes.root}>\n <div className={classes.controls}>\n <Autocomplete\n id=\"custom-fields-autocomplete\"\n value={selectedField}\n options={fieldOptions}\n getOptionLabel={option => option.name}\n renderInput={params => (\n <TextField\n {...params}\n aria-label={t(\n 'templateEditorPage.customFieldExplorer.selectFieldLabel',\n )}\n placeholder={t(\n 'templateEditorPage.customFieldExplorer.selectFieldLabel',\n )}\n variant=\"outlined\"\n InputProps={{\n ...params.InputProps,\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon />\n </InputAdornment>\n ),\n }}\n />\n )}\n onChange={(_event, option) => {\n if (option) {\n handleSelectionChange(option);\n }\n }}\n disableClearable\n fullWidth\n />\n </div>\n <div>\n <Accordion defaultExpanded>\n <AccordionSummary\n expandIcon={<ExpandMoreIcon />}\n aria-controls=\"panel-code-content\"\n id=\"panel-code-header\"\n >\n <Typography variant=\"h6\">\n {t('templateEditorPage.customFieldExplorer.preview.title')}\n </Typography>\n </AccordionSummary>\n <AccordionDetails>\n <div className={classes.code}>\n <CodeMirror\n readOnly\n theme=\"dark\"\n height=\"100%\"\n width=\"100%\"\n extensions={[StreamLanguage.define(yamlSupport)]}\n value={sampleFieldTemplate}\n />\n </div>\n </AccordionDetails>\n </Accordion>\n <Accordion defaultExpanded>\n <AccordionSummary\n expandIcon={<ExpandMoreIcon />}\n aria-controls=\"panel-preview-content\"\n id=\"panel-preview-header\"\n >\n <Typography variant=\"h6\">\n {t('templateEditorPage.customFieldExplorer.fieldPreview.title')}\n </Typography>\n </AccordionSummary>\n <AccordionDetails>\n <TemplateEditorForm\n key={refreshKey}\n content={sampleFieldTemplate}\n contentIsSpec\n fieldExtensions={fieldExtensions}\n setErrorText={() => null}\n />\n </AccordionDetails>\n </Accordion>\n <Accordion defaultExpanded>\n <AccordionSummary\n expandIcon={<ExpandMoreIcon />}\n aria-controls=\"panel-options-content\"\n id=\"panel-options-header\"\n >\n <Typography variant=\"h6\">\n {t('templateEditorPage.customFieldExplorer.fieldForm.title')}\n </Typography>\n </AccordionSummary>\n <AccordionDetails>\n <Form\n showErrorList={false}\n fields={{ ...fieldComponents }}\n noHtml5Validate\n formData={fieldFormState}\n formContext={{ fieldFormState }}\n onSubmit={e => handleFieldConfigChange(e.formData)}\n validator={validator}\n schema={selectedField.schema?.uiOptions || {}}\n experimental_defaultFormStateBehavior={{\n allOf: 'populateDefaults',\n }}\n >\n <Button\n variant=\"contained\"\n color=\"primary\"\n type=\"submit\"\n disabled={!selectedField.schema?.uiOptions}\n >\n {t(\n 'templateEditorPage.customFieldExplorer.fieldForm.applyButtonTitle',\n )}\n </Button>\n </Form>\n </AccordionDetails>\n </Accordion>\n </div>\n </main>\n );\n};\n"],"names":["yamlSupport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;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