From 6cbd4734b038fdec949b75a5962ecb282fb9261e Mon Sep 17 00:00:00 2001 From: Pranay Tippa Date: Wed, 27 Nov 2024 10:57:01 +0530 Subject: [PATCH] feat: Allowing configuring Group child in panel and wizard --- component-models.json | 192 +++++++++++++++-------------- models/form-components/_panel.json | 14 ++- 2 files changed, 113 insertions(+), 93 deletions(-) diff --git a/component-models.json b/component-models.json index e5ac328c27..ecd7c39f2a 100644 --- a/component-models.json +++ b/component-models.json @@ -2533,116 +2533,126 @@ "collapsible": false, "fields": [ { - "component": "text", - "name": "name", - "label": "Name", - "valueType": "string", - "required": true, - "valueFormat": "regexp", - "validation": { - "regExp": "^[^$].*", - "customErrorMsg": "Name cannot start with $" - } - }, - { - "component": "text", - "name": "jcr:title", - "label": "Title", - "valueType": "string" - }, - { - "component": "boolean", - "name": "hideTitle", - "label": "Hide title", - "valueType": "boolean" - }, - { - "component": "text", - "name": "dataRef", - "label": "Bind reference", - "valueType": "string" - }, - { - "component": "boolean", - "name": "unboundFormElement", - "label": "Mark as Unbound Form Element", - "valueType": "boolean" - }, - { - "component": "boolean", - "name": "visible", - "label": "Show Component", - "valueType": "boolean", - "value": true - }, - { - "component": "boolean", - "name": "enabled", - "label": "Enable Component", - "valueType": "boolean", - "value": true - }, - { - "component": "boolean", - "name": "readOnly", - "label": "Read-only", - "valueType": "boolean" - }, - { - "component": "select", - "name": "colspan", - "label": "Columns", - "valueType": "string", - "options": [ - { - "name": "1 column", - "value": "1" - }, - { - "name": "2 column", - "value": "2" - }, - { - "name": "3 column", - "value": "3" - }, + "fields": [ { - "name": "4 column", - "value": "4" + "component": "text", + "name": "name", + "label": "Name", + "valueType": "string", + "required": true, + "valueFormat": "regexp", + "validation": { + "regExp": "^[^$].*", + "customErrorMsg": "Name cannot start with $" + } }, { - "name": "5 column", - "value": "5" + "component": "text", + "name": "jcr:title", + "label": "Title", + "valueType": "string" }, { - "name": "6 column", - "value": "6" + "component": "boolean", + "name": "hideTitle", + "label": "Hide title", + "valueType": "boolean" }, { - "name": "7 column", - "value": "7" + "component": "text", + "name": "dataRef", + "label": "Bind reference", + "valueType": "string" }, { - "name": "8 column", - "value": "8" + "component": "boolean", + "name": "unboundFormElement", + "label": "Mark as Unbound Form Element", + "valueType": "boolean" }, { - "name": "9 column", - "value": "9" + "component": "boolean", + "name": "visible", + "label": "Show Component", + "valueType": "boolean", + "value": true }, { - "name": "10 column", - "value": "10" + "component": "boolean", + "name": "enabled", + "label": "Enable Component", + "valueType": "boolean", + "value": true }, { - "name": "11 column", - "value": "11" + "component": "boolean", + "name": "readOnly", + "label": "Read-only", + "valueType": "boolean" }, { - "name": "12 column", - "value": "12" + "component": "select", + "name": "colspan", + "label": "Columns", + "valueType": "string", + "options": [ + { + "name": "1 column", + "value": "1" + }, + { + "name": "2 column", + "value": "2" + }, + { + "name": "3 column", + "value": "3" + }, + { + "name": "4 column", + "value": "4" + }, + { + "name": "5 column", + "value": "5" + }, + { + "name": "6 column", + "value": "6" + }, + { + "name": "7 column", + "value": "7" + }, + { + "name": "8 column", + "value": "8" + }, + { + "name": "9 column", + "value": "9" + }, + { + "name": "10 column", + "value": "10" + }, + { + "name": "11 column", + "value": "11" + }, + { + "name": "12 column", + "value": "12" + } + ] } ] + }, + { + "component": "boolean", + "name": "wrapData", + "label": "Group child components' data on form submission", + "valueType": "boolean" } ] }, diff --git a/models/form-components/_panel.json b/models/form-components/_panel.json index 7e7c01500b..c7ce6fb65c 100644 --- a/models/form-components/_panel.json +++ b/models/form-components/_panel.json @@ -27,7 +27,17 @@ "name": "basic", "label": "Basic", "collapsible": false, - "...": "../form-common/_basic-input-fields.json" + "fields": [ + { + "...": "../form-common/_basic-input-fields.json" + }, + { + "component": "boolean", + "name": "wrapData", + "label": "Group child components' data on form submission", + "valueType": "boolean" + } + ] }, { "component": "container", @@ -63,4 +73,4 @@ ] } ] -} \ No newline at end of file +}