@backstage/plugin-scaffolder-react 1.15.0-next.2 → 1.15.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,38 @@
1
1
  # @backstage/plugin-scaffolder-react
2
2
 
3
+ ## 1.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 40de23c: Fixing a bug where the name for `templatingExtensions` was incorrectly set to `templateExtensions`
8
+
9
+ ## 1.15.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 5890016: add api to retrieve template extensions info from scaffolder-backend
14
+
15
+ ### Patch Changes
16
+
17
+ - a47fd39: Removes instances of default React imports, a necessary update for the upcoming React 19 migration.
18
+
19
+ <https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html>
20
+
21
+ - 6ed42b7: Scaffolding - Template card - button to show template entity detail
22
+ - 7ae9996: Fixes the detail icon in light theme to be visible in proper color (same as favorite star).
23
+ - Updated dependencies
24
+ - @backstage/plugin-catalog-react@1.17.0
25
+ - @backstage/frontend-plugin-api@0.10.1
26
+ - @backstage/core-components@0.17.1
27
+ - @backstage/core-plugin-api@1.10.6
28
+ - @backstage/plugin-permission-react@0.4.33
29
+ - @backstage/theme@0.6.5
30
+ - @backstage/catalog-client@1.9.1
31
+ - @backstage/catalog-model@1.7.3
32
+ - @backstage/types@1.2.1
33
+ - @backstage/version-bridge@1.0.11
34
+ - @backstage/plugin-scaffolder-common@1.5.10
35
+
3
36
  ## 1.15.0-next.2
4
37
 
