* fix: [WIP] reset meta to default value * refactor * fix reset child widget and type in metaReducer * Fix type and refactor test * fix multiselect click * Add jest test for reset widget action * Add cypress test * Add comments * Add more cases as per comment * remove `only` from test case * Add default value case of array with values * MultiSelect spec fix * fix currencyInput reset * refactor test code suggested in comments * fix type * fix more type * fix cypress test Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
432 lines
15 KiB
JSON
432 lines
15 KiB
JSON
{
|
|
"dsl": {
|
|
"widgetName": "MainContainer",
|
|
"backgroundColor": "none",
|
|
"rightColumn": 966,
|
|
"snapColumns": 64,
|
|
"detachFromLayout": true,
|
|
"widgetId": "0",
|
|
"topRow": 0,
|
|
"bottomRow": 5016,
|
|
"containerStyle": "none",
|
|
"snapRows": 125,
|
|
"parentRowSpace": 1,
|
|
"type": "CANVAS_WIDGET",
|
|
"canExtend": true,
|
|
"version": 59,
|
|
"minHeight": 360,
|
|
"parentColumnSpace": 1,
|
|
"dynamicBindingPathList": [],
|
|
"leftColumn": 0,
|
|
"children": [
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"boxShadow": "none",
|
|
"backgroundColor": "#FFFFFF",
|
|
"widgetName": "Container3",
|
|
"rightColumn": 60,
|
|
"orientation": "VERTICAL",
|
|
"snapColumns": 16,
|
|
"widgetId": "jaftzrmtin",
|
|
"containerStyle": "card",
|
|
"topRow": 0,
|
|
"bottomRow": 80,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"type": "CONTAINER_WIDGET",
|
|
"version": 1,
|
|
"isLoading": false,
|
|
"parentColumnSpace": 75.25,
|
|
"dynamicBindingPathList": [],
|
|
"leftColumn": 0,
|
|
"borderRadius": "0px",
|
|
"children": [
|
|
{
|
|
"boxShadow": "none",
|
|
"widgetName": "7hf8kkvvgv",
|
|
"topRow": 0,
|
|
"bottomRow": 790,
|
|
"parentRowSpace": 1,
|
|
"type": "CANVAS_WIDGET",
|
|
"canExtend": false,
|
|
"minHeight": 800,
|
|
"parentColumnSpace": 1,
|
|
"dynamicTriggerPathList": [],
|
|
"leftColumn": 0,
|
|
"dynamicBindingPathList": [],
|
|
"children": [
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"boxShadow": "none",
|
|
"widgetName": "Text1",
|
|
"rightColumn": 10,
|
|
"dynamicPropertyPathList": [],
|
|
"widgetId": "4d8d2eh4xg",
|
|
"topRow": 0,
|
|
"bottomRow": 3,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"type": "TEXT_WIDGET",
|
|
"parentId": "hjiybwqair",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 71.75,
|
|
"overflow": "SCROLL",
|
|
"fontFamily": "System Default",
|
|
"dynamicBindingPathList": [],
|
|
"leftColumn": 1,
|
|
"borderRadius": "0px",
|
|
"text": "Test text",
|
|
"textStyle": "HEADING"
|
|
},
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"isRequired": false,
|
|
"boxShadow": "none",
|
|
"widgetName": "Input1",
|
|
"rightColumn": 20,
|
|
"widgetId": "i9cuq42zmc",
|
|
"accentColor": "{{appsmith.theme.colors.primaryColor}}",
|
|
"topRow": 4,
|
|
"bottomRow": 8,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"label": "",
|
|
"type": "INPUT_WIDGET_V2",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 71.75,
|
|
"resetOnSubmit": false,
|
|
"leftColumn": 0,
|
|
"dynamicBindingPathList": [{ "key": "accentColor" }],
|
|
"borderRadius": "0px",
|
|
"inputType": "TEXT",
|
|
"isDisabled": false
|
|
},
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"isRequired": false,
|
|
"boxShadow": "none",
|
|
"widgetName": "Dropdown1",
|
|
"rightColumn": 60,
|
|
"isFilterable": true,
|
|
"widgetId": "nl5sy9cuaa",
|
|
"accentColor": "{{appsmith.theme.colors.primaryColor}}",
|
|
"topRow": 4,
|
|
"bottomRow": 8,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"label": "",
|
|
"type": "SELECT_WIDGET",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 71.75,
|
|
"leftColumn": 40,
|
|
"dynamicBindingPathList": [{ "key": "accentColor" }],
|
|
"borderRadius": "0px",
|
|
"options": "",
|
|
"isDisabled": false
|
|
},
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"boxShadow": "none",
|
|
"widgetName": "Button1",
|
|
"rightColumn": 12,
|
|
"isDefaultClickDisabled": true,
|
|
"buttonColor": "#03B365",
|
|
"widgetId": "gn6ug210ef",
|
|
"topRow": 16,
|
|
"bottomRow": 20,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"type": "BUTTON_WIDGET",
|
|
"version": 1,
|
|
"recaptchaType": "V3",
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 71.75,
|
|
"leftColumn": 4,
|
|
"dynamicBindingPathList": [],
|
|
"borderRadius": "0px",
|
|
"buttonVariant": "PRIMARY",
|
|
"text": "Submit",
|
|
"isDisabled": false
|
|
},
|
|
{
|
|
"boxShadow": "none",
|
|
"widgetName": "Checkbox1",
|
|
"topRow": 16,
|
|
"bottomRow": 20,
|
|
"parentRowSpace": 38,
|
|
"type": "CHECKBOX_WIDGET",
|
|
"alignWidget": "LEFT",
|
|
"parentColumnSpace": 71.75,
|
|
"leftColumn": 40,
|
|
"dynamicBindingPathList": [],
|
|
"labelPosition": "Right",
|
|
"isDisabled": false,
|
|
"labelTextSize": "0.875rem",
|
|
"isRequired": false,
|
|
"rightColumn": 52,
|
|
"widgetId": "szjhneuog5",
|
|
"accentColor": "#03B365",
|
|
"isVisible": true,
|
|
"label": "Label",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"borderRadius": "0px",
|
|
"defaultCheckedState": true
|
|
},
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"boxShadow": "none",
|
|
"widgetName": "Switch1",
|
|
"rightColumn": 52,
|
|
"widgetId": "szjhneuog9",
|
|
"accentColor": "#03B365",
|
|
"topRow": 73,
|
|
"bottomRow": 77,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"label": "Switch",
|
|
"type": "SWITCH_WIDGET",
|
|
"defaultSwitchState": true,
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"alignWidget": "LEFT",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 71.75,
|
|
"leftColumn": 40,
|
|
"dynamicBindingPathList": [],
|
|
"borderRadius": "0px",
|
|
"labelPosition": "Right",
|
|
"isDisabled": false
|
|
},
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"isRequired": false,
|
|
"boxShadow": "none",
|
|
"widgetName": "RadioGroup1",
|
|
"rightColumn": 12,
|
|
"widgetId": "nb2usgp3hv",
|
|
"topRow": 28,
|
|
"bottomRow": 36,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"label": "",
|
|
"type": "RADIO_GROUP_WIDGET",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"defaultOptionValue": "1",
|
|
"parentColumnSpace": 71.75,
|
|
"leftColumn": 0,
|
|
"dynamicBindingPathList": [],
|
|
"borderRadius": "0px",
|
|
"options": [
|
|
{ "label": "Male", "value": "M" },
|
|
{ "label": "Female", "value": "F" }
|
|
],
|
|
"isDisabled": false,
|
|
"alignment": "left"
|
|
},
|
|
{
|
|
"boxShadow": "none",
|
|
"widgetName": "DatePicker1",
|
|
"dateFormat": "DD/MM/YYYY",
|
|
"topRow": 28,
|
|
"bottomRow": 32,
|
|
"parentRowSpace": 38,
|
|
"type": "DATE_PICKER_WIDGET",
|
|
"parentColumnSpace": 71.75,
|
|
"dynamicTriggerPathList": [
|
|
{ "key": "onDateSelected" }
|
|
],
|
|
"leftColumn": 40,
|
|
"dynamicBindingPathList": [],
|
|
"isDisabled": false,
|
|
"onDateSelected": "{{showModal()}}",
|
|
"labelTextSize": "0.875rem",
|
|
"defaultDate": "2020-06-03T12:05:44.699+05:30",
|
|
"rightColumn": 60,
|
|
"widgetId": "kyrvcdcm4e",
|
|
"isVisible": true,
|
|
"datePickerType": "DATE_PICKER",
|
|
"label": "",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"borderRadius": "0px"
|
|
},
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"isRequired": false,
|
|
"boxShadow": "none",
|
|
"widgetName": "FilePicker1",
|
|
"rightColumn": 56,
|
|
"isDefaultClickDisabled": true,
|
|
"widgetId": "ca22py6vlv",
|
|
"topRow": 44,
|
|
"bottomRow": 48,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"label": "Select Files",
|
|
"allowedFileTypes": [],
|
|
"type": "FILE_PICKER_WIDGET",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 67.1171875,
|
|
"leftColumn": 40,
|
|
"dynamicBindingPathList": [],
|
|
"borderRadius": "0px",
|
|
"files": [],
|
|
"isDisabled": false
|
|
},
|
|
{
|
|
"labelTextSize": "0.875rem",
|
|
"boxShadow": "none",
|
|
"widgetName": "RichTextEditor1",
|
|
"rightColumn": 32,
|
|
"isDefaultClickDisabled": true,
|
|
"widgetId": "2uvezzlkn5",
|
|
"topRow": 44,
|
|
"bottomRow": 64,
|
|
"parentRowSpace": 38,
|
|
"isVisible": true,
|
|
"type": "RICH_TEXT_EDITOR_WIDGET",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 67.1171875,
|
|
"leftColumn": 0,
|
|
"dynamicBindingPathList": [],
|
|
"borderRadius": "0px",
|
|
"defaultText": "",
|
|
"inputType": "html",
|
|
"isDisabled": false
|
|
},
|
|
{
|
|
"boxShadow": "none",
|
|
"widgetName": "MultiSelect2",
|
|
"topRow": 49,
|
|
"bottomRow": 60,
|
|
"parentRowSpace": 10,
|
|
"type": "MULTI_SELECT_WIDGET_V2",
|
|
"defaultOptionValue": "",
|
|
"parentColumnSpace": 13.662109375,
|
|
"dynamicTriggerPathList": [],
|
|
"leftColumn": 37,
|
|
"dynamicBindingPathList": [{ "key": "accentColor" }],
|
|
"options": "",
|
|
"placeholderText": "",
|
|
"isDisabled": false,
|
|
"labelTextSize": "0.875rem",
|
|
"isRequired": false,
|
|
"rightColumn": 62,
|
|
"widgetId": "p6qkmj8uo1",
|
|
"accentColor": "{{appsmith.theme.colors.primaryColor}}",
|
|
"isVisible": true,
|
|
"label": "",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"isLoading": false,
|
|
"borderRadius": "0px"
|
|
},
|
|
{
|
|
"boxShadow": "none",
|
|
"widgetName": "Button2",
|
|
"onClick": "{{resetWidget('MultiSelect2')}}",
|
|
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
|
|
"dynamicPropertyPathList": [{ "key": "onClick" }],
|
|
"displayName": "Button",
|
|
"iconSVG": "/static/media/icon.cca02633.svg",
|
|
"topRow": 68,
|
|
"bottomRow": 72,
|
|
"parentRowSpace": 10,
|
|
"type": "BUTTON_WIDGET",
|
|
"hideCard": false,
|
|
"animateLoading": true,
|
|
"parentColumnSpace": 18.49609375,
|
|
"dynamicTriggerPathList": [{ "key": "onClick" }],
|
|
"leftColumn": 41,
|
|
"dynamicBindingPathList": [
|
|
{ "key": "buttonColor" },
|
|
{ "key": "borderRadius" }
|
|
],
|
|
"text": "Reset MultiSelect",
|
|
"isDisabled": false,
|
|
"key": "sv7prcomh7",
|
|
"isDeprecated": false,
|
|
"rightColumn": 58,
|
|
"isDefaultClickDisabled": true,
|
|
"widgetId": "tzstqq5xjt",
|
|
"isVisible": true,
|
|
"recaptchaType": "V3",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"renderMode": "CANVAS",
|
|
"isLoading": false,
|
|
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
"buttonVariant": "PRIMARY",
|
|
"placement": "CENTER"
|
|
},
|
|
{
|
|
"widgetName": "Text2",
|
|
"displayName": "Text",
|
|
"iconSVG": "/static/media/icon.97c59b52.svg",
|
|
"topRow": 60,
|
|
"bottomRow": 68,
|
|
"parentRowSpace": 10,
|
|
"type": "TEXT_WIDGET",
|
|
"hideCard": false,
|
|
"animateLoading": true,
|
|
"overflow": "NONE",
|
|
"fontFamily": "{{appsmith.theme.fontFamily.appFont}}",
|
|
"parentColumnSpace": 18.49609375,
|
|
"dynamicTriggerPathList": [],
|
|
"leftColumn": 37,
|
|
"dynamicBindingPathList": [
|
|
{ "key": "fontFamily" },
|
|
{ "key": "borderRadius" },
|
|
{ "key": "text" }
|
|
],
|
|
"shouldTruncate": false,
|
|
"truncateButtonColor": "#FFC13D",
|
|
"text": "{{MultiSelect2.selectedOptionValues.toString()}}",
|
|
"key": "a4y7w4uxvg",
|
|
"isDeprecated": false,
|
|
"rightColumn": 62,
|
|
"textAlign": "LEFT",
|
|
"widgetId": "6mabocqffh",
|
|
"isVisible": true,
|
|
"fontStyle": "BOLD",
|
|
"textColor": "#231F20",
|
|
"version": 1,
|
|
"parentId": "e3tq9qwta6",
|
|
"renderMode": "CANVAS",
|
|
"isLoading": false,
|
|
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
"fontSize": "1rem"
|
|
}
|
|
],
|
|
"labelTextSize": "0.875rem",
|
|
"backgroundColor": "transparent",
|
|
"rightColumn": 4816,
|
|
"orientation": "VERTICAL",
|
|
"snapColumns": 16,
|
|
"detachFromLayout": true,
|
|
"widgetId": "e3tq9qwta6",
|
|
"containerStyle": "none",
|
|
"isVisible": true,
|
|
"version": 1,
|
|
"isLoading": false,
|
|
"borderRadius": "0px"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |