feat: added modal name, lint warning for string, action selector modal (#32893)

This commit is contained in:
Aman Agarwal 2024-05-02 17:48:53 +05:30 committed by GitHub
parent 1a4a08e673
commit c41236845c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
60 changed files with 367 additions and 231 deletions

View File

@ -92,7 +92,7 @@ describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => {
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
propPane.EnterJSContext(
"onClick",
`{{Api1.run().then(() => { showAlert('Hello world!', 'info'); storeValue('a', 18); }).catch(() => { showModal('Modal1'); });}}`,
`{{Api1.run().then(() => { showAlert('Hello world!', 'info'); storeValue('a', 18); }).catch(() => { showModal(Modal1.name); });}}`,
true,
false,
);

View File

@ -212,7 +212,12 @@ describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => {
0,
);
propPane.EnterJSContext("onClick", "{{showModal('Modal1')}}", true, false);
propPane.EnterJSContext(
"onClick",
"{{showModal(Modal1.name)}}",
true,
false,
);
propPane.ToggleJSMode("onClick", false);
agHelper.GetNAssertElementText(
@ -253,7 +258,12 @@ describe("JS to non-JS mode in Action Selector", { tags: ["@tag.JS"] }, () => {
0,
);
propPane.EnterJSContext("onClick", "{{closeModal('Modal1')}}", true, false);
propPane.EnterJSContext(
"onClick",
"{{closeModal(Modal1.name)}}",
true,
false,
);
propPane.ToggleJSMode("onClick", false);
agHelper.GetNAssertElementText(

View File

@ -163,7 +163,7 @@ describe(
agHelper.ClickButton("Close");
EditorNavigation.SelectEntityByName("ButtonGroup1", EntityType.Widget);
agHelper.GetNClick(buttongroupwidgetlocators.buttonSettingInPropPane, 0);
propPane.EnterJSContext("onClick", "{{showModal('Modal1')}}");
propPane.EnterJSContext("onClick", "{{showModal(Modal1.name)}}");
deployMode.DeployApp();
agHelper.ClickButton("Favorite");
agHelper.AssertElementExist(locators._modal);

View File

@ -17,7 +17,7 @@ describe("Modal focus", { tags: ["@tag.Widget", "@tag.Modal"] }, function () {
cy.updateCodeInput(
".t--property-control-onclick",
`{{showModal('Modal1')}}`,
`{{showModal(Modal1.name)}}`,
);
//add modal
EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget);

View File

@ -26,7 +26,7 @@ describe(
entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL, 300, 300);
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
propPane.EnterJSContext("onClick", "{{showModal('Modal1');}}");
propPane.EnterJSContext("onClick", "{{showModal(Modal1.name);}}");
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON));
agHelper.WaitUntilEleAppear(
locators._widgetInDeployed(draggableWidgets.BUTTON),

View File

@ -252,7 +252,7 @@
{
"resetFormOnClick": true,
"widgetName": "FormButton1",
"onClick": "{{showModal('Modal1')}}",
"onClick": "{{showModal(Modal1.name)}}",
"buttonColor": "#03B365",
"dynamicPropertyPathList": [{ "key": "onClick" }],
"displayName": "FormButton",
@ -609,7 +609,7 @@
},
{
"widgetName": "Button4",
"onClick": "{{showModal('Modal2')}}",
"onClick": "{{showModal(Modal2.name)}}",
"buttonColor": "#03B365",
"dynamicPropertyPathList": [{ "key": "onClick" }],
"displayName": "Button",
@ -821,7 +821,7 @@
{
"widgetName": "Icon1",
"rightColumn": 64,
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"color": "#040627",
"iconName": "cross",
"displayName": "Icon",
@ -867,7 +867,7 @@
},
{
"widgetName": "Button2",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "#03B365",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",

View File

@ -215,7 +215,7 @@
{
"boxShadow": "none",
"widgetName": "Icon2",
"onClick": "{{closeModal('upvote_modal')}}",
"onClick": "{{closeModal(upvote_modal.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Icon",
"iconSVG": "/static/media/icon.31d6cfe0.svg",
@ -277,7 +277,7 @@
{
"boxShadow": "none",
"widgetName": "Button5",
"onClick": "{{closeModal('upvote_modal')}}",
"onClick": "{{closeModal(upvote_modal.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -2362,7 +2362,7 @@
{
"boxShadow": "none",
"widgetName": "AddIssue",
"onClick": "{{showModal('add_issue_modal')}}",
"onClick": "{{showModal(add_issue_modal.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Icon Button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -2929,7 +2929,7 @@
{
"boxShadow": "none",
"widgetName": "Button2",
"onClick": "{{closeModal('add_issue_modal')}}",
"onClick": "{{closeModal(add_issue_modal.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -2997,7 +2997,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton5",
"onClick": "{{closeModal('add_issue_modal')}}",
"onClick": "{{closeModal(add_issue_modal.name)}}",
"buttonColor": "#2E3D49",
"dynamicPropertyPathList": [
{ "key": "borderRadius" }
@ -4127,7 +4127,7 @@
"boxShadow": "none",
"customAlias": "",
"iconName": "caret-up",
"onClick": "{{showModal('upvote_modal');}}",
"onClick": "{{showModal(upvote_modal.name);}}",
"buttonVariant": "SECONDARY"
}
},
@ -4387,7 +4387,7 @@
{
"widgetName": "Icon2",
"rightColumn": 64.0,
"onClick": "{{closeModal('upvote_modal')}}",
"onClick": "{{closeModal(upvote_modal.name)}}",
"iconName": "cross",
"buttonColor": "#2E3D49",
"displayName": "Icon",
@ -4437,7 +4437,7 @@
},
{
"widgetName": "Button5",
"onClick": "{{closeModal('upvote_modal')}}",
"onClick": "{{closeModal(upvote_modal.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -6281,7 +6281,7 @@
{
"boxShadow": "NONE",
"widgetName": "AddIssue",
"onClick": "{{showModal('add_issue_modal')}}",
"onClick": "{{showModal(add_issue_modal.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Icon Button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -6751,7 +6751,7 @@
},
{
"widgetName": "Button2",
"onClick": "{{closeModal('add_issue_modal')}}",
"onClick": "{{closeModal(add_issue_modal.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -6814,7 +6814,7 @@
{
"boxShadow": "NONE",
"widgetName": "IconButton5",
"onClick": "{{closeModal('add_issue_modal')}}",
"onClick": "{{closeModal(add_issue_modal.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Icon Button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -7280,7 +7280,7 @@
"iconName": "caret-up",
"borderRadius": "ROUNDED",
"buttonVariant": "SECONDARY",
"onClick": "{{showModal('upvote_modal')}}",
"onClick": "{{showModal(upvote_modal.name)}}",
"horizontalAlignment": "LEFT",
"textSize": "PARAGRAPH"
},
@ -8518,7 +8518,7 @@
"timeoutInMillisecond": 10000.0,
"paginationType": "NONE",
"encodeParamsToggle": true,
"body": "() => {\n const labels = IssueManager.getAssignedLabels(label_select.selectedOptionValues);\n add_new_issue.run(() => {\n fetch_issues.run(() => {\n resetWidget('add_issue_modal', true);\n closeModal('add_issue_modal');\n });\n }, undefined, {\n labels: labels\n });\n}",
"body": "() => {\n const labels = IssueManager.getAssignedLabels(label_select.selectedOptionValues);\n add_new_issue.run(() => {\n fetch_issues.run(() => {\n resetWidget('add_issue_modal', true);\n closeModal(add_issue_modal.name);\n });\n }, undefined, {\n labels: labels\n });\n}",
"selfReferencingDataPaths": [],
"jsArguments": [],
"isAsync": false
@ -8529,7 +8529,7 @@
"invalids": [],
"messages": [],
"jsonPathKeys": [
"() => {\n const labels = IssueManager.getAssignedLabels(label_select.selectedOptionValues);\n add_new_issue.run(() => {\n fetch_issues.run(() => {\n resetWidget('add_issue_modal', true);\n closeModal('add_issue_modal');\n });\n }, undefined, {\n labels: labels\n });\n}"
"() => {\n const labels = IssueManager.getAssignedLabels(label_select.selectedOptionValues);\n add_new_issue.run(() => {\n fetch_issues.run(() => {\n resetWidget('add_issue_modal', true);\n closeModal(add_issue_modal.name);\n });\n }, undefined, {\n labels: labels\n });\n}"
],
"userSetOnLoad": false,
"confirmBeforeExecute": false,
@ -8554,7 +8554,7 @@
"timeoutInMillisecond": 10000.0,
"paginationType": "NONE",
"encodeParamsToggle": true,
"body": "() => {\n\t\tconst labels = IssueManager.getAssignedLabels(label_select.selectedOptionValues);\n\t\tadd_new_issue.run(() => {\n\t\t\t\tfetch_issues.run(() => {\n\t\t\t\t\tresetWidget('add_issue_modal', true);\n\t\t\t\t\tcloseModal('add_issue_modal');\n\t\t\t\t});\n\t\t}, undefined, { labels: labels })\n\t}",
"body": "() => {\n\t\tconst labels = IssueManager.getAssignedLabels(label_select.selectedOptionValues);\n\t\tadd_new_issue.run(() => {\n\t\t\t\tfetch_issues.run(() => {\n\t\t\t\t\tresetWidget('add_issue_modal', true);\n\t\t\t\t\tcloseModal(add_issue_modal.name);\n\t\t\t\t});\n\t\t}, undefined, { labels: labels })\n\t}",
"selfReferencingDataPaths": [],
"jsArguments": [],
"isAsync": false
@ -8565,7 +8565,7 @@
"invalids": [],
"messages": [],
"jsonPathKeys": [
"() => {\n\t\tconst labels = IssueManager.getAssignedLabels(label_select.selectedOptionValues);\n\t\tadd_new_issue.run(() => {\n\t\t\t\tfetch_issues.run(() => {\n\t\t\t\t\tresetWidget('add_issue_modal', true);\n\t\t\t\t\tcloseModal('add_issue_modal');\n\t\t\t\t});\n\t\t}, undefined, { labels: labels })\n\t}"
"() => {\n\t\tconst labels = IssueManager.getAssignedLabels(label_select.selectedOptionValues);\n\t\tadd_new_issue.run(() => {\n\t\t\t\tfetch_issues.run(() => {\n\t\t\t\t\tresetWidget('add_issue_modal', true);\n\t\t\t\t\tcloseModal(add_issue_modal.name);\n\t\t\t\t});\n\t\t}, undefined, { labels: labels })\n\t}"
],
"userSetOnLoad": false,
"confirmBeforeExecute": false,
@ -9632,7 +9632,7 @@
"timeoutInMillisecond": 10000.0,
"paginationType": "NONE",
"encodeParamsToggle": true,
"body": "() => {\n add_new_comment.run(() => {\n fetch_comments.run();\n update_issue_labels.run(() => fetch_issues.run());\n closeModal('upvote_modal');\n resetWidget('upvote_modal', true);\n });\n}",
"body": "() => {\n add_new_comment.run(() => {\n fetch_comments.run();\n update_issue_labels.run(() => fetch_issues.run());\n closeModal(upvote_modal.name);\n resetWidget('upvote_modal', true);\n });\n}",
"selfReferencingDataPaths": [],
"jsArguments": [],
"isAsync": true
@ -9643,7 +9643,7 @@
"invalids": [],
"messages": [],
"jsonPathKeys": [
"() => {\n add_new_comment.run(() => {\n fetch_comments.run();\n update_issue_labels.run(() => fetch_issues.run());\n closeModal('upvote_modal');\n resetWidget('upvote_modal', true);\n });\n}"
"() => {\n add_new_comment.run(() => {\n fetch_comments.run();\n update_issue_labels.run(() => fetch_issues.run());\n closeModal(upvote_modal.name);\n resetWidget('upvote_modal', true);\n });\n}"
],
"userSetOnLoad": false,
"confirmBeforeExecute": false,
@ -9668,7 +9668,7 @@
"timeoutInMillisecond": 10000.0,
"paginationType": "NONE",
"encodeParamsToggle": true,
"body": "() => {\n\t\tadd_new_comment.run(() => {\n\t\t\tfetch_comments.run();\n\t\t\tupdate_issue_labels.run(() => \n\t\t\t\tfetch_issues.run());\n\t\t\tcloseModal('upvote_modal');\n\t\t\tresetWidget('upvote_modal', true);\n\t\t});\n\t}",
"body": "() => {\n\t\tadd_new_comment.run(() => {\n\t\t\tfetch_comments.run();\n\t\t\tupdate_issue_labels.run(() => \n\t\t\t\tfetch_issues.run());\n\t\t\tcloseModal(upvote_modal.name);\n\t\t\tresetWidget('upvote_modal', true);\n\t\t});\n\t}",
"selfReferencingDataPaths": [],
"jsArguments": [],
"isAsync": true
@ -9679,7 +9679,7 @@
"invalids": [],
"messages": [],
"jsonPathKeys": [
"() => {\n\t\tadd_new_comment.run(() => {\n\t\t\tfetch_comments.run();\n\t\t\tupdate_issue_labels.run(() => \n\t\t\t\tfetch_issues.run());\n\t\t\tcloseModal('upvote_modal');\n\t\t\tresetWidget('upvote_modal', true);\n\t\t});\n\t}"
"() => {\n\t\tadd_new_comment.run(() => {\n\t\t\tfetch_comments.run();\n\t\t\tupdate_issue_labels.run(() => \n\t\t\t\tfetch_issues.run());\n\t\t\tcloseModal(upvote_modal.name);\n\t\t\tresetWidget('upvote_modal', true);\n\t\t});\n\t}"
],
"userSetOnLoad": false,
"confirmBeforeExecute": false,
@ -9975,7 +9975,7 @@
"pluginType": "JS",
"actions": [],
"archivedActions": [],
"body": "export default {\n\tgetAssignedLabels: (allLabels = label_select.selectedOptionValues) => {\n\t\tconst labels = allLabels.filter((label) => {\n\t\t\treturn Utils.checkIsPod(label) !== true;\n\t\t}); \n\t\tconst podMap = {};\n\t\tlabels.map((label) => {\n\t\t\tconst pod = Utils.getPodForLabel(label);\n\t\t\tif (pod)\n\t\t\t\tpodMap[pod] = true;\n\t\t});\n\t\treturn [...Object.keys(podMap), ...labels];\n\t}, \n\tcreate_issue: () => {\n\t\tconst labels = this.getAssignedLabels(label_select.selectedOptionValues);\n\t\tadd_new_issue.run(() => {\n\t\t\t\tfetch_issues.run(() => {\n\t\t\t\t\tresetWidget('add_issue_modal', true);\n\t\t\t\t\tcloseModal('add_issue_modal');\n\t\t\t\t});\n\t\t}, undefined, { labels: labels })\n\t},\n\tfetchIssues: () => {\n\t\tfetch_issues.run();\n\t},\n\tgetIssueData: () => {\n\t\treturn fetch_issues.data.map((issue) => {\n\t\t\tif (issue.upvote_id > 0)\n\t\t\t\tissue.count = issue.count + 1;\n\t\t\treturn { type: issue.type, title: issue.title, total_reactions: issue.total_reactions, unique_commentors: issue.unique_commentors, upvote_id: issue.upvote_id ,...issue};\n\t\t});\n\t},\n\taddComment: () => {\n\t\tadd_new_comment.run(() => {\n\t\t\tfetch_comments.run();\n\t\t\tupdate_issue_labels.run(() => \n\t\t\t\tfetch_issues.run());\n\t\t\tcloseModal('upvote_modal');\n\t\t\tresetWidget('upvote_modal', true);\n\t\t});\n\t},\n\tupdate: async () => {\n\t\tconst labels = this.getAssignedLabels(edit_label_select.selectedOptionValues);\n\t\tawait update_issue.run({ labels: labels });\n\t\tawait fetch_issues.run();\n\t},\n\tdelete: async () => {\n\t\tawait delete_issue.run(() => fetch_issues.run());\n\t}\n}",
"body": "export default {\n\tgetAssignedLabels: (allLabels = label_select.selectedOptionValues) => {\n\t\tconst labels = allLabels.filter((label) => {\n\t\t\treturn Utils.checkIsPod(label) !== true;\n\t\t}); \n\t\tconst podMap = {};\n\t\tlabels.map((label) => {\n\t\t\tconst pod = Utils.getPodForLabel(label);\n\t\t\tif (pod)\n\t\t\t\tpodMap[pod] = true;\n\t\t});\n\t\treturn [...Object.keys(podMap), ...labels];\n\t}, \n\tcreate_issue: () => {\n\t\tconst labels = this.getAssignedLabels(label_select.selectedOptionValues);\n\t\tadd_new_issue.run(() => {\n\t\t\t\tfetch_issues.run(() => {\n\t\t\t\t\tresetWidget('add_issue_modal', true);\n\t\t\t\t\tcloseModal(add_issue_modal.name);\n\t\t\t\t});\n\t\t}, undefined, { labels: labels })\n\t},\n\tfetchIssues: () => {\n\t\tfetch_issues.run();\n\t},\n\tgetIssueData: () => {\n\t\treturn fetch_issues.data.map((issue) => {\n\t\t\tif (issue.upvote_id > 0)\n\t\t\t\tissue.count = issue.count + 1;\n\t\t\treturn { type: issue.type, title: issue.title, total_reactions: issue.total_reactions, unique_commentors: issue.unique_commentors, upvote_id: issue.upvote_id ,...issue};\n\t\t});\n\t},\n\taddComment: () => {\n\t\tadd_new_comment.run(() => {\n\t\t\tfetch_comments.run();\n\t\t\tupdate_issue_labels.run(() => \n\t\t\t\tfetch_issues.run());\n\t\t\tcloseModal(upvote_modal.name);\n\t\t\tresetWidget('upvote_modal', true);\n\t\t});\n\t},\n\tupdate: async () => {\n\t\tconst labels = this.getAssignedLabels(edit_label_select.selectedOptionValues);\n\t\tawait update_issue.run({ labels: labels });\n\t\tawait fetch_issues.run();\n\t},\n\tdelete: async () => {\n\t\tawait delete_issue.run(() => fetch_issues.run());\n\t}\n}",
"variables": [],
"userPermissions": []
},
@ -9986,7 +9986,7 @@
"pluginType": "JS",
"actions": [],
"archivedActions": [],
"body": "export default {\n\tgetAssignedLabels: (allLabels = label_select.selectedOptionValues) => {\n\t\tconst labels = allLabels.filter((label) => {\n\t\t\treturn Utils.checkIsPod(label) !== true;\n\t\t}); \n\t\tconst podMap = {};\n\t\tlabels.map((label) => {\n\t\t\tconst pod = Utils.getPodForLabel(label);\n\t\t\tif (pod)\n\t\t\t\tpodMap[pod] = true;\n\t\t});\n\t\treturn [...Object.keys(podMap), ...labels];\n\t}, \n\tcreate_issue: () => {\n\t\tconst labels = this.getAssignedLabels(label_select.selectedOptionValues);\n\t\tadd_new_issue.run(() => {\n\t\t\t\tfetch_issues.run(() => {\n\t\t\t\t\tresetWidget('add_issue_modal', true);\n\t\t\t\t\tcloseModal('add_issue_modal');\n\t\t\t\t});\n\t\t}, undefined, { labels: labels })\n\t},\n\tfetchIssues: () => {\n\t\tfetch_issues.run();\n\t},\n\tgetIssueData: () => {\n\t\treturn fetch_issues.data.map((issue) => {\n\t\t\tif (issue.upvote_id > 0)\n\t\t\t\tissue.count = issue.count + 1;\n\t\t\treturn { type: issue.type, title: issue.title, total_reactions: issue.total_reactions, unique_commentors: issue.unique_commentors, upvote_id: issue.upvote_id ,...issue};\n\t\t});\n\t},\n\taddComment: () => {\n\t\tadd_new_comment.run(() => {\n\t\t\tfetch_comments.run();\n\t\t\tupdate_issue_labels.run(() => \n\t\t\t\tfetch_issues.run());\n\t\t\tcloseModal('upvote_modal');\n\t\t\tresetWidget('upvote_modal', true);\n\t\t});\n\t},\n\tupdate: async () => {\n\t\tconst labels = this.getAssignedLabels(edit_label_select.selectedOptionValues);\n\t\tawait update_issue.run({ labels: labels });\n\t\tawait fetch_issues.run();\n\t},\n\tdelete: async () => {\n\t\tawait delete_issue.run(() => fetch_issues.run());\n\t}\n}",
"body": "export default {\n\tgetAssignedLabels: (allLabels = label_select.selectedOptionValues) => {\n\t\tconst labels = allLabels.filter((label) => {\n\t\t\treturn Utils.checkIsPod(label) !== true;\n\t\t}); \n\t\tconst podMap = {};\n\t\tlabels.map((label) => {\n\t\t\tconst pod = Utils.getPodForLabel(label);\n\t\t\tif (pod)\n\t\t\t\tpodMap[pod] = true;\n\t\t});\n\t\treturn [...Object.keys(podMap), ...labels];\n\t}, \n\tcreate_issue: () => {\n\t\tconst labels = this.getAssignedLabels(label_select.selectedOptionValues);\n\t\tadd_new_issue.run(() => {\n\t\t\t\tfetch_issues.run(() => {\n\t\t\t\t\tresetWidget('add_issue_modal', true);\n\t\t\t\t\tcloseModal(add_issue_modal.name);\n\t\t\t\t});\n\t\t}, undefined, { labels: labels })\n\t},\n\tfetchIssues: () => {\n\t\tfetch_issues.run();\n\t},\n\tgetIssueData: () => {\n\t\treturn fetch_issues.data.map((issue) => {\n\t\t\tif (issue.upvote_id > 0)\n\t\t\t\tissue.count = issue.count + 1;\n\t\t\treturn { type: issue.type, title: issue.title, total_reactions: issue.total_reactions, unique_commentors: issue.unique_commentors, upvote_id: issue.upvote_id ,...issue};\n\t\t});\n\t},\n\taddComment: () => {\n\t\tadd_new_comment.run(() => {\n\t\t\tfetch_comments.run();\n\t\t\tupdate_issue_labels.run(() => \n\t\t\t\tfetch_issues.run());\n\t\t\tcloseModal(upvote_modal.name);\n\t\t\tresetWidget('upvote_modal', true);\n\t\t});\n\t},\n\tupdate: async () => {\n\t\tconst labels = this.getAssignedLabels(edit_label_select.selectedOptionValues);\n\t\tawait update_issue.run({ labels: labels });\n\t\tawait fetch_issues.run();\n\t},\n\tdelete: async () => {\n\t\tawait delete_issue.run(() => fetch_issues.run());\n\t}\n}",
"variables": [],
"userPermissions": []
},

View File

@ -497,7 +497,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -580,7 +580,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button2",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",

View File

@ -234,7 +234,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -317,7 +317,7 @@
{
"boxShadow": "none",
"widgetName": "runUpdateQuery",
"onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};selectRecords.run() })}}",
"onClick": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};selectRecords.run() })}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -678,7 +678,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -728,7 +728,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -926,7 +926,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -1057,7 +1057,7 @@
{
"boxShadow": "none",
"widgetName": "runInsertQuery",
"onClick": "{{insertRecord.run(() => {selectRecords.run();resetWidget('InsertModal', true);closeModal('InsertModal'), () => {};})}}",
"onClick": "{{insertRecord.run(() => {selectRecords.run();resetWidget('InsertModal', true);closeModal(InsertModal.name), () => {};})}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{

View File

@ -179,7 +179,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -262,7 +262,7 @@
{
"boxShadow": "none",
"widgetName": "runUpdateQuery",
"onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};selectRecords.run() })}}",
"onClick": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};selectRecords.run() })}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -833,7 +833,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -883,7 +883,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -975,7 +975,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -1109,7 +1109,7 @@
{
"boxShadow": "none",
"widgetName": "runInsertQuery",
"onClick": "{{insertRecord.run(() => {selectRecords.run();resetWidget('InsertModal', true);closeModal('InsertModal'), () => {};})}}",
"onClick": "{{insertRecord.run(() => {selectRecords.run();resetWidget('InsertModal', true);closeModal(InsertModal.name), () => {};})}}",
"buttonColor": "{{appsmith.theme.colors.backgroundColor}}",
"dynamicPropertyPathList": [
{

View File

@ -67,7 +67,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -145,7 +145,7 @@
{
"boxShadow": "none",
"widgetName": "Button5Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -184,7 +184,7 @@
{
"boxShadow": "none",
"widgetName": "runUpdateQuery",
"onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"onClick": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -615,7 +615,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -665,7 +665,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -755,7 +755,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -830,7 +830,7 @@
{
"boxShadow": "none",
"widgetName": "Button5",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -869,7 +869,7 @@
{
"boxShadow": "none",
"widgetName": "runInsertQuery",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal(InsertModal.name), () => {};})}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{

View File

@ -174,7 +174,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -252,7 +252,7 @@
{
"boxShadow": "none",
"widgetName": "Button5Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -291,7 +291,7 @@
{
"boxShadow": "none",
"widgetName": "runUpdateQuery",
"onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"onClick": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -817,7 +817,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -867,7 +867,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -1059,7 +1059,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -1134,7 +1134,7 @@
{
"boxShadow": "none",
"widgetName": "Button5",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -1173,7 +1173,7 @@
{
"boxShadow": "none",
"widgetName": "runInsertQuery",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal(InsertModal.name), () => {};})}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{

View File

@ -173,7 +173,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -251,7 +251,7 @@
{
"boxShadow": "none",
"widgetName": "Button5Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -290,7 +290,7 @@
{
"boxShadow": "none",
"widgetName": "runUpdateQuery",
"onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"onClick": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -872,7 +872,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -922,7 +922,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -1113,7 +1113,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -1188,7 +1188,7 @@
{
"boxShadow": "none",
"widgetName": "Button5",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -1227,7 +1227,7 @@
{
"boxShadow": "none",
"widgetName": "runInsertQuery",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal(InsertModal.name), () => {};})}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{

View File

@ -240,7 +240,7 @@
],
"displayName": "JSON Form",
"iconSVG": "/static/media/icon.5b428de12db9ad6a591955ead07f86e9.svg",
"onSubmit": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()})}}",
"onSubmit": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};\nselectRecords.run()})}}",
"topRow": 8,
"bottomRow": 60,
"fieldLimitExceeded": false,
@ -439,7 +439,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -746,7 +746,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -796,7 +796,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -880,7 +880,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -1130,7 +1130,7 @@
],
"displayName": "JSON Form",
"iconSVG": "/static/media/icon.5b428de12db9ad6a591955ead07f86e9.svg",
"onSubmit": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}",
"onSubmit": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal(InsertModal.name), () => {};})}}",
"topRow": 6,
"bottomRow": 58,
"fieldLimitExceeded": false,

