@backstage/plugin-scaffolder-react 1.14.6 → 1.15.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.
- package/CHANGELOG.md +39 -0
- package/dist/alpha.d.ts +1 -0
- package/dist/index.d.ts +64 -4
- package/dist/next/components/TemplateCard/CardHeader.esm.js +8 -1
- package/dist/next/components/TemplateCard/CardHeader.esm.js.map +1 -1
- package/dist/next/components/TemplateCard/TemplateDetailButton.esm.js +41 -0
- package/dist/next/components/TemplateCard/TemplateDetailButton.esm.js.map +1 -0
- package/dist/translation.esm.js +3 -0
- package/dist/translation.esm.js.map +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-react
|
|
2
2
|
|
|
3
|
+
## 1.15.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/core-components@0.17.1-next.0
|
|
9
|
+
- @backstage/frontend-plugin-api@0.10.1-next.0
|
|
10
|
+
- @backstage/plugin-catalog-react@1.16.1-next.1
|
|
11
|
+
- @backstage/catalog-client@1.9.1
|
|
12
|
+
- @backstage/catalog-model@1.7.3
|
|
13
|
+
- @backstage/core-plugin-api@1.10.5
|
|
14
|
+
- @backstage/theme@0.6.4
|
|
15
|
+
- @backstage/types@1.2.1
|
|
16
|
+
- @backstage/version-bridge@1.0.11
|
|
17
|
+
- @backstage/plugin-permission-react@0.4.32
|
|
18
|
+
- @backstage/plugin-scaffolder-common@1.5.10
|
|
19
|
+
|
|
20
|
+
## 1.15.0-next.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- 5890016: add api to retrieve template extensions info from scaffolder-backend
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 6ed42b7: Scaffolding - Template card - button to show template entity detail
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
- @backstage/plugin-catalog-react@1.16.1-next.0
|
|
31
|
+
- @backstage/catalog-client@1.9.1
|
|
32
|
+
- @backstage/catalog-model@1.7.3
|
|
33
|
+
- @backstage/core-components@0.17.0
|
|
34
|
+
- @backstage/core-plugin-api@1.10.5
|
|
35
|
+
- @backstage/frontend-plugin-api@0.10.0
|
|
36
|
+
- @backstage/theme@0.6.4
|
|
37
|
+
- @backstage/types@1.2.1
|
|
38
|
+
- @backstage/version-bridge@1.0.11
|
|
39
|
+
- @backstage/plugin-permission-react@0.4.32
|
|
40
|
+
- @backstage/plugin-scaffolder-common@1.5.10
|
|
41
|
+
|
|
3
42
|
## 1.14.6
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -483,6 +483,7 @@ declare const scaffolderReactTranslationRef: _backstage_core_plugin_api_alpha.Tr
|
|
|
483
483
|
readonly "templateCategoryPicker.title": "Categories";
|
|
484
484
|
readonly "templateCard.noDescription": "No description";
|
|
485
485
|
readonly "templateCard.chooseButtonText": "Choose";
|
|
486
|
+
readonly "cardHeader.detailBtnTitle": "Show template entity details";
|
|
486
487
|
readonly "templateOutputs.title": "Text Output";
|
|
487
488
|
}>;
|
|
488
489
|
|
package/dist/index.d.ts
CHANGED
|
@@ -394,14 +394,22 @@ type ScaffolderTask = {
|
|
|
394
394
|
createdAt: string;
|
|
395
395
|
};
|
|
396
396
|
/**
|
|
397
|
-
* A single
|
|
397
|
+
* A single scaffolder usage example
|
|
398
398
|
*
|
|
399
399
|
* @public
|
|
400
400
|
*/
|
|
401
|
-
type
|
|
402
|
-
description
|
|
401
|
+
type ScaffolderUsageExample = {
|
|
402
|
+
description?: string;
|
|
403
403
|
example: string;
|
|
404
|
+
notes?: string;
|
|
404
405
|
};
|
|
406
|
+
/**
|
|
407
|
+
* A single action example
|
|
408
|
+
*
|
|
409
|
+
* @public
|
|
410
|
+
* @deprecated in favor of ScaffolderUsageExample
|
|
411
|
+
*/
|
|
412
|
+
type ActionExample = ScaffolderUsageExample;
|
|
405
413
|
/**
|
|
406
414
|
* The response shape for a single action in the `listActions` call to the `scaffolder-backend`
|
|
407
415
|
*
|
|
@@ -422,6 +430,54 @@ type Action = {
|
|
|
422
430
|
* @public
|
|
423
431
|
*/
|
|
424
432
|
type ListActionsResponse = Array<Action>;
|
|
433
|
+
/**
|
|
434
|
+
* The response shape for a single filter in the `listTemplateExtensions` call to the `scaffolder-backend`
|
|
435
|
+
*
|
|
436
|
+
* @public
|
|
437
|
+
*/
|
|
438
|
+
type TemplateFilter = {
|
|
439
|
+
description?: string;
|
|
440
|
+
schema?: {
|
|
441
|
+
input?: JSONSchema7;
|
|
442
|
+
arguments?: JSONSchema7[];
|
|
443
|
+
output?: JSONSchema7;
|
|
444
|
+
};
|
|
445
|
+
examples?: ScaffolderUsageExample[];
|
|
446
|
+
};
|
|
447
|
+
/**
|
|
448
|
+
* The response shape for a single global function in the `listTemplateExtensions` call to the `scaffolder-backend`
|
|
449
|
+
*
|
|
450
|
+
* @public
|
|
451
|
+
*/
|
|
452
|
+
type TemplateGlobalFunction = {
|
|
453
|
+
description?: string;
|
|
454
|
+
schema?: {
|
|
455
|
+
arguments?: JSONSchema7[];
|
|
456
|
+
output?: JSONSchema7;
|
|
457
|
+
};
|
|
458
|
+
examples?: ScaffolderUsageExample[];
|
|
459
|
+
};
|
|
460
|
+
/**
|
|
461
|
+
* The response shape for a single global value in the `listTemplateExtensions` call to the `scaffolder-backend`
|
|
462
|
+
*
|
|
463
|
+
* @public
|
|
464
|
+
*/
|
|
465
|
+
type TemplateGlobalValue = {
|
|
466
|
+
description?: string;
|
|
467
|
+
value: JsonValue;
|
|
468
|
+
};
|
|
469
|
+
/**
|
|
470
|
+
* The response shape for the `listTemplateExtensions` call to the `scaffolder-backend`
|
|
471
|
+
*
|
|
472
|
+
* @public
|
|
473
|
+
*/
|
|
474
|
+
type ListTemplateExtensionsResponse = {
|
|
475
|
+
filters: Record<string, TemplateFilter>;
|
|
476
|
+
globals: {
|
|
477
|
+
functions: Record<string, TemplateGlobalFunction>;
|
|
478
|
+
values: Record<string, TemplateGlobalValue>;
|
|
479
|
+
};
|
|
480
|
+
};
|
|
425
481
|
/** @public */
|
|
426
482
|
type ScaffolderOutputLink = {
|
|
427
483
|
title?: string;
|
|
@@ -568,6 +624,10 @@ interface ScaffolderApi {
|
|
|
568
624
|
* Returns a list of all installed actions.
|
|
569
625
|
*/
|
|
570
626
|
listActions(): Promise<ListActionsResponse>;
|
|
627
|
+
/**
|
|
628
|
+
* Returns a structure describing the available templating extensions.
|
|
629
|
+
*/
|
|
630
|
+
listTemplateExtensions?(): Promise<ListTemplateExtensionsResponse>;
|
|
571
631
|
streamLogs(options: ScaffolderStreamLogsOptions): Observable<LogEvent>;
|
|
572
632
|
dryRun?(options: ScaffolderDryRunOptions): Promise<ScaffolderDryRunResponse>;
|
|
573
633
|
autocomplete?(options: {
|
|
@@ -688,4 +748,4 @@ interface FieldSchema<TReturn, TUiOptions> {
|
|
|
688
748
|
readonly TOutput: TReturn;
|
|
689
749
|
}
|
|
690
750
|
|
|
691
|
-
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 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 ScaffolderUseTemplateSecrets, SecretsContextProvider, type TaskStream, type TemplateGroupFilter, type TemplateParameterSchema, createScaffolderFieldExtension, createScaffolderLayout, makeFieldSchema, scaffolderApiRef, useCustomFieldExtensions, useCustomLayouts, useTaskEventStream, useTemplateSecrets };
|
|
751
|
+
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 };
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { makeStyles, useTheme } from '@material-ui/core/styles';
|
|
3
3
|
import { ItemCardHeader } from '@backstage/core-components';
|
|
4
4
|
import { FavoriteEntity } from '@backstage/plugin-catalog-react';
|
|
5
|
+
import { TemplateDetailButton } from './TemplateDetailButton.esm.js';
|
|
5
6
|
|
|
6
7
|
const useStyles = makeStyles(() => ({
|
|
7
8
|
header: {
|
|
@@ -26,7 +27,13 @@ const CardHeader = (props) => {
|
|
|
26
27
|
cardFontColor: themeForType.fontColor,
|
|
27
28
|
cardBackgroundImage: themeForType.backgroundImage
|
|
28
29
|
});
|
|
29
|
-
const SubtitleComponent = /* @__PURE__ */ React.createElement("div", { className: styles.subtitleWrapper }, /* @__PURE__ */ React.createElement("div", null, type), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
30
|
+
const SubtitleComponent = /* @__PURE__ */ React.createElement("div", { className: styles.subtitleWrapper }, /* @__PURE__ */ React.createElement("div", null, type), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TemplateDetailButton, { template: props.template }), /* @__PURE__ */ React.createElement(
|
|
31
|
+
FavoriteEntity,
|
|
32
|
+
{
|
|
33
|
+
entity: props.template,
|
|
34
|
+
style: { padding: 0, marginLeft: 6 }
|
|
35
|
+
}
|
|
36
|
+
)));
|
|
30
37
|
return /* @__PURE__ */ React.createElement(
|
|
31
38
|
ItemCardHeader,
|
|
32
39
|
{
|
|
@@ -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 React from 'react';\nimport {
|
|
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 React from 'react';\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":";;;;;;AAuBA,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,oCACH,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,MAAA,CAAO,mCACpB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAK,IAAK,CAAA,sCACV,KACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,wBAAqB,QAAU,EAAA,KAAA,CAAM,UAAU,CAChD,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,QAAQ,KAAM,CAAA,QAAA;AAAA,MACd,KAAO,EAAA,EAAE,OAAS,EAAA,CAAA,EAAG,YAAY,CAAE;AAAA;AAAA,GAEvC,CACF,CAAA;AAGF,EACE,uBAAA,KAAA,CAAA,aAAA;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;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Tooltip from '@material-ui/core/Tooltip';
|
|
3
|
+
import IconButton from '@material-ui/core/IconButton';
|
|
4
|
+
import Typography from '@material-ui/core/Typography';
|
|
5
|
+
import DescriptionIcon from '@material-ui/icons/Description';
|
|
6
|
+
import { Link } from '@backstage/core-components';
|
|
7
|
+
import { entityRouteRef, entityRouteParams } from '@backstage/plugin-catalog-react';
|
|
8
|
+
import { useRouteRef, useApp } from '@backstage/core-plugin-api';
|
|
9
|
+
import { stringifyEntityRef } from '@backstage/catalog-model';
|
|
10
|
+
import { scaffolderReactTranslationRef } from '../../../translation.esm.js';
|
|
11
|
+
import { useTranslationRef } from '@backstage/frontend-plugin-api';
|
|
12
|
+
|
|
13
|
+
const TemplateDetailButton = ({
|
|
14
|
+
template
|
|
15
|
+
}) => {
|
|
16
|
+
const catalogEntityRoute = useRouteRef(entityRouteRef);
|
|
17
|
+
const { t } = useTranslationRef(scaffolderReactTranslationRef);
|
|
18
|
+
const entityRef = stringifyEntityRef(template);
|
|
19
|
+
const app = useApp();
|
|
20
|
+
const TemplateIcon = app.getSystemIcon("kind:template") || DescriptionIcon;
|
|
21
|
+
return /* @__PURE__ */ React.createElement(Tooltip, { id: `tooltip-${entityRef}`, title: t("cardHeader.detailBtnTitle") }, /* @__PURE__ */ React.createElement(
|
|
22
|
+
IconButton,
|
|
23
|
+
{
|
|
24
|
+
"aria-label": t("cardHeader.detailBtnTitle"),
|
|
25
|
+
id: `viewDetail-${entityRef}`,
|
|
26
|
+
style: { padding: 0 },
|
|
27
|
+
color: "inherit"
|
|
28
|
+
},
|
|
29
|
+
/* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(
|
|
30
|
+
Link,
|
|
31
|
+
{
|
|
32
|
+
to: catalogEntityRoute(entityRouteParams(template)),
|
|
33
|
+
style: { display: "flex", alignItems: "center" }
|
|
34
|
+
},
|
|
35
|
+
/* @__PURE__ */ React.createElement(TemplateIcon, null)
|
|
36
|
+
))
|
|
37
|
+
));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { TemplateDetailButton };
|
|
41
|
+
//# sourceMappingURL=TemplateDetailButton.esm.js.map
|
|
@@ -0,0 +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 React from 'react';\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":";;;;;;;;;;;;AAkCO,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,KAAA,CAAA,aAAA,CAAC,WAAQ,EAAI,EAAA,CAAA,QAAA,EAAW,SAAS,CAAI,CAAA,EAAA,KAAA,EAAO,CAAE,CAAA,2BAA2B,CACvE,EAAA,kBAAA,KAAA,CAAA,aAAA;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;AAAA,KAAA;AAAA,oBAEN,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,SAAA,EAAU,MACpB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA,kBAAA,CAAmB,iBAAkB,CAAA,QAAQ,CAAC,CAAA;AAAA,QAClD,KAAO,EAAA,EAAE,OAAS,EAAA,MAAA,EAAQ,YAAY,QAAS;AAAA,OAAA;AAAA,0CAE9C,YAAa,EAAA,IAAA;AAAA,KAElB;AAAA,GAEJ,CAAA;AAEJ;;;;"}
|
package/dist/translation.esm.js
CHANGED
|
@@ -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 scaffolderReactTranslationRef = createTranslationRef({\n id: 'scaffolder-react',\n messages: {\n passwordWidget: {\n content:\n 'This widget is insecure. Please use [`ui:field: Secret`](https://backstage.io/docs/features/software-templates/writing-templates/#using-secrets) instead of `ui:widget: password`',\n },\n scaffolderPageContextMenu: {\n moreLabel: 'more',\n createLabel: 'Create',\n editorLabel: 'Manage Templates',\n actionsLabel: 'Installed Actions',\n tasksLabel: 'Task List',\n },\n stepper: {\n backButtonText: 'Back',\n createButtonText: 'Create',\n reviewButtonText: 'Review',\n stepIndexLabel: 'Step {{index, number}}',\n nextButtonText: 'Next',\n },\n templateCategoryPicker: {\n title: 'Categories',\n },\n templateCard: {\n noDescription: 'No description',\n chooseButtonText: 'Choose',\n },\n templateOutputs: {\n title: 'Text Output',\n },\n workflow: {\n noDescription: 'No description',\n },\n },\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,gCAAgC,oBAAqB,CAAA;AAAA,EAChE,EAAI,EAAA,kBAAA;AAAA,EACJ,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA;AAAA,MACd,OACE,EAAA;AAAA,KACJ;AAAA,IACA,yBAA2B,EAAA;AAAA,MACzB,SAAW,EAAA,MAAA;AAAA,MACX,WAAa,EAAA,QAAA;AAAA,MACb,WAAa,EAAA,kBAAA;AAAA,MACb,YAAc,EAAA,mBAAA;AAAA,MACd,UAAY,EAAA;AAAA,KACd;AAAA,IACA,OAAS,EAAA;AAAA,MACP,cAAgB,EAAA,MAAA;AAAA,MAChB,gBAAkB,EAAA,QAAA;AAAA,MAClB,gBAAkB,EAAA,QAAA;AAAA,MAClB,cAAgB,EAAA,wBAAA;AAAA,MAChB,cAAgB,EAAA;AAAA,KAClB;AAAA,IACA,sBAAwB,EAAA;AAAA,MACtB,KAAO,EAAA;AAAA,KACT;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,aAAe,EAAA,gBAAA;AAAA,MACf,gBAAkB,EAAA;AAAA,KACpB;AAAA,IACA,eAAiB,EAAA;AAAA,MACf,KAAO,EAAA;AAAA,KACT;AAAA,IACA,QAAU,EAAA;AAAA,MACR,aAAe,EAAA;AAAA;AACjB;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 scaffolderReactTranslationRef = createTranslationRef({\n id: 'scaffolder-react',\n messages: {\n passwordWidget: {\n content:\n 'This widget is insecure. Please use [`ui:field: Secret`](https://backstage.io/docs/features/software-templates/writing-templates/#using-secrets) instead of `ui:widget: password`',\n },\n scaffolderPageContextMenu: {\n moreLabel: 'more',\n createLabel: 'Create',\n editorLabel: 'Manage Templates',\n actionsLabel: 'Installed Actions',\n tasksLabel: 'Task List',\n },\n stepper: {\n backButtonText: 'Back',\n createButtonText: 'Create',\n reviewButtonText: 'Review',\n stepIndexLabel: 'Step {{index, number}}',\n nextButtonText: 'Next',\n },\n templateCategoryPicker: {\n title: 'Categories',\n },\n templateCard: {\n noDescription: 'No description',\n chooseButtonText: 'Choose',\n },\n cardHeader: {\n detailBtnTitle: 'Show template entity details',\n },\n templateOutputs: {\n title: 'Text Output',\n },\n workflow: {\n noDescription: 'No description',\n },\n },\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,gCAAgC,oBAAqB,CAAA;AAAA,EAChE,EAAI,EAAA,kBAAA;AAAA,EACJ,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA;AAAA,MACd,OACE,EAAA;AAAA,KACJ;AAAA,IACA,yBAA2B,EAAA;AAAA,MACzB,SAAW,EAAA,MAAA;AAAA,MACX,WAAa,EAAA,QAAA;AAAA,MACb,WAAa,EAAA,kBAAA;AAAA,MACb,YAAc,EAAA,mBAAA;AAAA,MACd,UAAY,EAAA;AAAA,KACd;AAAA,IACA,OAAS,EAAA;AAAA,MACP,cAAgB,EAAA,MAAA;AAAA,MAChB,gBAAkB,EAAA,QAAA;AAAA,MAClB,gBAAkB,EAAA,QAAA;AAAA,MAClB,cAAgB,EAAA,wBAAA;AAAA,MAChB,cAAgB,EAAA;AAAA,KAClB;AAAA,IACA,sBAAwB,EAAA;AAAA,MACtB,KAAO,EAAA;AAAA,KACT;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,aAAe,EAAA,gBAAA;AAAA,MACf,gBAAkB,EAAA;AAAA,KACpB;AAAA,IACA,UAAY,EAAA;AAAA,MACV,cAAgB,EAAA;AAAA,KAClB;AAAA,IACA,eAAiB,EAAA;AAAA,MACf,KAAO,EAAA;AAAA,KACT;AAAA,IACA,QAAU,EAAA;AAAA,MACR,aAAe,EAAA;AAAA;AACjB;AAEJ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0-next.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": "
|
|
70
|
-
"@backstage/catalog-model": "
|
|
71
|
-
"@backstage/core-components": "
|
|
72
|
-
"@backstage/core-plugin-api": "
|
|
73
|
-
"@backstage/frontend-plugin-api": "
|
|
74
|
-
"@backstage/plugin-catalog-react": "
|
|
75
|
-
"@backstage/plugin-permission-react": "
|
|
76
|
-
"@backstage/plugin-scaffolder-common": "
|
|
77
|
-
"@backstage/theme": "
|
|
78
|
-
"@backstage/types": "
|
|
79
|
-
"@backstage/version-bridge": "
|
|
69
|
+
"@backstage/catalog-client": "1.9.1",
|
|
70
|
+
"@backstage/catalog-model": "1.7.3",
|
|
71
|
+
"@backstage/core-components": "0.17.1-next.0",
|
|
72
|
+
"@backstage/core-plugin-api": "1.10.5",
|
|
73
|
+
"@backstage/frontend-plugin-api": "0.10.1-next.0",
|
|
74
|
+
"@backstage/plugin-catalog-react": "1.16.1-next.1",
|
|
75
|
+
"@backstage/plugin-permission-react": "0.4.32",
|
|
76
|
+
"@backstage/plugin-scaffolder-common": "1.5.10",
|
|
77
|
+
"@backstage/theme": "0.6.4",
|
|
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": "
|
|
108
|
-
"@backstage/core-app-api": "
|
|
109
|
-
"@backstage/plugin-catalog": "
|
|
110
|
-
"@backstage/plugin-catalog-common": "
|
|
111
|
-
"@backstage/plugin-permission-common": "
|
|
112
|
-
"@backstage/test-utils": "
|
|
107
|
+
"@backstage/cli": "0.32.0-next.1",
|
|
108
|
+
"@backstage/core-app-api": "1.16.0",
|
|
109
|
+
"@backstage/plugin-catalog": "1.29.0-next.1",
|
|
110
|
+
"@backstage/plugin-catalog-common": "1.1.3",
|
|
111
|
+
"@backstage/plugin-permission-common": "0.8.4",
|
|
112
|
+
"@backstage/test-utils": "1.7.6",
|
|
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",
|