Merge pull request #20615 from acierto/configure-template

Make it possible to define control buttons text (Back, Create, Review) per template
This commit is contained in:
Ben Lambert
2023-10-27 15:14:19 +02:00
committed by GitHub
11 changed files with 82 additions and 8 deletions
+10
View File
@@ -66,6 +66,7 @@ export interface TemplateEntityV1beta3 extends Entity {
kind: 'Template';
spec: {
type: string;
presentation?: TemplatePresentationV1beta3;
parameters?: TemplateParametersV1beta3 | TemplateParametersV1beta3[];
steps: Array<TemplateEntityStepV1beta3>;
output?: {
@@ -98,4 +99,13 @@ export interface TemplatePermissionsV1beta3 extends JsonObject {
// (undocumented)
tags?: string[];
}
// @public
export interface TemplatePresentationV1beta3 extends JsonObject {
buttonLabels?: {
backButtonText?: string;
createButtonText?: string;
reviewButtonText?: string;
};
}
```
@@ -45,6 +45,12 @@ export interface TemplateEntityV1beta3 extends Entity {
* The type that the Template will create. For example service, website or library.
*/
type: string;
/**
* Template specific configuration of the presentation layer.
*/
presentation?: TemplatePresentationV1beta3;
/**
* This is a JSONSchema or an array of JSONSchema's which is used to render a form in the frontend
* to collect user input and validate it against that schema. This can then be used in the `steps` part below to template
@@ -67,6 +73,31 @@ export interface TemplateEntityV1beta3 extends Entity {
};
}
/**
* The presentation of the template.
*
* @public
*/
export interface TemplatePresentationV1beta3 extends JsonObject {
/**
* Overrides default buttons' text
*/
buttonLabels?: {
/**
* The text for the button which leads to the previous template page
*/
backButtonText?: string;
/**
* The text for the button which starts the execution of the template
*/
createButtonText?: string;
/**
* The text for the button which opens template's review/summary
*/
reviewButtonText?: string;
};
}
/**
* Step that is part of a Template Entity.
*
+1
View File
@@ -27,6 +27,7 @@ export {
isTemplateEntityV1beta3,
} from './TemplateEntityV1beta3';
export type {
TemplatePresentationV1beta3,
TemplateEntityV1beta3,
TemplateEntityStepV1beta3,
TemplateParametersV1beta3,