View File

@ -266,7 +266,7 @@
],
"displayName": "JSON Form",
"iconSVG": "/static/media/icon.5b428de12db9ad6a591955ead07f86e9.svg",
"onSubmit": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()})}}",
"onSubmit": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};\nselectRecords.run()})}}",
"topRow": 8,
"bottomRow": 60,
"fieldLimitExceeded": false,
@ -561,7 +561,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -902,7 +902,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -952,7 +952,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -1043,7 +1043,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -1319,7 +1319,7 @@
],
"displayName": "JSON Form",
"iconSVG": "/static/media/icon.5b428de12db9ad6a591955ead07f86e9.svg",
"onSubmit": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}",
"onSubmit": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal(InsertModal.name), () => {};})}}",
"topRow": 6,
"bottomRow": 58,
"fieldLimitExceeded": false,

View File

@ -173,7 +173,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -251,7 +251,7 @@
{
"boxShadow": "none",
"widgetName": "Button5Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -290,7 +290,7 @@
{
"boxShadow": "none",
"widgetName": "runUpdateQuery",
"onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"onClick": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -690,7 +690,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -740,7 +740,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -930,7 +930,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -1005,7 +1005,7 @@
{
"boxShadow": "none",
"widgetName": "Button5",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -1044,7 +1044,7 @@
{
"boxShadow": "none",
"widgetName": "runInsertQuery",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal(InsertModal.name), () => {};})}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{

View File

@ -69,7 +69,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -345,7 +345,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "runUpdateQuery",
"onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};selectRecords.run() })}}",
"onClick": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};selectRecords.run() })}}",
"buttonColor": "#c084fc",
"dynamicPropertyPathList": [
{
@ -730,7 +730,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -780,7 +780,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -872,7 +872,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -947,7 +947,7 @@
{
"boxShadow": "none",
"widgetName": "runInsertQuery",
"onClick": "{{insertRecord.run(() => {selectRecords.run();resetWidget('InsertModal', true);closeModal('InsertModal'), () => {};})}}",
"onClick": "{{insertRecord.run(() => {selectRecords.run();resetWidget('InsertModal', true);closeModal(InsertModal.name), () => {};})}}",
"buttonColor": "#c084fc",
"dynamicPropertyPathList": [
{

View File

@ -1897,7 +1897,7 @@
{
"boxShadow": "none",
"widgetName": "runUpdateQuery",
"onClick": "{{updateRecord.run(() => {closeModal('UpdateModal'), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"onClick": "{{updateRecord.run(() => {closeModal(UpdateModal.name), () => {};\nselectRecords.run()\t\t\t\t\t\t\t\t\t\t\t\t })}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -1948,7 +1948,7 @@
{
"boxShadow": "none",
"widgetName": "Button5Copy",
"onClick": "{{closeModal('UpdateModal')}}",
"onClick": "{{closeModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -2005,7 +2005,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1Copy",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -2824,7 +2824,7 @@
{
"boxShadow": "none",
"widgetName": "InsertButton",
"onClick": "{{showModal('InsertModal')}}",
"onClick": "{{showModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -2874,7 +2874,7 @@
{
"boxShadow": "none",
"widgetName": "UpdateButton",
"onClick": "{{showModal('UpdateModal')}}",
"onClick": "{{showModal(UpdateModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -4590,7 +4590,7 @@
{
"boxShadow": "none",
"widgetName": "Button5",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -4631,7 +4631,7 @@
{
"boxShadow": "none",
"widgetName": "runInsertQuery",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal('InsertModal'), () => {};})}}",
"onClick": "{{insertRecord.run(() => {\nselectRecords.run();\t\t\t\tresetWidget('InsertModal', true);\ncloseModal(InsertModal.name), () => {};})}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"dynamicPropertyPathList": [
{
@ -4698,7 +4698,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('InsertModal')}}",
"onClick": "{{closeModal(InsertModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",

View File

@ -80,7 +80,7 @@
"key": "borderRadius"
}
],
"onClick": "{{closeModal('Modal1')}}"
"onClick": "{{closeModal(Modal1.name)}}"
},
{
"isVisible": true,
@ -170,7 +170,7 @@
"key": "borderRadius"
}
],
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"originalTopRow": 18,
"originalBottomRow": 22
},

View File

@ -798,7 +798,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -876,7 +876,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button3",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",

View File

@ -291,7 +291,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{showModal('Modal1')}}",
"onClick": "{{showModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -484,7 +484,7 @@
}
],
"labelPosition": "Top",
"onSelectionChange": "{{showModal('Modal2')}}",
"onSelectionChange": "{{showModal(Modal2.name)}}",
"options": [
{
"label": "Yes",
@ -544,7 +544,7 @@
}
],
"labelPosition": "Top",
"onSelectionChange": "{{showModal('Modal2')}}",
"onSelectionChange": "{{showModal(Modal2.name)}}",
"options": [
{
"label": "Blue",
@ -704,7 +704,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton2",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -793,7 +793,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",
@ -998,7 +998,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton4",
"onClick": "{{closeModal('Modal2')}}",
"onClick": "{{closeModal(Modal2.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -1087,7 +1087,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button3",
"onClick": "{{closeModal('Modal2')}}",
"onClick": "{{closeModal(Modal2.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",

View File

@ -50,7 +50,7 @@
"bottomRow": 1,
"parentId": "yyyrxs383y",
"widgetId": "kxdvolusyp",
"onClick": "{{closeModal('Modal1')}}"
"onClick": "{{closeModal(Modal1.name)}}"
},
{
"isVisible": true,

View File

@ -249,7 +249,7 @@
"boxShadow": "none",
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Delete_Modal')}}",
"onClick": "{{showModal(Delete_Modal.name)}}",
"buttonColor": "#DD4B34",
"buttonStyle": "rgb(3, 179, 101)",
"index": 5.0,
@ -684,7 +684,7 @@
"boxShadow": "none",
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Delete_Modal')}}",
"onClick": "{{showModal(Delete_Modal.name)}}",
"buttonColor": "#DD4B34",
"buttonStyle": "rgb(3, 179, 101)",
"index": 5.0,
@ -786,7 +786,7 @@
"boxShadow": "none",
"widgetName": "add_btn",
"rightColumn": 59.0,
"onClick": "{{showModal('Insert_Modal')}}",
"onClick": "{{showModal(Insert_Modal.name)}}",
"iconName": "add",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"widgetId": "nh3cu4lb1g",
@ -887,7 +887,7 @@
{
"boxShadow": "none",
"widgetName": "Button1",
"onClick": "{{closeModal('Delete_Modal')}}",
"onClick": "{{closeModal(Delete_Modal.name)}}",
"dynamicPropertyPathList": [],
"buttonColor": "#2E3D49",
"topRow": 17.0,
@ -913,7 +913,7 @@
{
"boxShadow": "none",
"widgetName": "Delete_Button",
"onClick": "{{DeleteQuery.run(() => SelectQuery.run(() => closeModal('Delete_Modal')), () => {})}}",
"onClick": "{{DeleteQuery.run(() => SelectQuery.run(() => closeModal(Delete_Modal.name)), () => {})}}",
"dynamicPropertyPathList": [{ "key": "onClick" }],
"buttonColor": "#DD4B34",
"topRow": 17.0,
@ -1350,7 +1350,7 @@
],
"displayName": "JSON Form",
"iconSVG": "/static/media/icon.6bacf7df.svg",
"onSubmit": "{{InsertQuery.run(\n\t() => SelectQuery.run()\n\t\t\t\t\t.then(() => closeModal('Insert_Modal')), \n\t(error) => showAlert(`Error while inserting resource!\\n ${error}`,'error'))\n}}",
"onSubmit": "{{InsertQuery.run(\n\t() => SelectQuery.run()\n\t\t\t\t\t.then(() => closeModal(Insert_Modal.name)), \n\t(error) => showAlert(`Error while inserting resource!\\n ${error}`,'error'))\n}}",
"topRow": 0.0,
"bottomRow": 81.0,
"fieldLimitExceeded": false,

File diff suppressed because one or more lines are too long

View File

@ -375,7 +375,7 @@
"bottomRow": true,
"parentId": true
},
"onClick": "{{showModal('Modal1')}}"
"onClick": "{{showModal(Modal1.name)}}"
}
},
"widgetName": "List1",
@ -751,7 +751,7 @@
},
{
"widgetName": "Button2",
"onClick": "{{showModal('Modal1')}}",
"onClick": "{{showModal(Modal1.name)}}",
"buttonColor": "#DD4B34",
"dynamicPropertyPathList": [
{ "key": "onClick" }
@ -854,7 +854,7 @@
},
{
"widgetName": "Button3",
"onClick": "{{showModal('nt_modal')}}",
"onClick": "{{showModal(nt_modal.name)}}",
"buttonColor": "#03B365",
"dynamicPropertyPathList": [],
"displayName": "Button",
@ -1036,7 +1036,7 @@
"iconName": "pencil-fill-icon",
"buttonVariant": "SECONDARY",
"boxShadow": "NONE",
"onClick": "{{showModal('ec_modal')}}"
"onClick": "{{showModal(ec_modal.name)}}"
},
"starelid": {
"index": 0,
@ -1637,7 +1637,7 @@
},
{
"widgetName": "Button6",
"onClick": "{{showModal('nc_modal')}}",
"onClick": "{{showModal(nc_modal.name)}}",
"buttonColor": "#03B365",
"dynamicPropertyPathList": [{ "key": "onClick" }],
"displayName": "Button",
@ -1862,7 +1862,7 @@
{
"resetFormOnClick": true,
"widgetName": "FormButton2",
"onClick": "{{closeModal('nt_modal')}}",
"onClick": "{{closeModal(nt_modal.name)}}",
"rightColumn": 17,
"isDefaultClickDisabled": true,
"buttonColor": "#03B365",
@ -2104,7 +2104,7 @@
},
{
"widgetName": "Button5",
"onClick": "{{showModal('nt_col_modal')}}",
"onClick": "{{showModal(nt_col_modal.name)}}",
"buttonColor": "#03B365",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -2240,7 +2240,7 @@
{
"resetFormOnClick": true,
"widgetName": "FormButton3",
"onClick": "{{(()=>{\n\tconst nt_col = appsmith.store.nt_col ||[];\nnt_col.push({\n\t\tname:nt_col_name.text,\ndtype:nt_col_type.selectedOptionValue,\npkey:nt_col_pkey.isSwitchedOn,\nnnull:nt_col_nnull.isSwitchedOn});\nstoreValue('nt_col',nt_col)\n\tshowModal('nt_modal')\n})()}}",
"onClick": "{{(()=>{\n\tconst nt_col = appsmith.store.nt_col ||[];\nnt_col.push({\n\t\tname:nt_col_name.text,\ndtype:nt_col_type.selectedOptionValue,\npkey:nt_col_pkey.isSwitchedOn,\nnnull:nt_col_nnull.isSwitchedOn});\nstoreValue('nt_col',nt_col)\n\tshowModal(nt_modal.name)\n})()}}",
"buttonColor": "#03B365",
"dynamicPropertyPathList": [{ "key": "onClick" }],
"displayName": "FormButton",
@ -2595,7 +2595,7 @@
{
"resetFormOnClick": true,
"widgetName": "FormButton5",
"onClick": "{{create_column.run(()=>{get_columns.run();\ncloseModal('nc_modal');\t\t})}}",
"onClick": "{{create_column.run(()=>{get_columns.run();\ncloseModal(nc_modal.name);\t\t})}}",
"buttonColor": "#03B365",
"dynamicPropertyPathList": [{ "key": "onClick" }],
"displayName": "FormButton",
@ -3219,7 +3219,7 @@
{
"widgetName": "Icon1",
"rightColumn": 63,
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"color": "#040627",
"iconName": "cross",
"displayName": "Icon",
@ -3265,7 +3265,7 @@
},
{
"widgetName": "Button7",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "#03B365",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",

View File

@ -473,7 +473,7 @@
"isRequired": false,
"widgetName": "Icon1",
"rightColumn": 64,
"onClick": "{{closeModal('TestModal')}}",
"onClick": "{{closeModal(TestModal.name)}}",
"color": "#040627",
"iconName": "cross",
"widgetId": "n5fc0ven2a",

View File

@ -436,7 +436,7 @@
{
"widgetName": "Icon1",
"rightColumn": 16,
"onClick": "{{closeModal('TestModal')}}",
"onClick": "{{closeModal(TestModal.name)}}",
"color": "#040627",
"iconName": "cross",
"widgetId": "n5fc0ven2a",

View File

@ -79,7 +79,7 @@
"key": "borderRadius"
}
],
"onClick": "{{closeModal('Modal1')}}"
"onClick": "{{closeModal(Modal1.name)}}"
},
{
"isVisible": true,
@ -158,7 +158,7 @@
"key": "borderRadius"
}
],
"onClick": "{{closeModal('Modal1')}}"
"onClick": "{{closeModal(Modal1.name)}}"
},
{
"isVisible": true,

View File

@ -145,7 +145,7 @@
"key": "accentColor"
}
],
"onSelectionChange": "{{showModal('Modal1')}}",
"onSelectionChange": "{{showModal(Modal1.name)}}",
"dynamicTriggerPathList": [
{
"key": "onSelectionChange"
@ -269,7 +269,7 @@
"key": "borderRadius"
}
],
"onClick": "{{closeModal('Modal1')}}"
"onClick": "{{closeModal(Modal1.name)}}"
},
{
"isVisible": true,
@ -356,7 +356,7 @@
"key": "borderRadius"
}
],
"onClick": "{{closeModal('Modal1')}}"
"onClick": "{{closeModal(Modal1.name)}}"
},
{
"isVisible": true,

View File

@ -149,7 +149,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -229,7 +229,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button2",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",

View File

@ -723,7 +723,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton2",
"onClick": "{{closeModal('SimpleModal')}}",
"onClick": "{{closeModal(SimpleModal.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -810,7 +810,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button3",
"onClick": "{{closeModal('Modal2')}}",
"onClick": "{{closeModal(Modal2.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",

View File

@ -112,7 +112,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -188,7 +188,7 @@
{
"boxShadow": "none",
"widgetName": "Button1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",

View File

@ -69,7 +69,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -152,7 +152,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",

View File

@ -59,7 +59,7 @@
{
"boxShadow": "NONE",
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "#2E3D49",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634a.svg",
@ -112,7 +112,7 @@
},
{
"widgetName": "Button1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "#03B365",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -463,7 +463,7 @@
"isDisabled": false,
"isDerived": false,
"label": "action",
"onClick": "{{showModal('Modal1')}}",
"onClick": "{{showModal(Modal1.name)}}",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.action))}}",
"buttonColor": "#03B365",
"menuColor": "#03B365",

