Merge branch 'feat/acl-frontend' into 'feature/acl'

fix: Minor UI changes

See merge request theappsmith/internal-tools-client!604
This commit is contained in:
Trisha Anand 2020-05-20 14:09:51 +00:00
commit c32ae80f3e
56 changed files with 3973 additions and 2154 deletions

View File

@ -1,6 +1,5 @@
{
"dsl": {
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
@ -20,203 +19,203 @@
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 8,
"topRow": 0,
"bottomRow": 9,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "a78zsh8adr",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 8,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 9,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "a78zsh8adr",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text1",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 35.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "5mijsozz1o"
}
],
"widgetId": "hvosuw4z59",
"detachFromLayout": true,
"canExtend": false
}
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text1",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 35.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "5mijsozz1o"
}
],
"widgetId": "go64l3m18d"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"widgetId": "hvosuw4z59",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "go64l3m18d"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 16,
"topRow": 9,
"bottomRow": 23,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "ycnnb3haff",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 16,
"topRow": 9,
"bottomRow": 23,
"rightColumn": 1204,
"topRow": 0,
"bottomRow": 532,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "ycnnb3haff",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 1204,
"topRow": 0,
"bottomRow": 532,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text3",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 72.875,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "ig6nii17j0"
},
{
"isVisible": true,
"isDisabled": false,
"widgetName": "Map1",
"enableSearch": true,
"zoomLevel": 50,
"enablePickLocation": true,
"allowZoom": true,
"mapCenter": {
"lat": 20.593684,
"long": 78.96288
},
"defaultMarkers": "[\n {\n \"lat\": -34.397,\n \"long\": 150.644,\n \"title\": \"Test A\"\n }\n]",
"type": "MAP_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 3,
"rightColumn": 11,
"topRow": 0,
"bottomRow": 12,
"parentId": "yt4ouwn0sk",
"widgetId": "673etzjyv9",
"dynamicBindings": {}
}
],
"widgetId": "yt4ouwn0sk",
"detachFromLayout": true,
"canExtend": false
}
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text3",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 72.875,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "ig6nii17j0"
},
{
"isVisible": true,
"isDisabled": false,
"widgetName": "Map1",
"enableSearch": true,
"zoomLevel": 50,
"enablePickLocation": true,
"allowZoom": true,
"mapCenter": {
"lat": 20.593684,
"long": 78.96288
},
"defaultMarkers": "[\n {\n \"lat\": -34.397,\n \"long\": 150.644,\n \"title\": \"Test A\"\n }\n]",
"type": "MAP_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 3,
"rightColumn": 11,
"topRow": 0,
"bottomRow": 12,
"parentId": "yt4ouwn0sk",
"widgetId": "673etzjyv9",
"dynamicBindings": {}
}
],
"widgetId": "s2x1p6okr1"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container4",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"widgetId": "yt4ouwn0sk",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "s2x1p6okr1"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container4",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 8,
"rightColumn": 16,
"topRow": 0,
"bottomRow": 9,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "796xzyf2fj",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 8,
"rightColumn": 16,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 9,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "796xzyf2fj",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text2",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 35.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "8oo6fcjhy4"
}
],
"widgetId": "tf53p2yg6n",
"detachFromLayout": true,
"canExtend": false
}
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text2",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 35.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "8oo6fcjhy4"
}
],
"widgetId": "2q5e9wr5vi"
}
"widgetId": "tf53p2yg6n",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "2q5e9wr5vi"
}
]
},
"layoutOnLoadActions": []
},
"layoutOnLoadActions": []
}

View File

@ -0,0 +1,183 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1292,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"dynamicBindings": {},
"version": 4,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 8,
"topRow": 0,
"bottomRow": 9,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "2maowfwe99",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"isVisible": true,
"text": "Label",
"textStyle": "LABEL",
"textAlign": "LEFT",
"widgetName": "Text4",
"type": "TEXT_WIDGET",
"isLoading": false,
"parentColumnSpace": 34.6875,
"parentRowSpace": 38,
"leftColumn": 4,
"rightColumn": 9,
"topRow": 3,
"bottomRow": 4,
"parentId": "rlnoulfiiz",
"widgetId": "ljzwxmav4b"
}
],
"widgetId": "rlnoulfiiz",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "6ro2rmfbpz"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 16,
"topRow": 9,
"bottomRow": 23,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "8muuok24ny",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 1204,
"topRow": 0,
"bottomRow": 532,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"isVisible": true,
"label": "Data",
"widgetName": "Table1",
"tableData": "[\n {\n \"id\": 2381224,\n \"email\": \"michael.lawson@reqres.in\",\n \"userName\": \"Michael Lawson\",\n \"productName\": \"Chicken Sandwich\",\n \"orderAmount\": 4.99\n },\n {\n \"id\": 2736212,\n \"email\": \"lindsay.ferguson@reqres.in\",\n \"userName\": \"Lindsay Ferguson\",\n \"productName\": \"Tuna Salad\",\n \"orderAmount\": 9.99\n },\n {\n \"id\": 6788734,\n \"email\": \"tobias.funke@reqres.in\",\n \"userName\": \"Tobias Funke\",\n \"productName\": \"Beef steak\",\n \"orderAmount\": 19.99\n },\n {\n \"id\": 7434532,\n \"email\": \"byron.fields@reqres.in\",\n \"userName\": \"Byron Fields\",\n \"productName\": \"Chicken Sandwich\",\n \"orderAmount\": 4.99\n },\n {\n \"id\": 7434532,\n \"email\": \"ryan.holmes@reqres.in\",\n \"userName\": \"Ryan Holmes\",\n \"productName\": \"Avocado Panini\",\n \"orderAmount\": 7.99\n }\n]",
"type": "TABLE_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 1,
"rightColumn": 10,
"topRow": 1,
"bottomRow": 8,
"parentId": "tyiwk4xuq0",
"widgetId": "c5h0m17qxj",
"dynamicBindings": {
"selectedRow": true
}
}
],
"widgetId": "tyiwk4xuq0",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "3oe1ka7jon"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container4",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 8,
"rightColumn": 16,
"topRow": 0,
"bottomRow": 9,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "rcpfairf1h",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [],
"widgetId": "q0atwguzda",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "l5lvm9yd4e"
}
]
},
"layoutOnLoadActions": []
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,83 @@
{
"name": "Using fixtures to represent data",
"country": "India",
"link": "www.google.com",
"command": "{command}{A}{del}",
"marker": [
{
"lat": -34.397,
"lng": 150.644,
"title": "Marker Test"
}
],
"location2": "Australia",
"name": "containtest",
"colour": "Red",
"Hover": "mouseover",
"inputdata": "one",
"text": "Adi12",
"number": "2",
"default": "initial",
"radio1": "test1",
"radio2": "test2",
"radio3": "test3",
"radio4": "test4",
"textcheck": "checker",
"textverify": "input",
"alert": "hello",
"layoutId": "5e86eb6492fdf85af565096f",
"contains": "lock",
"input": [
{
"label": "Option 1",
"value": "1"
},
{
"label": "Option 2",
"value": "2"
},
{
"label": "Option 3",
"value": "3"
},
{
"label": "Option 4",
"value": "4"
},
{
"label": "Option 5",
"value": "5"
}
],
"para": "This is to test the system data.",
"regex": "z{3}",
"chartInput": [
{
"x": "Day1",
"y": 10000
},
{
"x": "Day2",
"y": 12000
},
{
"x": "Day3",
"y": 32000
}
],
"series": "Weekly",
"plan": "Weekly plan",
"ylabel": "total wages",
"placeholder": "check",
"chartIndata": "App Sign Up",
"dropdownInput": "TestD",
"radioInputName": "Test Radio",
"checkbocInputName": "value",
"defaultimage": "https://i0.wp.com/www.heyuguys.com/images/2016/04/The-Joker.png?fit=1920%2C960",
"NewImage": "https://cdn.dribbble.com/users/1787323/screenshots/4563995/dribbbe_hammer-01.png",
"textfun": "{{Table1.selectedRow.userName}}",
"textfunID": "{{Table1.selectedRow.id}}",
"textfunemail": "{{Table1.selectedRow.email}}",
"name1": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes",
"ButtonLabel": "Test Button",
@ -15,5 +93,7 @@
"DatepickerLable": "date",
"RichTextEditorName": "RichtextEditor",
"HtmlText": "This is the initial<b>content </b> <h1> This is a Heading</h1> <p> This is a paragraph.</p>",
"RichTexteditorBody": "Here is the text area to edit html"
"RichTexteditorBody": "Here is the text area to edit html",
"userApi": "http://postgrest.appsmith.com:3000",
"validateImage": "https://cdn.dribbble.com/users/1787323/screenshots/4563995/dribbbe_hammer-01.png"
}

File diff suppressed because it is too large Load Diff

View File

@ -1,438 +1,547 @@
{
"dsl": {
    "widgetName": "MainContainer",
    "backgroundColor": "none",
    "rightColumn": 1224,
    "snapColumns": 16,
    "detachFromLayout": true,
    "widgetId": "0",
    "topRow": 0,
    "bottomRow": 1292,
    "containerStyle": "none",
    "snapRows": 33,
    "parentRowSpace": 1,
    "type": "CANVAS_WIDGET",
    "canExtend": true,
    "dynamicBindings": {},
    "version": 3,
    "minHeight": 1292,
    "parentColumnSpace": 1,
    "leftColumn": 0,
    "children": [
        {
            "backgroundColor": "#FFFFFF",
            "widgetName": "Container1",
            "rightColumn": 8,
            "orientation": "VERTICAL",
            "snapColumns": 16,
            "widgetId": "8elnkhrzdb",
            "containerStyle": "card",
            "topRow": 0,
            "bottomRow": 9,
            "parentRowSpace": 38,
            "isVisible": true,
            "type": "CONTAINER_WIDGET",
            "dynamicBindings": {},
            "isLoading": false,
            "parentColumnSpace": 75.25,
            "leftColumn": 0,
            "children": [
                {
                    "backgroundColor": "#FFFFFF",
                    "widgetName": "s3m9o0kzef",
                    "rightColumn": 602,
                    "orientation": "VERTICAL",
                    "snapColumns": 16,
                    "detachFromLayout": true,
                    "widgetId": "4utikp3lta",
                    "containerStyle": "none",
                    "topRow": 0,
                    "bottomRow": 342,
                    "parentRowSpace": 1,
                    "isVisible": true,
                    "type": "CANVAS_WIDGET",
                    "canExtend": false,
                    "isLoading": false,
                    "parentColumnSpace": 1,
                    "leftColumn": 0,
                    "children": [
                        {
                            "widgetName": "Text1",
                            "rightColumn": 3,
                            "widgetId": "6350kah7vo",
                            "topRow": 0,
                            "bottomRow": 1,
                            "parentRowSpace": 38,
                            "isVisible": true,
                            "type": "TEXT_WIDGET",
                            "dynamicBindings": {},
                            "isLoading": false,
                            "parentColumnSpace": 35.25,
                            "leftColumn": 0,
                            "text": "Title",
                            "textStyle": "HEADING"
                        }
                    ]
                }
            ]
        },
        {
            "backgroundColor": "#FFFFFF",
            "widgetName": "Container3",
            "rightColumn": 16,
            "orientation": "VERTICAL",
            "snapColumns": 16,
            "widgetId": "eavpzddsyy",
            "containerStyle": "card",
            "topRow": 9,
            "bottomRow": 23,
            "parentRowSpace": 38,
            "isVisible": true,
            "type": "CONTAINER_WIDGET",
            "dynamicBindings": {},
            "isLoading": false,
            "parentColumnSpace": 75.25,
            "leftColumn": 0,
            "children": [
                {
                    "backgroundColor": "#FFFFFF",
                    "widgetName": "7023pcljqc",
                    "rightColumn": 1204,
                    "orientation": "VERTICAL",
                    "snapColumns": 16,
                    "detachFromLayout": true,
                    "widgetId": "fwrt1tntll",
                    "containerStyle": "none",
                    "topRow": 0,
                    "bottomRow": 532,
                    "parentRowSpace": 1,
                    "isVisible": true,
                    "type": "CANVAS_WIDGET",
                    "canExtend": false,
                    "isLoading": false,
                    "parentColumnSpace": 1,
                    "leftColumn": 0,
                    "children": [
                        {
                            "widgetName": "Text3",
                            "rightColumn": 3,
                            "widgetId": "lzz2qxcwi5",
                            "topRow": 0,
                            "bottomRow": 1,
                            "parentRowSpace": 38,
                            "isVisible": true,
                            "type": "TEXT_WIDGET",
                            "dynamicBindings": {},
                            "isLoading": false,
                            "parentColumnSpace": 72.875,
                            "leftColumn": 0,
                            "text": "Title",
                            "textStyle": "HEADING"
                        },
                        {
                            "widgetName": "Aditya",
                            "rightColumn": 15,
                            "widgetId": "p4ph0yxggg",
                            "topRow": 1,
                            "bottomRow": 7,
                            "tabs": [
                                {
                                    "label": "Tab 1",
                                    "id": "tab1"
                                },
                                {
                                    "label": "Tab 2",
                                    "id": "tab2"
                                }
                            ],
                            "parentRowSpace": 38,
                            "isVisible": true,
                            "type": "TABS_WIDGET",
                            "dynamicBindings": {},
                            "parentId": "fwrt1tntll",
                            "shouldScrollContents": true,
                            "blueprint": {
                                "view": [
                                    {
                                        "size": {
                                            "rows": 6,
                                            "cols": 16
                                        },
                                        "position": {
                                            "top": 0,
                                            "left": 0
                                        },
                                        "type": "CANVAS_WIDGET",
                                        "props": {
                                            "tabId": "tab1",
                                            "detachFromLayout": true,
                                            "children": [],
                                            "containerStyle": "none",
                                            "canExtend": false
                                        }
                                    },
                                    {
                                        "size": {
                                            "rows": 6,
                                            "cols": 16
                                        },
                                        "position": {
                                            "top": 0,
                                            "left": 0
                                        },
                                        "type": "CANVAS_WIDGET",
                                        "props": {
                                            "tabId": "tab2",
                                            "detachFromLayout": true,
                                            "children": [],
                                            "containerStyle": "none",
                                            "canExtend": false
                                        }
                                    }
                                ]
                            },
                            "isLoading": false,
                            "parentColumnSpace": 71.75,
                            "leftColumn": 3,
                            "children": [
                                {
                                    "tabId": "tab1",
                                    "widgetName": "Canvas1",
                                    "rightColumn": 574,
                                    "detachFromLayout": true,
                                    "widgetId": "s3lmx5acn6",
                                    "containerStyle": "none",
                                    "topRow": 0,
                                    "bottomRow": 266,
                                    "parentRowSpace": 1,
                                    "isVisible": true,
                                    "canExtend": false,
                                    "type": "CANVAS_WIDGET",
                                    "parentId": "p4ph0yxggg",
                                    "minHeight": 266,
                                    "isLoading": false,
                                    "parentColumnSpace": 1,
                                    "leftColumn": 0,
                                    "children": [
                                        {
                                            "widgetName": "Input1",
                                            "rightColumn": 6,
                                            "widgetId": "tl5p847ta8",
                                            "topRow": 0,
                                            "bottomRow": 1,
                                            "isValid": "{{Input1.isRequired ? Input1.text && descriptionInput.text.length > 0 ? Input1.regex ? new RegExp(Input1.regex).test(Input1.text) : true : Input1.regex ? new RegExp(Input1.regex).test(Input1.text) : true}}",
                                            "parentRowSpace": 38,
                                            "isVisible": true,
                                            "label": "Label me",
                                            "type": "INPUT_WIDGET",
                                            "dynamicBindings": {
                                                "isValid": true
                                            },
                                            "parentId": "s3lmx5acn6",
                                            "isLoading": false,
                                            "parentColumnSpace": 51.4375,
                                            "leftColumn": 1,
                                            "inputType": "TEXT"
                                        },
                                        {
                                            "widgetName": "Checkbox1",
                                            "rightColumn": 6,
                                            "widgetId": "e0da18s6li",
                                            "topRow": 2,
                                            "bottomRow": 3,
                                            "parentRowSpace": 38,
                                            "isVisible": true,
                                            "label": "Label me",
                                            "type": "CHECKBOX_WIDGET",
                                            "dynamicBindings": {},
                                            "parentId": "s3lmx5acn6",
                                            "isLoading": false,
                                            "parentColumnSpace": 51.4375,
                                            "leftColumn": 3,
                                            "defaultCheckedState": true
                                        },
                                        {
                                            "widgetName": "RadioGroup1",
                                            "rightColumn": 12,
                                            "widgetId": "xop37d5kql",
                                            "topRow": 1,
                                            "bottomRow": 3,
                                            "isValid": "{{ RadioGroup1.isRequired ? !!RadioGroup1.selectedOptionValue : true }}",
                                            "parentRowSpace": 38,
                                            "isVisible": true,
                                            "label": "Label",
                                            "type": "RADIO_GROUP_WIDGET",
                                            "dynamicBindings": {
                                                "isValid": true,
                                                "selectedOption": true
                                            },
                                            "selectedOption": "{{_.find(RadioGroup1.options, { value: RadioGroup1.selectedOptionValue })}}",
                                            "parentId": "s3lmx5acn6",
                                            "isLoading": false,
                                            "defaultOptionValue": "1",
                                            "parentColumnSpace": 51.4375,
                                            "leftColumn": 9,
                                            "options": [
                                                {
                                                    "id": "1",
                                                    "label": "Alpha",
                                                    "value": "1"
                                                },
                                                {
                                                    "id": "2",
                                                    "label": "Bravo",
                                                    "value": "2"
                                                },
                                                {
                                                    "id": "3",
                                                    "label": "Charlie",
                                                    "value": "3"
                                                }
                                            ]
                                        },
                                        {
                                            "widgetName": "Button1",
                                            "rightColumn": 9,
                                            "isDefaultClickDisabled": true,
                                            "widgetId": "ih7kwqfhsb",
                                            "buttonStyle": "PRIMARY_BUTTON",
                                            "topRow": 3,
                                            "bottomRow": 4,
                                            "parentRowSpace": 38,
                                            "isVisible": true,
                                            "type": "BUTTON_WIDGET",
                                            "dynamicBindings": {},
                                            "parentId": "s3lmx5acn6",
                                            "isLoading": false,
                                            "parentColumnSpace": 51.4375,
                                            "leftColumn": 7,
                                            "text": "Submit",
                                            "isDisabled": false
                                        }
                                    ]
                                },
                                {
                                    "tabId": "tab2",
                                    "widgetName": "Canvas2",
                                    "rightColumn": 574,
                                    "detachFromLayout": true,
                                    "widgetId": "4gm6hualwh",
                                    "containerStyle": "none",
                                    "topRow": 0,
                                    "bottomRow": 266,
                                    "parentRowSpace": 1,
                                    "isVisible": true,
                                    "canExtend": false,
                                    "type": "CANVAS_WIDGET",
                                    "parentId": "p4ph0yxggg",
                                    "minHeight": 266,
                                    "isLoading": false,
                                    "parentColumnSpace": 1,
                                    "leftColumn": 0,
                                    "children": [
                                        {
                                            "widgetName": "RichTextEditor1",
                                            "rightColumn": 12,
                                            "isDefaultClickDisabled": true,
                                            "widgetId": "k3ec6crxfs",
                                            "topRow": 0,
                                            "bottomRow": 5,
                                            "parentRowSpace": 38,
                                            "isVisible": true,
                                            "type": "RICH_TEXT_EDITOR_WIDGET",
                                            "dynamicBindings": {},
                                            "parentId": "4gm6hualwh",
                                            "isLoading": false,
                                            "parentColumnSpace": 51.4375,
                                            "leftColumn": 4,
                                            "defaultText": "This is the initial <b>content</b> of the editor",
                                            "isDisabled": false
                                        },
                                        {
                                            "widgetName": "Checkbox2",
                                            "rightColumn": 4,
                                            "widgetId": "68e5f5kehb",
                                            "topRow": 1,
                                            "bottomRow": 2,
                                            "parentRowSpace": 38,
                                            "isVisible": true,
                                            "label": "Label me",
                                            "type": "CHECKBOX_WIDGET",
                                            "dynamicBindings": {},
                                            "parentId": "4gm6hualwh",
                                            "isLoading": false,
                                            "parentColumnSpace": 51.4375,
                                            "leftColumn": 1,
                                            "defaultCheckedState": true
                                        }
                                    ]
                                }
                            ],
                            "selectedTab": "AAditya"
                        }
                    ]
                }
            ]
        },
        {
            "backgroundColor": "#FFFFFF",
            "widgetName": "Container4",
            "rightColumn": 16,
            "orientation": "VERTICAL",
            "snapColumns": 16,
            "widgetId": "m2nzemp45g",
            "containerStyle": "card",
            "topRow": 0,
            "bottomRow": 9,
            "parentRowSpace": 38,
            "isVisible": true,
            "type": "CONTAINER_WIDGET",
            "dynamicBindings": {},
            "isLoading": false,
            "parentColumnSpace": 75.25,
            "leftColumn": 8,
            "children": [
                {
                    "backgroundColor": "#FFFFFF",
                    "widgetName": "hr7raim6z1",
                    "rightColumn": 602,
                    "orientation": "VERTICAL",
                    "snapColumns": 16,
                    "detachFromLayout": true,
                    "widgetId": "nlnjrkg0uh",
                    "containerStyle": "none",
                    "topRow": 0,
                    "bottomRow": 342,
                    "parentRowSpace": 1,
                    "isVisible": true,
                    "type": "CANVAS_WIDGET",
                    "canExtend": false,
                    "isLoading": false,
                    "parentColumnSpace": 1,
                    "leftColumn": 0,
                    "children": [
                        {
                            "widgetName": "Text2",
                            "rightColumn": 3,
                            "widgetId": "k7lop1jds0",
                            "topRow": 0,
                            "bottomRow": 1,
                            "parentRowSpace": 38,
                            "isVisible": true,
                            "type": "TEXT_WIDGET",
                            "dynamicBindings": {},
                            "isLoading": false,
                            "parentColumnSpace": 35.25,
                            "leftColumn": 0,
                            "text": "Title",
                            "textStyle": "HEADING"
                        }
                    ]
                }
            ]
        }
    ]
},
"layoutOnLoadActions": []
}
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1254,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"dynamicBindings": {},
"version": 4,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"rightColumn": 8,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "8elnkhrzdb",
"containerStyle": "card",
"topRow": 0,
"bottomRow": 9,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"dynamicBindings": {},
"isLoading": false,
"parentColumnSpace": 75.25,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "s3m9o0kzef",
"rightColumn": 602,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "4utikp3lta",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 342,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
"canExtend": false,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"widgetName": "Text1",
"rightColumn": 3,
"widgetId": "6350kah7vo",
"topRow": 0,
"bottomRow": 1,
"parentRowSpace": 38,
"isVisible": true,
"type": "TEXT_WIDGET",
"dynamicBindings": {},
"isLoading": false,
"parentColumnSpace": 35.25,
"leftColumn": 0,
"text": "Title",
"textStyle": "HEADING"
}
]
}
]
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"rightColumn": 16,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "eavpzddsyy",
"containerStyle": "card",
"topRow": 9,
"bottomRow": 20,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"dynamicBindings": {},
"isLoading": false,
"parentColumnSpace": 75.25,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "7023pcljqc",
"rightColumn": 1204,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "fwrt1tntll",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 532,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
"canExtend": false,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"widgetName": "Text3",
"rightColumn": 3,
"widgetId": "lzz2qxcwi5",
"topRow": 0,
"bottomRow": 1,
"parentRowSpace": 38,
"isVisible": true,
"type": "TEXT_WIDGET",
"dynamicBindings": {},
"isLoading": false,
"parentColumnSpace": 72.875,
"leftColumn": 0,
"text": "Title",
"textStyle": "HEADING"
},
{
"widgetName": "Tab",
"rightColumn": 7,
"widgetId": "p4ph0yxggg",
"topRow": 2,
"bottomRow": 8,
"tabs": [
{
"label": "Tab 1",
"id": "tab1"
},
{
"label": "Tab 2",
"id": "tab2"
},
{
"id": "tab6zuucm7r5j",
"label": "Tab 3"
},
{
"id": "tab5fcogap5gv",
"label": "Tab 4"
}
],
"parentRowSpace": 38,
"isVisible": true,
"type": "TABS_WIDGET",
"dynamicBindings": {},
"parentId": "fwrt1tntll",
"shouldScrollContents": true,
"blueprint": {
"view": [
{
"size": {
"rows": 6,
"cols": 16
},
"position": {
"top": 0,
"left": 0
},
"type": "CANVAS_WIDGET",
"props": {
"tabId": "tab1",
"detachFromLayout": true,
"children": [],
"containerStyle": "none",
"canExtend": false
}
},
{
"size": {
"rows": 6,
"cols": 16
},
"position": {
"top": 0,
"left": 0
},
"type": "CANVAS_WIDGET",
"props": {
"tabId": "tab2",
"detachFromLayout": true,
"children": [],
"containerStyle": "none",
"canExtend": false
}
}
]
},
"isLoading": false,
"parentColumnSpace": 71.75,
"leftColumn": 1,
"children": [
{
"tabId": "tab1",
"widgetName": "Canvas1",
"rightColumn": 574,
"detachFromLayout": true,
"widgetId": "s3lmx5acn6",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 266,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"parentId": "p4ph0yxggg",
"minHeight": 266,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"widgetName": "Input1",
"rightColumn": 6,
"widgetId": "tl5p847ta8",
"topRow": 0,
"bottomRow": 1,
"isValid": "{{Input1.isRequired ? Input1.text && descriptionInput.text.length > 0 ? Input1.regex ? new RegExp(Input1.regex).test(Input1.text) : true : Input1.regex ? new RegExp(Input1.regex).test(Input1.text) : true}}",
"parentRowSpace": 38,
"isVisible": true,
"label": "Label me",
"type": "INPUT_WIDGET",
"dynamicBindings": {
"isValid": true
},
"parentId": "s3lmx5acn6",
"isLoading": false,
"parentColumnSpace": 51.4375,
"leftColumn": 1,
"inputType": "TEXT"
},
{
"widgetName": "Checkbox1",
"rightColumn": 6,
"widgetId": "e0da18s6li",
"topRow": 2,
"bottomRow": 3,
"parentRowSpace": 38,
"isVisible": true,
"label": "Label me",
"type": "CHECKBOX_WIDGET",
"dynamicBindings": {},
"parentId": "s3lmx5acn6",
"isLoading": false,
"parentColumnSpace": 51.4375,
"leftColumn": 3,
"defaultCheckedState": true
},
{
"widgetName": "RadioGroup1",
"rightColumn": 12,
"widgetId": "xop37d5kql",
"topRow": 1,
"bottomRow": 3,
"isValid": "{{ RadioGroup1.isRequired ? !!RadioGroup1.selectedOptionValue : true }}",
"parentRowSpace": 38,
"isVisible": true,
"label": "Label",
"type": "RADIO_GROUP_WIDGET",
"dynamicBindings": {
"isValid": true,
"selectedOption": true
},
"selectedOption": "{{_.find(RadioGroup1.options, { value: RadioGroup1.selectedOptionValue })}}",
"parentId": "s3lmx5acn6",
"isLoading": false,
"defaultOptionValue": "1",
"parentColumnSpace": 51.4375,
"leftColumn": 9,
"options": [
{
"id": "1",
"label": "Alpha",
"value": "1"
},
{
"id": "2",
"label": "Bravo",
"value": "2"
},
{
"id": "3",
"label": "Charlie",
"value": "3"
}
]
},
{
"widgetName": "Button1",
"rightColumn": 9,
"isDefaultClickDisabled": true,
"widgetId": "ih7kwqfhsb",
"buttonStyle": "PRIMARY_BUTTON",
"topRow": 3,
"bottomRow": 4,
"parentRowSpace": 38,
"isVisible": true,
"type": "BUTTON_WIDGET",
"dynamicBindings": {},
"parentId": "s3lmx5acn6",
"isLoading": false,
"parentColumnSpace": 51.4375,
"leftColumn": 7,
"text": "Submit",
"isDisabled": false
}
]
},
{
"tabId": "tab2",
"widgetName": "Canvas2",
"rightColumn": 574,
"detachFromLayout": true,
"widgetId": "4gm6hualwh",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 228,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"parentId": "p4ph0yxggg",
"minHeight": 266,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"widgetName": "Checkbox2",
"rightColumn": 4,
"widgetId": "68e5f5kehb",
"topRow": 1,
"bottomRow": 2,
"parentRowSpace": 38,
"isVisible": true,
"label": "Label me",
"type": "CHECKBOX_WIDGET",
"dynamicBindings": {},
"parentId": "4gm6hualwh",
"isLoading": false,
"parentColumnSpace": 51.4375,
"leftColumn": 1,
"defaultCheckedState": true
}
]
},
{
"tabId": "tabp0uz4ucxjy",
"widgetName": "Canvas3",
"rightColumn": 430.5,
"detachFromLayout": true,
"widgetId": "d3vnpcqfux",
"containerStyle": "none",
"topRow": 1,
"bottomRow": 229,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"parentId": "p4ph0yxggg",
"minHeight": 228,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": []
},
{
"tabId": "tab9deewfrkvy",
"widgetName": "Canvas4",
"rightColumn": 1076.25,
"detachFromLayout": true,
"widgetId": "f12x4oh4im",
"containerStyle": "none",
"topRow": 1,
"bottomRow": 305,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"parentId": "p4ph0yxggg",
"minHeight": 304,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": []
},
{
"tabId": "tab5mky7wi8s7",
"widgetName": "Canvas5",
"rightColumn": 1076.25,
"detachFromLayout": true,
"widgetId": "7mvuw32897",
"containerStyle": "none",
"topRow": 1,
"bottomRow": 305,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"parentId": "p4ph0yxggg",
"minHeight": 304,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": []
},
{
"tabId": "tabf93xg6z8ic",
"widgetName": "Canvas6",
"rightColumn": 1076.25,
"detachFromLayout": true,
"widgetId": "z7br5p9n30",
"containerStyle": "none",
"topRow": 1,
"bottomRow": 305,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"parentId": "p4ph0yxggg",
"minHeight": 304,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": []
},
{
"tabId": "tabvpmnf6jds8",
"widgetName": "Canvas7",
"rightColumn": 1076.25,
"detachFromLayout": true,
"widgetId": "msmbeq6d5x",
"containerStyle": "none",
"topRow": 1,
"bottomRow": 305,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"parentId": "p4ph0yxggg",
"minHeight": 304,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": []
},
{
"tabId": "tabq1fozv19qz",
"widgetName": "Canvas8",
"rightColumn": 1076.25,
"detachFromLayout": true,
"widgetId": "mkl9qtbdxw",
"containerStyle": "none",
"topRow": 1,
"bottomRow": 305,
"parentRowSpace": 1,
"isVisible": true,
"canExtend": false,
"type": "CANVAS_WIDGET",
"parentId": "p4ph0yxggg",
"minHeight": 304,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": []
}
],
"selectedTab": "Tab 2"
}
]
}
]
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container4",
"rightColumn": 16,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "m2nzemp45g",
"containerStyle": "card",
"topRow": 0,
"bottomRow": 9,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"dynamicBindings": {},
"isLoading": false,
"parentColumnSpace": 75.25,
"leftColumn": 8,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "hr7raim6z1",
"rightColumn": 602,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "nlnjrkg0uh",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 342,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
"canExtend": false,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"widgetName": "Text2",
"rightColumn": 3,
"widgetId": "k7lop1jds0",
"topRow": 0,
"bottomRow": 1,
"parentRowSpace": 38,
"isVisible": true,
"type": "TEXT_WIDGET",
"dynamicBindings": {},
"isLoading": false,
"parentColumnSpace": 35.25,
"leftColumn": 0,
"text": "Title",
"textStyle": "HEADING"
}
]
}
]
}
]
},
"layoutOnLoadActions": []
}

View File

@ -0,0 +1,84 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1254,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"dynamicBindings": {},
"version": 4,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 16,
"topRow": 0,
"bottomRow": 23,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "8muuok24ny",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 1204,
"topRow": 0,
"bottomRow": 532,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"isVisible": true,
"label": "Data",
"widgetName": "Table1",
"tableData": "",
"type": "TABLE_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 2,
"rightColumn": 10,
"topRow": 3,
"bottomRow": 10,
"parentId": "tyiwk4xuq0",
"widgetId": "5up3r2iuvs",
"dynamicBindings": {
"selectedRow": true
}
}
],
"widgetId": "tyiwk4xuq0",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "3oe1ka7jon"
}
]
}
}

View File

@ -0,0 +1,394 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1254,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"dynamicBindings": {},
"version": 3,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 1,
"rightColumn": 15,
"topRow": 0,
"bottomRow": 15,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "utncsu66ty",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"isVisible": true,
"isDisabled": false,
"datePickerType": "DATE_PICKER",
"dateFormat": "DD/MM/YYYY",
"label": "Date",
"widgetName": "DatePicker1",
"defaultDate": "2020-04-25T13:33:46.277+05:30",
"type": "DATE_PICKER_WIDGET",
"isLoading": false,
"parentColumnSpace": 34.6875,
"parentRowSpace": 38,
"leftColumn": 1,
"rightColumn": 9,
"topRow": 1,
"bottomRow": 2,
"parentId": "acizsl94my",
"widgetId": "o87a4mf3lq",
"dynamicProperties": {},
"dynamicBindings": {
"isValid": true
},
"dynamicTriggers": {
"onDateSelected": true
},
"onDateSelected": "{{showModal('Modal1')}}"
},
{
"isVisible": true,
"isDisabled": false,
"datePickerType": "DATE_PICKER",
"dateFormat": "DD/MM/YYYY",
"label": "Date",
"widgetName": "DatePicker2",
"defaultDate": "2020-04-24T13:03:46.277+05:30",
"type": "DATE_PICKER_WIDGET",
"isLoading": false,
"parentColumnSpace": 34.6875,
"parentRowSpace": 38,
"leftColumn": 1,
"rightColumn": 9,
"topRow": 3,
"bottomRow": 4,
"parentId": "acizsl94my",
"widgetId": "tq86uzjesl"
},
{
"isVisible": true,
"text": "{{DatePicker1.defaultDate}}",
"textStyle": "LABEL",
"widgetName": "Text5",
"type": "TEXT_WIDGET",
"isLoading": false,
"parentColumnSpace": 34.6875,
"parentRowSpace": 38,
"leftColumn": 4,
"rightColumn": 8,
"topRow": 5,
"bottomRow": 6,
"parentId": "acizsl94my",
"widgetId": "dodyn4d4qd",
"dynamicBindings": {
"text": true
}
}
],
"widgetId": "acizsl94my",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "mp429a7dl3"
},
{
"isVisible": false,
"size": "MODAL_SMALL",
"canEscapeKeyClose": true,
"detachFromLayout": true,
"canOutsideClickClose": true,
"shouldScrollContents": true,
"widgetName": "Modal1",
"children": [
{
"isVisible": true,
"widgetName": "Canvas1",
"detachFromLayout": true,
"canExtend": true,
"isDisabled": false,
"shouldScrollContents": false,
"children": [
{
"isVisible": true,
"widgetName": "Icon1",
"iconName": "cross",
"iconSize": 24,
"color": "#040627",
"type": "ICON_WIDGET",
"isLoading": false,
"leftColumn": 15,
"rightColumn": 16,
"topRow": 0,
"bottomRow": 1,
"parentId": "cwamdbv44c",
"widgetId": "t3sjfihdb1",
"onClick": "{{closeModal('Modal1')}}"
},
{
"isVisible": true,
"text": "Modal Title",
"textStyle": "HEADING",
"widgetName": "Text4",
"type": "TEXT_WIDGET",
"isLoading": false,
"leftColumn": 0,
"rightColumn": 15,
"topRow": 0,
"bottomRow": 1,
"parentId": "cwamdbv44c",
"widgetId": "x893ud3zjh",
"dynamicBindings": {}
},
{
"isVisible": true,
"text": "Cancel",
"buttonStyle": "SECONDARY_BUTTON",
"widgetName": "Button2",
"isDisabled": false,
"isDefaultClickDisabled": true,
"type": "BUTTON_WIDGET",
"isLoading": false,
"leftColumn": 10,
"rightColumn": 13,
"topRow": 4,
"bottomRow": 5,
"parentId": "cwamdbv44c",
"widgetId": "q9snwskqan"
},
{
"isVisible": true,
"text": "Confirm",
"buttonStyle": "PRIMARY_BUTTON",
"widgetName": "Button3",
"isDisabled": false,
"isDefaultClickDisabled": true,
"type": "BUTTON_WIDGET",
"isLoading": false,
"leftColumn": 13,
"rightColumn": 16,
"topRow": 4,
"bottomRow": 5,
"parentId": "cwamdbv44c",
"widgetId": "tufuj2kdpz"
}
],
"blueprint": {
"view": [
{
"type": "ICON_WIDGET",
"position": {
"left": 15,
"top": 0
},
"size": {
"rows": 1,
"cols": 1
},
"props": {
"iconName": "cross",
"iconSize": 24,
"color": "#040627"
}
},
{
"type": "TEXT_WIDGET",
"position": {
"left": 0,
"top": 0
},
"size": {
"rows": 1,
"cols": 15
},
"props": {
"text": "Modal Title",
"textStyle": "HEADING"
}
},
{
"type": "BUTTON_WIDGET",
"position": {
"left": 10,
"top": 4
},
"size": {
"rows": 1,
"cols": 3
},
"props": {
"text": "Cancel",
"buttonStyle": "SECONDARY_BUTTON"
}
},
{
"type": "BUTTON_WIDGET",
"position": {
"left": 13,
"top": 4
},
"size": {
"rows": 1,
"cols": 3
},
"props": {
"text": "Confirm",
"buttonStyle": "PRIMARY_BUTTON"
}
}
],
"operations": [
{
"type": "MODIFY_PROPS"
}
]
},
"minHeight": 0,
"type": "CANVAS_WIDGET",
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 0,
"topRow": 0,
"bottomRow": 0,
"parentId": "bx9a2jg08o",
"widgetId": "cwamdbv44c"
}
],
"blueprint": {
"view": [
{
"type": "CANVAS_WIDGET",
"position": {
"left": 0,
"top": 0
},
"props": {
"detachFromLayout": true,
"canExtend": true,
"isVisible": true,
"isDisabled": false,
"shouldScrollContents": false,
"children": [],
"blueprint": {
"view": [
{
"type": "ICON_WIDGET",
"position": {
"left": 15,
"top": 0
},
"size": {
"rows": 1,
"cols": 1
},
"props": {
"iconName": "cross",
"iconSize": 24,
"color": "#040627"
}
},
{
"type": "TEXT_WIDGET",
"position": {
"left": 0,
"top": 0
},
"size": {
"rows": 1,
"cols": 15
},
"props": {
"text": "Modal Title",
"textStyle": "HEADING"
}
},
{
"type": "BUTTON_WIDGET",
"position": {
"left": 10,
"top": 4
},
"size": {
"rows": 1,
"cols": 3
},
"props": {
"text": "Cancel",
"buttonStyle": "SECONDARY_BUTTON"
}
},
{
"type": "BUTTON_WIDGET",
"position": {
"left": 13,
"top": 4
},
"size": {
"rows": 1,
"cols": 3
},
"props": {
"text": "Confirm",
"buttonStyle": "PRIMARY_BUTTON"
}
}
],
"operations": [
{
"type": "MODIFY_PROPS"
}
]
}
}
}
]
},
"type": "MODAL_WIDGET",
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 0,
"topRow": 0,
"bottomRow": 0,
"parentId": "0",
"widgetId": "bx9a2jg08o"
}
]
}
}

View File

@ -1,268 +1,268 @@
{
"dsl": {
   "widgetName": "MainContainer",
   "backgroundColor": "none",
   "rightColumn": 1224,
   "snapColumns": 16,
   "detachFromLayout": true,
   "widgetId": "0",
   "topRow": 0,
   "bottomRow": 1292,
   "containerStyle": "none",
   "snapRows": 33,
   "parentRowSpace": 1,
   "type": "CANVAS_WIDGET",
   "canExtend": true,
   "dynamicBindings": {},
   "version": 3,
   "minHeight": 1292,
   "parentColumnSpace": 1,
   "leftColumn": 0,
   "children": [
       {
           "backgroundColor": "#FFFFFF",
           "widgetName": "Container1",
           "type": "CONTAINER_WIDGET",
           "containerStyle": "card",
           "isVisible": true,
           "isLoading": false,
           "parentColumnSpace": 75.25,
           "parentRowSpace": 38,
           "dynamicBindings": {},
           "leftColumn": 0,
           "rightColumn": 8,
           "topRow": 0,
           "bottomRow": 9,
           "snapColumns": 16,
           "orientation": "VERTICAL",
           "children": [
               {
                   "backgroundColor": "#FFFFFF",
                   "widgetName": "c7p0vl1zqc",
                   "type": "CANVAS_WIDGET",
                   "containerStyle": "none",
                   "isVisible": true,
                   "isLoading": false,
                   "parentColumnSpace": 1,
                   "parentRowSpace": 1,
                   "leftColumn": 0,
                   "rightColumn": 602,
                   "topRow": 0,
                   "bottomRow": 342,
                   "snapColumns": 16,
                   "orientation": "VERTICAL",
                   "children": [
                       {
                           "text": "Title",
                           "textStyle": "HEADING",
                           "widgetName": "Text1",
                           "type": "TEXT_WIDGET",
                           "isVisible": true,
                           "isLoading": false,
                           "parentColumnSpace": 35.25,
                           "parentRowSpace": 38,
                           "dynamicBindings": {},
                           "leftColumn": 0,
                           "rightColumn": 3,
                           "topRow": 0,
                           "bottomRow": 1,
                           "widgetId": "5bjvswgbeq"
                       },
                       {
                           "isVisible": true,
                           "defaultImage": "https://www.cowgirlcontractcleaning.com/wp-content/uploads/sites/360/2018/05/placeholder-img-5.jpg",
                           "imageShape": "RECTANGLE",
                           "image": "https://images.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940",
                           "widgetName": "Image1",
                           "type": "IMAGE_WIDGET",
                           "isLoading": false,
                           "parentColumnSpace": 34.6875,
                           "parentRowSpace": 38,
                           "dynamicBindings": {},
                           "leftColumn": 5,
                           "rightColumn": 7,
                           "topRow": 2,
                           "bottomRow": 5,
                           "widgetId": "csc9e18wrn"
                       }
                   ],
                   "widgetId": "odbku2ed33",
                   "detachFromLayout": true,
                   "canExtend": false
               }
           ],
           "widgetId": "sicjgah1h4"
       },
       {
           "backgroundColor": "#FFFFFF",
           "widgetName": "Container3",
           "type": "CONTAINER_WIDGET",
           "containerStyle": "card",
           "isVisible": true,
           "isLoading": false,
           "parentColumnSpace": 75.25,
           "parentRowSpace": 38,
           "dynamicBindings": {},
           "leftColumn": 0,
           "rightColumn": 16,
           "topRow": 9,
           "bottomRow": 23,
           "snapColumns": 16,
           "orientation": "VERTICAL",
           "children": [
               {
                   "backgroundColor": "#FFFFFF",
                   "widgetName": "l02um7toe4",
                   "type": "CANVAS_WIDGET",
                   "containerStyle": "none",
                   "isVisible": true,
                   "isLoading": false,
                   "parentColumnSpace": 1,
                   "parentRowSpace": 1,
                   "leftColumn": 0,
                   "rightColumn": 1204,
                   "topRow": 0,
                   "bottomRow": 532,
                   "snapColumns": 16,
                   "orientation": "VERTICAL",
                   "children": [
                       {
                           "text": "Title",
                           "textStyle": "HEADING",
                           "widgetName": "Text3",
                           "type": "TEXT_WIDGET",
                           "isVisible": true,
                           "isLoading": false,
                           "parentColumnSpace": 72.875,
                           "parentRowSpace": 38,
                           "dynamicBindings": {},
                           "leftColumn": 0,
                           "rightColumn": 3,
                           "topRow": 0,
                           "bottomRow": 1,
                           "widgetId": "x6fphn5297"
                       },
                       {
                           "isVisible": true,
                           "widgetName": "Chart1",
                           "chartType": "BAR_CHART",
                           "chartName": "App Sign Up",
                           "allowHorizontalScroll": false,
                           "chartData": [
                               {
                                   "seriesName": "",
                                   "data": [
                                       {
                                           "x": "Mon",
                                           "y": 10000
                                       },
                                       {
                                           "x": "Tue",
                                           "y": 12000
                                       },
                                       {
                                           "x": "Wed",
                                           "y": 32000
                                       },
                                       {
                                           "x": "Thu",
                                           "y": 28000
                                       },
                                       {
                                           "x": "Fri",
                                           "y": 14000
                                       },
                                       {
                                           "x": "Sat",
                                           "y": 19000
                                       },
                                       {
                                           "x": "Sun",
                                           "y": 36000
                                       }
                                   ]
                               }
                           ],
                           "xAxisName": "Last Week",
                           "yAxisName": "Total Order Revenue $",
                           "type": "CHART_WIDGET",
                           "isLoading": false,
                           "parentColumnSpace": 71.75,
                           "parentRowSpace": 38,
                           "dynamicBindings": {},
                           "leftColumn": 3,
                           "rightColumn": 13,
                           "topRow": 2,
                           "bottomRow": 10,
                           "parentId": "mt3eypejz7",
                           "widgetId": "km95vrd4sy"
                       }
                   ],
                   "widgetId": "mt3eypejz7",
                   "detachFromLayout": true,
                   "canExtend": false
               }
           ],
           "widgetId": "oz8vs26002"
       },
       {
           "backgroundColor": "#FFFFFF",
           "widgetName": "Container4",
           "type": "CONTAINER_WIDGET",
           "containerStyle": "card",
           "isVisible": true,
           "isLoading": false,
           "parentColumnSpace": 75.25,
           "parentRowSpace": 38,
           "dynamicBindings": {},
           "leftColumn": 8,
           "rightColumn": 16,
           "topRow": 0,
           "bottomRow": 9,
           "snapColumns": 16,
           "orientation": "VERTICAL",
           "children": [
               {
                   "backgroundColor": "#FFFFFF",
                   "widgetName": "9w520wvlzd",
                   "type": "CANVAS_WIDGET",
                   "containerStyle": "none",
                   "isVisible": true,
                   "isLoading": false,
                   "parentColumnSpace": 1,
                   "parentRowSpace": 1,
                   "leftColumn": 0,
                   "rightColumn": 602,
                   "topRow": 0,
                   "bottomRow": 342,
                   "snapColumns": 16,
                   "orientation": "VERTICAL",
                   "children": [
                       {
                           "text": "Title",
                           "textStyle": "HEADING",
                           "widgetName": "Text2",
                           "type": "TEXT_WIDGET",
                           "isVisible": true,
                           "isLoading": false,
                           "parentColumnSpace": 35.25,
                           "parentRowSpace": 38,
                           "dynamicBindings": {},
                           "leftColumn": 0,
                           "rightColumn": 3,
                           "topRow": 0,
                           "bottomRow": 1,
                           "widgetId": "ffvzxjjeok"
                       }
                   ],
                   "widgetId": "5kvdaa6y6m",
                   "detachFromLayout": true,
                   "canExtend": false
               }
           ],
           "widgetId": "z6owhekptc"
       }
   ]
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1292,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"dynamicBindings": {},
"version": 3,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 8,
"topRow": 0,
"bottomRow": 9,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "c7p0vl1zqc",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text1",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 35.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "5bjvswgbeq"
},
{
"isVisible": true,
"defaultImage": "https://www.cowgirlcontractcleaning.com/wp-content/uploads/sites/360/2018/05/placeholder-img-5.jpg",
"imageShape": "RECTANGLE",
"image": "https://images.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940",
"widgetName": "Image1",
"type": "IMAGE_WIDGET",
"isLoading": false,
"parentColumnSpace": 34.6875,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 5,
"rightColumn": 7,
"topRow": 2,
"bottomRow": 5,
"widgetId": "csc9e18wrn"
}
],
"widgetId": "odbku2ed33",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "sicjgah1h4"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 16,
"topRow": 9,
"bottomRow": 23,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "l02um7toe4",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 1204,
"topRow": 0,
"bottomRow": 532,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text3",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 72.875,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "x6fphn5297"
},
{
"isVisible": true,
"widgetName": "Chart1",
"chartType": "BAR_CHART",
"chartName": "App Sign Up",
"allowHorizontalScroll": false,
"chartData": [
{
"seriesName": "",
"data": [
{
"x": "Mon",
"y": 10000
},
{
"x": "Tue",
"y": 12000
},
{
"x": "Wed",
"y": 32000
},
{
"x": "Thu",
"y": 28000
},
{
"x": "Fri",
"y": 14000
},
{
"x": "Sat",
"y": 19000
},
{
"x": "Sun",
"y": 36000
}
]
}
],
"xAxisName": "Last Week",
"yAxisName": "Total Order Revenue $",
"type": "CHART_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 3,
"rightColumn": 13,
"topRow": 2,
"bottomRow": 10,
"parentId": "mt3eypejz7",
"widgetId": "km95vrd4sy"
}
],
"widgetId": "mt3eypejz7",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "oz8vs26002"
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container4",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 8,
"rightColumn": 16,
"topRow": 0,
"bottomRow": 9,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "9w520wvlzd",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 602,
"topRow": 0,
"bottomRow": 342,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"text": "Title",
"textStyle": "HEADING",
"widgetName": "Text2",
"type": "TEXT_WIDGET",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 35.25,
"parentRowSpace": 38,
"dynamicBindings": {},
"leftColumn": 0,
"rightColumn": 3,
"topRow": 0,
"bottomRow": 1,
"widgetId": "ffvzxjjeok"
}
],
"widgetId": "5kvdaa6y6m",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "z6owhekptc"
}
]
},
"layoutOnLoadActions": []
}
}

