+
{{ $t('Value') }}
@@ -196,7 +196,7 @@
{{ $t('Content') }}
- {{ $t('Key name in the selected object to display to the user in the select list. Leave blank to show the entire selected value.') }}
+ {{ $t('Content to display to the user in the select list.') }}
diff --git a/tests/e2e/fixtures/select_list_array_data.json b/tests/e2e/fixtures/select_list_array_data.json
new file mode 100644
index 000000000..56f8b5a06
--- /dev/null
+++ b/tests/e2e/fixtures/select_list_array_data.json
@@ -0,0 +1,244 @@
+{
+ "type": "screen_package",
+ "version": "2",
+ "screens": [
+ {
+ "id": 5,
+ "screen_category_id": "1",
+ "title": "select list array",
+ "description": "select list array",
+ "type": "FORM",
+ "config": [
+ {
+ "name": "select list array",
+ "items": [
+ {
+ "label": "Select List",
+ "config": {
+ "icon": "fas fa-angle-double-down",
+ "name": "form_select_list_1",
+ "label": "New Select List",
+ "helper": null,
+ "options": {
+ "key": "value",
+ "value": "content",
+ "dataName": "response",
+ "jsonData": "[{\"content\":\"one\",\"value\":\"1\"},{\"content\":\"two\",\"value\":\"2\"}]",
+ "renderAs": "dropdown",
+ "editIndex": null,
+ "pmqlQuery": null,
+ "dataSource": "provideData",
+ "optionsList": [
+ { "value": "1", "content": "one" },
+ { "value": "2", "content": "two" }
+ ],
+ "removeIndex": null,
+ "showRenderAs": true,
+ "showJsonEditor": false,
+ "showOptionCard": false,
+ "selectedOptions": [],
+ "allowMultiSelect": false,
+ "showRemoveWarning": false,
+ "valueTypeReturned": "single"
+ },
+ "readonly": false,
+ "validation": [],
+ "placeholder": null,
+ "rootElement": "response",
+ "dataSourceUrl": null,
+ "dataSourceEndpoint": null
+ },
+ "component": "FormSelectList",
+ "inspector": [
+ {
+ "type": "FormInput",
+ "field": "name",
+ "config": {
+ "name": "Variable Name",
+ "label": "Variable Name",
+ "helper": "A variable name is a symbolic name to reference information.",
+ "validation": "regex:/^(?:[A-Za-z])(?:[0-9A-Z_a-z])*(?:\\.[0-9A-Z_a-z]+)*$/|required|not_in:null,break,case,catch,continue,debugger,default,delete,do,else,finally,for,function,if,in,instanceof,new,return,switch,this,throw,try,typeof,var,void,while,with,class,const,enum,export,extends,import,super"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "label",
+ "config": {
+ "label": "Label",
+ "helper": "The label describes the field's name"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "placeholder",
+ "config": {
+ "label": "Placeholder Text",
+ "helper": "The placeholder is what is shown in the field when no value is provided yet"
+ }
+ },
+ {
+ "type": "ValidationSelect",
+ "field": "validation",
+ "config": {
+ "label": "Validation Rules",
+ "helper": "The validation rules needed for this field"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "helper",
+ "config": {
+ "label": "Helper Text",
+ "helper": "Help text is meant to provide additional guidance on the field's value"
+ }
+ },
+ {
+ "type": "OptionsList",
+ "field": "options",
+ "config": { "label": null, "helper": null }
+ },
+ {
+ "type": "ColorSelect",
+ "field": "color",
+ "config": {
+ "label": "Text Color",
+ "helper": "Set the element's text color",
+ "options": [
+ { "value": "text-primary", "content": "primary" },
+ { "value": "text-secondary", "content": "secondary" },
+ { "value": "text-success", "content": "success" },
+ { "value": "text-danger", "content": "danger" },
+ { "value": "text-warning", "content": "warning" },
+ { "value": "text-info", "content": "info" },
+ { "value": "text-light", "content": "light" },
+ { "value": "text-dark", "content": "dark" }
+ ]
+ }
+ },
+ {
+ "type": "ColorSelect",
+ "field": "bgcolor",
+ "config": {
+ "label": "Background Color",
+ "helper": "Set the element's background color",
+ "options": [
+ { "value": "alert alert-primary", "content": "primary" },
+ {
+ "value": "alert alert-secondary",
+ "content": "secondary"
+ },
+ { "value": "alert alert-success", "content": "success" },
+ { "value": "alert alert-danger", "content": "danger" },
+ { "value": "alert alert-warning", "content": "warning" },
+ { "value": "alert alert-info", "content": "info" },
+ { "value": "alert alert-light", "content": "light" },
+ { "value": "alert alert-dark", "content": "dark" }
+ ]
+ }
+ },
+ {
+ "type": {
+ "props": ["value", "helper"],
+ "watch": { "value": { "immediate": true } },
+ "methods": [],
+ "_scopeId": "data-v-7c18055b",
+ "computed": { "effectiveValue": [] },
+ "_compiled": true,
+ "components": {
+ "MonacoEditor": {
+ "name": "monaco-editor",
+ "_Ctor": [],
+ "props": { "amdRequire": [] },
+ "extends": {
+ "name": "MonacoEditor",
+ "model": { "event": "change" },
+ "props": {
+ "theme": { "default": "vs" },
+ "value": { "required": true },
+ "options": [],
+ "language": [],
+ "original": [],
+ "amdRequire": [],
+ "diffEditor": { "default": false }
+ },
+ "watch": {
+ "options": { "deep": true, "user": true }
+ },
+ "methods": []
+ },
+ "methods": []
+ }
+ },
+ "staticRenderFns": []
+ },
+ "field": "defaultValue",
+ "config": {
+ "label": "Default Value",
+ "helper": "The default value is pre populated using the existing request data. This feature will allow you to modify the value displayed on screen load if needed."
+ }
+ },
+ {
+ "type": "FormCheckbox",
+ "field": "readonly",
+ "config": { "label": "Read Only", "helper": null }
+ },
+ {
+ "type": "FormInput",
+ "field": "conditionalHide",
+ "config": {
+ "label": "Visibility Rule",
+ "helper": "This control is hidden until this expression is true"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "customFormatter",
+ "config": {
+ "label": "Custom Format String",
+ "helper": "Use the Mask Pattern format Date ##/##/#### SSN ###-##-#### Phone (###) ###-####",
+ "validation": null
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "customCssSelector",
+ "config": {
+ "label": "CSS Selector Name",
+ "helper": "Use this in your custom css rules",
+ "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"
+ }
+ }
+ ],
+ "editor-control": "FormSelectList",
+ "editor-component": "FormSelectList"
+ }
+ ]
+ }
+ ],
+ "computed": [],
+ "custom_css": null,
+ "created_at": "2021-11-08T13:20:07-08:00",
+ "updated_at": "2021-11-08T13:20:39-08:00",
+ "status": "ACTIVE",
+ "key": null,
+ "watchers": [],
+ "categories": [
+ {
+ "id": 1,
+ "name": "Uncategorized",
+ "status": "ACTIVE",
+ "is_system": 0,
+ "created_at": "2021-11-08T10:25:46-08:00",
+ "updated_at": "2021-11-08T10:25:46-08:00",
+ "pivot": {
+ "assignable_id": 5,
+ "category_id": 1,
+ "category_type": "ProcessMaker\\Models\\ScreenCategory"
+ }
+ }
+ ]
+ }
+ ],
+ "screen_categories": [],
+ "scripts": []
+}
diff --git a/tests/e2e/fixtures/select_list_mustache.json b/tests/e2e/fixtures/select_list_mustache.json
new file mode 100644
index 000000000..704720178
--- /dev/null
+++ b/tests/e2e/fixtures/select_list_mustache.json
@@ -0,0 +1,260 @@
+{
+ "type": "screen_package",
+ "version": "2",
+ "screens": [
+ {
+ "id": 4,
+ "screen_category_id": "1",
+ "title": "test select list pmql",
+ "description": "test select list pmql",
+ "type": "FORM",
+ "config": [
+ {
+ "name": "test select list pmql",
+ "items": [
+ {
+ "label": "Select List",
+ "config": {
+ "icon": "fas fa-angle-double-down",
+ "name": "form_select_list_1",
+ "label": "New Select List",
+ "helper": null,
+ "options": {
+ "key": "",
+ "value": "id: {{ data.id }}",
+ "dataName": "response.data",
+ "jsonData": null,
+ "renderAs": "dropdown",
+ "editIndex": null,
+ "pmqlQuery": null,
+ "dataSource": "dataConnector",
+ "optionsList": [],
+ "removeIndex": null,
+ "showRenderAs": true,
+ "showJsonEditor": false,
+ "showOptionCard": false,
+ "selectedOptions": [],
+ "allowMultiSelect": false,
+ "selectedEndPoint": "ListAll",
+ "showRemoveWarning": false,
+ "valueTypeReturned": "object",
+ "selectedDataSource": 2
+ },
+ "readonly": false,
+ "validation": [],
+ "placeholder": null,
+ "rootElement": "response",
+ "dataSourceUrl": null,
+ "dataSourceEndpoint": null
+ },
+ "component": "FormSelectList",
+ "inspector": [
+ {
+ "type": "FormInput",
+ "field": "name",
+ "config": {
+ "name": "Variable Name",
+ "label": "Variable Name",
+ "helper": "A variable name is a symbolic name to reference information.",
+ "validation": "regex:/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*[^.]$/|required|not_in:null,break,case,catch,continue,debugger,default,delete,do,else,finally,for,function,if,in,instanceof,new,return,switch,this,throw,try,typeof,var,void,while,with,class,const,enum,export,extends,import,super,true,false"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "label",
+ "config": {
+ "label": "Label",
+ "helper": "The label describes the field's name"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "placeholder",
+ "config": {
+ "label": "Placeholder Text",
+ "helper": "The placeholder is what is shown in the field when no value is provided yet"
+ }
+ },
+ {
+ "type": "ValidationSelect",
+ "field": "validation",
+ "config": {
+ "label": "Validation Rules",
+ "helper": "The validation rules needed for this field"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "helper",
+ "config": {
+ "label": "Helper Text",
+ "helper": "Help text is meant to provide additional guidance on the field's value"
+ }
+ },
+ {
+ "type": "OptionsList",
+ "field": "options",
+ "config": { "label": null, "helper": null }
+ },
+ {
+ "type": "ColorSelect",
+ "field": "color",
+ "config": {
+ "label": "Text Color",
+ "helper": "Set the element's text color",
+ "options": [
+ { "value": "text-primary", "content": "primary" },
+ { "value": "text-secondary", "content": "secondary" },
+ { "value": "text-success", "content": "success" },
+ { "value": "text-danger", "content": "danger" },
+ { "value": "text-warning", "content": "warning" },
+ { "value": "text-info", "content": "info" },
+ { "value": "text-light", "content": "light" },
+ { "value": "text-dark", "content": "dark" }
+ ]
+ }
+ },
+ {
+ "type": "ColorSelect",
+ "field": "bgcolor",
+ "config": {
+ "label": "Background Color",
+ "helper": "Set the element's background color",
+ "options": [
+ { "value": "alert alert-primary", "content": "primary" },
+ {
+ "value": "alert alert-secondary",
+ "content": "secondary"
+ },
+ { "value": "alert alert-success", "content": "success" },
+ { "value": "alert alert-danger", "content": "danger" },
+ { "value": "alert alert-warning", "content": "warning" },
+ { "value": "alert alert-info", "content": "info" },
+ { "value": "alert alert-light", "content": "light" },
+ { "value": "alert alert-dark", "content": "dark" }
+ ]
+ }
+ },
+ {
+ "type": {
+ "props": ["value", "helper"],
+ "watch": { "value": { "immediate": true } },
+ "methods": [],
+ "_scopeId": "data-v-172d71e1",
+ "computed": { "effectiveValue": [] },
+ "_compiled": true,
+ "components": {
+ "MonacoEditor": {
+ "name": "monaco-editor",
+ "_Ctor": [],
+ "props": { "amdRequire": [] },
+ "extends": {
+ "name": "MonacoEditor",
+ "model": { "event": "change" },
+ "props": {
+ "theme": { "default": "vs" },
+ "value": { "required": true },
+ "options": [],
+ "language": [],
+ "original": [],
+ "amdRequire": [],
+ "diffEditor": { "default": false }
+ },
+ "watch": {
+ "options": { "deep": true, "user": true }
+ },
+ "methods": []
+ },
+ "methods": []
+ }
+ },
+ "staticRenderFns": []
+ },
+ "field": "defaultValue",
+ "config": {
+ "label": "Default Value",
+ "helper": "The default value is pre populated using the existing request data. This feature will allow you to modify the value displayed on screen load if needed."
+ }
+ },
+ {
+ "type": "FormCheckbox",
+ "field": "readonly",
+ "config": { "label": "Read Only", "helper": null }
+ },
+ {
+ "type": "FormInput",
+ "field": "conditionalHide",
+ "config": {
+ "label": "Visibility Rule",
+ "helper": "This control is hidden until this expression is true"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "customFormatter",
+ "config": {
+ "label": "Custom Format String",
+ "helper": "Use the Mask Pattern format Date ##/##/#### SSN ###-##-#### Phone (###) ###-####",
+ "validation": null
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "customCssSelector",
+ "config": {
+ "label": "CSS Selector Name",
+ "helper": "Use this in your custom css rules",
+ "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "ariaLabel",
+ "config": {
+ "label": "Aria Label",
+ "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "tabindex",
+ "config": {
+ "label": "Tab Order",
+ "helper": "Order in which a user will move focus from one control to another by pressing the Tab key",
+ "validation": "regex: [0-9]*"
+ }
+ }
+ ],
+ "editor-control": "FormSelectList",
+ "editor-component": "FormSelectList"
+ }
+ ]
+ }
+ ],
+ "computed": [],
+ "custom_css": null,
+ "created_at": "2021-11-08T10:31:29-08:00",
+ "updated_at": "2021-11-08T10:38:21-08:00",
+ "status": "ACTIVE",
+ "key": null,
+ "watchers": [],
+ "categories": [
+ {
+ "id": 1,
+ "name": "Uncategorized",
+ "status": "ACTIVE",
+ "is_system": 0,
+ "created_at": "2021-11-08T10:25:46-08:00",
+ "updated_at": "2021-11-08T10:25:46-08:00",
+ "pivot": {
+ "assignable_id": 4,
+ "category_id": 1,
+ "category_type": "ProcessMaker\\Models\\ScreenCategory"
+ }
+ }
+ ]
+ }
+ ],
+ "screen_categories": [],
+ "scripts": []
+}
diff --git a/tests/e2e/fixtures/select_list_mustache_custom_key.json b/tests/e2e/fixtures/select_list_mustache_custom_key.json
new file mode 100644
index 000000000..18a97d057
--- /dev/null
+++ b/tests/e2e/fixtures/select_list_mustache_custom_key.json
@@ -0,0 +1,260 @@
+{
+ "type": "screen_package",
+ "version": "2",
+ "screens": [
+ {
+ "id": 4,
+ "screen_category_id": "1",
+ "title": "test select list pmql",
+ "description": "test select list pmql",
+ "type": "FORM",
+ "config": [
+ {
+ "name": "test select list pmql",
+ "items": [
+ {
+ "label": "Select List",
+ "config": {
+ "icon": "fas fa-angle-double-down",
+ "name": "form_select_list_1",
+ "label": "New Select List",
+ "helper": null,
+ "options": {
+ "key": "data",
+ "value": "id: {{ data.id }}",
+ "dataName": "response.data",
+ "jsonData": null,
+ "renderAs": "dropdown",
+ "editIndex": null,
+ "pmqlQuery": null,
+ "dataSource": "dataConnector",
+ "optionsList": [],
+ "removeIndex": null,
+ "showRenderAs": true,
+ "showJsonEditor": false,
+ "showOptionCard": false,
+ "selectedOptions": [],
+ "allowMultiSelect": false,
+ "selectedEndPoint": "ListAll",
+ "showRemoveWarning": false,
+ "valueTypeReturned": "object",
+ "selectedDataSource": 2
+ },
+ "readonly": false,
+ "validation": [],
+ "placeholder": null,
+ "rootElement": "response",
+ "dataSourceUrl": null,
+ "dataSourceEndpoint": null
+ },
+ "component": "FormSelectList",
+ "inspector": [
+ {
+ "type": "FormInput",
+ "field": "name",
+ "config": {
+ "name": "Variable Name",
+ "label": "Variable Name",
+ "helper": "A variable name is a symbolic name to reference information.",
+ "validation": "regex:/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*[^.]$/|required|not_in:null,break,case,catch,continue,debugger,default,delete,do,else,finally,for,function,if,in,instanceof,new,return,switch,this,throw,try,typeof,var,void,while,with,class,const,enum,export,extends,import,super,true,false"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "label",
+ "config": {
+ "label": "Label",
+ "helper": "The label describes the field's name"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "placeholder",
+ "config": {
+ "label": "Placeholder Text",
+ "helper": "The placeholder is what is shown in the field when no value is provided yet"
+ }
+ },
+ {
+ "type": "ValidationSelect",
+ "field": "validation",
+ "config": {
+ "label": "Validation Rules",
+ "helper": "The validation rules needed for this field"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "helper",
+ "config": {
+ "label": "Helper Text",
+ "helper": "Help text is meant to provide additional guidance on the field's value"
+ }
+ },
+ {
+ "type": "OptionsList",
+ "field": "options",
+ "config": { "label": null, "helper": null }
+ },
+ {
+ "type": "ColorSelect",
+ "field": "color",
+ "config": {
+ "label": "Text Color",
+ "helper": "Set the element's text color",
+ "options": [
+ { "value": "text-primary", "content": "primary" },
+ { "value": "text-secondary", "content": "secondary" },
+ { "value": "text-success", "content": "success" },
+ { "value": "text-danger", "content": "danger" },
+ { "value": "text-warning", "content": "warning" },
+ { "value": "text-info", "content": "info" },
+ { "value": "text-light", "content": "light" },
+ { "value": "text-dark", "content": "dark" }
+ ]
+ }
+ },
+ {
+ "type": "ColorSelect",
+ "field": "bgcolor",
+ "config": {
+ "label": "Background Color",
+ "helper": "Set the element's background color",
+ "options": [
+ { "value": "alert alert-primary", "content": "primary" },
+ {
+ "value": "alert alert-secondary",
+ "content": "secondary"
+ },
+ { "value": "alert alert-success", "content": "success" },
+ { "value": "alert alert-danger", "content": "danger" },
+ { "value": "alert alert-warning", "content": "warning" },
+ { "value": "alert alert-info", "content": "info" },
+ { "value": "alert alert-light", "content": "light" },
+ { "value": "alert alert-dark", "content": "dark" }
+ ]
+ }
+ },
+ {
+ "type": {
+ "props": ["value", "helper"],
+ "watch": { "value": { "immediate": true } },
+ "methods": [],
+ "_scopeId": "data-v-172d71e1",
+ "computed": { "effectiveValue": [] },
+ "_compiled": true,
+ "components": {
+ "MonacoEditor": {
+ "name": "monaco-editor",
+ "_Ctor": [],
+ "props": { "amdRequire": [] },
+ "extends": {
+ "name": "MonacoEditor",
+ "model": { "event": "change" },
+ "props": {
+ "theme": { "default": "vs" },
+ "value": { "required": true },
+ "options": [],
+ "language": [],
+ "original": [],
+ "amdRequire": [],
+ "diffEditor": { "default": false }
+ },
+ "watch": {
+ "options": { "deep": true, "user": true }
+ },
+ "methods": []
+ },
+ "methods": []
+ }
+ },
+ "staticRenderFns": []
+ },
+ "field": "defaultValue",
+ "config": {
+ "label": "Default Value",
+ "helper": "The default value is pre populated using the existing request data. This feature will allow you to modify the value displayed on screen load if needed."
+ }
+ },
+ {
+ "type": "FormCheckbox",
+ "field": "readonly",
+ "config": { "label": "Read Only", "helper": null }
+ },
+ {
+ "type": "FormInput",
+ "field": "conditionalHide",
+ "config": {
+ "label": "Visibility Rule",
+ "helper": "This control is hidden until this expression is true"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "customFormatter",
+ "config": {
+ "label": "Custom Format String",
+ "helper": "Use the Mask Pattern format Date ##/##/#### SSN ###-##-#### Phone (###) ###-####",
+ "validation": null
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "customCssSelector",
+ "config": {
+ "label": "CSS Selector Name",
+ "helper": "Use this in your custom css rules",
+ "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "ariaLabel",
+ "config": {
+ "label": "Aria Label",
+ "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "tabindex",
+ "config": {
+ "label": "Tab Order",
+ "helper": "Order in which a user will move focus from one control to another by pressing the Tab key",
+ "validation": "regex: [0-9]*"
+ }
+ }
+ ],
+ "editor-control": "FormSelectList",
+ "editor-component": "FormSelectList"
+ }
+ ]
+ }
+ ],
+ "computed": [],
+ "custom_css": null,
+ "created_at": "2021-11-08T10:31:29-08:00",
+ "updated_at": "2021-11-08T10:38:21-08:00",
+ "status": "ACTIVE",
+ "key": null,
+ "watchers": [],
+ "categories": [
+ {
+ "id": 1,
+ "name": "Uncategorized",
+ "status": "ACTIVE",
+ "is_system": 0,
+ "created_at": "2021-11-08T10:25:46-08:00",
+ "updated_at": "2021-11-08T10:25:46-08:00",
+ "pivot": {
+ "assignable_id": 4,
+ "category_id": 1,
+ "category_type": "ProcessMaker\\Models\\ScreenCategory"
+ }
+ }
+ ]
+ }
+ ],
+ "screen_categories": [],
+ "scripts": []
+}
diff --git a/tests/e2e/fixtures/select_list_mustache_request_data.json b/tests/e2e/fixtures/select_list_mustache_request_data.json
new file mode 100644
index 000000000..397f94925
--- /dev/null
+++ b/tests/e2e/fixtures/select_list_mustache_request_data.json
@@ -0,0 +1,242 @@
+{
+ "type": "screen_package",
+ "version": "2",
+ "screens": [
+ {
+ "id": 6,
+ "screen_category_id": "1",
+ "title": "select list request data",
+ "description": "select list request data",
+ "type": "FORM",
+ "config": [
+ {
+ "name": "select list request data",
+ "items": [
+ {
+ "label": "Select List",
+ "config": {
+ "icon": "fas fa-angle-double-down",
+ "name": "form_select_list_1",
+ "label": "New Select List",
+ "helper": null,
+ "options": {
+ "key": "id",
+ "value": "id: {{id}} {{content}}",
+ "dataName": "array",
+ "jsonData": null,
+ "renderAs": "dropdown",
+ "editIndex": null,
+ "pmqlQuery": null,
+ "dataSource": "dataObject",
+ "optionsList": [],
+ "removeIndex": null,
+ "showRenderAs": true,
+ "showJsonEditor": false,
+ "showOptionCard": false,
+ "selectedOptions": [],
+ "allowMultiSelect": false,
+ "showRemoveWarning": false,
+ "valueTypeReturned": "single",
+ "selectedDataSource": null
+ },
+ "readonly": false,
+ "validation": [],
+ "placeholder": null,
+ "rootElement": "response",
+ "dataSourceUrl": null,
+ "dataSourceEndpoint": null
+ },
+ "component": "FormSelectList",
+ "inspector": [
+ {
+ "type": "FormInput",
+ "field": "name",
+ "config": {
+ "name": "Variable Name",
+ "label": "Variable Name",
+ "helper": "A variable name is a symbolic name to reference information.",
+ "validation": "regex:/^(?:[A-Za-z])(?:[0-9A-Z_a-z])*(?:\\.[0-9A-Z_a-z]+)*$/|required|not_in:null,break,case,catch,continue,debugger,default,delete,do,else,finally,for,function,if,in,instanceof,new,return,switch,this,throw,try,typeof,var,void,while,with,class,const,enum,export,extends,import,super"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "label",
+ "config": {
+ "label": "Label",
+ "helper": "The label describes the field's name"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "placeholder",
+ "config": {
+ "label": "Placeholder Text",
+ "helper": "The placeholder is what is shown in the field when no value is provided yet"
+ }
+ },
+ {
+ "type": "ValidationSelect",
+ "field": "validation",
+ "config": {
+ "label": "Validation Rules",
+ "helper": "The validation rules needed for this field"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "helper",
+ "config": {
+ "label": "Helper Text",
+ "helper": "Help text is meant to provide additional guidance on the field's value"
+ }
+ },
+ {
+ "type": "OptionsList",
+ "field": "options",
+ "config": { "label": null, "helper": null }
+ },
+ {
+ "type": "ColorSelect",
+ "field": "color",
+ "config": {
+ "label": "Text Color",
+ "helper": "Set the element's text color",
+ "options": [
+ { "value": "text-primary", "content": "primary" },
+ { "value": "text-secondary", "content": "secondary" },
+ { "value": "text-success", "content": "success" },
+ { "value": "text-danger", "content": "danger" },
+ { "value": "text-warning", "content": "warning" },
+ { "value": "text-info", "content": "info" },
+ { "value": "text-light", "content": "light" },
+ { "value": "text-dark", "content": "dark" }
+ ]
+ }
+ },
+ {
+ "type": "ColorSelect",
+ "field": "bgcolor",
+ "config": {
+ "label": "Background Color",
+ "helper": "Set the element's background color",
+ "options": [
+ { "value": "alert alert-primary", "content": "primary" },
+ {
+ "value": "alert alert-secondary",
+ "content": "secondary"
+ },
+ { "value": "alert alert-success", "content": "success" },
+ { "value": "alert alert-danger", "content": "danger" },
+ { "value": "alert alert-warning", "content": "warning" },
+ { "value": "alert alert-info", "content": "info" },
+ { "value": "alert alert-light", "content": "light" },
+ { "value": "alert alert-dark", "content": "dark" }
+ ]
+ }
+ },
+ {
+ "type": {
+ "props": ["value", "helper"],
+ "watch": { "value": { "immediate": true } },
+ "methods": [],
+ "_scopeId": "data-v-7c18055b",
+ "computed": { "effectiveValue": [] },
+ "_compiled": true,
+ "components": {
+ "MonacoEditor": {
+ "name": "monaco-editor",
+ "_Ctor": [],
+ "props": { "amdRequire": [] },
+ "extends": {
+ "name": "MonacoEditor",
+ "model": { "event": "change" },
+ "props": {
+ "theme": { "default": "vs" },
+ "value": { "required": true },
+ "options": [],
+ "language": [],
+ "original": [],
+ "amdRequire": [],
+ "diffEditor": { "default": false }
+ },
+ "watch": {
+ "options": { "deep": true, "user": true }
+ },
+ "methods": []
+ },
+ "methods": []
+ }
+ },
+ "staticRenderFns": []
+ },
+ "field": "defaultValue",
+ "config": {
+ "label": "Default Value",
+ "helper": "The default value is pre populated using the existing request data. This feature will allow you to modify the value displayed on screen load if needed."
+ }
+ },
+ {
+ "type": "FormCheckbox",
+ "field": "readonly",
+ "config": { "label": "Read Only", "helper": null }
+ },
+ {
+ "type": "FormInput",
+ "field": "conditionalHide",
+ "config": {
+ "label": "Visibility Rule",
+ "helper": "This control is hidden until this expression is true"
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "customFormatter",
+ "config": {
+ "label": "Custom Format String",
+ "helper": "Use the Mask Pattern format Date ##/##/#### SSN ###-##-#### Phone (###) ###-####",
+ "validation": null
+ }
+ },
+ {
+ "type": "FormInput",
+ "field": "customCssSelector",
+ "config": {
+ "label": "CSS Selector Name",
+ "helper": "Use this in your custom css rules",
+ "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"
+ }
+ }
+ ],
+ "editor-control": "FormSelectList",
+ "editor-component": "FormSelectList"
+ }
+ ]
+ }
+ ],
+ "computed": [],
+ "custom_css": null,
+ "created_at": "2021-11-08T13:33:31-08:00",
+ "updated_at": "2021-11-08T13:36:25-08:00",
+ "status": "ACTIVE",
+ "key": null,
+ "watchers": [],
+ "categories": [
+ {
+ "id": 1,
+ "name": "Uncategorized",
+ "status": "ACTIVE",
+ "is_system": 0,
+ "created_at": "2021-11-08T10:25:46-08:00",
+ "updated_at": "2021-11-08T10:25:46-08:00",
+ "pivot": {
+ "assignable_id": 6,
+ "category_id": 1,
+ "category_type": "ProcessMaker\\Models\\ScreenCategory"
+ }
+ }
+ ]
+ }
+ ],
+ "screen_categories": [],
+ "scripts": []
+}
diff --git a/tests/e2e/specs/LoadComplexData.spec.js b/tests/e2e/specs/LoadComplexData.spec.js
index e57be9199..b65b1cd9e 100644
--- a/tests/e2e/specs/LoadComplexData.spec.js
+++ b/tests/e2e/specs/LoadComplexData.spec.js
@@ -8,7 +8,7 @@ describe('Validation Rules (Advanced test)', () => {
cy.loadFromJson('FPP_PFP_CHAIRS_SCREEN.json', 0);
cy.get('[data-cy=mode-preview]').click();
// Open Tab 2
- cy.get('[aria-label="Part Time"]:visible:first').click();
+ cy.get('button:contains("Part Time"):visible:first').click();
// Tab 2 contains the title '2. PART TIME PAGE'
cy.get('#preview').should('contain.html', '2. PART TIME PAGE');
diff --git a/tests/e2e/specs/SelectListMustache.spec.js b/tests/e2e/specs/SelectListMustache.spec.js
new file mode 100644
index 000000000..d92241416
--- /dev/null
+++ b/tests/e2e/specs/SelectListMustache.spec.js
@@ -0,0 +1,176 @@
+describe('select list mustache', () => {
+ beforeEach(() => {
+ cy.server();
+ cy.visit('/');
+ cy.route(
+ 'POST',
+ '/api/1.0/requests/data_sources/2',
+ JSON.stringify({
+ 'status': 200,
+ 'response': {
+ 'data': [{
+ 'id': 1,
+ 'created_by_id': 2,
+ 'updated_by_id': 2,
+ 'created_at': '2021-11-08 10:29:56',
+ 'updated_at': '2021-11-08 10:29:56',
+ 'data': {
+ 'dni': '1234',
+ 'name': {
+ 'last': 'Callizaya',
+ 'first': 'David',
+ },
+ 'id': 1,
+ },
+ 'collection_id': 1,
+ 'title': '1',
+ 'created_by': {
+ 'id': 2,
+ 'email': 'admin@processmaker.com',
+ },
+ 'updated_by': {
+ 'id': 2,
+ 'email': 'admin@processmaker.com',
+ },
+ }, {
+ 'id': 2,
+ 'created_by_id': 2,
+ 'updated_by_id': 2,
+ 'created_at': '2021-11-08 10:29:56',
+ 'updated_at': '2021-11-08 10:29:56',
+ 'data': {
+ 'dni': '5678',
+ 'name': {
+ 'last': 'Loayza',
+ 'first': 'Dante',
+ },
+ 'id': 2,
+ },
+ 'collection_id': 1,
+ 'title': '2',
+ 'created_by': {
+ 'id': 2,
+ 'email': 'admin@processmaker.com',
+ },
+ 'updated_by': {
+ 'id': 2,
+ 'email': 'admin@processmaker.com',
+ },
+ }],
+ 'meta': {
+ 'filter': '',
+ 'sort_by': '',
+ 'sort_order': '',
+ 'count': 2,
+ 'total_pages': 1,
+ 'current_page': 1,
+ 'from': 1,
+ 'last_page': 1,
+ 'path': '/api/1.0/collections/1/records',
+ 'per_page': 9223372036854775807,
+ 'to': 2,
+ 'total': 2,
+ },
+ },
+ })
+ ).as('executeScript');
+ });
+
+ it('Verify select list mustache + data source', () => {
+ cy.loadFromJson('select_list_mustache.json', 0);
+ cy.get('[data-cy=mode-preview]').click();
+ cy.get('[data-cy="screen-field-form_select_list_1"]').selectOption('id: 2');
+
+ // Check the data of the screen
+ cy.assertPreviewData({
+ form_select_list_1: {
+ 'id': 2,
+ 'created_by_id': 2,
+ 'updated_by_id': 2,
+ 'created_at': '2021-11-08 10:29:56',
+ 'updated_at': '2021-11-08 10:29:56',
+ 'data': {
+ 'dni': '5678',
+ 'name': {
+ 'last': 'Loayza',
+ 'first': 'Dante',
+ },
+ 'id': 2,
+ },
+ 'collection_id': 1,
+ 'title': '2',
+ 'created_by': {
+ 'id': 2,
+ 'email': 'admin@processmaker.com',
+ },
+ 'updated_by': {
+ 'id': 2,
+ 'email': 'admin@processmaker.com',
+ },
+ },
+ });
+ });
+
+ it('Verify select list mustache + data source with custom key', () => {
+ cy.loadFromJson('select_list_mustache_custom_key.json', 0);
+ cy.get('[data-cy=mode-preview]').click();
+ cy.get('[data-cy="screen-field-form_select_list_1"]').selectOption('id: 2');
+
+ // Check the data of the screen
+ cy.assertPreviewData({
+ form_select_list_1: {
+ 'dni': '5678',
+ 'name': {
+ 'last': 'Loayza',
+ 'first': 'Dante',
+ },
+ 'id': 2,
+ },
+ });
+ });
+
+ it('Verify select list simple array of options', () => {
+ cy.loadFromJson('select_list_array_data.json', 0);
+ cy.get('[data-cy=mode-preview]').click();
+ cy.get('[data-cy="screen-field-form_select_list_1"]').selectOption('two');
+
+ // Check the data of the screen
+ cy.assertPreviewData({
+ form_select_list_1: '2',
+ });
+ });
+
+ it('Verify select list mustache with request data', () => {
+ cy.loadFromJson('select_list_mustache_request_data.json', 0);
+ // Setup Request Data
+ cy.setPreviewDataInput({
+ array: [
+ {
+ 'id': '1',
+ 'content': 'one',
+ },
+ {
+ 'id': '2',
+ 'content': 'two',
+ },
+ ],
+ });
+ cy.get('[data-cy=mode-preview]').click();
+ cy.get('[data-cy="screen-field-form_select_list_1"]').selectOption('id: 2 two');
+
+ // Check the data of the screen
+ cy.assertPreviewData({
+ array: [
+ {
+ 'id': '1',
+ 'content': 'one',
+ },
+ {
+ 'id': '2',
+ 'content': 'two',
+ },
+ ],
+ form_select_list_1: '2',
+ });
+ });
+});
\ No newline at end of file