File diff suppressed because one or more lines are too long

View File

@ -1041,7 +1041,7 @@
"boxShadow": "none",
"mobileBottomRow": 4,
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal_1');}}",
"onClick": "{{closeModal(Modal_1.name);}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -1155,7 +1155,7 @@
"boxShadow": "none",
"mobileBottomRow": 22,
"widgetName": "Button1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",

View File

@ -58,7 +58,7 @@
{
"widgetName": "Icon1",
"rightColumn": 64,
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"color": "#040627",
"iconName": "cross",
"displayName": "Icon",
@ -102,7 +102,7 @@
},
{
"widgetName": "Button1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "#03B365",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -171,7 +171,7 @@
},
{
"widgetName": "Button3",
"onClick": "{{showModal('Modal1')}}",
"onClick": "{{showModal(Modal1.name)}}",
"buttonColor": "#03B365",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",

View File

@ -59,7 +59,7 @@
{
"widgetName": "Icon1",
"rightColumn": 64,
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"color": "#040627",
"iconName": "cross",
"displayName": "Icon",
@ -107,7 +107,7 @@
},
{
"widgetName": "Button1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "#03B365",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",
@ -342,7 +342,7 @@
},
{
"widgetName": "Button3",
"onClick": "{{showModal('Modal1')}}",
"onClick": "{{showModal(Modal1.name)}}",
"buttonColor": "#03B365",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca02633.svg",

View File

@ -24,7 +24,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button1",
"onClick": "{{showModal('Modal1')}}",
"onClick": "{{showModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",
@ -109,7 +109,7 @@
{
"boxShadow": "none",
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg",
@ -192,7 +192,7 @@
"resetFormOnClick": false,
"boxShadow": "none",
"widgetName": "Button2",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",

View File

@ -56,7 +56,7 @@
"boxShadow": "none",
"mobileBottomRow": 12.0,
"widgetName": "Button1",
"onClick": "{{showModal('Modal1');}}",
"onClick": "{{showModal(Modal1.name);}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",
@ -145,7 +145,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -1804,7 +1804,7 @@
"responsiveBehavior": "fill",
"mobileLeftColumn": 7.0,
"maxDynamicHeight": 9000.0,
"onOptionChange": "{{showModal('Modal2');}}",
"onOptionChange": "{{showModal(Modal2.name);}}",
"minDynamicHeight": 4.0
},
{
@ -1852,7 +1852,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton3",
"onClick": "{{closeModal('Modal2')}}",
"onClick": "{{closeModal(Modal2.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -2340,7 +2340,7 @@
"rightColumn": 59.0,
"widgetId": "b7fjdn1ail",
"minWidth": 450.0,
"onItemClick": "{{showModal('Modal3');}}",
"onItemClick": "{{showModal(Modal3.name);}}",
"parentId": "0",
"renderMode": "CANVAS",
"mobileTopRow": 17.0,
@ -2393,7 +2393,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton4",
"onClick": "{{closeModal('Modal3')}}",
"onClick": "{{closeModal(Modal3.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -2481,7 +2481,7 @@
"boxShadow": "none",
"mobileBottomRow": 22.0,
"widgetName": "Button2",
"onClick": "{{closeModal('Modal3')}}",
"onClick": "{{closeModal(Modal3.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",
@ -2644,7 +2644,7 @@
"totalRecordsCount": 0.0,
"tags": ["Suggested", "Display"],
"isLoading": false,
"onSearchTextChanged": "{{showModal('Modal4');}}",
"onSearchTextChanged": "{{showModal(Modal4.name);}}",
"childStylesheet": {
"button": {
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
@ -2950,7 +2950,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton5",
"onClick": "{{closeModal('Modal4')}}",
"onClick": "{{closeModal(Modal4.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -3038,7 +3038,7 @@
"boxShadow": "none",
"mobileBottomRow": 22.0,
"widgetName": "Button4",
"onClick": "{{closeModal('Modal4')}}",
"onClick": "{{closeModal(Modal4.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",
@ -3170,7 +3170,7 @@
"boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}",
"borderColor": "#E0DEDE",
"iconSVG": "/static/media/icon.46adf7030d667f0ad9002aa31f997573.svg",
"onSubmit": "{{showModal('Modal5');}}",
"onSubmit": "{{showModal(Modal5.name);}}",
"topRow": 61.0,
"type": "JSON_FORM_WIDGET",
"animateLoading": true,
@ -3498,7 +3498,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton6",
"onClick": "{{closeModal('Modal5')}}",
"onClick": "{{closeModal(Modal5.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -3586,7 +3586,7 @@
"boxShadow": "none",
"mobileBottomRow": 22.0,
"widgetName": "Button6",
"onClick": "{{closeModal('Modal5')}}",
"onClick": "{{closeModal(Modal5.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",
@ -3771,7 +3771,7 @@
"boxShadow": "none",
"mobileBottomRow": 12.0,
"widgetName": "Button1",
"onClick": "{{showModal('Modal1');}}",
"onClick": "{{showModal(Modal1.name);}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",
@ -3860,7 +3860,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton1",
"onClick": "{{closeModal('Modal1')}}",
"onClick": "{{closeModal(Modal1.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -5519,7 +5519,7 @@
"responsiveBehavior": "fill",
"mobileLeftColumn": 7.0,
"maxDynamicHeight": 9000.0,
"onOptionChange": "{{showModal('Modal2');}}",
"onOptionChange": "{{showModal(Modal2.name);}}",
"minDynamicHeight": 4.0
},
{
@ -5567,7 +5567,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton3",
"onClick": "{{closeModal('Modal2')}}",
"onClick": "{{closeModal(Modal2.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -6055,7 +6055,7 @@
"rightColumn": 59.0,
"widgetId": "b7fjdn1ail",
"minWidth": 450.0,
"onItemClick": "{{showModal('Modal3');}}",
"onItemClick": "{{showModal(Modal3.name);}}",
"parentId": "0",
"renderMode": "CANVAS",
"mobileTopRow": 17.0,
@ -6108,7 +6108,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton4",
"onClick": "{{closeModal('Modal3')}}",
"onClick": "{{closeModal(Modal3.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -6196,7 +6196,7 @@
"boxShadow": "none",
"mobileBottomRow": 22.0,
"widgetName": "Button2",
"onClick": "{{closeModal('Modal3')}}",
"onClick": "{{closeModal(Modal3.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",
@ -6359,7 +6359,7 @@
"totalRecordsCount": 0.0,
"tags": ["Suggested", "Display"],
"isLoading": false,
"onSearchTextChanged": "{{showModal('Modal4');}}",
"onSearchTextChanged": "{{showModal(Modal4.name);}}",
"childStylesheet": {
"button": {
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
@ -6665,7 +6665,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton5",
"onClick": "{{closeModal('Modal4')}}",
"onClick": "{{closeModal(Modal4.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -6753,7 +6753,7 @@
"boxShadow": "none",
"mobileBottomRow": 22.0,
"widgetName": "Button4",
"onClick": "{{closeModal('Modal4')}}",
"onClick": "{{closeModal(Modal4.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",
@ -6885,7 +6885,7 @@
"boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}",
"borderColor": "#E0DEDE",
"iconSVG": "/static/media/icon.46adf7030d667f0ad9002aa31f997573.svg",
"onSubmit": "{{showModal('Modal5');}}",
"onSubmit": "{{showModal(Modal5.name);}}",
"topRow": 61.0,
"type": "JSON_FORM_WIDGET",
"animateLoading": true,
@ -7213,7 +7213,7 @@
"boxShadow": "none",
"mobileBottomRow": 4.0,
"widgetName": "IconButton6",
"onClick": "{{closeModal('Modal5')}}",
"onClick": "{{closeModal(Modal5.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Icon button",
"iconSVG": "/static/media/icon.b08054586989b185a0801e9a34f8ad49.svg",
@ -7301,7 +7301,7 @@
"boxShadow": "none",
"mobileBottomRow": 22.0,
"widgetName": "Button6",
"onClick": "{{closeModal('Modal5')}}",
"onClick": "{{closeModal(Modal5.name)}}",
"buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"displayName": "Button",
"iconSVG": "/static/media/icon.05d209fafeb13a8569e3b4e97069d9ee.svg",

File diff suppressed because one or more lines are too long

View File

@ -134,7 +134,7 @@
"isCellVisible": true,
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Delete_Modal')}}",
"onClick": "{{showModal(Delete_Modal.name)}}",
"textSize": "PARAGRAPH",
"buttonColor": "#DD4B34",
"index": 7.0,
@ -432,7 +432,7 @@
"boxShadow": "NONE",
"widgetName": "add_btn",
"rightColumn": 60.0,
"onClick": "{{showModal('Insert_Modal')}}",
"onClick": "{{showModal(Insert_Modal.name)}}",
"iconName": "add",
"buttonColor": "#03B365",
"widgetId": "kby34l9nbb",
@ -524,7 +524,7 @@
{
"widgetName": "Button1",
"rightColumn": 46.0,
"onClick": "{{closeModal('Delete_Modal')}}",
"onClick": "{{closeModal(Delete_Modal.name)}}",
"isDefaultClickDisabled": true,
"dynamicPropertyPathList": [],
"buttonColor": "#03B365",
@ -549,7 +549,7 @@
{
"widgetName": "Delete_Button",
"rightColumn": 64.0,
"onClick": "{{DeleteQuery.run(() => SelectQuery.run(() => closeModal('Delete_Modal')), () => {})}}",
"onClick": "{{DeleteQuery.run(() => SelectQuery.run(() => closeModal(Delete_Modal.name)), () => {})}}",
"isDefaultClickDisabled": true,
"dynamicPropertyPathList": [
{
@ -688,7 +688,7 @@
"resetFormOnClick": true,
"widgetName": "insert_button",
"rightColumn": 62.0,
"onClick": "{{InsertQuery.run(() => SelectQuery.run(() => closeModal('Insert_Modal')))}}",
"onClick": "{{InsertQuery.run(() => SelectQuery.run(() => closeModal(Insert_Modal.name)))}}",
"isDefaultClickDisabled": true,
"dynamicPropertyPathList": [
{
@ -719,7 +719,7 @@
"resetFormOnClick": true,
"widgetName": "reset_button",
"rightColumn": 42.0,
"onClick": "{{closeModal('Insert_Modal')}}",
"onClick": "{{closeModal(Insert_Modal.name)}}",
"isDefaultClickDisabled": true,
"buttonColor": "#03B365",
"widgetId": "o23gs26wm5",

View File

@ -251,7 +251,7 @@
"customColumn2": {
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Modal2')}}",
"onClick": "{{showModal(Modal2.name)}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "#38AFF4",
"index": 9,
@ -378,7 +378,7 @@
"customColumn2": {
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Modal2')}}",
"onClick": "{{showModal(Modal2.name)}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "#38AFF4",
"index": 9,

View File

@ -270,7 +270,7 @@
"customColumn2": {
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Modal2')}}",
"onClick": "{{showModal(Modal2.name)}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "#38AFF4",
"index": 9,
@ -411,7 +411,7 @@
"customColumn2": {
"isDerived": true,
"computedValue": "",
"onClick": "{{showModal('Modal2')}}",
"onClick": "{{showModal(Modal2.name)}}",
"textSize": "PARAGRAPH2",
"buttonStyle": "#38AFF4",
"index": 9,

View File

@ -146,7 +146,7 @@
"bottomRow": 1,
"parentId": "cwamdbv44c",
"widgetId": "t3sjfihdb1",
"onClick": "{{closeModal('Modal1')}}"
"onClick": "{{closeModal(Modal1.name)}}"
},
{
"isVisible": true,

View File

@ -4,6 +4,7 @@ import type {
MemberExpressionData,
IdentifierInfo,
AssignmentExpressionData,
CallExpressionData,
} from "./src";
import {
isIdentifierNode,
@ -83,6 +84,7 @@ export type {
AssignmentExpressionData,
JSVarProperty,
JSFunctionProperty,
CallExpressionData,
};
export {

View File

@ -466,6 +466,14 @@ export const getModalName = (
switch (argument?.type) {
case NodeTypes.Literal:
modalName = argument.value as string;
break;
case NodeTypes.MemberExpression:
// this is for cases where we have {{showModal(Modal1.name)}} or {{closeModal(Modal1.name)}}
// modalName = Modal1.name;
modalName = generate(argument, {
comments: true,
}).trim();
break;
}
}
@ -509,7 +517,7 @@ export const setModalName = (
const newNode: LiteralNode = {
type: NodeTypes.Literal,
value: `${changeValue}`,
raw: String.raw`'${changeValue}'`,
raw: String.raw`${changeValue}`,
start: startPosition,
// add 2 for quotes
end: startPosition + (changeValue.length + LENGTH_OF_QUOTES),

View File

@ -592,6 +592,11 @@ export interface AssignmentExpressionData {
parentNode: NodeWithLocation<AssignmentExpressionNode>;
}
export interface CallExpressionData {
property: NodeWithLocation<IdentifierNode>;
params: NodeWithLocation<MemberExpressionNode | LiteralNode>[];
}
export interface AssignmentExpressionNode extends Node {
operator: string;
left: Expression;
@ -622,8 +627,10 @@ export const extractExpressionsFromCode = (
): {
invalidTopLevelMemberExpressionsArray: MemberExpressionData[];
assignmentExpressionsData: AssignmentExpressionData[];
callExpressionsData: CallExpressionData[];
} => {
const assignmentExpressionsData = new Set<AssignmentExpressionData>();
const callExpressionsData = new Set<CallExpressionData>();
const invalidTopLevelMemberExpressions = new Set<MemberExpressionData>();
const variableDeclarations = new Set<string>();
let functionalParams = new Set<string>();
@ -638,6 +645,7 @@ export const extractExpressionsFromCode = (
return {
invalidTopLevelMemberExpressionsArray: [],
assignmentExpressionsData: [],
callExpressionsData: [],
};
}
throw e;
@ -717,6 +725,14 @@ export const extractExpressionsFromCode = (
parentNode: node,
} as AssignmentExpressionData);
},
CallExpression(node: Node) {
if (isCallExpressionNode(node) && isIdentifierNode(node.callee)) {
callExpressionsData.add({
property: node.callee,
params: node.arguments,
} as CallExpressionData);
}
},
});
const invalidTopLevelMemberExpressionsArray = Array.from(
@ -731,6 +747,7 @@ export const extractExpressionsFromCode = (
return {
invalidTopLevelMemberExpressionsArray,
assignmentExpressionsData: [...assignmentExpressionsData],
callExpressionsData: [...callExpressionsData],
};
};

View File

@ -286,10 +286,10 @@ export const ternDocsInfo: Record<string, any> = {
],
},
showModal: {
exampleArgs: ["'Modal1'"],
exampleArgs: ["Modal1.name"],
},
closeModal: {
exampleArgs: ["'Modal1'"],
exampleArgs: ["Modal1.name"],
},
navigateTo: {
exampleArgs: [

View File

@ -369,7 +369,7 @@ export const FIELD_CONFIG: AppsmithFunctionConfigType = {
label: () => "Modal name",
options: (props: FieldProps) => props.modalDropdownList,
defaultText: "Select modal",
exampleText: "showModal('Modal1')",
exampleText: "showModal(Modal1.name)",
getter: (value: any) => {
return modalGetter(value);
},
@ -382,7 +382,7 @@ export const FIELD_CONFIG: AppsmithFunctionConfigType = {
label: () => "Modal name",
options: (props: FieldProps) => props.modalDropdownList,
defaultText: "Select modal",
exampleText: "closeModal('Modal1')",
exampleText: "closeModal(Modal1.name)",
getter: (value: any) => {
return modalGetter(value);
},

View File

@ -70,7 +70,7 @@ export const FIELD_GROUP_CONFIG: FieldGroupConfig = {
[AppsmithFunction.showModal]: {
label: createMessage(SHOW_MODAL),
fields: [FieldType.SHOW_MODAL_FIELD],
defaultParams: `''`,
defaultParams: ``,
icon: "show-modal",
},
[AppsmithFunction.closeModal]: {

View File

@ -378,7 +378,7 @@ export function useModalDropdownList(handleClose: () => void) {
const modalName = nextModalName;
if (setter) {
setter({
value: `${modalName}`,
value: `${modalName}.name`,
});
dispatch(createModalAction(modalName));
handleClose();

View File

@ -246,26 +246,26 @@ describe("Test modalSetter", () => {
{
index: 1,
input: "{{showModal('')}}",
expected: "{{showModal('Modal1');}}",
value: "Modal1",
expected: "{{showModal(Modal1.name);}}",
value: "Modal1.name",
},
{
index: 2,
input: "{{showModal('Modal1')}}",
expected: "{{showModal('Modal2');}}",
value: "Modal2",
input: "{{showModal(Modal1.name)}}",
expected: "{{showModal(Modal2.name);}}",
value: "Modal2.name",
},
{
index: 3,
input: "{{closeModal('')}}",
expected: "{{closeModal('Modal1');}}",
value: "Modal1",
expected: "{{closeModal(Modal1.name);}}",
value: "Modal1.name",
},
{
index: 4,
input: "{{closeModal('Modal1')}}",
expected: "{{closeModal('Modal2');}}",
value: "Modal2",
input: "{{closeModal(Modal1.name)}}",
expected: "{{closeModal(Modal2.name);}}",
value: "Modal2.name",
},
];
test.each(cases.map((x) => [x.index, x.input, x.expected, x.value]))(
@ -286,17 +286,27 @@ describe("Test modalGetter", () => {
},
{
index: 2,
input: "{{showModal('Modal1')}}",
expected: "Modal1",
input: "{{showModal(Modal1.name)}}",
expected: "Modal1.name",
},
{
index: 3,
input: '{{showModal("Modal1")}}',
expected: "Modal1",
},
{
index: 4,
input: "{{closeModal('')}}",
expected: "",
},
{
index: 4,
input: "{{closeModal('Modal1')}}",
index: 5,
input: "{{closeModal(Modal1.name)}}",
expected: "Modal1.name",
},
{
index: 6,
input: '{{closeModal("Modal1")}}',
expected: "Modal1",
},
];

View File

@ -149,12 +149,14 @@ function getActionHeading(
case AppsmithFunction.showModal:
return (
FIELD_CONFIG[FieldType.SHOW_MODAL_FIELD].getter(code) || "Select modal"
FIELD_CONFIG[FieldType.SHOW_MODAL_FIELD].getter(code).split(".")[0] ||
"Select modal"
);
case AppsmithFunction.closeModal:
return (
FIELD_CONFIG[FieldType.CLOSE_MODAL_FIELD].getter(code) || "Select modal"
FIELD_CONFIG[FieldType.CLOSE_MODAL_FIELD].getter(code).split(".")[0] ||
"Select modal"
);
case AppsmithFunction.resetWidget:

View File

@ -42,6 +42,7 @@ export const WARNING_LINT_ERRORS = {
W014: "Misleading line break before '{a}'; readers may interpret this as an expression boundary.",
ASYNC_FUNCTION_BOUND_TO_SYNC_FIELD:
"Cannot execute async code on functions bound to data fields",
ACTION_MODAL_STRING: 'Use Modal1.name instead of "Modal" as a string',
};
export function asyncActionInSyncFieldLintMessage(isJsObject = false) {
@ -66,6 +67,8 @@ export enum CustomLintErrorCode {
INVALID_WIDGET_PROPERTY_SETTER = "INVALID_WIDGET_PROPERTY_SETTER",
// appsmith.store.value = "test"
INVALID_APPSMITH_STORE_PROPERTY_SETTER = "INVALID_APPSMITH_STORE_PROPERTY_SETTER",
// showModal("Modal1")
ACTION_MODAL_STRING = "ACTION_MODAL_STRING",
}
export const CUSTOM_LINT_ERRORS: Record<
@ -115,4 +118,7 @@ export const CUSTOM_LINT_ERRORS: Record<
[CustomLintErrorCode.INVALID_APPSMITH_STORE_PROPERTY_SETTER]: () => {
return "Use storeValue() method to modify the store";
},
[CustomLintErrorCode.ACTION_MODAL_STRING]: (modalName: string) => {
return `Use ${modalName}.name instead of "${modalName}" as a string`;
},
};

View File

@ -6,6 +6,7 @@ import { get, isEmpty, isNumber, keys } from "lodash";
import type {
MemberExpressionData,
AssignmentExpressionData,
CallExpressionData,
} from "@shared/ast";
import {
extractExpressionsFromCode,
@ -384,6 +385,7 @@ function getCustomErrorsFromScript(
): LintError[] {
let invalidTopLevelMemberExpressions: MemberExpressionData[] = [];
let assignmentExpressions: AssignmentExpressionData[] = [];
let callExpressions: CallExpressionData[] = [];
try {
const value = extractExpressionsFromCode(
script,
@ -393,6 +395,7 @@ function getCustomErrorsFromScript(
invalidTopLevelMemberExpressions =
value.invalidTopLevelMemberExpressionsArray;
assignmentExpressions = value.assignmentExpressionsData;
callExpressions = value.callExpressionsData;
} catch (e) {}
const invalidWidgetPropertySetterErrors =
@ -422,10 +425,18 @@ function getCustomErrorsFromScript(
data,
});
const invalidActionModalErrors = getActionModalStringValueErrors({
callExpressions,
script,
scriptPos,
originalBinding,
});
return [
...invalidPropertyErrors,
...invalidWidgetPropertySetterErrors,
...invalidAppsmithStorePropertyErrors,
...invalidActionModalErrors,
];
}
@ -455,3 +466,57 @@ function getPositionInEvaluationScript(type: EvaluationScriptType): Position {
return { line: lines.length, ch: lastLine.length };
}
function getActionModalStringValueErrors({
callExpressions,
originalBinding,
script,
scriptPos,
}: {
callExpressions: CallExpressionData[];
scriptPos: Position;
originalBinding: string;
script: string;
}) {
const actionModalLintErrors: LintError[] = [];
for (const { params, property } of callExpressions) {
if (property.name === "showModal" || property.name === "closeModal") {
if (params[0] && isLiteralNode(params[0])) {
const lintErrorMessage = CUSTOM_LINT_ERRORS[
CustomLintErrorCode.ACTION_MODAL_STRING
](params[0].value);
const callExpressionsString = generate(params[0]);
// line position received after AST parsing is 1 more than the actual line of code, hence we subtract 1 to get the actual line number
const objectStartLine = params[0].loc.start.line - 1;
// AST parsing start column position from index 0 whereas codemirror start ch position from index 1, hence we add 1 to get the actual ch position
const objectStartCol = params[0].loc.start.column + 1;
actionModalLintErrors.push({
errorType: PropertyEvaluationErrorType.LINT,
raw: script,
severity: getLintSeverity(
CustomLintErrorCode.ACTION_MODAL_STRING,
lintErrorMessage,
),
errorMessage: {
name: "LintingError",
message: lintErrorMessage,
},
errorSegment: callExpressionsString,
originalBinding,
variables: [callExpressionsString, null, null],
code: CustomLintErrorCode.ACTION_MODAL_STRING,
line: objectStartLine - scriptPos.line,
ch:
objectStartLine === scriptPos.line
? objectStartCol - scriptPos.ch
: objectStartCol,
});
}
}
}
return actionModalLintErrors;
}

View File

@ -65,7 +65,7 @@ export const getModalDropdownList = createSelector(
return modalWidgets.map((widget: FlattenedWidgetProps) => ({
id: widget.widgetId,
label: widget.widgetName,
value: `${widget.widgetName}`,
value: `${widget.widgetName}.name`,
}));
},
);

View File

@ -3532,7 +3532,7 @@ export const originalDSLForDSLMigrations = {
{
boxShadow: "none",
widgetName: "IconButton6",
onClick: "{{closeModal('Modal1')}}",
onClick: "{{closeModal(Modal1.name)}}",
buttonColor: "{{appsmith.theme.colors.primaryColor}}",
displayName: "Icon button",
iconSVG: "/static/media/icon.1a0c634a.svg",

View File

@ -3,7 +3,7 @@ import { EventType } from "constants/AppsmithActionConstants/ActionConstants";
import type { RenderMode } from "constants/WidgetConstants";
import { GridDefaults } from "constants/WidgetConstants";
import { ValidationTypes } from "constants/WidgetValidation";
import type { Stylesheet } from "entities/AppTheming";
import type { SetterConfig, Stylesheet } from "entities/AppTheming";
import { SelectionRequestType } from "sagas/WidgetSelectUtils";
import {
FlexLayerAlignment,
@ -178,7 +178,7 @@ export class ModalWidget extends BaseWidget<ModalWidgetProps, WidgetState> {
{
widgetId: iconChild.widgetId,
propertyName: "onClick",
propertyValue: `{{closeModal('${parent.widgetName}')}}`,
propertyValue: `{{closeModal(${parent.widgetName}.name);}}`,
},
];
}
@ -204,7 +204,7 @@ export class ModalWidget extends BaseWidget<ModalWidgetProps, WidgetState> {
{
widgetId: cancelBtnChild.widgetId,
propertyName: "onClick",
propertyValue: `{{closeModal('${parent.widgetName}')}}`,
propertyValue: `{{closeModal(${parent.widgetName}.name);}}`,
},
];
}
@ -359,6 +359,22 @@ export class ModalWidget extends BaseWidget<ModalWidgetProps, WidgetState> {
static getAutocompleteDefinitions(): AutocompletionDefinitions {
return {
isVisible: DefaultAutocompleteDefinitions.isVisible,
name: {
"!type": "string",
"!doc": "Returns the modal name",
},
};
}
static getDerivedPropertiesMap() {
return {
name: "{{this.widgetName}}",
};
}
static getSetterConfig(): SetterConfig {
return {
__setters: {},
};
}

View File

@ -199,7 +199,7 @@ export const ModalFactory = Factory.Sync.makeFactory<WidgetProps>({
{
widgetName: "Icon1",
rightColumn: 16,
onClick: "{{closeModal('TestModal')}}",
onClick: "{{closeModal(TestModal.name)}}",
color: "#040627",
iconName: "cross",
widgetId: "n5fc0ven2a",