View File

@ -0,0 +1,58 @@
const commonlocators = require("../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json");
const widgetsPage = require("../../../locators/Widgets.json");
const dsl = require("../../../fixtures/uiBindDsl.json");
describe("Binding the Datepicker and Text Widget", function() {
let nextDay;
let dateDp2;
before(() => {
cy.addDsl(dsl);
});
it("DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function() {
cy.openPropertyPane("textwidget");
/**
* Bind the datepicker1 to text widget
*/
cy.testJsontext("text", "{{DatePicker1.defaultDate}}");
cy.get(commonlocators.editPropCrossButton).click();
/**
* Fetching the date on DatePicker2
*/
cy.get(formWidgetsPage.datepickerWidget + " .bp3-input")
.eq(1)
.invoke("val")
.then(val => {
dateDp2 = val;
cy.log(dateDp2);
});
/**
* Changing date on datepicker1 to current date +1
*/
cy.openPropertyPane("datepickerwidget");
cy.SetDateToToday();
cy.get(formWidgetsPage.nextDayBtn).click();
cy.get(commonlocators.onDateSelectedField).click();
cy.get(commonlocators.editPropCrossButton).click();
/**
*Validate the date in text widget
*/
nextDay = Cypress.moment()
.add(1, "days")
.format("YYYY-MM-DD");
cy.get(commonlocators.labelTextStyle).should("contain", nextDay);
});
it("Validate the Date is not changed in DatePicker2", function() {
cy.get(formWidgetsPage.datepickerWidget + " .bp3-input")
.eq(1)
.should("have.value", dateDp2);
});
});

View File

@ -0,0 +1,45 @@
const commonlocators = require("../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/tableWidgetDsl.json");
const pages = require("../../../locators/Pages.json");
const apiPage = require("../../../locators/ApiEditor.json");
let apiData;
describe("Test Create Api and Bind to Table widget", function() {
before(() => {
cy.addDsl(dsl);
});
it("Test_Add users api and execute api", function() {
cy.NavigateToApiEditor();
cy.testCreateApiButton();
cy.createApi(this.data.userApi, "users");
cy.get(apiPage.responseBody)
.contains("name")
.siblings("span")
.invoke("text")
.then(text => {
cy.log(text);
apiData = text;
cy.log("val1:" + apiData);
});
});
it("Test_Validate the Api data is updated on Table widget", function() {
cy.get(pages.pagesIcon).click({ force: true });
cy.openPropertyPane("tablewidget");
cy.testJsontext("tabledata", "{{Api1.data}}");
cy.get(commonlocators.editPropCrossButton).click();
/**
* readTabledata--> is to read the table contents
* @param --> "row num" and "col num"
*/
cy.readTabledata("0", "1").then(tabData => {
expect(apiData).to.eq(`\"${tabData}\"`);
});
});
afterEach(() => {
// put your clean up code if any
});
});

View File

@ -0,0 +1,29 @@
const commonlocators = require("../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/TextTabledsl.json");
describe("Text-Table Binding Functionality", function() {
before(() => {
cy.addDsl(dsl);
});
it("Text-Table Binding Functionality For Username", function() {
cy.openPropertyPane("tablewidget");
/**
* @param(Index) Provide index value to select the row.
*/
cy.isSelectRow(1);
cy.openPropertyPane("textwidget");
cy.testJsontext("text", JSON.stringify(this.data.textfun));
/**
* @param{Row Index} Provide the row index
* @param(Column Index) Provide column index
*/
cy.readTabledata("1", "2").then(tabData => {
const tabValue = `\"${tabData}\"`;
cy.get(commonlocators.TextInside).should("have.text", tabValue);
});
});
afterEach(() => {
// put your clean up code if any
cy.get(commonlocators.editPropCrossButton).click();
});
});

View File

