Commit Graph

39 Commits

Author SHA1 Message Date
Rishabh Saxena
bec7acdcfc
Fix iframe url xss (#6209) 2021-07-28 11:31:09 +05:30
Abhinav Jha
1391b55bae
Widget Property Validation structure (#5270) 2021-07-26 11:20:46 +05:30
Paul Li
38ffe86290
Rate widget (#4891)
* FEATURE-3357 : Rate Widget

-- Create the first MVP of rate widget

* FEATURE-3357 : Rate Widget

-- Change the widget name into rating
-- Change the widget icon
-- Fix the overflow issue in case max count is big
-- Fix the issue in case default rate is zero
-- Add validations for maxCount and defaultRate

* FEATURE-3357 : Rate Widget

-- Fix an issue : Stars is cut off if maxCount is greater than 20
-- Add test cases for two validation types, RATE_DEFAULT_RATE and RATE_MAX_COUNT

* FEATURE-3357 : Rate Widget

-- Add expected data type for tooltip field

* FEATURE-3357 : Rate Widget

-- Expose maxCount

* FEATURE-3357 : Rate Widget

-- Change contents of isAllowHalf property
-- Adjust alignment of stars dynamically
-- Decrease default widget width

* FEATURE-3357 : Rate Widget

-- Remove a unnecessary comment block
2021-07-02 15:25:50 +05:30
Yash Vibhandik
6102f5b119
Added text color JS convertible support in text widget
added text color js convertible support in text widget, added COLOR_PICKER_TEXT validation and updated test case (#5409)
2021-07-02 12:39:17 +05:30
Abhinav Jha
d8c9d16575
Fix #1805 base64 encoded images (#4020)
Co-authored-by: Navdeep Singh <navdeep.er@gmail.com>
Co-authored-by: Apple <nandan@thinkify.io>
2021-04-30 12:30:13 +05:30
Ashok Kumar M
8f7cc87801
Fix: Tabs widget refactor with new nested property validation (#4014)
* dip

* test cases first commit

* Adding Tabs migrator.

* fixing tests.

* bug fix.

* selected tab fix

* missed commit

* fixing bugs

* Fixing tab name bugs.

* close property pane when dragging or resizing

* migration changes.

* release rebase changes.

* adding List factory

* remove dynamic bindings on deleting tabs.

* Adding validation messages for nested properties as well

* fixing validation issue.

* tabs visibility validation.

* missed commit

* Fixing broken cypress tests.

* Fixing broken tests.
2021-04-27 12:46:54 +05:30
Pawan Kumar
d814e780ed
Fix: Update chart from array to object (#3907)
* update structure of chart data

* update chart data

* update chart data structure

* remove array like validator

* remove log

* remove log

* widget utils + update tests for chart data validations

* update utils test

* add migrations

* remove unnecessary helper function

* remove unnecessary helper function

* update validation test cases

* WIP

* WIP 2

* Remove validationConfigMap from widget and add to properties

* Update data tree validator to get validation from the correct place

* Minor reference fixes

* Fix test mocks

* fix for bad setting of nested property path

* add test for migration for chart widget function

* fix test for widget utils

* remove unused import;

* remove unsued import

* update migration version

* remove console and add check if data is array

* fix custom fusion chart + validation not working issue

* move custom fusion chart config to chart data section

* remove console and unused import

* fix test

* fix property config test

* fix dynamicbinding path list in migration

* remove old chart validation

* remove old validation test

* fix widget prop utils test

* remove array codepath for widget utils

* fix utils test

* fix utils test

* fix prettier issue

Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
2021-04-26 16:05:59 +05:30
Pawan Kumar
1717b0e392
[Feature] Grid Widget (#2389)
* Updated test

* updated assertions

* Resizing image to take full width of table cell

* updated assertion

* Stop updating dynamicBindingPathList directly from widget

* Fix selectedRow and selectedRows computations

* Fix primaryColumns computations

* Updated test for derived column

* Added tests for computed value

* Added check clear data

* Reordering of test

* updated common method

* Made image size as 100% of table cell size

* add templating logic

* Updated flow and dsl

* Clear old primary columns

* Updated testname

* updated assertion

* use evaluated values for children

* Fix primary columns update on component mount and component update

* add isArray check

* remove property pane enhancement reducer

* add property pane enhancement reducer

* disable items other than template + fix running property enchancment on drop of list widget

* disbled drag, resize, settingsControl, drag for items other than template

* add grid options

* uncomment the widget operation for add child for grid children

* handle delete scenario for child widget in list widget

* WIP: Use the new delete and update property features

* add listdsl.json for testcases

* add test cases for correct no. of items being rendered

* add test cases currentItem binding in list widget

* change dragEnabled to dragDisabled

* change resizeEnabled to resizeDisabled

* change settingsControlEnabled to settingsControlDisabled

* change dropEnabled to dropDisabled

* update settingsControlDisabled default value

* Use deleteProperties in propertyControls

* Fix unsetting of array indices when deleting widget properties

* remove old TableWidget.tsx file

* Fix derived column property update on primary column property update

* Handle undefined primary columns

* Fix filepicker immutable prop issue

* Fix object.freeze issue when adding ids to the property pane configuration

* fix widget issue in grid

* Fix column actions dynamicBindingPathList inclusion issue

* remove consoles + fix typo around batch update

* Remove redundant tests

* js binding test for date picker

* hydate enhancement map on copy list widget

* check for dynamicleaf

* fixes

* improve check

* fix getNextWidgetName

* update template in list widget when copying

* updating template copy logic when copying widget

* update dynamicBindingPathList in copied widget

* Add path parameter to hidden functions in property pane configs

* fix copy bug when copying list widget

* add computed list property control

* Remove time column type

Fix editor prompt for currentRow

Fix undefined derivedColumns scenario

Remove validations for primaryColums and derivedColumns

Fix section toggle for video, image and button column types

* Fix table widget actions and custom column migrations

* Add logs for cyclical dependency map ♻️

* Process array differences

* add property control for list widget

* Fix onClick migrations

* Property pane config parity

* binding and trigger paths from the property pane config (#2920)

* try react virtualized library

* Fix unit test

* Fix unit test 

* Fix minor issues in table widget

* Add default meta props to binding paths to ensure eval and validation

* Dummy commit 🎉

* Remove unnecessary datepicker test

Fix chart data as string issue

* Achieve table column sorting and resizing parity with release

* handle scenario where last column isn't available to access

* Fix for panel config path not existing in the widget

* Fix bindings in currentRow (default)

Add dummy property pane config for canvas widget

* Update canvas widgets with dynamicPathLists on delete of property paths

* Add all diffs to change paths and trim later

* Add back default properties 🚶🏻‍♂️

* Use object based paths instead of arrays for primaryColumns and derivedColumns

* Fix issue in reordered columns

* Fix inccorect update order

* add virtualized list

* Fix failing property pane tests

* minor change

* minor list widget change

* Remove .vscode from git

* Rename ads to alloy

Fix isVisible in list widget

* move grid component to widget folder

* fix import in widget registry

* add sticky row in virtualized list

* add sticky container

* Fix Height of grid widget items container

* fix dragging of items in children other than template children

* update list widget

* update list widget

* Fix padding in list widget

* hide scrollbar in list widget list

* fix copy bug in list widget

* regenrate enhancement map on undo delete widget

* Use enhancementmap for autocomplete in list widget

Basic styles for list widget scrollbar

* add custom control in widget config

* minor commit

* update scrollbar styles

* remove unused variable

* fix typo in custom control

* comment out test cases

* remove unused imports

* remove unused imports

* add JSON stringify in interweave

* add noPad styling in dragLayer for noPad prop

* implement grid gap

* add list item background color prop

* add white color in color picker control

* fix gap in last list item

* remove onBeforeParse in textcomponent

* remove virtualization in grid widget

* allow overflow-y

* add onListItemClick action

* add beta label

* add pagination

* fix actions in pagination in list widget

* add list widget icon

* add list background color default value

* remove extra div

* fix pagination issue

* fix list widget crashing on perpage change

* extract child operation function to widgetblueprint saga

* refactor enhancements

* add enhancement hook

* refactor propertyUpdate hook enhancment

* remove enhacement map

* revert renaming ads to alloy

* add autopagination

* Cleanup unused vars

Re-write loop using map

Fix binding with external input widget

* update default background color

* remove unnessary scrol + fix pagination per page

* remove console.log

* use grid gap in pixel instead of snap

* fix list widget tests for binding

* add tests for on click action and pagination

* remove unnecessary imports

* remove overflow hidden in list component

* Add feature to enable template actions

* update property pane help text for list widget

* disable pagination in editor view

* update property pane options

* add test case for action

* uncomment tests

* fix grid gap validation

* update test cases

* fix property pane opening issue for list tempalte

* Disable form widgets in list widget

* fix template issue for actions

* add validation tests for list data

* update starting template

* add selectedRow + enable pagination in edit mode

* remove extra padding in list widget + popper fix on settingDisabled

* add stop propagation for button click

* fix click event in edit mode

* disallow filepicker widget for list widget

* add test for list widget entity definition for selectItem

* remove unused imports

* fix test

* remove evaluated value for list child widgets

* add comment

* remove log

* fix copying bug in list widget

* add check for not allowing template to copy

* fix test

* add test for property pane actions

* remove unused import

* add draglayercomponent test

* add test for draggable component

* add test for evaluatedvalue popup

* add test for messages.ts

* add test for widgeticons

* add test for property pane selector

* add test for widget config response

* start testing widget configresponse

* add test for enhancements in widget config

* add test for codeeditor

* add test for base widget + list widget

* add test for executeWidgetBlueprintChildOperations

* remove unused import

* add test for widget operation utils

* remove unused import

* add test for handleSpecificCasesWhilePasting

* remove unused function

* remove unused import

* add empty list styling

* resolve all review comments

* fix message test

* add test for widget operation utils

* fix merge conflicts

* move validations in property config

Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: nandan.anantharamu <nandan.anantharamu@thoughtspot.com>
Co-authored-by: vicky-primathon.in <vicky.bansal@primathon.in>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
Co-authored-by: Piyush <piyush@codeitout.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
2021-04-23 11:13:13 +05:30
Hetu Nandu
4d73e7e0b3
Widget validation for nested property paths (#3947) 2021-04-21 20:04:25 +05:30
Hetu Nandu
363bee8ec9
Fix action field evaluation for editor (#3701) 2021-03-30 10:59:03 +05:30
Abhinav Jha
1ccece69e1
Custom FusionCharts Config (#2670)
* Property pane enhancements

- Property pane sections are collapsible
- Property pane controls can be hidden conditionally
- Property pane configurations now come from the widget instead of a global config file
- Property pane property updates can be hooked with other related updates
- Property pane control and section ids are generated dynamically now.

* Add chart type: "Custom FusionChart" (#2996)

Co-authored-by: Zeger Hoogeboom <zegerhoogeboom@users.noreply.github.com>
Co-authored-by: zeger <zeger@equinoxai.com>
2021-03-25 03:35:04 +05:30
Abhinav Jha
4a05b5d320
Fix #3335 - New method of computing table data to display (#3607) 2021-03-25 00:55:38 +05:30
Vicky Bansal
f2e0ed29c5
Update: DatePicker validates data as ISO 8601 string (#3397) 2021-03-24 17:42:24 +05:30
NandanAnantharamu
6c80f23201
Feature: DatePicker V2 (#2889)
Co-authored-by: vicky-primathon.in <vicky.bansal@primathon.in>
Co-authored-by: nandan.anantharamu <nandan.anantharamu@thoughtspot.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
2021-02-23 18:05:09 +05:30
Piyush Mishra
a4fe0a461e
Table Widget New Features (#2816)
- Each column has more options and can be configured in the property pane instead of the table
- Table level styles can now be set in the property pane
- Property sections are collapsible

Co-authored-by: vicky-primathon.in <vicky.bansal@primathon.in>
Co-authored-by: nandan.anantharamu <nandan.anantharamu@thoughtspot.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
2021-02-16 15:59:08 +05:30
Vicky Bansal
11f5687b38
Date picker validation fixed (#2789)
* Date picker validation fixed

* Added date value check to remove unncessary validations

Commented defaultDate validation test as invalid date cannot be saved in date control

* Fixed date selection on user change

Fixed min and max date parsing for date picker control default date

* Added validation for min and max date in validations to handle validations when field is converted to JS
2021-02-02 20:12:49 +05:30
Rishabh Saxena
8e459a0c6b
validate map center and markers (#2488) 2021-01-19 12:59:15 +05:30
Hetu Nandu
5bd2cc1ea4
Execution params in actions (#2128) 2020-12-15 00:18:13 +05:30
Pawan Kumar
9997f2cb9f
Feature: Min and Max date inputs to restrict range in Datepicker Widget (#1865)
* add daterange property control

* fix typescript errors

* update daterangepicker control

* remove daterangepicker control

* add toasts for invalid dates + add test cases

* update test cases

* update test cases

* update test cases + change validation type name + few refactor

* merge release + update toast usage in datepicker control

* update test cases

* update form dsl for test cases

* update test cases

* update setDate command in test cases

* update test cases

* update test case dsl for datepicker widget

* update test cases

Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
2020-11-27 14:18:38 +05:30
Pawan Kumar
ad52842e1c
Fix/entity name coincide issue 1396 (#1781)
* Fixing the telemetry on self-hosted instances (#1714)

* Fix issue where creating a new application twice does not work (#1713)

* add check if name is conflicting with internal fn

* use already existing selector

* add conflicting names checks on api/queries/widget names

* add test cases for invalid widget/api/query names

* refactor

* change array to map

* remove getDataTreeKeys selector

* refactor

Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
2020-11-23 14:57:00 +05:30
vicky-primathon
3b85cc8222
Added defaultSelectedRow property in table widget so that users can configure default selected row(s) (#1684)
* Added defaultSelectedRow property in table widget so that users can configure default selected rows

* Cypress test cases added to test default row selection in table widget

* Fix defualtSelectedRow property's evaluation type

* Fix default select row type

* Set default selected row when resetting user selected rows

* Use defaultSelectedRow when no user selected row in table
2020-11-20 13:13:39 +05:30
Hetu Nandu
655b160922
Web worker evaluation (#706)
- Adds Web workers and does evaluations in off the main thread
- Removes any need to store functions in the data tree and only keeps them around while evaluating
- Maintains a stored data tree in the redux state
- Evaluates based on editor events instead of state changes
2020-10-21 09:55:32 +05:30
Hetu Nandu
78c4b5a382 Fixes date widget crashing when no date format is mentioned (#322)
Fixed by using a proper default format string for ISO dates
2020-08-17 16:43:14 +05:30
vicky-primathon
527bb5898a
Fix-The tabs should scroll with the increase in the number of tabs. (#131)
* Fixed tabs widget bugs and other updates:
1. Moved drag icon to the left of tab name field in the tabs widget property pane
2. Change drag icon
3. Add scroll when the tabs occupy more width than the width of tabs widget.
4. Add selected tab name validation.
5. Hide overflow tabs.
6. Avoid vertical scrollbars in tabs widget header
2020-07-29 14:31:17 +05:30
Abhinav Jha
1d2e165a71 Fix the chart widget crash issue 2020-06-18 13:16:04 +05:30
Hetu Nandu
e401844014 Fix Chart series data 2020-06-05 16:20:23 +00:00
Hetu Nandu
973af1c5e7 Single series chart data 2020-06-02 11:27:24 +00:00
Vicky Bansal
747c3d5d8b Chart validations, Tabs add new tab issue fix 2020-05-29 06:07:56 +00:00
Satbir Singh
a2086d2b5f Action selector refactor 2020-04-20 05:42:46 +00:00
Nikhil Nandagopal
739ba35dc1 Feature/widgets 2020-04-15 11:42:11 +00:00
Satbir Singh
c8f3548065 Adding validation for regex. 2020-04-03 08:12:45 +05:30
Satbir Singh
70243829d5 Nav to Url validation fixed 2020-03-31 10:40:52 +00:00
Satbir Singh
1a71c8f317 Default option value multi select 2020-03-31 03:21:35 +00:00
Vicky Bansal
adb7065b99 Feature/graph components 2020-03-13 12:06:41 +00:00
Hetu Nandu
ef245c1c8d P0 fixes 2020-02-03 11:49:20 +00:00
Hetu Nandu
d5e08b5836 Validation Error Message display 2019-12-10 13:30:16 +00:00
Abhinav Jha
d64bbc4015 Use applicationId and pageId to render pages 2019-11-22 14:02:55 +00:00
Hetu Nandu
a2b275bade Validation parse widget property 2019-11-22 13:12:39 +00:00
Hetu Nandu
a6f7882d5f Revamp widget property validation 2019-11-19 12:44:58 +00:00