Commit Graph

173 Commits

Author SHA1 Message Date
Aswath K
eed6ad9166
fix: empty string validation if required is set (#9476) 2021-12-02 16:45:18 +05:30
Anand Srinivasan
4ced0954db
feat: Syntax parsing through AST (#9115)
* ast changes

* ast fix for cyclic dependency

* jest test updates for ast

* feat: Extract references in code with AST (#8617)

Co-authored-by: Nidhi <nidhi@appsmith.com>

* undo debugger changes

* code clean up and comments

* update type checks for literal nodes

* include tests for IIFE and direct object access

* fix - dependency map not updated on IIFE/direct object access

* update tslib

* unescape on AST parsing

Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
2021-12-02 15:33:43 +05:30
Abhinav Jha
5173ef418b
chore: Update Validations (#9177)
* Update Validations
===
- If number value is out of bounds, return minmax || parsed || 0
- If text has regex, match RegExp - earlier we were matching with
  string, which was always failing
- Prioritise  expected  value in TEXT validation RegExp case.

* Add tests for regex and update tests for other changes

* Add test for using expected type instead of regex in messages

* Update regex, as it was reported to be buggy
2021-11-30 22:21:41 +05:30
Rishabh Rathod
bddafdcb7e
fix: Add default props dependency in dependency map (#9418)
* Add cloneDeep
* Add comments
2021-11-29 09:04:40 +00:00
Favour Ohanekwu
c98bbbe6ae
fix: properly update dependency map (#9169)
Properly update dependency map
2021-11-24 05:43:50 +01:00
Apeksha Bhosale
8cb3436524
fix: this is undefined in js editor (#9174)
* replace this in js object

* move this replacement in data tree factory
2021-11-16 14:12:31 +05:30
Nidhi
51246a0869 fix: Reverted AST 2021-11-10 20:13:21 +05:30
arunvjn
a9cf962b74
fix: evaluation of escaped characters (#8796) 2021-11-10 12:41:23 +05:30
Apeksha Bhosale
229412e19d
Refactor: JS Editor eval flow (#8821)
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
2021-11-08 12:19:22 +05:30
Rishabh Rathod
bef48e8a79
chore: Config changes (#8564)
Change eslint config for console logging from error to warn
Add babel auto-import resolver to avoid using relative paths
2021-11-05 11:19:19 +05:30
Hetu Nandu
c0d0037ce2
feat: Extract references in code with AST (#8617)
Co-authored-by: Nidhi <nidhi@appsmith.com>
2021-11-03 13:12:31 +05:30
Confidence Okoghenun
04bae5477b
feat: Updates widget default state (#8562) 2021-11-02 09:47:49 +05:30
Hetu Nandu
e6b0f4deb3
fix: Fix data clone error when returning results from trigger event (#8673) 2021-10-26 15:53:12 +05:30
Favour Ohanekwu
d10bde59e9
Add support for optional chaining and null coalescing in Linting (#8448) 2021-10-12 15:39:43 +01:00
Apeksha Bhosale
c0e945f0a3
in case if empty eval tree (#8441) 2021-10-12 15:49:10 +05:30
Hetu Nandu
2c3a0991f7
feat: setInterval and clearInterval support (#8158) 2021-10-11 12:55:03 +00:00
Chiradeep-Banik
7af22b96a7
Remove Square bracket notation when using object properties (#7954)
- Replaced with dot-notations
2021-10-09 02:13:43 +05:30
Vinod
159e7f2062
fix: issue with string templates (#7848)
* Remove bracket highlight on error

* fix string template issue

* using string template to join strings

* fix breaking tests
2021-10-07 12:33:15 +00:00
Apeksha Bhosale
b34102f685
fix: added errors to debugger (#8195)
* added errors to debugger

* comment added
2021-10-06 12:42:22 +05:30
Hetu Nandu
94e3ffef67
feat: Linting in trigger fields (#7638) 2021-10-05 13:52:27 +00:00
Hetu Nandu
79aefc4d74
hotfix: js action parsing error resolution (#8086) 2021-10-01 22:40:49 +05:30
Hetu Nandu
633db3068e
fix: Single binding sql query causing prepared statement issue (#7792) 2021-10-01 21:05:05 +05:30
Hetu Nandu
72f6ad8d99
fix: Cyclic dependency not resolving in JS Editor (#8003) 2021-10-01 15:09:09 +00:00
Apeksha Bhosale
1aac46a66d
don't send errors to sentry (#7906) 2021-09-29 20:11:55 +05:30
akash-codemonk
48f2c584ab
fix: Fix mismatch between errors in debugger and evaluated value popup (#7752) 2021-09-29 17:33:11 +05:30
Satish Gandham
c3d5b1010b
fix: Change multiselect back to supporting numbers and boolean. (#7895)
* Revert "fix: multiselect validation (#7698)"

This reverts commit 728a2559c5.

* - Convert the multiselect options value and labels to string before filtering as the values can be numbers.

* - Discourage users from using string in multiselect default value

Co-authored-by: Satish Gandham <satish@appsmith.com>
2021-09-28 19:38:24 +05:30
rahulramesha
fb7143cef2
fix: chartWidget fix for "TypeError: r.palettecolors.split" (#7717)
* adding validation for fusion chart's paletteColors Attribute

* restructuring as params for TEXT type

* removing unnecessary space

* addressing review comments

* adding validations to ignore case
2021-09-23 18:12:34 +05:30
Hetu Nandu
8f84fc0f69
fix: error handling in trigger execution flow (#7671) 2021-09-23 07:21:57 +00:00
akash-codemonk
a971d49a1e
chore: Fix remaining empty fields in property pane shown in error state (#7537) 2021-09-23 10:35:59 +05:30
Tolulope Adetula
728a2559c5
fix: multiselect validation (#7698)
* fix: multiselect validation

* fix: add failing scenarios for validation

* fix: test
2021-09-22 08:37:12 +01:00
akash-codemonk
997eb0b65b
fix: Do not show empty array as an error for tableData field (#7332) 2021-09-22 12:36:26 +05:30
Vinod
f3b281092b
fix: copy icon in evaluated popup and dot notation jshint error (#7639)
* Remove bracket highlight on error

* remove dot notation rule and change copy icon

* fix #7582
2021-09-22 07:05:02 +00:00
rahulramesha
6cefc6dbea
feat: Undo/Redo (#6654)
* Scaffolding for undo-redo

* undo redo working Poc commit

* memory performance improvements by diffing

* dont run update on undo/redo"

* merging widget postion update and canvas bottom row update into one dsl update.

* fix tabs widget

* Visible updates per undo redo action (#6838)

Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>

* resize atomic operation

* fix switch control state issue

* disallow undo/redo for snipping and comment mode

* disallow undo/redo for snipping and comment mode

* fix color picker issue in undo/redo

* add test for replayDSL

* option control fix, adding logs

* minor position change undo redo updates

* add test cases for replayHelpers

* property Upade visual change

* remove unused code

* global hot key jest test for undo redo

* Fixing batch updates on property change..

* add tests for toggle control in property pane

* unwanted utils.

* add tests for text control

* add tests for deletion

* add tests for dropping a new widget

* adding jest test for replayUtils

* add move widget tests

* add tests for color picker control

* add analytics for undo/redo

* add analytics for undo/redo

* tab addition atomic

* cypress tests for propertyPane, toasts and radiowidget optionControl

* replayDSL end of redo stack fix

* property update changes

* menu option control debounce input

* color picker empty undo fix

* fix cypress tests

* widget add/remove atomic

* revert alternative approach to handle atomic operations

* update replayDSL test

* add some comments

* addressing review comments

* flash color for property pane controls

* Fixing adding of tabs widget as well.

* code review comments.

* merging widget postion update and canvas bottom row update into one dsl update.

* fix ordering of tabs property control

* meta property update canvas min height.

* fixing failed specs.

* Fixing entity explorer update on deleting tab from entity explorer.

* address review comments and minor property update changes

* fixing failing tests

* merge conflicts

* changes to cater widget api.

* fix suggested widget table issue

* draggable list for undo redo

* fix widget name focus

* excluding canvas updates.

* fixing codeEditor update on propertySection collapse

* fixed failing test case

Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
2021-09-21 13:25:56 +05:30
Apeksha Bhosale
386e788e28
fix: pushing and removing errors from debugger for js object (#7465)
* pushing and removing errors from debugger for js object

* added message part of messages

* changes for linting and errors showing

* added try catch for executing function

* PR comments fixed

* PR comment fixed
2021-09-21 11:32:45 +05:30
Hetu Nandu
4315e92cf7
Reset widget children by default (#7505) 2021-09-20 18:40:03 +05:30
Tolulope Adetula
3c4ef11df2
fix: radio group widget options (#7313)
* Update RadioGroupComponent.tsx

* fix: radio widget validation

* fix: add test for default param
2021-09-20 00:13:37 -07:00
Vinod
2bd324a5aa
feat: address few bug with linting and improve highlighting (#7287)
* show lint errors as warnings

* add initial code

* adjust editor positions

* update pr comments

* mark jshint errors

* reset changes

* remove unused prop

* fix test errors

* remove unused imports

* dont show warning in the error counter

* show yellow if warning

* remove active error functionality

* update linter to use async functionality

* update linter messages

* update binding positions

* fix evaluate tests

* dont show undefined errors in debugger

* move lint code to separate file

* update testes

* remove unused import

* update tests

* address pr comments

* add comment to explain why

* replace proper regex

* fix undefined message error

* Update styling for warnings

* address position issue in the linter

* Fix failing tests

* Merge 'release' on to  'Feature/linting-errors'

* add console as global object

* address lint issues

* fix requested linting erros for release

* fix breaking issue

* remove unwanted code

* revert unrelated changes

* remove unnecessary file

* add extra libraries to jshint data

* import lodash functions that are used

* update jshint settings

* Fix failing test

* don't show lint errors if there is a parsing issue

* update jshint to latest version
2021-09-17 16:01:45 +05:30
Tolulope Adetula
15b26f823e
feat: Tree Select widget (#6271)
* feat: Tree Select

* feat: styling multiselect

* fix: selected values

* fix: remove console statement

* fix: popup position

* fix: selection types

* fix: Form validation using TreeSelect

* feat: Add Label to TreeSelect

* fix: styling

* fix: Dropdown search

* fix: Add Entity Definitions

* fix: Entity Definition

* Feat: Add clear icon

* fix: validation

* fix: options validation

* fix: Styling issues

* fix: build error

* Fix: Separate Tree Select widget

* fix: issues and add validation

* fix: Options Validation

* fix: issues with build

* fix: yarn

* fix: changes

* fix

* Fix: select component

* fix: PR issues

* fix: merge conflicts

* fix: issues

* fix: all issues

* test: added test

* fix: failing test
2021-09-17 02:08:35 -07:00
akash-codemonk
71d7b26665
fix: Do not show errors for blank fields in datepicker and listwidget (#7032) 2021-09-16 11:02:00 +05:30
Hetu Nandu
bc6164cb81
Fix action error callback crash (#7377) 2021-09-13 15:55:22 +05:30
Abhinav Jha
b49f5097c6
refactor: Widget Development API (#6405) 2021-09-09 20:40:22 +05:30
Apeksha Bhosale
09eea59330
feat: JS Editor (#6003)
* Changes to add js plugin

* routes+reducer+create template

* added debugger to js editor page

* entity explorer changes

* create js function

* added copy, move and delete action

* added js plugin

* added existing js functions to data tree

* removed actionconfig for js collection

* new js function added to data tree and entity as well

* parsing flow added

* changes to data tree

* parse and update js functions

* small changes for def creator for js action

* create delete modified

* small changes for update

* update flow change

* entity properties added

* removed linting errors

* small changes in entity explorer

* changes for update

* move, copy implementation

* conflict resolved

* changes for dependecy map creation

* Only make the variables the binding paths

* Basic eval sync working

* Minor fixes

* removed unwanted code

* entity props and autocomplete

* saving in progress show

* redirection fix after delete js action

* removed unnecessary line

* Fixing merge conflict

* added sample body

* removed dummy data and added plugin Type

* few PR comments fixed

* automplete fix

* few more PR comments fix

* PR commnets fix

* move and copy api change

* js colleciton name refactor & 'move to page' changes & search

* view changes

* autocomplete added for js collections

* removing till async is implemented

* small changes

* separate js pane response view

* Executing functions

* js collection to js objects

* entity explorer issue and resolve action on page switch

* removed unused line

* small color fix

* js file icon added

* added js action to property pane

* Property pane changes for actions

* property pane changes for js functions

* showing syntax error for now

* actions sorted in response tab

* added js objects to slash and recent entitties

* enabling this to be used inside of function

* eval fix

* feature flag changes for entity explorer and property pane

* debugger changes

* copy bug fix

* small changes for eval

* debugger bug fix

* chnaged any to specific types

* error in console fix

* icons update

* fixed test case

* test case fix

* non empty check for functions

* evaluate test case fix

* added new icons

* text change

* updated time for debounce for trial

* after release mereg

* changed icon

* after merge

* PR comments simple

* fixed PR comments - redux form, settings remove

* js object interface changes

* name refactor

* export default change

* delete resolve actions chnage

* after merge

* adding execute fn as 3rd option and removed create new js function

* issue 7054 fixed - app crash

* execute function on response tab changes

* refactor function name part 1

* refactor of js function name

* try catch added refactor

* test fix

* not used line removed

* test cases locator fixed

Co-authored-by: Nidhi <nidhi.nair93@gmail.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
2021-09-08 23:02:22 +05:30
Hetu Nandu
f95f550721
fix: Promise action backwards compatibility (#7052) 2021-09-03 16:32:28 +05:30
arunvjn
d119737de9
feat: Introducing JS Snippets (#6453)
Users should be able to look up relevant snippets based on where they trigger snippets from, narrow down the filter results based on entities, customize the snippet with custom data, evaluate and see its real time value.
2021-08-29 09:20:16 +05:30
Hetu Nandu
3380227cbb
feat: Enable Promises in Appsmith (#6253) 2021-08-27 14:55:28 +05:30
Vinod
9f3a24fbb0
feat: show lint errors in code editor (#6265) 2021-08-26 10:15:17 +05:30
akash-codemonk
80b288cecf
fix: Do not mark property pane field as an error when the field is empty. 2021-08-26 09:38:39 +05:30
Hetu Nandu
f012fd9d69
fix: Revert redux update perf improvements (#6808) 2021-08-24 17:40:25 +05:30
hetunandu
9941c253f7 Revert "Hotfix for logging and debugging redux updates (#6728)"
This reverts commit 4b5ca10e0d.
2021-08-19 18:31:37 +05:30
Hetu Nandu
4b5ca10e0d
Hotfix for logging and debugging redux updates (#6728) 2021-08-19 16:35:16 +05:30