@ -1,4 +1,5 @@
const commonlocators = require("../../../locators/commonlocators.json");
const widgetsPage = require("../../../locators/Widgets.json");
const dsl = require("../../../fixtures/commondsl.json");
describe("Container Widget Functionality", function() {
@ -8,9 +9,31 @@ describe("Container Widget Functionality", function() {
it("Container Widget Functionality", function() {
cy.openPropertyPane("containerwidget");
//Checking the edit props for container changing the background color of container
cy.testCodeMirror("#C0C0C0");
/**
* @param{Text} Random Text
* @param{ContainerWidget}Mouseover
* @param{ContainerPre Css} Assertion
*/
cy.widgetText(
"job",
widgetsPage.containerWidget,
commonlocators.containerInnerText,
);
/**
* @param{Text} Random Colour
*/
cy.testCodeMirror(this.data.colour);
cy.get(widgetsPage.containerD)
.should("have.css", "background-color")
.and("eq", "rgb(255, 0, 0)");
/**
* @param{toggleButton Css} Assert to be checked
*/
cy.togglebar(widgetsPage.Scrollbutton);
cy.get(widgetsPage.containerD)
.eq(0)
.scrollIntoView({ easing: "linear" })
.should("be.visible");
cy.get(commonlocators.editPropCrossButton).click();
});

View File

@ -1,5 +1,6 @@
const commonlocators = require("../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/commondsl.json");
const widgetsPage = require("../../../locators/Widgets.json");
describe("Input Widget Functionality", function() {
beforeEach(() => {
@ -7,11 +8,54 @@ describe("Input Widget Functionality", function() {
});
it("Input Widget Functionality", function() {
cy.openPropertyPane("inputwidget");
//Checking the edit props for container and changing the Input label name
cy.testCodeMirror("Test Input Label");
cy.get(commonlocators.editPropCrossButton).click();
/**
* @param{Text} Random Text
* @param{InputWidget}Mouseover
* @param{InputPre Css} Assertion
*/
cy.widgetText("day", widgetsPage.inputWidget, widgetsPage.inputval);
/**
* @param{Text} Random Value
*/
cy.testCodeMirror(this.data.inputdata);
cy.get(widgetsPage.label)
.first()
.trigger(this.data.Hover, { force: true })
.should("have.text", "one");
cy.get(widgetsPage.datatype)
.find(commonlocators.dropdownbuttonclick)
.click({ force: true })
.get(commonlocators.dropdownmenu)
.children()
.contains("Number")
.click();
cy.get(widgetsPage.innertext)
.click({ force: true })
.type(this.data.para)
.should("be.empty");
cy.openPropertyPane("inputwidget");
cy.get(widgetsPage.defaultInput)
.type(this.data.command)
.type("hello");
cy.get(widgetsPage.placeholder)
.type(this.data.command)
.type(this.data.placeholder);
/**
* @param{Widget} Widget InnerCss
*/
cy.get(widgetsPage.innertext)
.invoke("attr", "placeholder")
.should("contain", "check");
cy.get(widgetsPage.Regex)
.click()
.type(this.data.regex);
/**
* @param{Show Alert} Css for InputChange
*/
cy.getAlert(commonlocators.optionchangetextInput);
cy.get(widgetsPage.inputButtonPos)
.eq(0)
.click({ force: true });
});
afterEach(() => {

View File

@ -1,4 +1,6 @@
const commonlocators = require("../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json");
const widgetsPage = require("../../../locators/Widgets.json");
const dsl = require("../../../fixtures/formdsl.json");
describe("Checkbox Widget Functionality", function() {
@ -8,10 +10,32 @@ describe("Checkbox Widget Functionality", function() {
it("Checkbox Widget Functionality", function() {
cy.openPropertyPane("checkboxwidget");
//Checking the edit props for Checkbox and also the properties of Checkbox widget
cy.testCodeMirror("Test Checkbox");
cy.get(commonlocators.editPropCrossButton).click();
/**
* @param{Text} Random Text
* @param{CheckboxWidget}Mouseover
* @param{CheckboxPre Css} Assertion
*/
cy.widgetText(
"checker",
formWidgetsPage.checkboxWidget,
widgetsPage.checkboxInput,
);
/**
* @param{Text} Random Value
*/
cy.testCodeMirror(this.data.checkbocInputName);
cy.get(widgetsPage.checkboxLabel).should("have.text", "value");
/**
* @param{toggleButton Css} Assert to be checked
*/
cy.togglebar(widgetsPage.defaultcheck);
/**
* @param{Show Alert} Css for InputChange
*/
cy.getAlert(commonlocators.optionchangetextCheckbox);
cy.get(widgetsPage.checkboxLabel)
.contains("value")
.click({ force: true });
});
afterEach(() => {

View File

@ -10,15 +10,30 @@ describe("DatePicker Widget Functionality", function() {
it("DatePicker Widget Functionality", function() {
cy.openPropertyPane("datepickerwidget");
//Checking the edit props for DatePicker and also the properties of DatePicker widget
cy.testCodeMirror(this.data.DatepickerLable);
// changing the date to today
cy.SetDateToToday();
//changing the Button Name
cy.widgetText(
this.data.Datepickername,
formWidgetsPage.datepickerWidget,
formWidgetsPage.datepickerWidget + " pre",
);
//Checking the edit props for DatePicker and also the properties of DatePicker widget
cy.testCodeMirror(this.data.DatepickerLable);
cy.wait("@updateLayout");
// change the date to next day
cy.get(".t--property-control-defaultdate input").click();
cy.get(".DayPicker-Day[aria-selected='true'] + div").click();
/**
* setDate--> is a Command to select the date in the date picker
* @param1 --> its takes currentday+ <future day> eg: 1
* @param2 --> user date formate
*/
cy.setDate(1, "ddd MMM DD YYYY");
const nd = Cypress.moment()
.add(1, "days")
.format("DD/MM/YYYY");

View File

@ -8,21 +8,38 @@ describe("Dropdown Widget Functionality", function() {
});
it("Dropdown Widget Functionality", function() {
cy.openPropertyPane("dropdownwidget");
//Checking the edit props for Dropdown and also the properties of Dropdown widget
cy.testCodeMirror("Test Dropdown");
/**
* @param{Text} Random Text
* @param{DropdownWidget}Mouseover
* @param{DropdownPre Css} Assertion
*/
cy.widgetText(
"lock",
formWidgetsPage.dropdownWidget,
commonlocators.containerInnerText,
);
/**
* @param{Text} Random Value
*/
cy.testCodeMirror(this.data.dropdownInput);
cy.get(formWidgetsPage.labelvalue).should("have.text", "TestD");
cy.get(formWidgetsPage.dropdownSelectionType)
.find(".bp3-button")
.find(commonlocators.dropdownbuttonclick)
.click({ force: true })
.get("ul.bp3-menu")
.get(commonlocators.dropdownmenu)
.children()
.contains("Multi Select")
.click();
cy.get(formWidgetsPage.dropdownSelectionType)
.find(".bp3-button > .bp3-button-text")
.find(commonlocators.menuSelection)
.should("have.text", "Multi Select");
cy.get(commonlocators.editPropCrossButton).click();
/**
* @param{Show Alert} Css for InputChange
*/
cy.getAlert(commonlocators.optionchangetextDropdown);
cy.get(formWidgetsPage.dropdownInput).click({ force: true });
cy.get(formWidgetsPage.dropdownInput).type("Option");
cy.dropdownDynamic("Option 1");
});
afterEach(() => {

View File

@ -1,4 +1,5 @@
const commonlocators = require("../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/formdsl.json");
describe("Form Widget Functionality", function() {
@ -7,10 +8,30 @@ describe("Form Widget Functionality", function() {
});
it("Form Widget Functionality", function() {
cy.openPropertyPane("formwidget");
//Checking the edit props for Form and also the properties of Form widget
cy.testCodeMirror("Gray");
/**
* @param{Text} Random Text
* @param{FormWidget}Mouseover
* @param{FormPre Css} Assertion
*/
cy.widgetText(
"FormTest",
formWidgetsPage.formWidget,
formWidgetsPage.formInner,
);
/**
* @param{Text} Random Colour
*/
cy.testCodeMirror(this.data.colour);
cy.get(formWidgetsPage.formD)
.should("have.css", "background-color")
.and("eq", "rgb(255, 0, 0)");
/**
* @param{toggleButton Css} Assert to be checked
*/
cy.togglebar(commonlocators.scrollView);
cy.get(formWidgetsPage.formD)
.scrollTo("bottom")
.should("be.visible");
cy.get(commonlocators.editPropCrossButton).click();
});

View File

@ -8,21 +8,65 @@ describe("Radio Widget Functionality", function() {
});
it("Radio Widget Functionality", function() {
cy.openPropertyPane("radiogroupwidget");
//Checking the edit props for Radio Widget and also the properties of Radio widget
cy.testCodeMirror("Test Radio");
/**
* @param{Text} Random Text
* @param{RadioWidget}Mouseover
* @param{RadioPre Css} Assertion
*/
cy.widgetText(
"radiotest",
formWidgetsPage.radioWidget,
formWidgetsPage.radioInput,
);
/**
* @param{Text} Random Colour
*/
cy.testCodeMirror(this.data.radioInputName);
cy.get(formWidgetsPage.labelradio)
.eq(0)
.should("have.text", "Test Radio");
/**
* @param{IndexValue} Provide Input Index Value
* @param{Text} Index Text Value.
*
*/
cy.radioInput(0, this.data.radio1);
cy.get(formWidgetsPage.labelradio)
.eq(1)
.should("have.text", "test1");
cy.radioInput(1, "1");
cy.radioInput(2, this.data.radio2);
cy.get(formWidgetsPage.labelradio)
.eq(2)
.should("have.text", "test2");
cy.radioInput(3, "2");
cy.radioInput(4, this.data.radio3);
cy.get(formWidgetsPage.labelradio)
.eq(3)
.should("have.text", "test3");
cy.radioInput(5, "3");
cy.get(formWidgetsPage.radioAddButton).click({ force: true });
cy.radioInput(6, this.data.radio4);
cy.get(formWidgetsPage.labelradio)
.eq(4)
.should("have.text", "test4");
cy.get(formWidgetsPage.deleteradiovalue)
.eq(3)
.click({ force: true });
cy.get(formWidgetsPage.labelradio).should("not.have.value", "test4");
/**
* @param{Show Alert} Css for InputChange
*/
cy.getAlert(commonlocators.optionchangeRadioselect);
cy.get(formWidgetsPage.defaultSelect);
cy.get(formWidgetsPage.radioOnSelectionChangeDropdown)
.get(commonlocators.dropdownSelectButton)
.click({ force: true })
.get("ul.bp3-menu")
.children()
.contains("Navigate To")
.click();
cy.get(formWidgetsPage.radioOnSelectionChangeDropdown)
.get(commonlocators.dropdownSelectButton)
.find("> .bp3-button-text")
.should("have.text", "Navigate To");
cy.get(commonlocators.editPropCrossButton).click();
.type(this.data.command)
.type("2");
cy.get(formWidgetsPage.labelradio)
.eq(3)
.click({ force: true });
});
afterEach(() => {

View File

@ -0,0 +1,47 @@
const commonlocators = require("../../../locators/commonlocators.json");
const Layoutpage = require("../../../locators/Layout.json");
const widgetsPage = require("../../../locators/Widgets.json");
const dsl = require("../../../fixtures/layoutdsl.json");
describe("Tab widget test", function() {
beforeEach(() => {
cy.addDsl(dsl);
});
it("Tab Widget Functionality Test", function() {
cy.openPropertyPane("tabswidget");
/**
* @param{Text} Random Text
* @param{TabWidget}Mouseover
* @param{TabPre Css} Assertion
*/
cy.widgetText("tab", Layoutpage.tabWidget, Layoutpage.tabInput);
/**
* @param{IndexValue} Provide input Index Value
* @param{Text} Provide Index Text Value
*/
cy.tabVerify(0, "Aditya");
cy.tabVerify(1, "test");
//Default tab selection and validation
cy.get(Layoutpage.tabDefault)
.type(this.data.command)
.type("test");
cy.get(Layoutpage.tabWidget)
.contains("test")
.click({ force: true })
.should("be.visible");
/**
* @param{toggleButton Css} Assert to be checked
*/
cy.togglebar(widgetsPage.Scrollbutton)
.check({ force: true })
.should("be.checked");
cy.get(Layoutpage.tabContainer)
.scrollIntoView({ easing: "linear" })
.should("be.visible");
cy.get(commonlocators.crossbutton).click({ force: true });
});
afterEach(() => {
// put your clean up code if any
});
});

View File

@ -9,18 +9,59 @@ describe("Chart Widget Functionality", function() {
it("Chart Widget Functionality", function() {
cy.openPropertyPane("chartwidget");
//Checking the edit props for Chart and also the properties of Chart widget
cy.testCodeMirror("App Sign Up");
cy.get(viewWidgetsPage.chartSelectChartType)
.find(".bp3-button")
/**
* @param{Text} Random Text
* @param{ChartWidget}Mouseover
* @param{ChartPre Css} Assertion
*/
cy.widgetText(
"Test",
viewWidgetsPage.chartWidget,
commonlocators.containerInnerText,
);
/**
* @param{Text} Random Input Value
*/
cy.testCodeMirror(this.data.chartIndata);
cy.get(viewWidgetsPage.chartInnerText)
.contains("App Sign Up")
.should("have.text", "App Sign Up");
cy.get(viewWidgetsPage.chartType)
.find(commonlocators.dropdownbuttonclick)
.click({ force: true })
.get("ul.bp3-menu")
.get(commonlocators.dropdownmenu)
.children()
.contains("Bar Chart")
.contains("Column Chart")
.click();
cy.get(viewWidgetsPage.chartSelectChartType)
.find(".bp3-button > .bp3-button-text")
.should("have.text", "Bar Chart");
cy.get(viewWidgetsPage.chartType)
.find(commonlocators.menuSelection)
.should("have.text", "Column Chart");
cy.get(viewWidgetsPage.chartWidget)
.should("be.visible")
.and(chart => {
expect(chart.height()).to.be.greaterThan(200);
});
cy.get(viewWidgetsPage.chartWidget).should("have.css", "opacity", "1");
const labels = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
[0, 1, 2, 3, 4, 5, 6].forEach(k => {
cy.get(viewWidgetsPage.rectangleChart)
.eq(k)
.trigger("mousemove", { force: true });
cy.get(viewWidgetsPage.Chartlabel)
.eq(k)
.should("have.text", labels[k]);
});
cy.get(viewWidgetsPage.xlabel)
.click({ force: true })
.type(this.data.command)
.type(this.data.plan);
cy.get(viewWidgetsPage.ylabel)
.click({ force: true })
.type(this.data.command)
.type(this.data.ylabel);
//Close edit prop
cy.get(commonlocators.editPropCrossButton).click();
});

View File

@ -9,10 +9,27 @@ describe("Image Widget Functionality", function() {
it("Image Widget Functionality", function() {
cy.openPropertyPane("imagewidget");
//Checking the edit props for Image and also the properties of Image widget
cy.testCodeMirror(
"https://images.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940",
/**
* @param{Text} Random Text
* @param{ImageWidget}Mouseover
* @param{ImagePre Css} Assertion
*/
cy.widgetText(
"img",
viewWidgetsPage.imageWidget,
viewWidgetsPage.imagecontainer,
);
cy.get(viewWidgetsPage.defaultImage)
.click({ force: true })
.type(this.data.command)
.type(this.data.defaultimage);
/**
* @param{URL} ImageUrl
*/
cy.testCodeMirror(this.data.NewImage);
cy.get(viewWidgetsPage.imageinner)
.invoke("attr", "src")
.should("contain", this.data.validateImage);
cy.get(commonlocators.editPropCrossButton).click();
});

View File

@ -0,0 +1,55 @@
const commonlocators = require("../../../locators/commonlocators.json");
const viewWidgetsPage = require("../../../locators/ViewWidgets.json");
const dsl = require("../../../fixtures/Mapdsl.json");
describe("Map Widget Functionality", function() {
beforeEach(() => {
cy.addDsl(dsl);
});
it("Map Widget Functionality", function() {
cy.openPropertyPane("mapwidget");
/**
* @param{Text} Random Text
* @param{MapWidget}Mouseover
* @param{MapPre Css} Assertion
*/
cy.widgetText(
"Maptest",
viewWidgetsPage.mapWidget,
viewWidgetsPage.mapInner,
);
cy.get(viewWidgetsPage.mapinitialloc)
.click({ force: true })
.clear()
.type(this.data.country)
.type("{enter}");
cy.get(viewWidgetsPage.mapInput)
.click({ force: true })
.type(this.data.command)
.type(JSON.stringify(this.data.marker), {
parseSpecialCharSequences: false,
});
cy.get(viewWidgetsPage.zoomLevel)
.eq(0)
.click({ force: true });
cy.get(viewWidgetsPage.zoomLevel)
.eq(1)
.click({ force: true });
/**
* @param{Show Alert} Css for InputChange
*/
cy.getAlert(commonlocators.mapOptionChange);
cy.get(viewWidgetsPage.mapSearch).should("be.visible");
cy.get(viewWidgetsPage.mapSearch)
.invoke("attr", "placeholder")
.should("contain", "Enter location to search");
cy.get(viewWidgetsPage.mapSearch)
.click({ force: true })
.clear()
.type(this.data.location2)
.type("{enter}");
});
afterEach(() => {
// put your clean up code if any
});
});

View File

@ -11,5 +11,6 @@
"addToPageBtnsId": ".t--addToPageButtons",
"ApiHomePage": ".t--apiHomePage",
"formActionButtons": ".t--formActionButtons",
"dataSourceField": ".t--dataSourceField"
"dataSourceField": ".t--dataSourceField",
"responseBody":".CodeMirror-code span.cm-string.cm-property"
}

View File

@ -4,9 +4,24 @@
"dropdownSelectionType": ".t--property-control-selectiontype",
"radioWidget": ".t--draggable-radiogroupwidget",
"radioOnSelectionChangeDropdown": ".t--property-control-onselectionchange",
"datepickerWidget":".t--draggable-datepickerwidget",
"filepickerWidget":".t--draggable-filepickerwidget",
"formWidget":".t--draggable-formwidget",
"richTextEditorWidget":".t--draggable-richtexteditorwidget",
"richEditorOnTextChange":".t--property-control-ontextchange"
}
"nextDayBtn": ".DayPicker-Day[aria-selected='true'] + div.DayPicker-Day",
"datepickerWidget": ".t--draggable-datepickerwidget",
"filepickerWidget": ".t--draggable-filepickerwidget",
"formWidget": ".t--draggable-formwidget",
"richTextEditorWidget": ".t--draggable-richtexteditorwidget",
"richEditorOnTextChange": ".t--property-control-ontextchange",
"optionvalue": ".t--property-control-defaultselectedvalue .kDwnRc",
"defselected": ".CodeMirror textarea",
"dropdowninner": ".bp3-button > .bp3-button-text",
"Textinput": ".t--property-control-options .CodeMirror textarea",
"labelvalue": ".t--draggable-dropdownwidget label",
"dropdownInput": ".bp3-tag-input-values",
"labelradio": ".t--draggable-radiogroupwidget label",
"deleteradiovalue": ".t--property-control-options mask",
"inputRadio": ".t--draggable-radiogroupwidget input",
"defaultSelect": ".t--property-control-defaultselectedvalue .CodeMirror-code",
"formInner": ".t--draggable-formwidget pre",
"radioInput": ".t--draggable-radiogroupwidget pre",
"radioAddButton": ".t--property-control-options button",
"formD": "div[type='FORM_WIDGET']"
}

View File

@ -0,0 +1,9 @@
{
"tabWidget": ".t--draggable-tabswidget",
"tabInput": ".t--draggable-tabswidget pre",
"tabName": ".t--property-control-tabs input",
"tabDefault": ".t--property-control-defaulttab .CodeMirror-code",
"tabButton": ".t--property-control-tabs button",
"tabDelete": ".t--property-control-tabs mask",
"tabContainer": "div[type='TABS_WIDGET']"
}

View File

@ -1,5 +1,31 @@
{
"imageWidget": ".t--draggable-imagewidget",
"chartWidget": ".t--draggable-chartwidget",
"chartSelectChartType": ".t--property-control-charttype"
}
"chartType": ".t--property-control-charttype",
"destin": ".appsmith_widget_01ewdomru7",
"mapWidget": ".t--draggable-mapwidget",
"dropdownSelectButton": ".t--open-dropdown-Select",
"dismissbutton": ".dismissButton",
"search": "input[placeholder='Enter location']",
"enablesearch": ".t--property-control-enablesearchlocation input",
"enablepicklocation": ".t--property-control-enablepicklocation input",
"enablecreatemarker": ".t--property-control-createnewmarker input",
"zoom": ".t--property-control-zoomable input",
"searchloc": "input[placeholder='Enter location to search']",
"imagecontainer": ".t--draggable-imagewidget pre",
"imageinner": ".t--draggable-imagewidget img",
"chartInnerText": ".t--draggable-chartwidget text",
"inputChartValue": ".t--property-control-chartdata .CodeMirror textarea",
"chartButton": ".t--property-control-chartdata button",
"rectangleChart": ".t--draggable-chartwidget g rect",
"xlabel": ".t--property-control-x-axislabel .CodeMirror-code",
"ylabel": ".t--property-control-y-axislabel .CodeMirror-code",
"mapInner": ".t--draggable-mapwidget pre",
"mapInput": ".t--property-control-defaultmarkers .CodeMirror-code",
"mapinitialloc": ".t--property-control-initiallocation input",
"mapSearch": ".t--draggable-mapwidget input",
"createMarker": ".t--property-control-createnewmarker [type='checkbox']",
"zoomLevel": ".t--property-control-zoomlevel svg",
"defaultImage": ".t--property-control-defaultimage .CodeMirror-code",
"Chartlabel": ".t--draggable-chartwidget g:nth-child(5) text"
}

View File

@ -1,16 +1,37 @@
{
"containerWidget":".t--draggable-containerwidget",
"inputWidget":".t--draggable-inputwidget",
"togglebutton":"input[type='checkbox']",
"inputPropsDataType":".t--property-control-datatype",
"inputdatatypeplaceholder":".t--property-control-placeholder",
"buttonWidget":".t--draggable-buttonwidget",
"textWidget":".t--draggable-textwidget",
"tableWidget":".t--draggable-tablewidget",
"tableOnRowSelected":".t--property-control-onrowselected",
"dropdownSelectButton":".t--open-dropdown-Select",
"containerWidget": ".t--draggable-containerwidget",
"inputWidget": ".t--draggable-inputwidget",
"togglebutton": "input[type='checkbox']",
"inputPropsDataType": ".t--property-control-datatype",
"inputdatatypeplaceholder": ".t--property-control-placeholder",
"buttonWidget": ".t--draggable-buttonwidget",
"textWidget": ".t--draggable-textwidget",
"tableWidget": ".t--draggable-tablewidget",
"tableOnRowSelected": ".t--property-control-onrowselected",
"dropdownSelectButton": ".t--open-dropdown-Select",
"buttonOnClick": ".t--property-control-onclick",
"deleteWidget":".t--modal-widget>div .t--widget-delete-control",
"textbuttonWidget":".t--draggable-buttonwidget button.bp3-button[type='button']"
"Scrollbutton": ".t--property-control-scrollcontents input",
"label": ".t--draggable-inputwidget label",
"inputval": ".t--draggable-inputwidget pre",
"dataclass": "'.bp3-input",
"datatype": ".t--property-control-datatype",
"innertext": ".t--draggable-inputwidget input",
"defaultinput": ".t--property-control-defaultinput",
"requiredjs": ".t--property-control-required input",
"visible": ".t--property-control-visible input",
"disable": ".t--property-control-disabled",
"menubar": ".bp3-menu",
"menupop": ".bp3-popover",
"defaultcheck": ".t--property-control-defaultselected input",
"indicator": ".bp3-checkbox",
"Regex": ".t--property-control-regex .CodeMirror-lines",
"RadioInput": ".t--property-control-options input",
"checkboxInput": ".t--draggable-checkboxwidget pre",
"checkboxLabel": ".t--draggable-checkboxwidget label",
"containerD": "div[type='CONTAINER_WIDGET']",
"defaultInput": ".t--property-control-defaultinput .CodeMirror-code",
"placeholder": ".t--property-control-placeholder .CodeMirror-code",
"inputButtonPos": ".t--draggable-inputwidget button",
"deleteWidget": ".t--modal-widget>div .t--widget-delete-control",
"textbuttonWidget": ".t--draggable-buttonwidget button.bp3-button[type='button']"
}

View File

@ -1,17 +1,36 @@
{
"editIcon":".t--widget-propertypane-toggle",
"editPropCrossButton":".t--property-pane-close-btn",
"deleteWidgetIcon":".t--widget-delete-control",
"dropdownSelectButton":".t--open-dropdown-Select-Action",
"homeIcon":".bp3-icon.bp3-icon-home",
"typeWidgetName":".bp3-editable-text-editing>input",
"requiredCheckbox":".t--property-control-required input[type='checkbox']",
"visibleCheckbox":".t--property-control-visible input[type='checkbox']",
"disableCheckbox":".t--property-control-disabled input[type='checkbox']",
"labelTextStyle":".bp3-ui-text span",
"bodyTextStyle":".bp3-running-text span",
"headingTextStyle":".bp3-heading span",
"editWidgetName":".bp3-editable-text",
"dropDownIcon":".t--property-control-textstyle span.bp3-icon-chevron-down"
"editIcon": ".t--widget-propertypane-toggle",
"editPropCrossButton": ".t--property-pane-close-btn",
"deleteWidgetIcon": ".t--widget-delete-control",
"dropdownSelectButton": ".t--open-dropdown-Select-Action",
"crossbutton": ".t--property-pane-close-btn",
"dropdownAction": ".t--open-dropdown-Select-Action",
"datatypedropdown": ".t--property-control-datatype button",
"Alerttypedropdown": ".t--open-dropdown-Select-type",
"dropdownmenu": "ul.bp3-menu",
"containerInnerText": ".t--draggable-containerwidget pre",
"optionchangetextDropdown": " .t--property-control-onoptionchange .CodeMirror-code",
"optionchangetextCheckbox": ".t--property-control-oncheckchange .CodeMirror-code",
"optionchangetextInput": ".t--property-control-ontextchanged .CodeMirror-code",
"optionchangeRadioselect": ".t--property-control-onselectionchange .CodeMirror-code",
"onMarkerclick": ".t--property-control-onmarkerclick .CodeMirror-code",
"success": "div[type='success']",
"mapOptionChange": ".t--property-control-onmarkerclick .CodeMirror-code",
"dropdownbuttonclick": ".bp3-button",
"menuSelection": ".bp3-button > .bp3-button-text",
"scrollView": ".t--property-control-scrollcontents input",
"InputforText": ".t--property-control-text .CodeMirror-code",
"TextInside": ".bp3-ui-text span",
"homeIcon": ".bp3-icon.bp3-icon-home",
"typeWidgetName": ".bp3-editable-text-editing>input",
"requiredCheckbox": ".t--property-control-required input[type='checkbox']",
"visibleCheckbox": ".t--property-control-visible input[type='checkbox']",
"disableCheckbox": ".t--property-control-disabled input[type='checkbox']",
"labelTextStyle": ".bp3-ui-text span",
"bodyTextStyle": ".bp3-running-text span",
"headingTextStyle": ".bp3-heading span",
"editWidgetName": ".bp3-editable-text",
"dropDownIcon": ".t--property-control-textstyle span.bp3-icon-chevron-down",
"onDateSelectedField":".t--property-control-ondateselected"
}

View File

@ -7,6 +7,7 @@ const commonlocators = require("../locators/commonlocators.json");
const queryEditor = require("../locators/QueryEditor.json");
const modalWidgetPage = require("../locators/ModalWidget.json");
const widgetsPage = require("../locators/Widgets.json");
const LayoutPage = require("../locators/Layout.json");
const formWidgetsPage = require("../locators/FormWidgets.json");
const ApiEditor = require("../locators/ApiEditor.json");
const apiwidget = require("../locators/apiWidgetslocator.json");
@ -15,9 +16,9 @@ const headerkey = "(//pre//span)[3]";
const headervalue = "(//pre//span)[4]";
Cypress.Commands.add("CreateApp", appname => {
cy.get(homePage.CreateApp)
.contains("Create Application")
.click({ force: true });
// cy.get(homePage.CreateApp)
cy.contains("Create New").click({ force: true });
// .click({ force: true });
cy.get("form input").type(appname);
cy.get(homePage.CreateApp)
.contains("Submit")
@ -31,38 +32,6 @@ Cypress.Commands.add("CreateApp", appname => {
cy.get("@getUser").should("have.property", "status", 200);
});
Cypress.Commands.add("DeleteApp", appName => {
cy.get(commonlocators.homeIcon).click({ force: true });
cy.wait("@applications");
cy.get(homePage.searchInput)
.focus()
.type(appName);
cy.wait(2000);
cy.get(homePage.appMoreIcon)
.first()
.click({ force: true });
cy.get(homePage.deleteButton).click({ force: true });
//following code was added as it was failing intermitently
/*
cy.get(homePage.selectAction).should("be.visible");
cy.get(homePage.selectAction).click({ force: true });
cy.get(homePage.deleteApp).should("be.visible");
cy.get(homePage.deleteApp).click({ force: true });
cy.wait("@deleteApp");
cy.wait("@deleteApp").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.wait("@getPagesForApp");
cy.wait("@applications").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
*/
});
Cypress.Commands.add("LogintoApp", (uname, pword) => {
cy.visit("/user/login");
cy.get(loginPage.username).should("be.visible");
@ -75,6 +44,11 @@ Cypress.Commands.add("LogintoApp", (uname, pword) => {
200,
);
});
Cypress.Commands.add("LogOut", () => {
cy.request("POST", "/api/v1/logout").then(response => {
expect(response.status).equal(200);
});
});
Cypress.Commands.add("NavigateToWidgets", pageName => {
cy.get(pages.pagesIcon).click({ force: true });
@ -366,7 +340,6 @@ Cypress.Commands.add("testCodeMirror", value => {
.clear({
force: true,
});
// cy.wait("@updateLayout");
}
cy.get(".CodeMirror textarea")
@ -375,21 +348,36 @@ Cypress.Commands.add("testCodeMirror", value => {
force: true,
parseSpecialCharSequences: false,
});
// cy.wait("@updateLayout");
cy.get(".CodeMirror textarea")
.first()
.should("have.value", value);
});
});
Cypress.Commands.add("testJsontext", (endp, value) => {
cy.get(".t--property-control-" + endp + " .CodeMirror textarea")
.first()
.focus({ force: true })
.type("{uparrow}", { force: true })
.type("{ctrl}{shift}{downarrow}", { force: true });
cy.focused().then($cm => {
if ($cm.val() !== "") {
cy.get(".CodeMirror textarea")
.first()
.clear({
force: true,
});
}
cy.get(".CodeMirror textarea")
.first()
.type(value, {
force: true,
parseSpecialCharSequences: false,
});
});
});
Cypress.Commands.add("SetDateToToday", () => {
cy.get(formWidgetsPage.datepickerWidget)
.first()
.trigger("mouseover");
cy.get(formWidgetsPage.datepickerWidget)
.children(commonlocators.editicon)
.first()
.click({ force: true });
cy.get(".t--property-control-defaultdate input").click();
cy.get(".bp3-datepicker-footer span")
.contains("Today")
@ -437,25 +425,19 @@ Cypress.Commands.add("addDsl", dsl => {
let currentURL;
let pageid;
let layoutId;
// cy.Createpage("TestDsl")
// Extracting the Page id from the Url
cy.url().then(url => {
currentURL = url;
const myRegexp = /pages(.*)/;
const match = myRegexp.exec(currentURL);
pageid = match[1].split("/")[1];
cy.log(pageid + "page id");
//Fetch the layout id
cy.server();
cy.request("GET", "api/v1/pages/" + pageid).then(response => {
const len = JSON.stringify(response.body);
cy.log(len);
layoutId = JSON.parse(len).data.layouts[0].id;
// Dumpimg the DSL to the created page
cy.request(
"PUT",
"api/v1/layouts/" + layoutId + "/pages/" + pageid,
@ -482,6 +464,77 @@ Cypress.Commands.add("DeleteAppByApi", () => {
});
});
});
Cypress.Commands.add("togglebar", value => {
cy.get(value)
.check({ force: true })
.should("be.checked");
});
Cypress.Commands.add("radiovalue", (value, value2) => {
cy.get(value)
.click()
.clear()
.type(value2);
});
Cypress.Commands.add("optionValue", (value, value2) => {
cy.get(value)
.click()
.clear()
.type(value2);
});
Cypress.Commands.add("dropdownDynamic", text => {
cy.wait(2000);
cy.get("ul[class='bp3-menu']")
.first()
.contains(text)
.click({ force: true })
.should("have.text", text);
});
Cypress.Commands.add("getAlert", alertcss => {
cy.get(commonlocators.dropdownSelectButton).click({ force: true });
cy.get(widgetsPage.menubar)
.contains("Show Alert")
.click({ force: true })
.should("have.text", "Show Alert");
cy.get(alertcss)
.click({ force: true })
.type("{command}{A}{del}")
.type("hello")
.should("not.to.be.empty");
cy.get(".t--open-dropdown-Select-type").click({ force: true });
cy.get(".bp3-popover-content .bp3-menu li")
.contains("Success")
.click({ force: true });
});
Cypress.Commands.add("widgetText", (text, inputcss, innercss) => {
cy.get(commonlocators.editWidgetName)
.dblclick({ force: true })
.type(text)
.type("{enter}");
cy.get(inputcss)
.first()
.trigger("mouseover", { force: true });
cy.get(innercss).should("have.text", text);
});
Cypress.Commands.add("radioInput", (index, text) => {
cy.get(widgetsPage.RadioInput)
.eq(index)
.click()
.clear()
.type(text);
});
Cypress.Commands.add("tabVerify", (index, text) => {
cy.get(".t--property-control-tabs input")
.eq(index)
.click({ force: true })
.clear()
.type(text);
cy.get(LayoutPage.tabWidget)
.contains(text)
.click({ force: true })
.should("be.visible");
});
Cypress.Commands.add("NavigateToDatasourceEditor", () => {
cy.get(datasourceEditor.datasourceEditorIcon).click({ force: true });
@ -649,3 +702,71 @@ Cypress.Commands.add("openPropertyPane", widgetType => {
.first()
.click();
});
Cypress.Commands.add("createApi", (url, parameters) => {
cy.get("@createNewApi").then(response => {
cy.get(ApiEditor.ApiNameField).should("be.visible");
cy.expect(response.response.body.responseMeta.success).to.eq(true);
cy.get(ApiEditor.ApiNameField).should(
"have.value",
response.response.body.data.name,
);
});
cy.get(ApiEditor.dataSourceField).click();
cy.contains(url).click({
force: true,
});
cy.get(".CodeMirror.CodeMirror-empty textarea")
.first()
.click({ force: true })
.type(parameters, { force: true });
cy.SaveAPI();
cy.get(ApiEditor.formActionButtons).should("be.visible");
cy.get(ApiEditor.ApiRunBtn).should("not.be.disabled");
});
Cypress.Commands.add("isSelectRow", index => {
cy.get(
'.e-gridcontent.e-lib.e-droppable td[index="' +
index +
'"][aria-colindex="' +
index +
'"]',
).click({ force: true });
});
Cypress.Commands.add("readTabledata", (rowNum, colNum) => {
const selector = `.t--draggable-tablewidget .e-gridcontent.e-lib.e-droppable td[index=${rowNum}][aria-colindex=${colNum}]`;
const tabVal = cy.get(selector).invoke("text");
return tabVal;
});
Cypress.Commands.add("getDate", (date, dateFormate) => {
const expDate = Cypress.moment()
.add(date, "days")
.format(dateFormate);
cy.log(date);
return expDate;
});
Cypress.Commands.add("setDate", (date, dateFormate) => {
const expDate = Cypress.moment()
.add(date, "days")
.format(dateFormate);
const sel = `.DayPicker-Day[aria-label=\"${expDate}\"]`;
cy.get(sel).click();
});
Cypress.Commands.add("pageNo", index => {
cy.get(".e-pagercontainer a")
.eq(index)
.click({ force: true })
.should("be.visible");
});
Cypress.Commands.add("pageNoValidate", index => {
const data = '.e-numericcontainer a[index="' + index + '"]';
const pageVal = cy.get(data);
return pageVal;
});

View File

@ -103,10 +103,10 @@ beforeEach(function() {
after(function() {
// ---commenting Publish app and Delete page as of now--- //
//cy.Deletepage(pageid);
//cy.PublishtheApp();
//cy.DeleteApp(appId);
//-- Deleting the application by Api---//
cy.DeleteAppByApi();
//-- LogOut Application---//
cy.LogOut();
});

View File

@ -10,6 +10,8 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
location / {
proxy_pass http://localhost:3000;
@ -17,11 +19,19 @@ server {
location /api {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
location /oauth2 {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
location /login {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
@ -41,6 +51,8 @@ server {
proxy_ssl_server_name on;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
location / {
proxy_pass http://localhost:3000;
@ -48,11 +60,19 @@ server {
location /api {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
location /oauth2 {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
location /login {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
}

View File

@ -17,14 +17,24 @@ server {
location /api {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
location /oauth2 {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
location /login {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
}
server {
@ -48,11 +58,21 @@ server {
location /api {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
location /oauth2 {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
location /login {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://release-api.appsmith.com;
}
}

View File

@ -7,43 +7,58 @@
[context.production.environment]
REACT_APP_ENVIRONMENT = "PRODUCTION"
REACT_APP_BASE_URL = "https://api.appsmith.com"
APP_HOST = "app.appsmith.com"
[context.release]
[context.release.environment]
REACT_APP_ENVIRONMENT = "STAGING"
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
APP_HOST = "release.app.appsmith.com"
[context.develop]
[context.develop.environment]
REACT_APP_ENVIRONMENT = "DEVELOPMENT"
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
APP_HOST = "develop.app.appsmith.com"
[context.a]
[context.a.environment]
REACT_APP_ENVIRONMENT = "STAGING"
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
APP_HOST = "a.app.appsmith.com"
[context.b]
[context.b.environment]
REACT_APP_ENVIRONMENT = "STAGING"
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
APP_HOST = "b.app.appsmith.com"
[context.deploy-preview]
[context.deploy-preview.environment]
REACT_APP_ENVIRONMENT = "STAGING"
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
# Not adding an APP_HOST here because the URL is dynamic in nature and cannot be determined.
[[redirects]]
from = "/api/*"
to = "API_PLACEHOLDER/api/:splat"
status = 200
force = true
headers = { X-Forwarded-Host = "APP_HOST_PLACEHOLDER", X-Forwarded-Proto = "https" }
[[redirects]]
from = "/oauth2/*"
to = "API_PLACEHOLDER/oauth2/:splat"
status = 200
force = true
headers = { X-Forwarded-Host = "APP_HOST_PLACEHOLDER", X-Forwarded-Proto = "https" }
[[redirects]]
from = "/login/*"
to = "API_PLACEHOLDER/login/:splat"
status = 200
force = true
headers = { X-Forwarded-Host = "APP_HOST_PLACEHOLDER", X-Forwarded-Proto = "https" }
# This must be the last redirect in the chain because it's a catch-all
[[redirects]]

View File

@ -22,6 +22,13 @@ export const updateDatasource = (payload: Datasource) => {
};
};
export const changeDatasource = (payload: Datasource) => {
return {
type: ReduxActionTypes.CHANGE_DATASOURCE,
payload,
};
};
export const testDatasource = (payload: Partial<Datasource>) => {
return {
type: ReduxActionTypes.TEST_DATASOURCE_INIT,

View File

@ -68,6 +68,7 @@ class DatePickerComponent extends React.Component<
componentDidUpdate(prevProps: DatePickerComponentProps) {
if (
this.props.selectedDate !== this.state.selectedDate &&
!moment(this.props.selectedDate).isSame(
moment(prevProps.selectedDate),
"seconds",
@ -145,7 +146,7 @@ class DatePickerComponent extends React.Component<
};
onDateSelected = (selectedDate: Date) => {
const date = moment(selectedDate).toISOString(true);
const date = selectedDate ? moment(selectedDate).toISOString(true) : "";
this.setState({ selectedDate: date });
this.props.onDateSelected(date);
};

View File

@ -663,7 +663,7 @@ function useApiOptionTree() {
const apiName = createNewApiName(actions, pageId);
if (setter) {
setter({
value: `${apiName}.run`,
value: `${apiName}`,
type: ActionType.api,
});
dispatch(createNewApiAction(pageId));

View File

@ -27,9 +27,9 @@ const KeyValueRow = (props: Props & WrappedFieldArrayProps) => {
let isRequired: boolean | undefined;
useEffect(() => {
// Always maintain 2 rows
if (props.fields.length < 2) {
for (let i = props.fields.length; i < 2; i += 1) {
// Always maintain 1 row
if (props.fields.length < 1) {
for (let i = props.fields.length; i < 1; i += 1) {
props.fields.push({ [keyName[1]]: "", [valueName[1]]: "" });
}
}

View File

@ -18,24 +18,14 @@ const FormRowWithLabel = styled.div`
const KeyValueRow = (props: Props & WrappedFieldArrayProps) => {
useEffect(() => {
// Always maintain 2 rows
if (props.fields.length < 2) {
for (let i = props.fields.length; i < 2; i += 1) {
// Always maintain 1 row
if (props.fields.length < 1) {
for (let i = props.fields.length; i < 1; i += 1) {
props.fields.push({ key: "", value: "" });
}
}
}, [props.fields]);
useEffect(() => {
if (typeof props.fields.getAll() === "string") {
const fieldsValue: [] = JSON.parse(`${props.fields.getAll()}`);
props.fields.removeAll();
fieldsValue.forEach((value, index) => {
props.fields.insert(index, value);
});
}
}, [props.fields]);
return (
<div>
{typeof props.fields.getAll() === "object" && (

View File

@ -70,11 +70,9 @@ class DatePickerControl extends BaseControl<
}
onDateSelected = (date: Date): void => {
this.setState({ selectedDate: moment(date).toISOString(true) });
this.updateProperty(
this.props.propertyName,
moment(date).toISOString(true),
);
const selectedDate = date ? moment(date).toISOString(true) : "";
this.setState({ selectedDate: selectedDate });
this.updateProperty(this.props.propertyName, selectedDate);
};
formatDate = (date: Date): string => {

View File

@ -4,6 +4,7 @@ import {
HOTJAR_PROD_HJSV,
} from "constants/ThirdPartyConstants";
import { AppsmithUIConfigs } from "./types";
import { FeatureFlagEnum } from "utils/featureFlags";
export const prodConfig = (baseUrl: string): AppsmithUIConfigs => ({
sentry: {
@ -24,7 +25,11 @@ export const prodConfig = (baseUrl: string): AppsmithUIConfigs => ({
apiUrl: "/api/",
baseUrl,
logLevel: "error",
featureFlags: [],
featureFlags: [
FeatureFlagEnum.ApiPaneV2,
FeatureFlagEnum.DatasourcePane,
FeatureFlagEnum.QueryPane,
],
});
export default prodConfig;

View File

@ -67,9 +67,12 @@ export const ReduxActionTypes: { [key: string]: string } = {
CREATE_DATASOURCE_FROM_FORM_INIT: "CREATE_DATASOURCE_FROM_FORM_INIT",
UPDATE_DATASOURCE_INIT: "UPDATE_DATASOURCE_INIT",
UPDATE_DATASOURCE_SUCCESS: "UPDATE_DATASOURCE_SUCCESS",
CHANGE_DATASOURCE: "CHANGE_DATASOURCE",
SELECT_PLUGIN: "SELECT_PLUGIN",
TEST_DATASOURCE_INIT: "TEST_DATASOURCE_INIT",
TEST_DATASOURCE_SUCCESS: "TEST_DATASOURCE_SUCCESS",
DELETE_DATASOURCE_DRAFT: "DELETE_DATASOURCE_DRAFT",
UPDATE_DATASOURCE_DRAFT: "UPDATE_DATASOURCE_DRAFT",
FETCH_PUBLISHED_PAGE_INIT: "FETCH_PUBLISHED_PAGE_INIT",
FETCH_PUBLISHED_PAGE_SUCCESS: "FETCH_PUBLISHED_PAGE_SUCCESS",
DELETE_DATASOURCE_INIT: "DELETE_DATASOURCE_INIT",

View File

@ -97,9 +97,14 @@ const ApplicationTitle = styled.div`
top: ${props => props.theme.spaces[4]}px;
cursor: pointer;
}
.apptitle{
white-space: nowrap;
width: 70%;
overflow: hidden;
text-overflow: ellipsis;
}
}
`;
const ApplicationImage = styled.div`
&& {
height: 100%;
@ -131,7 +136,6 @@ const APPLICATION_CONTROL_FONTSIZE_INDEX = 6;
type ApplicationCardProps = {
application: ApplicationPayload;
loading: boolean;
duplicate?: (applicationId: string) => void;
share?: (applicationId: string) => void;
delete?: (applicationId: string) => void;
@ -189,9 +193,8 @@ export const ApplicationCard = (props: ApplicationCardProps) => {
return (
<Wrapper key={props.application.id} hasReadPermission={hasReadPermission}>
<ApplicationTitle
className={props.loading ? Classes.SKELETON : undefined}
>
<span>{props.application.name}</span>
<div className="apptitle">{props.application.name}</div>
{hasEditPermission && (
<Link to={editApplicationURL} className="t--application-edit-link">
<Control className="control">

View File

@ -32,9 +32,16 @@ const ApplicationCardsWrapper = styled.div`
flex-flow: row wrap;
justify-content: flex-start;
align-items: space-evenly;
font-size: ${props => props.theme.fontSizes[4]}px;
`;
const Wrapper = styled(Card)`
const OrgName = styled.div`
font-size: ${props => props.theme.fontSizes[6]}px;
padding-top: ${props => props.theme.spaces[2]}px;
padding-left: ${props => props.theme.spaces[5]}px;
`;
const ApplicationAddCardWrapper = styled(Card)`
display: flex;
flex-direction: column;
justify-content: center;
@ -84,18 +91,6 @@ class Applications extends Component<ApplicationProps> {
? AppToaster.show({ message: DELETING_APPLICATION })
: AppToaster.clear()}
<SubHeader
add={{
form: CreateApplicationForm,
title: "Create Application",
formName: CREATE_APPLICATION_FORM_NAME,
formSubmitIntent: "primary",
isAdding: this.props.isCreatingApplication,
errorAdding: this.props.createApplicationError,
formSubmitText: "Create",
onClick: () => {
AnalyticsUtil.logEvent("CREATE_APP_CLICK", {});
},
}}
search={{
placeholder: "Search",
queryFn: this.props.searchApplications,
@ -110,18 +105,21 @@ class Applications extends Component<ApplicationProps> {
return (
<>
<p>{organization.name}</p>
<OrgName>{organization.name}</OrgName>
<ApplicationCardsWrapper key={organization.id}>
{hasCreateApplicationPemission && (
<FormDialogComponent
trigger={
<Wrapper>
<Icon
<ApplicationAddCardWrapper>
<Icon
icon="plus"
iconSize={20}
iconSize={70}
className="createIcon"
/>
</Wrapper>
<div className="createnew">Create New</div>
</ApplicationAddCardWrapper>
}
Form={CreateApplicationForm}
title={"Create Application"}
@ -132,36 +130,18 @@ class Applications extends Component<ApplicationProps> {
application.pages?.length > 0 && (
<ApplicationCard
key={application.id}
loading={this.props.isFetchingApplications}
application={application}
delete={this.props.deleteApplication}
/>
)
);
})}
<PageSectionDivider />
</ApplicationCardsWrapper>
</>
);
})}
{/* <ApplicationCardsWrapper>
<FormDialogComponent
trigger={<Wrapper>Hello</Wrapper>}
Form={CreateApplicationForm}
title={"Create Application"}
/>
{applicationList.map((application: ApplicationPayload) => {
return (
application.pageCount > 0 && (
<ApplicationCard
key={application.id}
loading={this.props.isFetchingApplications}
application={application}
delete={this.props.deleteApplication}
/>
)
);
})}
</ApplicationCardsWrapper> */}
</PageWrapper>
);
}

View File

@ -42,6 +42,7 @@ class Collapsible extends React.Component<Props, ComponentState> {
render() {
const { children, title } = this.props;
const { isOpen } = this.state;
return (
<>
@ -57,7 +58,7 @@ class Collapsible extends React.Component<Props, ComponentState> {
>
<SectionLabel>{title}</SectionLabel>
<Icon
icon={"chevron-down"}
icon={isOpen ? "chevron-up" : "chevron-down"}
iconSize={16}
style={{ color: "#2E3D49" }}
/>

View File

@ -4,25 +4,31 @@ import { WrappedFieldInputProps } from "redux-form";
import Edit from "assets/images/EditPen.svg";
const InputContainer = styled.div`
const InputContainer = styled.div<{ focused: boolean }>`
align-items: center;
display: flex;
width: 300px;
input {
margin-left: 10px;
font-size: 18px;
border: 0;
border: ${props => (props.focused ? 1 : 0)};
display: block;
width: 100%;
font-weight: 500;
line-height: 24px;
text-overflow: ellipsis;
:hover {
cursor: ${props => (props.focused ? "auto" : "pointer")};
}
}
`;
const EditPen = styled.img`
height: 17px;
width: 17px;
:hover {
cursor: pointer;
}
`;
interface FormTitleProps {
@ -32,7 +38,7 @@ interface FormTitleProps {
interface FormTitleState {
readOnly: boolean;
hideIcon: boolean;
focused: boolean;
}
class FormTitle extends React.Component<FormTitleProps, FormTitleState> {
@ -43,7 +49,7 @@ class FormTitle extends React.Component<FormTitleProps, FormTitleState> {
this.state = {
readOnly: false,
hideIcon: false,
focused: false,
};
}
@ -59,13 +65,13 @@ class FormTitle extends React.Component<FormTitleProps, FormTitleState> {
event.target.select();
};
onFocus = (event: any) => {
event.target.select();
this.setState({ hideIcon: true });
onFocus = () => {
this.nameInput?.select();
this.setState({ focused: true });
};
onBlur = (e: any) => {
this.setState({ hideIcon: false });
onBlur = () => {
this.setState({ focused: false });
};
onPressEnter = (event: any) => {
@ -75,10 +81,10 @@ class FormTitle extends React.Component<FormTitleProps, FormTitleState> {
render() {
const { input } = this.props;
const { hideIcon } = this.state;
const { focused } = this.state;
return (
<InputContainer>
<InputContainer focused={focused}>
<input
ref={input => {
this.nameInput = input;
@ -93,7 +99,9 @@ class FormTitle extends React.Component<FormTitleProps, FormTitleState> {
onFocus={this.onFocus}
onBlur={this.onBlur}
/>
{!hideIcon && <EditPen src={Edit} alt="Edit pen" />}
{!focused && (
<EditPen onClick={this.onFocus} src={Edit} alt="Edit pen" />
)}
</InputContainer>
);
}

View File

@ -16,6 +16,7 @@ import {
initDatasourcePane,
storeDatastoreRefs,
deleteDatasource,
changeDatasource,
} from "actions/datasourceActions";
import { ControlIcons } from "icons/ControlIcons";
import { theme } from "constants/DefaultTheme";
@ -25,10 +26,7 @@ import ImageAlt from "assets/images/placeholder-image.svg";
import Postgres from "assets/images/Postgress.png";
import MongoDB from "assets/images/MongoDB.png";
import RestTemplateImage from "assets/images/RestAPI.png";
import {
DATA_SOURCES_EDITOR_ID_URL,
DATA_SOURCES_EDITOR_URL,
} from "constants/routes";
import { DATA_SOURCES_EDITOR_URL } from "constants/routes";
import { REST_PLUGIN_PACKAGE_NAME } from "constants/ApiEditorConstants";
import {
PLUGIN_PACKAGE_POSTGRES,
@ -36,6 +34,7 @@ import {
} from "constants/QueryEditorConstants";
import { AppState } from "reducers";
import { Datasource } from "api/DatasourcesApi";
import Fuse from "fuse.js";
interface ReduxDispatchProps {
initDatasourcePane: (pluginType: string, urlId?: string) => void;
@ -44,6 +43,7 @@ interface ReduxDispatchProps {
storeDatastoreRefs: (refsList: []) => void;
fetchFormConfig: (id: string) => void;
deleteDatasource: (id: string) => void;
onDatasourceChange: (datasource: Datasource) => void;
}
interface ReduxStateProps {
@ -51,6 +51,7 @@ interface ReduxStateProps {
plugins: Plugin[];
datastoreRefs: Record<string, any>;
formConfigs: Record<string, []>;
drafts: Record<string, Datasource>;
}
type DataSourceSidebarProps = {};
@ -172,6 +173,15 @@ const Container = styled.div`
}
`;
const DraftIconIndicator = styled.span<{ isHidden: boolean }>`
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #f2994a;
margin: 0 5px;
opacity: ${({ isHidden }) => (isHidden ? 0 : 1)};
`;
type Props = DataSourceSidebarProps &
RouteComponentProps<{
pageId: string;
@ -181,6 +191,15 @@ type Props = DataSourceSidebarProps &
ReduxStateProps &
ReduxDispatchProps;
const FUSE_OPTIONS = {
shouldSort: true,
threshold: 0.5,
location: 0,
minMatchCharLength: 3,
findAllMatches: true,
keys: ["name"],
};
class DataSourceSidebar extends React.Component<Props, State> {
refsCollection: any;
@ -202,6 +221,13 @@ class DataSourceSidebar extends React.Component<Props, State> {
storeDatastoreRefs(this.refsCollection);
}
shouldComponentUpdate(nextProps: Readonly<Props>): boolean {
if (Object.keys(nextProps.drafts) !== Object.keys(this.props.drafts)) {
return true;
}
return nextProps.dataSources !== this.props.dataSources;
}
handleCreateNewDatasource = () => {
const { history } = this.props;
const { pageId, applicationId } = this.props.match.params;
@ -210,17 +236,7 @@ class DataSourceSidebar extends React.Component<Props, State> {
};
handleItemSelected = (datasource: Datasource) => {
const { history, formConfigs } = this.props;
const { pageId, applicationId } = this.props.match.params;
this.props.initializeForm(datasource);
this.props.selectPlugin(datasource.pluginId);
if (!formConfigs[datasource.pluginId]) {
this.props.fetchFormConfig(datasource.pluginId);
}
history.push(
DATA_SOURCES_EDITOR_ID_URL(applicationId, pageId, datasource.id),
);
this.props.onDatasourceChange(datasource);
};
handleSearchChange = (e: React.ChangeEvent<{ value: string }>) => {
@ -230,6 +246,13 @@ class DataSourceSidebar extends React.Component<Props, State> {
});
};
getSearchFilteredList = () => {
const { search } = this.state;
const { dataSources } = this.props;
const fuse = new Fuse(dataSources, FUSE_OPTIONS);
return search ? fuse.search(search) : dataSources;
};
getImageSource = (pluginId: string) => {
const { plugins } = this.props;
const plugin = plugins.find(plugin => plugin.id === pluginId);
@ -246,16 +269,19 @@ class DataSourceSidebar extends React.Component<Props, State> {
}
};
renderItem = (datasources: Datasource[]) => {
renderItem = () => {
const {
match: {
params: { datasourceId },
},
datastoreRefs,
deleteDatasource,
drafts,
} = this.props;
return datasources.map(datasource => {
const filteredList = this.getSearchFilteredList();
return filteredList.map(datasource => {
return (
<ItemContainer
data-cy={datasource.id}
@ -272,6 +298,7 @@ class DataSourceSidebar extends React.Component<Props, State> {
/>
<ActionName>{datasource.name}</ActionName>
</ActionItem>
<DraftIconIndicator isHidden={!(datasource.id in drafts)} />
<TreeDropdown
defaultText=""
onSelect={() => {
@ -300,7 +327,6 @@ class DataSourceSidebar extends React.Component<Props, State> {
render() {
const { search } = this.state;
const { dataSources } = this.props;
const {
match: {
params: { datasourceId },
@ -328,24 +354,28 @@ class DataSourceSidebar extends React.Component<Props, State> {
onClick={this.handleCreateNewDatasource}
/>
</Container>
{this.renderItem(dataSources)}
{this.renderItem()}
</Wrapper>
);
}
}
const mapStateToProps = (state: AppState): ReduxStateProps => {
const { drafts } = state.ui.datasourcePane;
return {
formConfigs: state.entities.plugins.formConfigs,
dataSources: getDataSources(state),
plugins: getPlugins(state),
datastoreRefs: state.ui.datasourcePane.datasourceRefs,
drafts,
};
};
const mapDispatchToProps = (dispatch: Function): ReduxDispatchProps => ({
initDatasourcePane: (pluginType: string, urlId?: string) =>
dispatch(initDatasourcePane(pluginType, urlId)),
onDatasourceChange: (datasource: Datasource) =>
dispatch(changeDatasource(datasource)),
fetchFormConfig: (id: string) => dispatch(fetchPluginForm({ id })),
selectPlugin: (pluginId: string) => dispatch(selectPlugin(pluginId)),
initializeForm: (data: Record<string, any>) =>

View File

@ -10,7 +10,6 @@ import {
ColumnsDirective,
ColumnDirective,
} from "@syncfusion/ej2-react-grids";
import ReactJson from "react-json-view";
import styled, { createGlobalStyle } from "styled-components";
import { Popover, Icon } from "@blueprintjs/core";
import { components, MenuListComponentProps } from "react-select";
@ -29,8 +28,9 @@ import { Datasource } from "api/DatasourcesApi";
import { RestAction } from "api/ActionAPI";
import { QUERY_EDITOR_FORM_NAME } from "constants/forms";
import { PLUGIN_PACKAGE_POSTGRES } from "constants/QueryEditorConstants";
import { Colors } from "constants/Colors";
import "@syncfusion/ej2-react-grids/styles/material.css";
import { Colors } from "constants/Colors";
import JSONViewer from "./JSONViewer";
const QueryFormContainer = styled.div`
font-size: 20px;
@ -180,6 +180,10 @@ const StyledGridComponent = styled(GridComponent)`
}
`;
const ErrorMessage = styled.p`
font-size: 14px;
color: ${Colors.RED};
`;
const CreateDatasource = styled.div`
height: 44px;
display: flex;
@ -212,6 +216,7 @@ type QueryFormProps = {
executedQueryData: any;
applicationId: string;
selectedPluginPackage: string;
runErrorMessage: string | undefined;
pageId: string;
location: {
state: any;
@ -241,6 +246,7 @@ const QueryEditorForm: React.FC<Props> = (props: Props) => {
selectedPluginPackage,
createTemplate,
isCreating,
runErrorMessage,
} = props;
const [showTemplateMenu, setMenuVisibility] = useState(true);
@ -446,6 +452,13 @@ const QueryEditorForm: React.FC<Props> = (props: Props) => {
</NoDataSourceContainer>
)}
{runErrorMessage && (
<>
<p className="statementTextArea">Query error</p>
<ErrorMessage>{runErrorMessage}</ErrorMessage>
</>
)}
{executedQueryData && dataSources.length && (
<ResponseContainer>
<p className="statementTextArea">Query response</p>
@ -470,16 +483,7 @@ const QueryEditorForm: React.FC<Props> = (props: Props) => {
</ColumnsDirective>
</StyledGridComponent>
) : (
<ReactJson
src={executedQueryData.body}
name={null}
enableClipboard={false}
displayObjectSize={false}
displayDataTypes={false}
style={{
fontSize: "14px",
}}
/>
<JSONViewer src={executedQueryData.body} />
)}
</ResponseContent>
</ResponseContainer>

View File

@ -0,0 +1,61 @@
import React from "react";
import ReactJson from "react-json-view";
import styled from "styled-components";
import { Card } from "@blueprintjs/core";
const OutputContainer = styled.div`
background: #f5f6f7;
border: 1px solid #d0d7dd;
box-sizing: border-box;
border-radius: 4px;
padding: 6px;
`;
const Record = styled(Card)`
margin: 5px;
`;
type JSONOutputProps = {
src: [];
};
type Props = JSONOutputProps;
class JSONOutput extends React.Component<Props> {
render() {
const { src } = this.props;
const reactJsonProps = {
name: null,
enableClipboard: false,
displayObjectSize: false,
displayDataTypes: false,
style: {
fontSize: "14px",
},
};
if (!src.length) {
return (
<OutputContainer>
<Record>
<ReactJson src={src} {...reactJsonProps} />
</Record>
</OutputContainer>
);
}
return (
<OutputContainer>
{src.map((record, index) => {
return (
<Record key={index}>
<ReactJson src={record} {...reactJsonProps} />
</Record>
);
})}
</OutputContainer>
);
}
}
export default JSONOutput;

View File

@ -42,7 +42,7 @@ const Templates: Record<string, any> = {
create: `INSERT INTO users(
id, name, gender, avatar, email, address, role)
VALUES (?, ?, ?, ?, ?, ?, ?);`,
read: "SELECT * FROM users LIMIT 10 ORDER BY id",
read: "SELECT * FROM users ORDER BY id LIMIT 10",
delete: `DELETE FROM users WHERE id=?`,
update: `UPDATE users
Set status='APPROVED'

View File

@ -45,6 +45,7 @@ type QueryPageProps = {
submitForm: (name: string) => void;
createAction: (values: RestAction) => void;
runAction: (action: RestAction, actionId: string) => void;
runErrorMessage: Record<string, string>;
deleteAction: (id: string) => void;
updateAction: (data: RestAction) => void;
createTemplate: (template: string) => void;
@ -91,6 +92,7 @@ class QueryEditor extends React.Component<Props> {
selectedPluginPackage,
apiPane,
isCreating,
runErrorMessage,
} = this.props;
const { applicationId, pageId } = this.props.match.params;
@ -135,6 +137,7 @@ class QueryEditor extends React.Component<Props> {
DATASOURCES_OPTIONS={DATASOURCES_OPTIONS}
selectedPluginPackage={selectedPluginPackage}
executedQueryData={executedQueryData[queryId]}
runErrorMessage={runErrorMessage[queryId]}
/>
) : (
<QueryHomeScreen
@ -152,6 +155,7 @@ class QueryEditor extends React.Component<Props> {
}
const mapStateToProps = (state: AppState): any => {
const { runErrorMessage } = state.ui.queryPane;
const formData = getFormValues(QUERY_EDITOR_FORM_NAME)(state) as RestAction;
const initialValues = getFormInitialValues(QUERY_EDITOR_FORM_NAME)(
state,
@ -163,6 +167,7 @@ const mapStateToProps = (state: AppState): any => {
);
return {
runErrorMessage,
apiPane: state.ui.apiPane,
pluginIds: getPluginIdsOfPackageNames(state, PLUGIN_PACKAGE_DBS),
dataSources: getDataSources(state),

View File

@ -2,15 +2,18 @@ import React from "react";
import { createReducer } from "utils/AppsmithUtils";
import { ReduxActionTypes, ReduxAction } from "constants/ReduxActionConstants";
import { Datasource } from "api/DatasourcesApi";
import _ from "lodash";
const initialState: DatasourcePaneReduxState = {
selectedPlugin: "",
datasourceRefs: {},
drafts: {},
};
export interface DatasourcePaneReduxState {
selectedPlugin: string;
datasourceRefs: {};
drafts: Record<string, Datasource>;
}
const datasourcePaneReducer = createReducer(initialState, {
@ -42,6 +45,25 @@ const datasourcePaneReducer = createReducer(initialState, {
},
};
},
[ReduxActionTypes.UPDATE_DATASOURCE_DRAFT]: (
state: DatasourcePaneReduxState,
action: ReduxAction<{ id: string; draft: Partial<Datasource> }>,
) => {
return {
...state,
drafts: {
...state.drafts,
[action.payload.id]: action.payload.draft,
},
};
},
[ReduxActionTypes.DELETE_DATASOURCE_DRAFT]: (
state: DatasourcePaneReduxState,
action: ReduxAction<{ id: string }>,
) => ({
...state,
drafts: _.omit(state.drafts, action.payload.id),
}),
});
export default datasourcePaneReducer;

View File

@ -5,6 +5,7 @@ import {
ReduxAction,
} from "constants/ReduxActionConstants";
import { RestAction } from "api/ActionAPI";
import _ from "lodash";
const initialState: QueryPaneReduxState = {
isFetching: false,
@ -13,6 +14,7 @@ const initialState: QueryPaneReduxState = {
isSaving: {},
isDeleting: {},
runQuerySuccessData: {},
runErrorMessage: {},
lastUsed: "",
};
@ -22,6 +24,7 @@ export interface QueryPaneReduxState {
isSaving: Record<string, boolean>;
isDeleting: Record<string, boolean>;
runQuerySuccessData: {};
runErrorMessage: Record<string, string>;
lastUsed: string;
isCreating: boolean;
}
@ -134,6 +137,8 @@ const queryPaneReducer = createReducer(initialState, {
state: any,
action: ReduxAction<{ actionId: string; data: object }>,
) => {
const { actionId } = action.payload;
return {
...state,
isRunning: {
@ -144,17 +149,24 @@ const queryPaneReducer = createReducer(initialState, {
...state.runQuerySuccessData,
[action.payload.actionId]: action.payload.data,
},
runErrorMessage: _.omit(state.runErrorMessage, [actionId]),
};
},
[ReduxActionErrorTypes.RUN_QUERY_ERROR]: (
state: any,
action: ReduxAction<{ actionId: string }>,
action: ReduxAction<{ actionId: string; message: string }>,
) => {
const { actionId, message } = action.payload;
return {
...state,
isRunning: {
...state.isRunning,
[action.payload.actionId]: false,
[actionId]: false,
},
runErrorMessage: {
...state.runError,
[actionId]: message,
},
};
},

View File

@ -1,16 +1,25 @@
import { all, put, takeEvery, select } from "redux-saga/effects";
import { change, initialize } from "redux-form";
import { all, put, takeEvery, select, call } from "redux-saga/effects";
import { change, initialize, getFormValues } from "redux-form";
import _ from "lodash";
import {
ReduxAction,
ReduxActionErrorTypes,
ReduxActionTypes,
ReduxFormActionTypes,
ReduxActionWithMeta,
} from "constants/ReduxActionConstants";
import {
getCurrentApplicationId,
getCurrentPageId,
} from "selectors/editorSelectors";
import { getDatasourceRefs, getPluginForm } from "selectors/entitiesSelector";
import {
getDatasourceRefs,
getPluginForm,
getDatasource,
getDatasourceDraft,
} from "selectors/entitiesSelector";
import { selectPlugin } from "actions/datasourceActions";
import { fetchPluginForm } from "actions/pluginActions";
import { GenericApiResponse } from "api/ApiResponses";
import DatasourcesApi, {
CreateDatasourceConfig,
@ -99,6 +108,12 @@ export function* deleteDatasourceSaga(
type: ReduxActionTypes.DELETE_DATASOURCE_SUCCESS,
payload: response.data,
});
yield put({
type: ReduxActionTypes.DELETE_DATASOURCE_DRAFT,
payload: {
id: response.data.id,
},
});
history.push(DATA_SOURCES_EDITOR_URL(applicationId, pageId));
}
} catch (error) {
@ -125,6 +140,12 @@ function* updateDatasourceSaga(actionPayload: ReduxAction<Datasource>) {
type: ReduxActionTypes.UPDATE_DATASOURCE_SUCCESS,
payload: response.data,
});
yield put({
type: ReduxActionTypes.DELETE_DATASOURCE_DRAFT,
payload: {
id: response.data.id,
},
});
}
} catch (error) {
yield put({
@ -269,6 +290,60 @@ function* createDatasourceFromFormSaga(
}
}
function* updateDraftsSaga() {
const values = yield select(getFormValues(DATASOURCE_DB_FORM));
if (!values.id) return;
const datasource = yield select(getDatasource, values.id);
if (_.isEqual(values, datasource)) {
yield put({
type: ReduxActionTypes.DELETE_DATASOURCE_DRAFT,
payload: { id: values.id },
});
} else {
yield put({
type: ReduxActionTypes.UPDATE_DATASOURCE_DRAFT,
payload: { id: values.id, draft: values },
});
}
}
function* changeDatasourceSaga(actionPayload: ReduxAction<Datasource>) {
const { id, pluginId } = actionPayload.payload;
const datasource = actionPayload.payload;
const state = yield select();
const draft = yield select(getDatasourceDraft, id);
const formConfigs = state.entities.plugins.formConfigs;
const applicationId = yield select(getCurrentApplicationId);
const pageId = yield select(getCurrentPageId);
let data;
if (_.isEmpty(draft)) {
data = actionPayload.payload;
} else {
data = draft;
}
yield put(initialize(DATASOURCE_DB_FORM, data));
yield put(selectPlugin(pluginId));
if (!formConfigs[pluginId]) {
yield put(fetchPluginForm({ id: pluginId }));
}
history.push(
DATA_SOURCES_EDITOR_ID_URL(applicationId, pageId, datasource.id),
);
}
function* formValueChangeSaga(
actionPayload: ReduxActionWithMeta<string, { field: string; form: string }>,
) {
const { form } = actionPayload.meta;
if (form !== DATASOURCE_DB_FORM) return;
yield all([call(updateDraftsSaga)]);
}
export function* watchDatasourcesSagas() {
yield all([
takeEvery(ReduxActionTypes.FETCH_DATASOURCES_INIT, fetchDatasourcesSaga),
@ -280,5 +355,8 @@ export function* watchDatasourcesSagas() {
takeEvery(ReduxActionTypes.UPDATE_DATASOURCE_INIT, updateDatasourceSaga),
takeEvery(ReduxActionTypes.TEST_DATASOURCE_INIT, testDatasourceSaga),
takeEvery(ReduxActionTypes.DELETE_DATASOURCE_INIT, deleteDatasourceSaga),
takeEvery(ReduxActionTypes.CHANGE_DATASOURCE, changeDatasourceSaga),
// Intercepting the redux-form change actionType
takeEvery(ReduxFormActionTypes.VALUE_CHANGE, formValueChangeSaga),
]);
}

View File

@ -246,6 +246,7 @@ export function* executeQuerySaga(
type: ReduxActionErrorTypes.RUN_QUERY_ERROR,
payload: {
actionId: actionPayload.payload.actionId,
message: error.message,
show: false,
},
});

View File

@ -8,6 +8,7 @@ import { QUERY_CONSTANT } from "constants/QueryEditorConstants";
import { API_CONSTANT } from "constants/ApiEditorConstants";
import { createSelector } from "reselect";
import { Page } from "constants/ReduxActionConstants";
import { Datasource } from "api/DatasourcesApi";
export const getEntities = (state: AppState): AppState["entities"] =>
state.entities;
@ -107,6 +108,20 @@ export const getActions = (state: AppState): ActionDataState =>
export const getDatasourceRefs = (state: AppState): any =>
state.ui.datasourcePane.datasourceRefs;
export const getDatasource = (
state: AppState,
datasourceId: string,
): Partial<Datasource> | undefined =>
state.entities.datasources.list.find(
datasource => datasource.id === datasourceId,
);
export const getDatasourceDraft = (state: AppState, id: string) => {
const drafts = state.ui.datasourcePane.drafts;
if (id in drafts) return drafts[id];
return {};
};
export const getPlugins = (state: AppState) => state.entities.plugins.list;
export const getApiActions = (state: AppState): ActionDataState => {