5
38
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -472,7 +472,7 @@ type TemplateGlobalValue = {
472
472
  *
473
473
  * @public
474
474
  */
475
- type ListTemplateExtensionsResponse = {
475
+ type ListTemplatingExtensionsResponse = {
476
476
  filters: Record<string, TemplateFilter>;
477
477
  globals: {
478
478
  functions: Record<string, TemplateGlobalFunction>;
@@ -628,7 +628,7 @@ interface ScaffolderApi {
628
628
  /**
629
629
  * Returns a structure describing the available templating extensions.
630
630
  */
631
- listTemplateExtensions?(): Promise<ListTemplateExtensionsResponse>;
631
+ listTemplatingExtensions?(): Promise<ListTemplatingExtensionsResponse>;
632
632
  streamLogs(options: ScaffolderStreamLogsOptions): Observable<LogEvent>;
633
633
  dryRun?(options: ScaffolderDryRunOptions): Promise<ScaffolderDryRunResponse>;
634
634
  autocomplete?(options: {
@@ -749,4 +749,4 @@ interface FieldSchema<TReturn, TUiOptions> {
749
749
  readonly TOutput: TReturn;
750
750
  }
751
751
 
752
- export { type Action, type ActionExample, type CustomFieldExtensionSchema, type CustomFieldValidator, type FieldExtensionComponent, type FieldExtensionComponentProps, type FieldExtensionOptions, type FieldExtensionUiSchema, type FieldSchema, type FormProps, type LayoutComponent, type LayoutOptions, type LayoutTemplate, type ListActionsResponse, type ListTemplateExtensionsResponse, type LogEvent, type ReviewStepProps, type ScaffolderApi, type ScaffolderDryRunOptions, type ScaffolderDryRunResponse, ScaffolderFieldExtensions, type ScaffolderGetIntegrationsListOptions, type ScaffolderGetIntegrationsListResponse, ScaffolderLayouts, type ScaffolderOutputLink, type ScaffolderOutputText, type ScaffolderRJSFField, type ScaffolderRJSFFieldProps, type ScaffolderRJSFFormProps, type ScaffolderRJSFRegistryFieldsType, type ScaffolderScaffoldOptions, type ScaffolderScaffoldResponse, type ScaffolderStep, type ScaffolderStreamLogsOptions, type ScaffolderTask, type ScaffolderTaskOutput, type ScaffolderTaskStatus, type ScaffolderUsageExample, type ScaffolderUseTemplateSecrets, SecretsContextProvider, type TaskStream, type TemplateFilter, type TemplateGlobalFunction, type TemplateGlobalValue, type TemplateGroupFilter, type TemplateParameterSchema, createScaffolderFieldExtension, createScaffolderLayout, makeFieldSchema, scaffolderApiRef, useCustomFieldExtensions, useCustomLayouts, useTaskEventStream, useTemplateSecrets };
752
+ export { type Action, type ActionExample, type CustomFieldExtensionSchema, type CustomFieldValidator, type FieldExtensionComponent, type FieldExtensionComponentProps, type FieldExtensionOptions, type FieldExtensionUiSchema, type FieldSchema, type FormProps, type LayoutComponent, type LayoutOptions, type LayoutTemplate, type ListActionsResponse, type ListTemplatingExtensionsResponse, type LogEvent, type ReviewStepProps, type ScaffolderApi, type ScaffolderDryRunOptions, type ScaffolderDryRunResponse, ScaffolderFieldExtensions, type ScaffolderGetIntegrationsListOptions, type ScaffolderGetIntegrationsListResponse, ScaffolderLayouts, type ScaffolderOutputLink, type ScaffolderOutputText, type ScaffolderRJSFField, type ScaffolderRJSFFieldProps, type ScaffolderRJSFFormProps, type ScaffolderRJSFRegistryFieldsType, type ScaffolderScaffoldOptions, type ScaffolderScaffoldResponse, type ScaffolderStep, type ScaffolderStreamLogsOptions, type ScaffolderTask, type ScaffolderTaskOutput, type ScaffolderTaskStatus, type ScaffolderUsageExample, type ScaffolderUseTemplateSecrets, SecretsContextProvider, type TaskStream, type TemplateFilter, type TemplateGlobalFunction, type TemplateGlobalValue, type TemplateGroupFilter, type TemplateParameterSchema, createScaffolderFieldExtension, createScaffolderLayout, makeFieldSchema, scaffolderApiRef, useCustomFieldExtensions, useCustomLayouts, useTaskEventStream, useTemplateSecrets };
@@ -12,6 +12,9 @@ const useStyles = makeStyles(() => ({
12
12
  subtitleWrapper: {
13
13
  display: "flex",
14
14
  justifyContent: "space-between"
15
+ },
16
+ detailIcon: {
17
+ color: ({ cardFontColor }) => cardFontColor
15
18
  }
16
19
  }));
17
20
  const CardHeader = (props) => {
@@ -30,7 +33,13 @@ const CardHeader = (props) => {
30
33
  const SubtitleComponent = /* @__PURE__ */ jsxs("div", { className: styles.subtitleWrapper, children: [
31
34
  /* @__PURE__ */ jsx("div", { children: type }),
32
35
  /* @__PURE__ */ jsxs("div", { children: [
33
- /* @__PURE__ */ jsx(TemplateDetailButton, { template: props.template }),
36
+ /* @__PURE__ */ jsx(
37
+ TemplateDetailButton,
38
+ {
39
+ className: styles.detailIcon,
40
+ template: props.template
41
+ }
42
+ ),
34
43
  /* @__PURE__ */ jsx(
35
44
  FavoriteEntity,
36
45
  {
@@ -1 +1 @@
1
- {"version":3,"file":"CardHeader.esm.js","sources":["../../../../src/next/components/TemplateCard/CardHeader.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 { makeStyles, Theme, useTheme } from '@material-ui/core/styles';\nimport { ItemCardHeader } from '@backstage/core-components';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { FavoriteEntity } from '@backstage/plugin-catalog-react';\nimport { TemplateDetailButton } from './TemplateDetailButton.tsx';\n\nconst useStyles = makeStyles<\n Theme,\n {\n cardFontColor: string;\n cardBackgroundImage: string;\n }\n>(() => ({\n header: {\n backgroundImage: ({ cardBackgroundImage }) => cardBackgroundImage,\n color: ({ cardFontColor }) => cardFontColor,\n },\n subtitleWrapper: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n}));\n\n/**\n * Props for the CardHeader component\n */\nexport interface CardHeaderProps {\n template: TemplateEntityV1beta3;\n}\n\n/**\n * The Card Header with the background for the TemplateCard.\n */\nexport const CardHeader = (props: CardHeaderProps) => {\n const {\n template: {\n metadata: { title, name },\n spec: { type },\n },\n } = props;\n const { getPageTheme } = useTheme();\n const themeForType = getPageTheme({ themeId: type });\n\n const styles = useStyles({\n cardFontColor: themeForType.fontColor,\n cardBackgroundImage: themeForType.backgroundImage,\n });\n\n const SubtitleComponent = (\n <div className={styles.subtitleWrapper}>\n <div>{type}</div>\n <div>\n <TemplateDetailButton template={props.template} />\n <FavoriteEntity\n entity={props.template}\n style={{ padding: 0, marginLeft: 6 }}\n />\n </div>\n </div>\n );\n\n return (\n <ItemCardHeader\n title={title ?? name}\n subtitle={SubtitleComponent}\n classes={{ root: styles.header }}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAsBA,MAAM,SAAA,GAAY,WAMhB,OAAO;AAAA,EACP,MAAQ,EAAA;AAAA,IACN,eAAiB,EAAA,CAAC,EAAE,mBAAA,EAA0B,KAAA,mBAAA;AAAA,IAC9C,KAAO,EAAA,CAAC,EAAE,aAAA,EAAoB,KAAA;AAAA,GAChC;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,OAAS,EAAA,MAAA;AAAA,IACT,cAAgB,EAAA;AAAA;AAEpB,CAAE,CAAA,CAAA;AAYW,MAAA,UAAA,GAAa,CAAC,KAA2B,KAAA;AACpD,EAAM,MAAA;AAAA,IACJ,QAAU,EAAA;AAAA,MACR,QAAA,EAAU,EAAE,KAAA,EAAO,IAAK,EAAA;AAAA,MACxB,IAAA,EAAM,EAAE,IAAK;AAAA;AACf,GACE,GAAA,KAAA;AACJ,EAAM,MAAA,EAAE,YAAa,EAAA,GAAI,QAAS,EAAA;AAClC,EAAA,MAAM,YAAe,GAAA,YAAA,CAAa,EAAE,OAAA,EAAS,MAAM,CAAA;AAEnD,EAAA,MAAM,SAAS,SAAU,CAAA;AAAA,IACvB,eAAe,YAAa,CAAA,SAAA;AAAA,IAC5B,qBAAqB,YAAa,CAAA;AAAA,GACnC,CAAA;AAED,EAAA,MAAM,iBACJ,mBAAA,IAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,OAAO,eACrB,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,SAAK,QAAK,EAAA,IAAA,EAAA,CAAA;AAAA,yBACV,KACC,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAC,GAAA,CAAA,oBAAA,EAAA,EAAqB,QAAU,EAAA,KAAA,CAAM,QAAU,EAAA,CAAA;AAAA,sBAChD,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UACC,QAAQ,KAAM,CAAA,QAAA;AAAA,UACd,KAAO,EAAA,EAAE,OAAS,EAAA,CAAA,EAAG,YAAY,CAAE;AAAA;AAAA;AACrC,KACF,EAAA;AAAA,GACF,EAAA,CAAA;AAGF,EACE,uBAAA,GAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,OAAO,KAAS,IAAA,IAAA;AAAA,MAChB,QAAU,EAAA,iBAAA;AAAA,MACV,OAAS,EAAA,EAAE,IAAM,EAAA,MAAA,CAAO,MAAO;AAAA;AAAA,GACjC;AAEJ;;;;"}
1
+ {"version":3,"file":"CardHeader.esm.js","sources":["../../../../src/next/components/TemplateCard/CardHeader.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 { makeStyles, Theme, useTheme } from '@material-ui/core/styles';\nimport { ItemCardHeader } from '@backstage/core-components';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { FavoriteEntity } from '@backstage/plugin-catalog-react';\nimport { TemplateDetailButton } from './TemplateDetailButton.tsx';\n\nconst useStyles = makeStyles<\n Theme,\n {\n cardFontColor: string;\n cardBackgroundImage: string;\n }\n>(() => ({\n header: {\n backgroundImage: ({ cardBackgroundImage }) => cardBackgroundImage,\n color: ({ cardFontColor }) => cardFontColor,\n },\n subtitleWrapper: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n detailIcon: {\n color: ({ cardFontColor }) => cardFontColor,\n },\n}));\n\n/**\n * Props for the CardHeader component\n */\nexport interface CardHeaderProps {\n template: TemplateEntityV1beta3;\n}\n\n/**\n * The Card Header with the background for the TemplateCard.\n */\nexport const CardHeader = (props: CardHeaderProps) => {\n const {\n template: {\n metadata: { title, name },\n spec: { type },\n },\n } = props;\n const { getPageTheme } = useTheme();\n const themeForType = getPageTheme({ themeId: type });\n\n const styles = useStyles({\n cardFontColor: themeForType.fontColor,\n cardBackgroundImage: themeForType.backgroundImage,\n });\n\n const SubtitleComponent = (\n <div className={styles.subtitleWrapper}>\n <div>{type}</div>\n <div>\n <TemplateDetailButton\n className={styles.detailIcon}\n template={props.template}\n />\n <FavoriteEntity\n entity={props.template}\n style={{ padding: 0, marginLeft: 6 }}\n />\n </div>\n </div>\n );\n\n return (\n <ItemCardHeader\n title={title ?? name}\n subtitle={SubtitleComponent}\n classes={{ root: styles.header }}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAsBA,MAAM,SAAA,GAAY,WAMhB,OAAO;AAAA,EACP,MAAQ,EAAA;AAAA,IACN,eAAiB,EAAA,CAAC,EAAE,mBAAA,EAA0B,KAAA,mBAAA;AAAA,IAC9C,KAAO,EAAA,CAAC,EAAE,aAAA,EAAoB,KAAA;AAAA,GAChC;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,OAAS,EAAA,MAAA;AAAA,IACT,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,UAAY,EAAA;AAAA,IACV,KAAO,EAAA,CAAC,EAAE,aAAA,EAAoB,KAAA;AAAA;AAElC,CAAE,CAAA,CAAA;AAYW,MAAA,UAAA,GAAa,CAAC,KAA2B,KAAA;AACpD,EAAM,MAAA;AAAA,IACJ,QAAU,EAAA;AAAA,MACR,QAAA,EAAU,EAAE,KAAA,EAAO,IAAK,EAAA;AAAA,MACxB,IAAA,EAAM,EAAE,IAAK;AAAA;AACf,GACE,GAAA,KAAA;AACJ,EAAM,MAAA,EAAE,YAAa,EAAA,GAAI,QAAS,EAAA;AAClC,EAAA,MAAM,YAAe,GAAA,YAAA,CAAa,EAAE,OAAA,EAAS,MAAM,CAAA;AAEnD,EAAA,MAAM,SAAS,SAAU,CAAA;AAAA,IACvB,eAAe,YAAa,CAAA,SAAA;AAAA,IAC5B,qBAAqB,YAAa,CAAA;AAAA,GACnC,CAAA;AAED,EAAA,MAAM,iBACJ,mBAAA,IAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,OAAO,eACrB,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,SAAK,QAAK,EAAA,IAAA,EAAA,CAAA;AAAA,yBACV,KACC,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,oBAAA;AAAA,QAAA;AAAA,UACC,WAAW,MAAO,CAAA,UAAA;AAAA,UAClB,UAAU,KAAM,CAAA;AAAA;AAAA,OAClB;AAAA,sBACA,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UACC,QAAQ,KAAM,CAAA,QAAA;AAAA,UACd,KAAO,EAAA,EAAE,OAAS,EAAA,CAAA,EAAG,YAAY,CAAE;AAAA;AAAA;AACrC,KACF,EAAA;AAAA,GACF,EAAA,CAAA;AAGF,EACE,uBAAA,GAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,OAAO,KAAS,IAAA,IAAA;AAAA,MAChB,QAAU,EAAA,iBAAA;AAAA,MACV,OAAS,EAAA,EAAE,IAAM,EAAA,MAAA,CAAO,MAAO;AAAA;AAAA,GACjC;AAEJ;;;;"}
@@ -11,7 +11,8 @@ import { scaffolderReactTranslationRef } from '../../../translation.esm.js';
11
11
  import { useTranslationRef } from '@backstage/frontend-plugin-api';
12
12
 
13
13
  const TemplateDetailButton = ({
14
- template
14
+ template,
15
+ className
15
16
  }) => {
16
17
  const catalogEntityRoute = useRouteRef(entityRouteRef);
17
18
  const { t } = useTranslationRef(scaffolderReactTranslationRef);
@@ -24,13 +25,12 @@ const TemplateDetailButton = ({
24
25
  "aria-label": t("cardHeader.detailBtnTitle"),
25
26
  id: `viewDetail-${entityRef}`,
26
27
  style: { padding: 0 },
27
- color: "inherit",
28
28
  children: /* @__PURE__ */ jsx(Typography, { component: "span", children: /* @__PURE__ */ jsx(
29
29
  Link,
30
30
  {
31
31
  to: catalogEntityRoute(entityRouteParams(template)),
32
32
  style: { display: "flex", alignItems: "center" },
33
- children: /* @__PURE__ */ jsx(TemplateIcon, {})
33
+ children: /* @__PURE__ */ jsx(TemplateIcon, { className })
34
34
  }
35
35
  ) })
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateDetailButton.esm.js","sources":["../../../../src/next/components/TemplateCard/TemplateDetailButton.tsx"],"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 Tooltip from '@material-ui/core/Tooltip';\nimport IconButton from '@material-ui/core/IconButton';\nimport Typography from '@material-ui/core/Typography';\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport { Link } from '@backstage/core-components';\nimport {\n entityRouteParams,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useApp, useRouteRef } from '@backstage/core-plugin-api';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { scaffolderReactTranslationRef } from '../../../translation';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\n\nexport interface TemplateDetailButtonProps {\n template: Entity;\n}\n\nexport const TemplateDetailButton = ({\n template,\n}: TemplateDetailButtonProps) => {\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const { t } = useTranslationRef(scaffolderReactTranslationRef);\n const entityRef = stringifyEntityRef(template);\n\n const app = useApp();\n const TemplateIcon = app.getSystemIcon('kind:template') || DescriptionIcon;\n\n return (\n <Tooltip id={`tooltip-${entityRef}`} title={t('cardHeader.detailBtnTitle')}>\n <IconButton\n aria-label={t('cardHeader.detailBtnTitle')}\n id={`viewDetail-${entityRef}`}\n style={{ padding: 0 }}\n color=\"inherit\"\n >\n <Typography component=\"span\">\n <Link\n to={catalogEntityRoute(entityRouteParams(template))}\n style={{ display: 'flex', alignItems: 'center' }}\n >\n <TemplateIcon />\n </Link>\n </Typography>\n </IconButton>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAiCO,MAAM,uBAAuB,CAAC;AAAA,EACnC;AACF,CAAiC,KAAA;AAC/B,EAAM,MAAA,kBAAA,GAAqB,YAAY,cAAc,CAAA;AACrD,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,6BAA6B,CAAA;AAC7D,EAAM,MAAA,SAAA,GAAY,mBAAmB,QAAQ,CAAA;AAE7C,EAAA,MAAM,MAAM,MAAO,EAAA;AACnB,EAAA,MAAM,YAAe,GAAA,GAAA,CAAI,aAAc,CAAA,eAAe,CAAK,IAAA,eAAA;AAE3D,EACE,uBAAA,GAAA,CAAC,WAAQ,EAAI,EAAA,CAAA,QAAA,EAAW,SAAS,CAAI,CAAA,EAAA,KAAA,EAAO,CAAE,CAAA,2BAA2B,CACvE,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAY,EAAE,2BAA2B,CAAA;AAAA,MACzC,EAAA,EAAI,cAAc,SAAS,CAAA,CAAA;AAAA,MAC3B,KAAA,EAAO,EAAE,OAAA,EAAS,CAAE,EAAA;AAAA,MACpB,KAAM,EAAA,SAAA;AAAA,MAEN,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,SAAA,EAAU,MACpB,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,EAAI,EAAA,kBAAA,CAAmB,iBAAkB,CAAA,QAAQ,CAAC,CAAA;AAAA,UAClD,KAAO,EAAA,EAAE,OAAS,EAAA,MAAA,EAAQ,YAAY,QAAS,EAAA;AAAA,UAE/C,8BAAC,YAAa,EAAA,EAAA;AAAA;AAAA,OAElB,EAAA;AAAA;AAAA,GAEJ,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"TemplateDetailButton.esm.js","sources":["../../../../src/next/components/TemplateCard/TemplateDetailButton.tsx"],"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 Tooltip from '@material-ui/core/Tooltip';\nimport IconButton from '@material-ui/core/IconButton';\nimport Typography from '@material-ui/core/Typography';\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport { Link } from '@backstage/core-components';\nimport {\n entityRouteParams,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useApp, useRouteRef } from '@backstage/core-plugin-api';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { scaffolderReactTranslationRef } from '../../../translation';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\n\nexport interface TemplateDetailButtonProps {\n template: Entity;\n className?: string;\n}\n\nexport const TemplateDetailButton = ({\n template,\n className,\n}: TemplateDetailButtonProps) => {\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const { t } = useTranslationRef(scaffolderReactTranslationRef);\n const entityRef = stringifyEntityRef(template);\n\n const app = useApp();\n const TemplateIcon = app.getSystemIcon('kind:template') || DescriptionIcon;\n\n return (\n <Tooltip id={`tooltip-${entityRef}`} title={t('cardHeader.detailBtnTitle')}>\n <IconButton\n aria-label={t('cardHeader.detailBtnTitle')}\n id={`viewDetail-${entityRef}`}\n style={{ padding: 0 }}\n >\n <Typography component=\"span\">\n <Link\n to={catalogEntityRoute(entityRouteParams(template))}\n style={{ display: 'flex', alignItems: 'center' }}\n >\n <TemplateIcon className={className} />\n </Link>\n </Typography>\n </IconButton>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCO,MAAM,uBAAuB,CAAC;AAAA,EACnC,QAAA;AAAA,EACA;AACF,CAAiC,KAAA;AAC/B,EAAM,MAAA,kBAAA,GAAqB,YAAY,cAAc,CAAA;AACrD,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,6BAA6B,CAAA;AAC7D,EAAM,MAAA,SAAA,GAAY,mBAAmB,QAAQ,CAAA;AAE7C,EAAA,MAAM,MAAM,MAAO,EAAA;AACnB,EAAA,MAAM,YAAe,GAAA,GAAA,CAAI,aAAc,CAAA,eAAe,CAAK,IAAA,eAAA;AAE3D,EACE,uBAAA,GAAA,CAAC,WAAQ,EAAI,EAAA,CAAA,QAAA,EAAW,SAAS,CAAI,CAAA,EAAA,KAAA,EAAO,CAAE,CAAA,2BAA2B,CACvE,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAY,EAAE,2BAA2B,CAAA;AAAA,MACzC,EAAA,EAAI,cAAc,SAAS,CAAA,CAAA;AAAA,MAC3B,KAAA,EAAO,EAAE,OAAA,EAAS,CAAE,EAAA;AAAA,MAEpB,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,SAAA,EAAU,MACpB,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,EAAI,EAAA,kBAAA,CAAmB,iBAAkB,CAAA,QAAQ,CAAC,CAAA;AAAA,UAClD,KAAO,EAAA,EAAE,OAAS,EAAA,MAAA,EAAQ,YAAY,QAAS,EAAA;AAAA,UAE/C,QAAA,kBAAA,GAAA,CAAC,gBAAa,SAAsB,EAAA;AAAA;AAAA,OAExC,EAAA;AAAA;AAAA,GAEJ,EAAA,CAAA;AAEJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-react",
3
- "version": "1.15.0-next.2",
3
+ "version": "1.15.1",
4
4
  "description": "A frontend library that helps other Backstage plugins interact with the Scaffolder",
5
5
  "backstage": {
6
6
  "role": "web-library",
@@ -66,17 +66,17 @@
66
66
  "test": "backstage-cli package test"
67
67
  },
68
68
  "dependencies": {
69
- "@backstage/catalog-client": "1.9.1",
70
- "@backstage/catalog-model": "1.7.3",
71
- "@backstage/core-components": "0.17.1-next.1",
72
- "@backstage/core-plugin-api": "1.10.6-next.0",
73
- "@backstage/frontend-plugin-api": "0.10.1-next.1",
74
- "@backstage/plugin-catalog-react": "1.17.0-next.2",
75
- "@backstage/plugin-permission-react": "0.4.33-next.0",
76
- "@backstage/plugin-scaffolder-common": "1.5.10",
77
- "@backstage/theme": "0.6.5-next.0",
78
- "@backstage/types": "1.2.1",
79
- "@backstage/version-bridge": "1.0.11",
69
+ "@backstage/catalog-client": "^1.9.1",
70
+ "@backstage/catalog-model": "^1.7.3",
71
+ "@backstage/core-components": "^0.17.1",
72
+ "@backstage/core-plugin-api": "^1.10.6",
73
+ "@backstage/frontend-plugin-api": "^0.10.1",
74
+ "@backstage/plugin-catalog-react": "^1.17.0",
75
+ "@backstage/plugin-permission-react": "^0.4.33",
76
+ "@backstage/plugin-scaffolder-common": "^1.5.10",
77
+ "@backstage/theme": "^0.6.5",
78
+ "@backstage/types": "^1.2.1",
79
+ "@backstage/version-bridge": "^1.0.11",
80
80
  "@material-ui/core": "^4.12.2",
81
81
  "@material-ui/icons": "^4.9.1",
82
82
  "@material-ui/lab": "4.0.0-alpha.61",
@@ -104,12 +104,12 @@
104
104
  "zod-to-json-schema": "^3.20.4"
105
105
  },
106
106
  "devDependencies": {
107
- "@backstage/cli": "0.32.0-next.2",
108
- "@backstage/core-app-api": "1.16.1-next.0",
109
- "@backstage/plugin-catalog": "1.29.0-next.2",
110
- "@backstage/plugin-catalog-common": "1.1.3",
111
- "@backstage/plugin-permission-common": "0.8.4",
112
- "@backstage/test-utils": "1.7.7-next.0",
107
+ "@backstage/cli": "^0.32.0",
108
+ "@backstage/core-app-api": "^1.16.1",
109
+ "@backstage/plugin-catalog": "^1.29.0",
110
+ "@backstage/plugin-catalog-common": "^1.1.3",
111
+ "@backstage/plugin-permission-common": "^0.8.4",
112
+ "@backstage/test-utils": "^1.7.7",
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",