From 71d67185c49724c30bbe7446e362afd8f45ff4be Mon Sep 17 00:00:00 2001 From: Rudraprasad Das Date: Thu, 30 Nov 2023 18:03:33 +0530 Subject: [PATCH] feat: dsl migration with server (#28518) ## Description 1. Shifts DSL migration logic to @shared/dsl 2. Exposes /migrate/dsl endpoint on rts 3. Integrates RTS endpoint to backend for serving migrated pages 4. Introduces feature flag to switch between client-based and server-based on-demand migration #### PR fixes following issue(s) Fixes #26783, #26784, #26980 #### Type of change - New feature (non-breaking change which adds functionality) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [x] Manual - [ ] JUnit - [x] Jest - [x] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed --------- Co-authored-by: Nayan --- CODEOWNERS | 6 +- .../OtherUIFeatures/PageOnLoad_spec.ts | 1 - .../Widgets/Chart/ChartDataPoint_Spec.ts | 1 - .../Widgets/Datepicker/DatePickerV2_spec.js | 1 - .../ClientSide/Widgets/Form/FormData_spec.js | 5 - .../TableV1/Table_FilteredTableData_spec.js | 1 - .../Widgets/TableV2/AddNewRow1_spec.js | 2 +- .../TableV2/TableV2_FilteredTableData_spec.js | 1 - app/client/packages/dsl/.eslintrc.json | 7 +- app/client/packages/dsl/package.json | 1 + app/client/packages/dsl/rollup.config.js | 2 + app/client/packages/dsl/src/index.ts | 9 +- .../src/migrate/helpers/widget-configs.json | 61315 ++++++++++++++++ app/client/packages/dsl/src/migrate/index.ts | 599 + .../migrations/001-update-containers.ts | 40 + .../migrations/002-chart-data-migration.ts | 23 + .../migrations/003-map-data-migration.ts | 62 + .../004-single-chart-data-migration.ts | 30 + .../005-tabs-widget-property-migration.ts | 35 + .../006-dynamic-path-list-migration.ts | 26 + .../007-canvas-name-conflict-migration.ts | 23 + ...-renamed-canvas-name-conflict-migration.ts | 25 + ...09-table-widget-property-pane-migration.ts | 175 + .../010-add-version-number-migration.ts | 11 + ...1-migrate-table-primary-columns-binding.ts | 42 + ...te-incorrect-dynamic-binding-path-lists.ts | 934 + .../migrations/013-migrate-old-chart-data.ts | 22 + .../014-rte-default-value-migration.ts | 12 + ...015-migrate-text-style-from-text-widget.ts | 33 + ...migrate-chart-data-from-array-to-object.ts | 60 + .../migrations/017-migrate-tabs-data.ts | 103 + .../migrations/018-migrate-initial-values.ts | 66 + .../migrations/019-migrate-to-new-layout.ts | 35 + ...e-newly-added-tabs-widgets-missing-data.ts | 41 + .../021-migrate-overflowing-tabs-widgets.ts | 114 + ...-table-widget-parent-row-space-property.ts | 17 + ...dd-log-blacklist-to-all-widget-children.ts | 35 + ...ble-widget-header-visibility-properties.ts | 20 + ...grate-items-to-list-data-in-list-widget.ts | 69 + .../026-migrate-datepicker-min-max-date.ts | 18 + ...igrate-filter-value-for-dropdown-widget.ts | 20 + ...te-table-primary-columns-computed-value.ts | 45 + .../029-migrate-to-new-multiselect.ts | 17 + ...grate-table-widget-delimiter-properties.ts | 17 + ...31-migrate-is-disabled-to-button-column.ts | 31 + .../032-migrate-table-default-selected-row.ts | 13 + ...te-menu-button-widget-button-properties.ts | 19 + .../034-migrate-button-widget-validation.ts | 16 + .../035-migrate-input-validation.ts | 22 + .../036-revert-table-default-selected-row.ts | 16 + .../037-migrate-table-sanitize-column-keys.ts | 113 + ...grate-resizable-modal-widget-properties.ts | 33 + ...rate-table-widget-selected-row-bindings.ts | 50 + ...040-revert-button-style-to-button-color.ts | 103 + .../migrations/041-migrate-button-variant.ts | 62 + ...e-map-widget-is-clicked-marker-centered.ts | 17 + ...3-map-allow-horizontal-scroll-mirgation.ts | 17 + .../migrations/044-is-sortable-migration.ts | 13 + ...igrate-table-widget-icon-button-variant.ts | 25 + ...e-checkbox-group-widget-inline-property.ts | 18 + .../dsl/src/migrate/migrations/047-SKIP.ts | 3 + .../migrations/048-migrate-recaptcha-type.ts | 19 + ...add-private-widgets-to-all-list-widgets.ts | 27 + .../dsl/src/migrate/migrations/050-SKIP.ts | 5 + ...ate-phone-input-widget-allow-formatting.ts | 15 + .../052-migrate-modal-icon-button-widget.ts | 17 + .../053-migrate-scroll-truncate-property.ts | 29 + ...te-phone-input-widget-default-dial-code.ts | 32 + ...ency-input-widget-default-currency-code.ts | 32 + ...-migrate-radio-group-alignment-property.ts | 15 + ...-migrate-styling-properties-for-theming.ts | 773 + .../058-migrate-checkbox-switch-property.ts | 29 + ...59-migrate-chart-widget-reskinning-data.ts | 31 + .../060-migrate-table-widget-v2-validation.ts | 23 + ...61-migrate-chart-widget-reskinning-data.ts | 3 + ...igrate-select-type-widget-default-value.ts | 38 + ...igrate-map-chart-widget-reskinning-data.ts | 24 + .../064-migrate-rate-widget-disabed-state.ts | 51 + .../065-migrate-code-scanner-layout.ts | 17 + ...rate-table-widget-v2-validation-binding.ts | 79 + .../migrations/067-migrate-label-position.ts | 14 + ...8-migrate-properties-for-dynamic-height.ts | 62 + .../069-migrate-menu-button-dynamic-items.ts | 10 + ...ylesheet-from-dynamic-binding-path-list.ts | 23 + ...1-migrate-table-widget-v2-select-option.ts | 27 + ...te-list-widget-children-for-auto-height.ts | 38 + ...3-mirgate-input-widget-show-step-arrows.ts | 16 + ...utton-dynamic-items-inside-table-widget.ts | 24 + ...rate-input-widgets-multiline-input-type.ts | 28 + .../076-migrate-column-freeze-attributes.ts | 22 + ...le-select-option-attributes-for-new-row.ts | 25 + ...ffix-for-inline-edit-validation-control.ts | 70 + ...migrate-table-widget-table-data-js-mode.ts | 18 + ...ate-select-widget-option-to-source-data.ts | 17 + ...ct-widget-source-data-binding-path-list.ts | 26 + ...widget-label-orientation-stagger-option.ts | 15 + ...migrate-add-show-hide-data-point-labels.ts | 11 + ...dget-add-source-data-property-path-list.ts | 31 + ...igrate-default-values-for-custom-echart.ts | 75 + ...086-migrate-table-server-side-filtering.ts | 10 + ...hartDataFromArrayFromArrayToObject.test.ts | 87 + .../src/migrate/tests}/ChartWidget.test.ts | 17 +- .../ChartWidgetReskinningMigrations.test.ts | 4 +- .../CurrencyInputWidgetMigrations.test.ts | 8 +- .../src/migrate/tests}/DSLMigration.test.ts | 291 +- .../migrate/tests}/DSLMigrationsUtils.test.ts | 53 +- .../tests/MigrateInitialValues.test.ts | 540 + .../src/migrate/tests}/ModalWidget.test.ts | 9 +- .../tests}/PhoneInputWidgetMigrations.test.ts | 8 +- .../src/migrate/tests}/SelectWidget.test.ts | 11 +- .../src/migrate/tests}/TableWidget.test.ts | 1175 +- .../dsl/src/migrate/tests}/TextWidget.test.ts | 50 +- .../migrate/tests}/ThemingMigration.test.ts | 5 +- .../dsl/src/migrate/tests/testDSLs.ts | 3785 + app/client/packages/dsl/src/migrate/types.ts | 9 + app/client/packages/dsl/src/migrate/utils.ts | 148 + .../dsl/src/{ => transform}/constants.ts | 0 .../dsl/src/{ => transform}/index.test.ts | 2 +- .../packages/dsl/src/transform/index.ts | 10 + .../dsl/src/{DSL.ts => transform/lib.ts} | 13 +- .../packages/dsl/src/transform/types.ts | 11 + .../rts/src/controllers/Dsl/DslController.ts | 37 + .../packages/rts/src/routes/dsl_routes.ts | 17 + app/client/packages/rts/src/server.ts | 2 + .../packages/rts/src/services/DslService.ts | 8 + app/client/packages/rts/tsconfig.json | 1 + app/client/src/api/PageApi.tsx | 4 +- app/client/src/ce/entities/FeatureFlag.ts | 3 + app/client/src/ce/sagas/JSActionSagas.ts | 16 +- app/client/src/ce/sagas/PageSagas.tsx | 67 +- app/client/src/sagas/ActionSagas.ts | 13 +- app/client/src/sagas/JSPaneSagas.ts | 12 +- app/client/src/selectors/pageSelectors.tsx | 7 + app/client/src/utils/DSLMigrations.ts | 3361 +- .../src/utils/WidgetPropsUtils.test.tsx | 834 +- app/client/src/utils/WidgetPropsUtils.tsx | 36 +- .../src/widgets/TabsMigrator/widget/index.tsx | 105 +- app/client/yarn.lock | 23 +- .../controllers/ce/PageControllerCE.java | 10 +- .../server/dtos/ce/DslVersionDTO.java | 12 + .../server/helpers/DSLMigrationUtils.java | 66 +- .../NewPageImportableServiceCEImpl.java | 7 + .../services/ApplicationPageServiceImpl.java | 8 +- .../services/ce/ApplicationPageServiceCE.java | 3 +- .../ce/ApplicationPageServiceCEImpl.java | 82 +- .../services/ApplicationPageServiceTest.java | 253 +- .../server/services/NewPageServiceTest.java | 4 +- 147 files changed, 74237 insertions(+), 3503 deletions(-) create mode 100644 app/client/packages/dsl/src/migrate/helpers/widget-configs.json create mode 100644 app/client/packages/dsl/src/migrate/index.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/001-update-containers.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/002-chart-data-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/003-map-data-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/004-single-chart-data-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/005-tabs-widget-property-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/006-dynamic-path-list-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/007-canvas-name-conflict-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/008-renamed-canvas-name-conflict-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/009-table-widget-property-pane-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/010-add-version-number-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/011-migrate-table-primary-columns-binding.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/012-migrate-incorrect-dynamic-binding-path-lists.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/013-migrate-old-chart-data.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/014-rte-default-value-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/015-migrate-text-style-from-text-widget.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/016-migrate-chart-data-from-array-to-object.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/017-migrate-tabs-data.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/018-migrate-initial-values.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/019-migrate-to-new-layout.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/020-migrate-newly-added-tabs-widgets-missing-data.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/021-migrate-overflowing-tabs-widgets.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/022-migrate-table-widget-parent-row-space-property.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/023-add-log-blacklist-to-all-widget-children.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/024-migrate-table-widget-header-visibility-properties.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/025-migrate-items-to-list-data-in-list-widget.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/026-migrate-datepicker-min-max-date.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/027-migrate-filter-value-for-dropdown-widget.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/028-migrate-table-primary-columns-computed-value.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/029-migrate-to-new-multiselect.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/030-migrate-table-widget-delimiter-properties.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/031-migrate-is-disabled-to-button-column.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/032-migrate-table-default-selected-row.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/033-migrate-menu-button-widget-button-properties.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/034-migrate-button-widget-validation.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/035-migrate-input-validation.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/036-revert-table-default-selected-row.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/037-migrate-table-sanitize-column-keys.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/038-migrate-resizable-modal-widget-properties.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/039-migrate-table-widget-selected-row-bindings.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/040-revert-button-style-to-button-color.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/041-migrate-button-variant.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/042-migrate-map-widget-is-clicked-marker-centered.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/043-map-allow-horizontal-scroll-mirgation.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/044-is-sortable-migration.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/045-migrate-table-widget-icon-button-variant.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/046-migrate-checkbox-group-widget-inline-property.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/047-SKIP.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/048-migrate-recaptcha-type.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/049-add-private-widgets-to-all-list-widgets.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/050-SKIP.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/051-migrate-phone-input-widget-allow-formatting.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/052-migrate-modal-icon-button-widget.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/053-migrate-scroll-truncate-property.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/054-migrate-phone-input-widget-default-dial-code.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/055-migrate-currency-input-widget-default-currency-code.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/056-migrate-radio-group-alignment-property.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/057-migrate-styling-properties-for-theming.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/058-migrate-checkbox-switch-property.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/059-migrate-chart-widget-reskinning-data.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/060-migrate-table-widget-v2-validation.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/061-migrate-chart-widget-reskinning-data.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/062-migrate-select-type-widget-default-value.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/063-migrate-map-chart-widget-reskinning-data.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/064-migrate-rate-widget-disabed-state.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/065-migrate-code-scanner-layout.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/066-migrate-table-widget-v2-validation-binding.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/067-migrate-label-position.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/068-migrate-properties-for-dynamic-height.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/069-migrate-menu-button-dynamic-items.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/070-migrate-child-stylesheet-from-dynamic-binding-path-list.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/071-migrate-table-widget-v2-select-option.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/072-migrate-list-widget-children-for-auto-height.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/073-mirgate-input-widget-show-step-arrows.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/074-migrate-mwnu-button-dynamic-items-inside-table-widget.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/075-migrate-input-widgets-multiline-input-type.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/076-migrate-column-freeze-attributes.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/077-migrate-table-select-option-attributes-for-new-row.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/078-migrate-binding-prefix-suffix-for-inline-edit-validation-control.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/079-migrate-table-widget-table-data-js-mode.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/080-migrate-select-widget-option-to-source-data.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/081-migrate-select-widget-source-data-binding-path-list.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/082-migrate-chart-widget-label-orientation-stagger-option.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/083-migrate-add-show-hide-data-point-labels.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/084-migrate-select-widget-add-source-data-property-path-list.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/085-migrate-default-values-for-custom-echart.ts create mode 100644 app/client/packages/dsl/src/migrate/migrations/086-migrate-table-server-side-filtering.ts create mode 100644 app/client/packages/dsl/src/migrate/tests/ChartDataFromArrayFromArrayToObject.test.ts rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/ChartWidget.test.ts (85%) rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/ChartWidgetReskinningMigrations.test.ts (96%) rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/CurrencyInputWidgetMigrations.test.ts (99%) rename app/client/{src/utils => packages/dsl/src/migrate/tests}/DSLMigration.test.ts (62%) rename app/client/{src/utils => packages/dsl/src/migrate/tests}/DSLMigrationsUtils.test.ts (98%) create mode 100644 app/client/packages/dsl/src/migrate/tests/MigrateInitialValues.test.ts rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/ModalWidget.test.ts (92%) rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/PhoneInputWidgetMigrations.test.ts (99%) rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/SelectWidget.test.ts (99%) rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/TableWidget.test.ts (76%) rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/TextWidget.test.ts (92%) rename app/client/{src/utils/migrations => packages/dsl/src/migrate/tests}/ThemingMigration.test.ts (99%) create mode 100644 app/client/packages/dsl/src/migrate/tests/testDSLs.ts create mode 100644 app/client/packages/dsl/src/migrate/types.ts create mode 100644 app/client/packages/dsl/src/migrate/utils.ts rename app/client/packages/dsl/src/{ => transform}/constants.ts (100%) rename app/client/packages/dsl/src/{ => transform}/index.test.ts (98%) create mode 100644 app/client/packages/dsl/src/transform/index.ts rename app/client/packages/dsl/src/{DSL.ts => transform/lib.ts} (71%) create mode 100644 app/client/packages/dsl/src/transform/types.ts create mode 100644 app/client/packages/rts/src/controllers/Dsl/DslController.ts create mode 100644 app/client/packages/rts/src/routes/dsl_routes.ts create mode 100644 app/client/packages/rts/src/services/DslService.ts create mode 100644 app/client/src/selectors/pageSelectors.tsx create mode 100644 app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ce/DslVersionDTO.java diff --git a/CODEOWNERS b/CODEOWNERS index 0124f366ae..1d3430db57 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -116,8 +116,10 @@ app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitCloudSer app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitDeployKeyGenerator.java @AnaghHegde @nayan-rafiq app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitFileUtils.java @AnaghHegde @nayan-rafiq app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/GitUtils.java @AnaghHegde @nayan-rafiq +app/client/src/pages/Editor/gitSync/* @brayn003 - +# DSL Package +app/client/packages/dsl/* @brayn003 # Data Platform @@ -215,7 +217,7 @@ app/client/cypress/e2e/Regression/ClientSide/Github/**/* @ankitakinger app/client/cypress/e2e/Regression/ClientSide/FormLogin/**/* @ankitakinger app/client/cypress/e2e/Regression/ClientSide/Auditlogs/**/* @ankitakinger -#FE pod +# FE pod app/client/src/actions/evaluationActions.ts @ApekshaBhosale app/client/src/ce/entities/DataTree/**/* @ApekshaBhosale app/client/src/ce/entities/DependencyMap/**/* @ApekshaBhosale diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts index 3e86e75dbb..472a08cdd1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts @@ -20,7 +20,6 @@ describe("Check debugger logs state when there are onPageLoad actions", function it("1. Check debugger logs state when there are onPageLoad actions", function () { EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Table data", "{{TestApi.data.users}}"); apiPage.CreateAndFillApi(testdata.baseUrl + testdata.methods, "TestApi"); apiPage.RunAPI(); agHelper.GetNClick(explorer.addWidget); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts index 75b1e83f12..eb8b9081e6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts @@ -62,7 +62,6 @@ describe("Input widget test with default value from chart datapoint", () => { it("2. onDataPointClick should work and respond with x, y, seriesTitle, and rawEventData (in case of custom fusion chart).", () => { agHelper.AddDsl("chartCustomSankeyDataDsl"); - assertHelper.AssertNetworkStatus("@updateLayout"); EditorNavigation.SelectEntityByName("Chart1", EntityType.Widget); agHelper.Sleep(1500); //waiting for chart to load! propPane.SelectPlatformFunction("onDataPointClick", "Show alert"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2_spec.js index d38c807af5..c68a627e5c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2_spec.js @@ -120,7 +120,6 @@ describe("DatePicker Widget Property pane tests with js bindings", function () { EditorNavigation.SelectEntityByName("DatePicker1", EntityType.Widget); _.propPane.EnterJSContext("Min Date", "2021-01-01"); _.propPane.EnterJSContext("Max Date", "2021-10-10"); - _.propPane.EnterJSContext("Default Date", ""); cy.selectDateFormat("DD/MM/YYYY HH:mm"); _.propPane.EnterJSContext( "Default Date", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormData_spec.js index 045f512d09..43065520d7 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormData_spec.js @@ -6,11 +6,6 @@ describe("Form data", function () { }); it("CheckboxGroupWidget, MultiSelectTreeWidget, MultiSelectWidgetV2, SelectWidget, SingleSelectTreeWidget, SwitchGroupWidget, PhoneInputWidget, InputWidgetV2 and CurrencyInputWidget should have value props of which values are not null or undefined to be included as a form data", function () { - cy.wait("@updateLayout").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); // Check form data cy.get("[data-testid='container-wrapper-vannrar7rd'] span") .should("exist") diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js index 9684210455..86d3c83219 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js @@ -15,7 +15,6 @@ describe("Table Widget Filtered Table data in autocomplete", function () { it("Table Widget Functionality To Filter and search data", function () { cy.openPropertyPane("tablewidget"); - cy.wait("@updateLayout"); cy.get(publish.searchInput).first().type("query"); cy.get(publish.filterBtn).click(); cy.get(publish.attributeDropdown).click(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js index c095eeaa49..3aeb3886fa 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRow1_spec.js @@ -12,7 +12,7 @@ describe("Basic flow ", () => { cy.get(".t--property-control-allowaddingarow").should("exist"); cy.get(".t--property-control-allowaddingarow input").should("exist"); cy.get(".t--add-new-row").should("not.exist"); - _.propPane.TogglePropertyState("Allow adding a row", "Off"); + _.propPane.TogglePropertyState("Allow adding a row", "Off", null); cy.get(".t--add-new-row").should("not.exist"); cy.get(".t--property-control-onsave").should("not.exist"); cy.get(".t--property-control-ondiscard").should("not.exist"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_FilteredTableData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_FilteredTableData_spec.js index 1db1522a4a..c97a98c2c0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_FilteredTableData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_FilteredTableData_spec.js @@ -13,7 +13,6 @@ describe("Table Widget V2 Filtered Table data in autocomplete", function () { before("Table Widget V2 Functionality", () => { _.agHelper.AddDsl("tableV2AndTextDsl"); cy.openPropertyPane("tablewidgetv2"); - cy.wait("@updateLayout"); }); it("1. Table Widget V2 Functionality To Filter and search data", function () { diff --git a/app/client/packages/dsl/.eslintrc.json b/app/client/packages/dsl/.eslintrc.json index e57f842c13..ee3cbf002c 100644 --- a/app/client/packages/dsl/.eslintrc.json +++ b/app/client/packages/dsl/.eslintrc.json @@ -1,4 +1,9 @@ { "extends": ["../../.eslintrc.base.json"], - "ignorePatterns": ["build"] + "ignorePatterns": ["build"], + "rules": { + "@typescript-eslint/strict-boolean-expressions": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/prefer-nullish-coalescing": "off" + } } diff --git a/app/client/packages/dsl/package.json b/app/client/packages/dsl/package.json index 1b7f512415..026d96ea78 100644 --- a/app/client/packages/dsl/package.json +++ b/app/client/packages/dsl/package.json @@ -24,6 +24,7 @@ "typescript": "4.5.5" }, "devDependencies": { + "@rollup/plugin-json": "^6.0.0", "jest": "^29.5.0", "ts-jest": "^29.1.0" } diff --git a/app/client/packages/dsl/rollup.config.js b/app/client/packages/dsl/rollup.config.js index d3e6016f92..6b638ab5cc 100644 --- a/app/client/packages/dsl/rollup.config.js +++ b/app/client/packages/dsl/rollup.config.js @@ -3,6 +3,7 @@ import commonjs from "@rollup/plugin-commonjs"; import typescript from "rollup-plugin-typescript2"; import generatePackageJson from "rollup-plugin-generate-package-json"; import packageJson from "./package.json"; +import json from "@rollup/plugin-json"; export default { // TODO: Figure out regex where each directory can be a separate module without having to manually add them @@ -25,6 +26,7 @@ export default { typescript({ useTsconfigDeclarationDir: true, }), + json(), generatePackageJson({ baseContents: (pkg) => ({ ...pkg, diff --git a/app/client/packages/dsl/src/index.ts b/app/client/packages/dsl/src/index.ts index ae32dd46c2..6696835075 100644 --- a/app/client/packages/dsl/src/index.ts +++ b/app/client/packages/dsl/src/index.ts @@ -1,5 +1,4 @@ -export { nestDSL, flattenDSL } from "./DSL"; -export { ROOT_CONTAINER_WIDGET_ID } from "./constants"; +export { nestDSL, flattenDSL, ROOT_CONTAINER_WIDGET_ID } from "./transform"; export type { NestedDSLWidget, @@ -7,4 +6,8 @@ export type { FlattenedDSLWidget, FlattenedDSL, FlattenedDSLEntities, -} from "./DSL"; +} from "./transform"; + +export { migrateDSL, LATEST_DSL_VERSION } from "./migrate"; + +export type { DSLWidget } from "./migrate/types"; diff --git a/app/client/packages/dsl/src/migrate/helpers/widget-configs.json b/app/client/packages/dsl/src/migrate/helpers/widget-configs.json new file mode 100644 index 0000000000..04abdaa6ae --- /dev/null +++ b/app/client/packages/dsl/src/migrate/helpers/widget-configs.json @@ -0,0 +1,61315 @@ +{ + "CANVAS_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables scrolling for content inside the widget", + "propertyName": "shouldScrollContents", + "label": "Scroll contents", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "borderColor", + "label": "Border color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "helpText": "Enter value for border width", + "propertyName": "borderWidth", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "postUpdateAction": "CHECK_CONTAINERS_FOR_AUTO_HEIGHT" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 0, + "active": true + } + } + }, + "SKELETON_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "CONTAINER_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables scrolling for content inside the widget", + "propertyName": "shouldScrollContents", + "label": "Scroll contents", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "borderColor", + "label": "Border color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "helpText": "Enter value for border width", + "propertyName": "borderWidth", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "postUpdateAction": "CHECK_CONTAINERS_FOR_AUTO_HEIGHT" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 0, + "active": true + } + } + }, + "TEXT_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "text", + "helpText": "Sets the text of the widget", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "limitLineBreaks": true + } + } + }, + { + "propertyName": "overflow", + "label": "Overflow Text", + "helpText": "Controls the text behavior when length of text exceeds", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Scroll", + "value": "SCROLL" + }, + { + "label": "Truncate", + "value": "TRUNCATE" + }, + { + "label": "None", + "value": "NONE" + } + ], + "defaultValue": "NONE", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "disableLink", + "helpText": "Controls parsing text as Link", + "label": "Disable link", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "fontFamily", + "label": "Font family", + "helpText": "Controls the font family being used", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "System Default", + "value": "System Default" + }, + { + "label": "Nunito Sans", + "value": "Nunito Sans" + }, + { + "label": "Poppins", + "value": "Poppins" + }, + { + "label": "Inter", + "value": "Inter" + }, + { + "label": "Montserrat", + "value": "Montserrat" + }, + { + "label": "Noto Sans", + "value": "Noto Sans" + }, + { + "label": "Open Sans", + "value": "Open Sans" + }, + { + "label": "Roboto", + "value": "Roboto" + }, + { + "label": "Rubik", + "value": "Rubik" + }, + { + "label": "Ubuntu", + "value": "Ubuntu" + } + ], + "defaultValue": "System Default", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "fontSize", + "label": "Font size", + "helpText": "Controls the size of the font used", + "controlType": "DROP_DOWN", + "defaultValue": "1rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "textColor", + "label": "Text color", + "helpText": "Controls the color of the text displayed", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "propertyName": "backgroundColor", + "label": "Background color", + "helpText": "Background color of the text added", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {}, + "expected": { + "type": "string (HTML color name or HEX value)", + "example": "red | #9C0D38", + "autocompleteDataType": "STRING" + } + } + } + }, + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "borderColor", + "label": "Border color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "truncateButtonColor", + "label": "Truncate button color", + "helpText": "Controls the color of the truncate button", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["overflow"] + } + ] + }, + { + "sectionName": "Text formatting", + "children": [ + { + "propertyName": "textAlign", + "label": "Alignment", + "helpText": "Controls the horizontal alignment of the text", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "startIcon": "align-left", + "value": "LEFT" + }, + { + "startIcon": "align-center", + "value": "CENTER" + }, + { + "startIcon": "align-right", + "value": "RIGHT" + } + ], + "defaultValue": "LEFT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "fontStyle", + "label": "Emphasis", + "helpText": "Controls the font emphasis of the text displayed", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "helpText": "Enter value for border width which can also use as margin", + "propertyName": "borderWidth", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 0, + "active": true + } + } + }, + "TABLE_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Takes in an array of objects to display rows in the table. Bind data from an API using {{}}", + "propertyName": "tableData", + "label": "Table data", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"name\": \"John\" }]", + "inputType": "ARRAY", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "OBJECT_ARRAY", + "params": { + "default": [] + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "id": "j5qw4duqpm" + }, + { + "helpText": "Columns", + "propertyName": "primaryColumns", + "controlType": "PRIMARY_COLUMNS", + "label": "Columns", + "dependencies": [ + "derivedColumns", + "columnOrder", + "childStylesheet" + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Unique column names", + "example": "abc", + "autocompleteDataType": "STRING" + }, + "fnString": "function uniqueColumnNameValidation(value, props, _) {\n var tableColumns = _.map(value, \"label\");\n var duplicates = tableColumns.filter(function (val, index, arr) {\n return arr.indexOf(val) !== index;\n });\n var hasError = !!duplicates.length;\n if (value && hasError) {\n return {\n isValid: false,\n parsed: value,\n messages: [\"Column names should be unique.\"]\n };\n }\n return {\n isValid: true,\n parsed: value,\n messages: []\n };\n}" + } + }, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "children": [ + { + "sectionName": "Column Control", + "children": [ + { + "propertyName": "columnType", + "label": "Column type", + "controlType": "DROP_DOWN", + "customJSControl": "COMPUTE_VALUE", + "options": [ + { + "label": "Plain text", + "value": "text" + }, + { + "label": "URL", + "value": "url" + }, + { + "label": "Number", + "value": "number" + }, + { + "label": "Image", + "value": "image" + }, + { + "label": "Video", + "value": "video" + }, + { + "label": "Date", + "value": "date" + }, + { + "label": "Button", + "value": "button" + }, + { + "label": "Menu button", + "value": "menuButton" + }, + { + "label": "Icon button", + "value": "iconButton" + } + ], + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder", + "childStylesheet" + ], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "acqrx65qrw" + }, + { + "propertyName": "displayText", + "label": "Display text", + "controlType": "COMPUTE_VALUE", + "customJSControl": "COMPUTE_VALUE", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "iyerolcg8a" + }, + { + "helpText": "The value computed & shown in each cell. Use {{currentRow}} to reference each row in the table. This property is not accessible outside the column settings.", + "propertyName": "computedValue", + "label": "Computed value", + "controlType": "COMPUTE_VALUE", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "zdrq8x937x" + }, + { + "propertyName": "isCellVisible", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnType" + ], + "label": "Visible", + "helpText": "Controls the visibility of the cell in the column", + "defaultValue": true, + "controlType": "SWITCH", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "id": "eez4rn1l3k" + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "defaultValue": false, + "controlType": "SWITCH", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "q43r2jjvjq" + }, + { + "propertyName": "isCompact", + "helpText": "Decides if menu items will consume lesser space", + "label": "Compact", + "controlType": "SWITCH", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "csblo22phi" + }, + { + "propertyName": "inputFormat", + "label": "Original Date Format", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "UNIX timestamp (s)", + "value": "Epoch" + }, + { + "label": "UNIX timestamp (ms)", + "value": "Milliseconds" + }, + { + "label": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.SSSZ" + }, + { + "label": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "YYYY-MM-DD hh:mm:ss", + "value": "YYYY-MM-DD hh:mm:ss" + }, + { + "label": "Do MMM YYYY", + "value": "Do MMM YYYY" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "LLL", + "value": "LLL" + }, + { + "label": "LL", + "value": "LL" + }, + { + "label": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "defaultValue": "YYYY-MM-DD HH:mm", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "YYYY-MM-DDTHH:mm:ss.SSSZ", + "Epoch", + "Milliseconds", + "YYYY-MM-DD", + "YYYY-MM-DD HH:mm", + "YYYY-MM-DDTHH:mm:ss.sssZ", + "YYYY-MM-DDTHH:mm:ss", + "YYYY-MM-DD hh:mm:ss", + "Do MMM YYYY", + "DD/MM/YYYY", + "DD/MM/YYYY HH:mm", + "LLL", + "LL", + "D MMMM, YYYY", + "H:mm A D MMMM, YYYY", + "MM-DD-YYYY", + "DD-MM-YYYY", + "MM/DD/YYYY", + "DD/MM/YYYY", + "DD/MM/YY", + "MM/DD/YY" + ] + } + } + }, + "isTriggerProperty": false, + "id": "fegw857tsj" + }, + { + "propertyName": "outputFormat", + "label": "Display Date Format", + "controlType": "DROP_DOWN", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "options": [ + { + "label": "UNIX timestamp (s)", + "value": "Epoch" + }, + { + "label": "UNIX timestamp (ms)", + "value": "Milliseconds" + }, + { + "label": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.SSSZ" + }, + { + "label": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "YYYY-MM-DD hh:mm:ss", + "value": "YYYY-MM-DD hh:mm:ss" + }, + { + "label": "Do MMM YYYY", + "value": "Do MMM YYYY" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "LLL", + "value": "LLL" + }, + { + "label": "LL", + "value": "LL" + }, + { + "label": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "defaultValue": "YYYY-MM-DD HH:mm", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnType" + ], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "YYYY-MM-DDTHH:mm:ss.SSSZ", + "Epoch", + "Milliseconds", + "YYYY-MM-DD", + "YYYY-MM-DD HH:mm", + "YYYY-MM-DDTHH:mm:ss.sssZ", + "YYYY-MM-DDTHH:mm:ss", + "YYYY-MM-DD hh:mm:ss", + "Do MMM YYYY", + "DD/MM/YYYY", + "DD/MM/YYYY HH:mm", + "LLL", + "LL", + "D MMMM, YYYY", + "H:mm A D MMMM, YYYY", + "MM-DD-YYYY", + "DD-MM-YYYY", + "MM/DD/YYYY", + "DD/MM/YYYY", + "DD/MM/YY", + "MM/DD/YY" + ] + } + } + }, + "isTriggerProperty": false, + "id": "hw9gkspm5v" + }, + { + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "r04v2xb5iv" + } + ], + "id": "yn3ysih7xe" + }, + { + "sectionName": "Styles", + "dependencies": ["primaryColumns", "derivedColumns"], + "children": [ + { + "propertyName": "horizontalAlignment", + "label": "Text align", + "controlType": "ICON_TABS", + "options": [ + { + "startIcon": "align-left", + "value": "LEFT" + }, + { + "startIcon": "align-center", + "value": "CENTER" + }, + { + "startIcon": "align-right", + "value": "RIGHT" + } + ], + "defaultValue": "LEFT", + "isJSConvertible": true, + "customJSControl": "COMPUTE_VALUE", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": ["LEFT", "CENTER", "RIGHT"] + } + } + }, + "isTriggerProperty": false, + "id": "xyd9kqo1en" + }, + { + "propertyName": "textSize", + "label": "Text size", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "customJSControl": "COMPUTE_VALUE", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + } + ], + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "5h7xexl8tc" + }, + { + "propertyName": "fontStyle", + "label": "Font Style", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + }, + { + "icon": "text-underline", + "value": "UNDERLINE" + } + ], + "isJSConvertible": true, + "customJSControl": "COMPUTE_VALUE", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "03l1we2ap2" + }, + { + "propertyName": "verticalAlignment", + "label": "Vertical alignment", + "controlType": "ICON_TABS", + "options": [ + { + "startIcon": "vertical-align-top", + "value": "TOP" + }, + { + "startIcon": "vertical-align-middle", + "value": "CENTER" + }, + { + "startIcon": "vertical-align-bottom", + "value": "BOTTOM" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "customJSControl": "COMPUTE_VALUE", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": ["TOP", "CENTER", "BOTTOM"] + } + } + }, + "isTriggerProperty": false, + "id": "823qkw36dw" + }, + { + "propertyName": "textColor", + "label": "Text color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER", + "isJSConvertible": true, + "customJSControl": "COMPUTE_VALUE", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "isTriggerProperty": false, + "id": "dks3x828rt" + }, + { + "propertyName": "cellBackground", + "label": "Cell Background", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER", + "isJSConvertible": true, + "customJSControl": "COMPUTE_VALUE", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "isTriggerProperty": false, + "id": "xxyxqle2jp" + } + ], + "id": "higuch2vy1" + }, + { + "sectionName": "Button Properties", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the icon button", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "controlType": "ICON_SELECT", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + } + }, + "id": "geov3jro97" + }, + { + "propertyName": "iconAlign", + "label": "Icon Alignment", + "helpText": "Sets the icon alignment of the menu button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + }, + "id": "w679ttdpy0" + }, + { + "propertyName": "buttonLabel", + "label": "Label", + "controlType": "COMPUTE_VALUE", + "defaultValue": "Action", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "4m24qo0zgd" + }, + { + "propertyName": "menuButtonLabel", + "label": "Label", + "controlType": "COMPUTE_VALUE", + "defaultValue": "Open Menu", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "7ztruk6bg7" + }, + { + "propertyName": "buttonColor", + "label": "Button color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER", + "helpText": "Changes the color of the button", + "isJSConvertible": true, + "customJSControl": "COMPUTE_VALUE", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "isTriggerProperty": false, + "id": "clt0n2f08n" + }, + { + "propertyName": "buttonVariant", + "label": "Button variant", + "controlType": "DROP_DOWN", + "customJSControl": "COMPUTE_VALUE", + "defaultValue": "PRIMARY", + "isJSConvertible": true, + "helpText": "Sets the variant", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "default": "PRIMARY", + "allowedValues": [ + "PRIMARY", + "SECONDARY", + "TERTIARY" + ] + } + } + }, + "id": "daiig46u7w" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "ew48svr1c2" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "d1lpnjkxyu" + }, + { + "propertyName": "menuColor", + "helpText": "Sets the custom color preset based on the menu button variant", + "label": "Menu Color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER", + "customJSControl": "COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "etl0rd7k1b" + }, + { + "propertyName": "menuVariant", + "label": "Menu Variant", + "controlType": "DROP_DOWN", + "helpText": "Sets the variant of the menu button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "default": "PRIMARY", + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"] + } + }, + "id": "31b8p1w59w" + }, + { + "helpText": "when the button is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "isBindProperty": true, + "isTriggerProperty": true, + "id": "zb4i8jh21f" + } + ], + "id": "cuzk44cblk" + }, + { + "sectionName": "Menu items", + "children": [ + { + "helpText": "Menu items", + "propertyName": "menuItems", + "controlType": "MENU_ITEMS", + "label": "", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["derivedColumns", "columnOrder"], + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "children": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label of a menu item", + "label": "Label", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "oq3c2kt7m8" + }, + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of a menu item", + "label": "Background color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "validation": { + "type": "TEXT" + }, + "id": "xmnrueb3hn" + }, + { + "propertyName": "textColor", + "helpText": "Sets the text color of a menu item", + "label": "Text color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "47mv9ychwi" + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "zxxtav1dkt" + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "uro66vsgv1" + } + ], + "id": "iemrtuwzf4" + }, + { + "sectionName": "Icon Options", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for a menu item", + "controlType": "ICON_SELECT", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "2kcy8y3anl" + }, + { + "propertyName": "iconColor", + "helpText": "Sets the icon color of a menu item", + "label": "Icon color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "bkfphnn5u4" + }, + { + "propertyName": "iconAlign", + "label": "Icon alignment", + "helpText": "Sets the icon alignment of a menu item", + "controlType": "ICON_TABS", + "defaultValue": "left", + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "urmr1uq56v" + } + ], + "id": "0m8s7vj2qn" + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the menu item is clicked", + "propertyName": "onClick", + "label": "onItemClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "primaryColumns", + "derivedColumns", + "columnOrder" + ], + "id": "3csdzlh9py" + } + ], + "id": "aekjevumnc" + } + ] + }, + "id": "1ypf52ekj3" + } + ], + "id": "w4emqtkgi8" + } + ] + }, + "id": "67jkhqegzb" + }, + { + "helpText": "Assigns a unique column which helps maintain selectedRows and triggeredRows based on value", + "propertyName": "primaryColumnId", + "dependencies": ["primaryColumns"], + "label": "Primary key column", + "controlType": "PRIMARY_COLUMNS_DROPDOWN", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "vr90xc4twi" + }, + { + "propertyName": "defaultSearchText", + "label": "Default search text", + "controlType": "INPUT_TEXT", + "placeholderText": "{{appsmith.user.name}}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "up1gitn8x8" + }, + { + "helpText": "Selects row(s) by default", + "propertyName": "defaultSelectedRow", + "label": "Default selected row", + "controlType": "INPUT_TEXT", + "placeholderText": "0", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Index of row(s)", + "example": "0 | [0, 1]", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultSelectedRowValidation(value, props, _) {\n if (props) {\n if (props.multiRowSelection) {\n if (_.isString(value)) {\n var trimmed = value.trim();\n try {\n var parsedArray = JSON.parse(trimmed);\n if (Array.isArray(parsedArray)) {\n var sanitized = parsedArray.filter(function (entry) {\n return Number.isInteger(parseInt(entry, 10)) && parseInt(entry, 10) > -1;\n });\n return {\n isValid: true,\n parsed: sanitized\n };\n } else {\n throw Error(\"Not a stringified array\");\n }\n } catch (e) {\n // If cannot be parsed as an array\n var arrayEntries = trimmed.split(\",\");\n var result = [];\n arrayEntries.forEach(function (entry) {\n if (Number.isInteger(parseInt(entry, 10)) && parseInt(entry, 10) > -1) {\n if (!_.isNil(entry)) result.push(parseInt(entry, 10));\n }\n });\n return {\n isValid: true,\n parsed: result\n };\n }\n }\n if (Array.isArray(value)) {\n var _sanitized = value.filter(function (entry) {\n return Number.isInteger(parseInt(entry, 10)) && parseInt(entry, 10) > -1;\n });\n return {\n isValid: true,\n parsed: _sanitized\n };\n }\n if (Number.isInteger(value) && value > -1) {\n return {\n isValid: true,\n parsed: [value]\n };\n }\n return {\n isValid: false,\n parsed: [],\n message: \"This value does not match type: number[]\"\n };\n } else {\n try {\n var _value = value;\n if (_value === \"\") {\n return {\n isValid: true,\n parsed: undefined\n };\n }\n if (Number.isInteger(parseInt(_value, 10)) && parseInt(_value, 10) > -1) return {\n isValid: true,\n parsed: parseInt(_value, 10)\n };\n return {\n isValid: true,\n parsed: -1\n };\n } catch (e) {\n return {\n isValid: true,\n parsed: -1\n };\n }\n }\n }\n return {\n isValid: true,\n parsed: value\n };\n}" + } + }, + "dependencies": ["multiRowSelection"], + "id": "7sdmn7z1er" + }, + { + "propertyName": "compactMode", + "helpText": "Selects row height", + "label": "Default row height", + "controlType": "DROP_DOWN", + "defaultValue": "DEFAULT", + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "label": "Short", + "value": "SHORT" + }, + { + "label": "Default", + "value": "DEFAULT" + }, + { + "label": "Tall", + "value": "TALL" + } + ], + "id": "5wmzukqjmd" + }, + { + "helpText": "Bind the Table.pageNo property in your API and call it onPageChange", + "propertyName": "serverSidePaginationEnabled", + "label": "Server side pagination", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "id": "6nsik3brf6" + }, + { + "helpText": "It stores the total no. of rows in the table. Helps in calculating the no. of pages that further allows to enable or disable the next/previous control in pagination.", + "propertyName": "totalRecordsCount", + "label": "Total Record Count", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter total record count", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Number", + "example": "10", + "autocompleteDataType": "STRING" + }, + "fnString": "function totalRecordsCountValidation(value, props, _) {\n if (_.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: 0,\n message: \"\"\n };\n }\n if (!Number.isFinite(value) && !_.isString(value)) {\n return {\n isValid: false,\n parsed: 0,\n message: \"This value must be a number\"\n };\n }\n if (_.isString(value) && !/^\\d+\\.?\\d*$/.test(value)) {\n return {\n isValid: false,\n parsed: 0,\n message: \"This value must be a number\"\n };\n }\n return {\n isValid: true,\n parsed: Number(value),\n message: \"\"\n };\n}" + } + }, + "dependencies": ["serverSidePaginationEnabled"], + "id": "26xsw8wp0l" + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "isJSConvertible": true, + "label": "Visible", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "aktix16mkw" + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "rial11aey2" + }, + { + "helpText": "Controls sorting in View Mode", + "propertyName": "isSortable", + "isJSConvertible": true, + "label": "Sortable", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + }, + "id": "lug72nud8j" + }, + { + "propertyName": "multiRowSelection", + "label": "Enable multi row selection", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "id": "29jdklugvm" + }, + { + "propertyName": "enableClientSideSearch", + "label": "Enable client side search", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "id": "wah0doia88" + } + ], + "id": "w5173y524o" + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a table row is selected", + "propertyName": "onRowSelected", + "label": "onRowSelected", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "98pxr1d4cx" + }, + { + "helpText": "when a table page is changed", + "propertyName": "onPageChange", + "label": "onPageChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "9cz6kho1yk" + }, + { + "helpText": "when a table page size is changed", + "propertyName": "onPageSizeChange", + "label": "onPageSizeChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "2f060cwl5b" + }, + { + "propertyName": "onSearchTextChanged", + "label": "onSearchTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "rgaz3el2tr" + }, + { + "helpText": "when a table column is sorted", + "propertyName": "onSort", + "label": "onSort", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "ta7qqappfg" + } + ], + "id": "1lwnu7mp8z" + }, + { + "sectionName": "Header options", + "children": [ + { + "helpText": "Toggle visibility of the search box", + "propertyName": "isVisibleSearch", + "label": "Search", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "yj2erataw8" + }, + { + "helpText": "Toggle visibility of the filters", + "propertyName": "isVisibleFilters", + "label": "Filters", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "c87jcfwgty" + }, + { + "helpText": "Toggle visibility of the data download", + "propertyName": "isVisibleDownload", + "label": "Download", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "3ymo3oov1y" + }, + { + "helpText": "Toggle visibility of the pagination", + "propertyName": "isVisiblePagination", + "label": "Pagination", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "p4kthsv0wk" + }, + { + "propertyName": "delimiter", + "label": "CSV separator", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter CSV separator", + "helpText": "The character used for separating the CSV download file.", + "isBindProperty": true, + "isTriggerProperty": false, + "defaultValue": ",", + "validation": { + "type": "TEXT" + }, + "dependencies": ["isVisibleDownload"], + "id": "60rianxjoy" + } + ], + "id": "zav0ff8gi2" + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "cellBackground", + "label": "Cell background color", + "controlType": "COLOR_PICKER", + "dependencies": ["primaryColumns", "derivedColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "8z5f7tro7t" + }, + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true, + "id": "t5l7ol0p72" + }, + { + "propertyName": "textColor", + "label": "Text color", + "controlType": "COLOR_PICKER", + "dependencies": ["primaryColumns", "derivedColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "gmd88ssaat" + }, + { + "propertyName": "textSize", + "label": "Text size", + "controlType": "DROP_DOWN", + "dependencies": ["primaryColumns", "derivedColumns"], + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "ifiyt81gkr" + }, + { + "propertyName": "fontStyle", + "label": "Font Style", + "controlType": "BUTTON_GROUP", + "dependencies": ["primaryColumns", "derivedColumns"], + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "fsnk92fsgh" + }, + { + "propertyName": "horizontalAlignment", + "label": "Text align", + "controlType": "ICON_TABS", + "dependencies": ["primaryColumns", "derivedColumns"], + "options": [ + { + "startIcon": "align-left", + "value": "LEFT" + }, + { + "startIcon": "align-center", + "value": "CENTER" + }, + { + "startIcon": "align-right", + "value": "RIGHT" + } + ], + "defaultValue": "LEFT", + "isBindProperty": false, + "isTriggerProperty": false, + "id": "q41arx9qci" + }, + { + "propertyName": "verticalAlignment", + "label": "Vertical alignment", + "controlType": "ICON_TABS", + "dependencies": ["primaryColumns", "derivedColumns"], + "options": [ + { + "startIcon": "vertical-align-top", + "value": "TOP" + }, + { + "startIcon": "vertical-align-middle", + "value": "CENTER" + }, + { + "startIcon": "vertical-align-bottom", + "value": "BOTTOM" + } + ], + "defaultValue": "CENTER", + "isBindProperty": false, + "isTriggerProperty": false, + "id": "13p4k09vyg" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "cc0sllqqlr" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "z3mehinv69" + } + ], + "id": "hkx7f3x62x" + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "CHECKBOX_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "helpText": "Displays a label next to the widget", + "placeholderText": "I agree to the T&C", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } + ], + "defaultValue": "Left", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the alignment of the widget", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "isBindProperty": true, + "isTriggerProperty": false, + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "LEFT" + }, + { + "startIcon": "align-right", + "value": "RIGHT" + } + ], + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "defaultCheckedState", + "label": "Default state", + "helpText": "Sets the default checked state of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables input to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the check state is changed", + "propertyName": "onCheckChange", + "label": "onCheckChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the checked state color of the checkbox", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 2, + "active": true + } + } + }, + "RADIO_GROUP_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Displays a list of unique options", + "propertyName": "options", + "label": "Options", + "controlType": "OPTION_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": \"string\", \"value\": \"string\" | number}>", + "example": "[{\"label\": \"One\", \"value\": \"one\"}]", + "autocompleteDataType": "STRING" + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Sets a default selected option", + "propertyName": "defaultOptionValue", + "label": "Default selected value", + "placeholderText": "Y", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string |\nnumber (only works in mustache syntax)", + "example": "abc | {{1}}", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isInline", + "helpText": "Whether the radio buttons are to be displayed inline horizontally", + "label": "Inline", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a user changes the selected option", + "propertyName": "onSelectionChange", + "label": "onSelectionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "alignment", + "helpText": "Sets the alignment of the widget", + "label": "Alignment", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ] + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the accent color of the widget", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "active": true + } + } + }, + "BUTTON_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "text", + "label": "Label", + "helpText": "Sets the label of the button", + "controlType": "INPUT_TEXT", + "placeholderText": "Submit", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "when the button is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show helper text with button on hover", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Submits Form", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables clicks to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "googleRecaptchaKey", + "label": "Google reCAPTCHA key", + "helpText": "Sets Google reCAPTCHA site key for the button", + "controlType": "INPUT_TEXT", + "placeholderText": "reCAPTCHA Key", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "recaptchaType", + "label": "Google reCAPTCHA version", + "controlType": "DROP_DOWN", + "helpText": "Select reCAPTCHA version", + "options": [ + { + "label": "reCAPTCHA v3", + "value": "V3" + }, + { + "label": "reCAPTCHA v2", + "value": "V2" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["V3", "V2"], + "default": "V3" + } + } + } + ] + }, + { + "sectionName": "Form settings", + "children": [ + { + "helpText": "Disabled if the form is invalid, if this widget exists directly within a Form widget.", + "propertyName": "disabledWhenInvalid", + "label": "Disabled invalid forms", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Resets the fields of the form, on click, if this widget exists directly within a Form widget.", + "propertyName": "resetFormOnClick", + "label": "Reset form on success", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "buttonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "defaultValue": "PRIMARY", + "fullWidth": true, + "helpText": "Sets the variant of the icon button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"], + "default": "PRIMARY" + } + } + } + ] + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Select icon", + "helpText": "Sets the icon to be used for the button", + "controlType": "ICON_SELECT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["iconAlign"], + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + } + }, + { + "propertyName": "placement", + "label": "Placement", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the space between items", + "options": [ + { + "label": "Start", + "value": "START" + }, + { + "label": "Between", + "value": "BETWEEN" + }, + { + "label": "Center", + "value": "CENTER" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["START", "BETWEEN", "CENTER"], + "default": "CENTER" + } + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "buttonColor", + "helpText": "Changes the color of the button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "IMAGE_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Sets the image to be displayed", + "propertyName": "image", + "label": "Image", + "controlType": "INPUT_TEXT", + "placeholderText": "URL / Base64", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "IMAGE_URL" + } + }, + { + "helpText": "Sets the default image to be displayed when load fails", + "propertyName": "defaultImage", + "label": "Default image", + "controlType": "INPUT_TEXT", + "placeholderText": "URL / Base64", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "IMAGE_URL" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Sets how the Image should be resized to fit its container.", + "propertyName": "objectFit", + "label": "Object fit", + "controlType": "DROP_DOWN", + "defaultValue": "contain", + "options": [ + { + "label": "Contain", + "value": "contain" + }, + { + "label": "Cover", + "value": "cover" + }, + { + "label": "Auto", + "value": "auto" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["contain", "cover", "auto"] + } + } + }, + { + "helpText": "Controls the max zoom of the widget", + "propertyName": "maxZoomLevel", + "label": "Max zoom level", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "1x (No Zoom)", + "value": 1 + }, + { + "label": "2x", + "value": 2 + }, + { + "label": "4x", + "value": 4 + }, + { + "label": "8x", + "value": 8 + }, + { + "label": "16x", + "value": 16 + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "allowedValues": [1, 2, 4, 8, 16] + } + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls if the image is allowed to rotate", + "propertyName": "enableRotation", + "label": "Enable rotation", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls if the image is allowed to download", + "propertyName": "enableDownload", + "label": "Enable download", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when user clicks on an image", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "VIDEO_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "url", + "label": "URL", + "helpText": "Link to the video file which should be played", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter URL", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {}, + "expected": { + "type": "Video URL", + "example": "https://assets.appsmith.com/widgets/bird.mp4", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "autoPlay", + "label": "Autoplay", + "helpText": "Video will be automatically played, by enabling this feature, video will be muted by default.", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the video is played", + "propertyName": "onPlay", + "label": "onPlay", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the video is paused", + "propertyName": "onPause", + "label": "onPause", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the video ends", + "propertyName": "onEnd", + "label": "onEnd", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of the widget", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "TABS_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "tabsObj", + "isJSConvertible": false, + "label": "Tabs", + "helpText": "Tabs", + "controlType": "TABS_INPUT", + "isBindProperty": false, + "isTriggerProperty": false, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "children": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the tab", + "controlType": "SWITCH", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ] + } + }, + { + "propertyName": "defaultTab", + "helpText": "Selects a tab name specified by default", + "placeholderText": "Tab 1", + "label": "Default tab", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Tab Name (string)", + "example": "Tab 1", + "autocompleteDataType": "STRING" + } + }, + "dependentPaths": ["tabsObj", "tabs"] + }, + "dependencies": ["tabsObj", "tabs"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables scrolling for content inside the widget", + "propertyName": "shouldScrollContents", + "label": "Scroll contents", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "shouldShowTabs", + "helpText": "Hides the tabs so that different widgets can be displayed based on the default tab", + "label": "Show tabs", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "postUpdateAction": "CHECK_CONTAINERS_FOR_AUTO_HEIGHT" + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the button is clicked", + "propertyName": "onTabSelected", + "label": "onTabSelected", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Colors, Borders and Shadows", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the color of the selected tab's underline ", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "borderColor", + "label": "Border color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Enter value for border width", + "propertyName": "borderWidth", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "postUpdateAction": "CHECK_CONTAINERS_FOR_AUTO_HEIGHT" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 1, + "active": true + } + } + }, + "MODAL_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Enables scrolling for content inside the widget", + "propertyName": "shouldScrollContents", + "label": "Scroll contents", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "canOutsideClickClose", + "label": "Quick Dismiss", + "helpText": "Allows dismissing the modal when user taps outside", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the modal is closed", + "propertyName": "onClose", + "label": "onClose", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of the widget", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 0, + "active": true + } + } + }, + "CHART_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Changes the visualisation of the chart data", + "propertyName": "chartType", + "label": "Chart type", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Line chart", + "value": "LINE_CHART" + }, + { + "label": "Bar chart", + "value": "BAR_CHART" + }, + { + "label": "Pie chart", + "value": "PIE_CHART" + }, + { + "label": "Column chart", + "value": "COLUMN_CHART" + }, + { + "label": "Area chart", + "value": "AREA_CHART" + }, + { + "label": "Custom EChart", + "value": "CUSTOM_ECHART" + }, + { + "label": "Custom Fusion Charts (deprecated)", + "value": "CUSTOM_FUSION_CHART" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "LINE_CHART", + "BAR_CHART", + "PIE_CHART", + "COLUMN_CHART", + "AREA_CHART", + "CUSTOM_ECHART", + "CUSTOM_FUSION_CHART" + ] + } + } + }, + { + "helpText": "Configure a custom ECHART see docs.appsmith.com", + "placeholderText": "Custom ECharts Configuration", + "propertyName": "customEChartConfig", + "label": "Custom ECharts Configuration", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "OBJECT", + "params": { + "default": {} + } + }, + "dependencies": ["chartType"] + }, + { + "helpText": "Configure a custom FusionChart see docs.appsmith.com", + "placeholderText": "Fusion Chart Config", + "propertyName": "customFusionChartConfig", + "label": "Custom fusion chart", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "OBJECT", + "params": { + "default": {}, + "allowedKeys": [ + { + "type": "TEXT", + "name": "type", + "params": { + "allowedValues": [ + "area2d", + "bar2d", + "bar3d", + "boxandwhisker2d", + "candlestick", + "chord", + "dragnode", + "dragarea", + "dragcolumn2d", + "dragline", + "errorbar2d", + "errorline", + "errorscatter", + "funnel", + "gantt", + "heatmap", + "hbullet", + "hled", + "InverseMSArea", + "InverseMSColumn2D", + "InverseMSLine", + "LogMSColumn2D", + "LogMSLine", + "MultiAxisLine", + "multilevelpie", + "overlappedcolumn2d", + "overlappedbar2d", + "pyramid", + "radar", + "angulargauge", + "realtimearea", + "bulb", + "realtimecolumn", + "cylinder", + "hlineargauge", + "realtimeline", + "realtimelinedy", + "realtimestackedarea", + "realtimestackedcolumn", + "thermometer", + "sankey", + "selectscatter", + "sparkcolumn", + "sparkline", + "sparkwinloss", + "msstepline", + "sunburst", + "treemap", + "vbullet", + "vled", + "waterfall2d", + "zoomline", + "zoomlinedy", + "zoomscatter", + "column2d", + "column3d", + "line", + "area", + "bar2d", + "bar3d", + "pie2d", + "pie3d", + "doughnut2d", + "doughnut3d", + "pareto2d", + "pareto3d", + "scrollcombidy2d", + "scrollcombi2d", + "scrollstackedcolumn2d", + "scrollmsstackedcolumn2d", + "scrollmsstackedcolumn2dlinedy", + "scrollstackedbar2d", + "scrollarea2d", + "scrollline2d", + "scrollcolumn2d", + "scrollbar2d", + "bubble", + "scatter", + "msstackedcolumn2d", + "stackedarea2d", + "stackedbar3d", + "stackedbar2d", + "stackedcolumn3d", + "stackedcolumn2d", + "msstackedcolumn2dlinedy", + "stackedcolumn3dlinedy", + "mscolumn3dlinedy", + "mscombidy2d", + "mscombidy3d", + "stackedcolumn3dline", + "stackedcolumn2dline", + "mscolumnline3d", + "mscombi3d", + "mscombi2d", + "marimekko", + "MSArea", + "msbar3d", + "msbar2d", + "msline", + "mscolumn3d", + "mscolumn2d", + "spline", + "splinearea", + "msspline", + "mssplinedy", + "mssplinearea", + "stackedcolumn2dlinedy", + "stackedarea2dlinedy" + ], + "default": "", + "required": true + } + }, + { + "type": "OBJECT", + "name": "dataSource", + "params": { + "required": true, + "ignoreCase": false, + "allowedKeys": [ + { + "name": "chart", + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "paletteColors", + "type": "TEXT", + "params": { + "strict": true, + "ignoreCase": true + } + } + ], + "default": {} + } + }, + { + "name": "data", + "type": "ARRAY", + "params": { + "default": [], + "children": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "label", + "type": "TEXT" + }, + { + "name": "value", + "type": "NUMBER" + } + ] + } + } + } + } + ] + } + } + ] + } + }, + "dependencies": ["chartType"], + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Populates the chart with the data", + "propertyName": "chartData", + "placeholderText": "[{ \"x\": \"2021\", \"y\": \"94000\" }]", + "label": "Chart series", + "controlType": "CHART_DATA", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["chartType"], + "children": [ + { + "helpText": "Series data", + "propertyName": "data", + "label": "Series data", + "controlType": "INPUT_TEXT_AREA", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "default": [], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "x", + "type": "TEXT", + "params": { + "required": true, + "default": "" + } + }, + { + "name": "y", + "type": "NUMBER", + "params": { + "required": true, + "default": 10 + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Series name", + "propertyName": "seriesName", + "label": "Series name", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Adds a title to the chart", + "placeholderText": "Sales Report", + "propertyName": "chartName", + "label": "Title", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables scrolling inside the chart", + "propertyName": "allowScroll", + "label": "Allow scroll", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["chartType"] + }, + { + "helpText": "Hides/Display data point labels on series data", + "propertyName": "showDataPointLabel", + "label": "Show Labels", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["chartType"] + } + ] + }, + { + "sectionName": "Axis", + "children": [ + { + "propertyName": "setAdaptiveYMin", + "label": "Adaptive axis", + "helpText": "Define the minimum scale for X/Y axis", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Specifies the label of the x-axis", + "propertyName": "xAxisName", + "placeholderText": "Dates", + "label": "x-axis label", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["chartType"] + }, + { + "helpText": "Specifies the label of the y-axis", + "propertyName": "yAxisName", + "placeholderText": "Revenue", + "label": "y-axis label", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["chartType"] + }, + { + "helpText": "Changes the x-axis label orientation", + "propertyName": "labelOrientation", + "label": "x-axis label orientation", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["chartType"], + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Auto", + "value": "auto" + }, + { + "label": "Slant", + "value": "slant" + }, + { + "label": "Rotate", + "value": "rotate" + } + ] + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the chart data point is clicked", + "propertyName": "onDataPointClick", + "label": "onDataPointClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "MAP_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "mapCenter", + "label": "Initial location", + "helpText": "Default location for the map. Search for a location directly in the field.", + "isJSConvertible": true, + "controlType": "LOCATION_SEARCH", + "dependencies": ["googleMapsApiKey"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "lat", + "type": "NUMBER", + "params": { + "min": -90, + "max": 90, + "default": 0, + "required": true + } + }, + { + "name": "long", + "type": "NUMBER", + "params": { + "min": -180, + "max": 180, + "default": 0, + "required": true + } + } + ] + } + } + }, + { + "propertyName": "defaultMarkers", + "label": "Default markers", + "controlType": "INPUT_TEXT", + "inputType": "ARRAY", + "helpText": "Sets the default markers on the map", + "placeholderText": "[{ \"lat\": \"val1\", \"long\": \"val2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "lat", + "type": "NUMBER", + "params": { + "min": -90, + "max": 90, + "default": 0, + "required": true + } + }, + { + "name": "long", + "type": "NUMBER", + "params": { + "min": -180, + "max": 180, + "default": 0, + "required": true + } + }, + { + "name": "title", + "type": "TEXT" + }, + { + "name": "color", + "type": "TEXT" + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "zoomLevel", + "label": "Zoom level", + "controlType": "STEP", + "helpText": "Changes the default zoom of the map", + "stepType": "ZOOM_PERCENTAGE", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "enablePickLocation", + "label": "Enable pick location", + "helpText": "Allows a user to pick their location", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "isClickedMarkerCentered", + "label": "Map & marker centering", + "helpText": "Controls whether the clicked marker is centered on the map", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "allowClustering", + "label": "Enable clustering", + "controlType": "SWITCH", + "helpText": "Allows markers to be clustered", + "defaultValue": false, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "enableSearch", + "label": "Enable search location", + "helpText": "Allows a user to search for a location", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + } + ] + }, + { + "sectionName": "Create marker", + "children": [ + { + "propertyName": "enableCreateMarker", + "label": "Create new marker", + "helpText": "Allows users to mark locations on the map", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "onCreateMarker", + "label": "onCreateMarker", + "helpText": "When create new marker is enabled, this event triggers upon successful marker creation", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["enableCreateMarker"] + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "propertyName": "onMarkerClick", + "label": "onMarkerClick", + "helpText": "when the user clicks on the marker", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "RICH_TEXT_EDITOR_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "inputType", + "helpText": "Sets the input type of the default text property in widget.", + "label": "Input Type", + "controlType": "ICON_TABS", + "defaultValue": "html", + "fullWidth": true, + "options": [ + { + "label": "Markdown", + "value": "markdown" + }, + { + "label": "HTML", + "value": "html" + } + ], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "defaultText", + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "label": "Default value", + "controlType": "INPUT_TEXT", + "placeholderText": "Hello World", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isToolbarHidden", + "label": "Hide toolbar", + "helpText": "Controls the visibility of the toolbar", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the text is changed", + "propertyName": "onTextChange", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "defaultValue": "FIXED", + "active": true + } + } + }, + "DATE_PICKER_WIDGET2": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Sets the format of the selected date", + "propertyName": "dateFormat", + "label": "Date format", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "optionWidth": "340px", + "options": [ + { + "label": "2023-09-28T17:44:41.4141+05:30", + "subText": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.sssZ", + "subTextPosition": 0 + }, + { + "label": "September 28, 2023 5:44 PM", + "subText": "LLL", + "value": "LLL", + "subTextPosition": 0 + }, + { + "label": "September 28, 2023", + "subText": "LL", + "value": "LL", + "subTextPosition": 0 + }, + { + "label": "2023-09-28 17:44", + "subText": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm", + "subTextPosition": 0 + }, + { + "label": "2023-09-28T17:44:41", + "subText": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss", + "subTextPosition": 0 + }, + { + "label": "2023-09-28 05:44:41 PM", + "subText": "YYYY-MM-DD hh:mm:ss A", + "value": "YYYY-MM-DD hh:mm:ss A", + "subTextPosition": 0 + }, + { + "label": "28/09/2023 17:44", + "subText": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm", + "subTextPosition": 0 + }, + { + "label": "28 September, 2023", + "subText": "D MMMM, YYYY", + "value": "D MMMM, YYYY", + "subTextPosition": 0 + }, + { + "label": "17:44 PM 28 September, 2023", + "subText": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY", + "subTextPosition": 0 + }, + { + "label": "2023-09-28", + "subText": "YYYY-MM-DD", + "value": "YYYY-MM-DD", + "subTextPosition": 0 + }, + { + "label": "09-28-2023", + "subText": "MM-DD-YYYY", + "value": "MM-DD-YYYY", + "subTextPosition": 0 + }, + { + "label": "28-09-2023", + "subText": "DD-MM-YYYY", + "value": "DD-MM-YYYY", + "subTextPosition": 0 + }, + { + "label": "09/28/2023", + "subText": "MM/DD/YYYY", + "value": "MM/DD/YYYY", + "subTextPosition": 0 + }, + { + "label": "28/09/2023", + "subText": "DD/MM/YYYY", + "value": "DD/MM/YYYY", + "subTextPosition": 0 + }, + { + "label": "28/09/23", + "subText": "DD/MM/YY", + "value": "DD/MM/YY", + "subTextPosition": 0 + }, + { + "label": "09/28/23", + "subText": "MM/DD/YY", + "value": "MM/DD/YY", + "subTextPosition": 0 + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "hideSubText": true + }, + { + "propertyName": "defaultDate", + "label": "Default Date", + "helpText": "Sets the default date of the widget. The date is updated if the default date changes", + "controlType": "DATE_PICKER", + "placeholderText": "Enter Default Date", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "DATE_ISO_STRING" + } + }, + { + "propertyName": "firstDayOfWeek", + "label": "First Day Of Week", + "helpText": "Defines the first day of the week for calendar", + "controlType": "INPUT_TEXT", + "defaultValue": "0", + "inputType": "INTEGER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "0 : sunday\n1 : monday\n2 : tuesday\n3 : wednesday\n4 : thursday\n5 : friday\n6 : saturday", + "example": "0", + "autocompleteDataType": "STRING" + } + } + } + }, + { + "propertyName": "timePrecision", + "label": "Time Precision", + "controlType": "DROP_DOWN", + "helpText": "Sets the different time picker or hide.", + "defaultValue": "minute", + "options": [ + { + "label": "None", + "value": "None" + }, + { + "label": "Minute", + "value": "minute" + }, + { + "label": "Second", + "value": "second" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["None", "minute", "second"], + "default": "minute" + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "minDate", + "label": "Min Date", + "helpText": "Defines the min date for this widget", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "DATE_ISO_STRING" + } + }, + { + "propertyName": "maxDate", + "label": "Max Date", + "helpText": "Defines the max date for this widget", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "DATE_ISO_STRING" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current selection", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Add tooltip text here", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "shortcuts", + "label": "Show Shortcuts", + "helpText": "Choose to show shortcut menu", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "closeOnSelection", + "label": "Close On Selection", + "helpText": "Calender should close when a date is selected", + "controlType": "SWITCH", + "defaultValue": true, + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "propertyName": "onDateSelected", + "label": "onDateSelected", + "helpText": "when a date is selected in the calendar", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "propertyName": "onFocus", + "label": "onFocus", + "helpText": "when the date picker receives focus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "propertyName": "onBlur", + "label": "onBlur", + "helpText": "when the date picker loses focus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "defaultValue": "FIXED", + "active": true + } + } + }, + "SWITCH_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "helpText": "Displays a label next to the widget", + "placeholderText": "Enable Option", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } + ], + "defaultValue": "Left", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the alignment of the widget", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "isBindProperty": true, + "isTriggerProperty": false, + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "LEFT" + }, + { + "startIcon": "align-right", + "value": "RIGHT" + } + ], + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "defaultSwitchState", + "label": "Default state", + "helpText": "On / Off the Switch by default. Changes to the default selection update the widget state", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables input to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the switch state is changed", + "propertyName": "onChange", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the background color of the widget", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 1, + "active": true + } + } + }, + "FORM_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables scrolling for content inside the widget", + "propertyName": "shouldScrollContents", + "label": "Scroll contents", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "borderColor", + "label": "Border color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "helpText": "Enter value for border width", + "propertyName": "borderWidth", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "postUpdateAction": "CHECK_CONTAINERS_FOR_AUTO_HEIGHT" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 0, + "active": true + } + } + }, + "RATE_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "maxCount", + "helpText": "Sets the maximum allowed rating", + "label": "Max rating", + "controlType": "INPUT_TEXT", + "placeholderText": "5", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + } + }, + { + "propertyName": "defaultRate", + "helpText": "Sets the default rating", + "label": "Default rating", + "controlType": "INPUT_TEXT", + "placeholderText": "2.5", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": 5, + "autocompleteDataType": "NUMBER" + } + } + }, + "dependencies": ["maxCount", "isAllowHalf"] + }, + { + "propertyName": "tooltips", + "helpText": "Sets the tooltip contents of stars", + "label": "Tooltips", + "controlType": "INPUT_TEXT", + "placeholderText": "[\"Bad\", \"Neutral\", \"Good\"]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "children": { + "type": "TEXT" + } + } + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isAllowHalf", + "helpText": "Controls if user can submit half stars", + "label": "Allow half stars", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isReadOnly", + "helpText": "Makes the widget read only", + "label": "Read only", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the rate is changed", + "propertyName": "onRateChanged", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "size", + "label": "Star size", + "helpText": "Controls the size of the stars in the widget", + "controlType": "ICON_TABS", + "defaultValue": "LARGE", + "fullWidth": true, + "options": [ + { + "label": "Small", + "value": "SMALL" + }, + { + "label": "Medium", + "value": "MEDIUM" + }, + { + "label": "Large", + "value": "LARGE" + } + ], + "isBindProperty": false, + "isTriggerProperty": false + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "activeColor", + "label": "Active color", + "helpText": "Color of the selected stars", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "inactiveColor", + "label": "Inactive color", + "helpText": "Color of the unselected stars", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 1, + "active": true + } + } + }, + "IFRAME_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "source", + "helpText": "The URL of the page to embed", + "label": "URL", + "controlType": "INPUT_TEXT", + "placeholderText": "https://docs.appsmith.com", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "SAFE_URL", + "params": { + "default": "https://www.example.com" + } + } + }, + { + "propertyName": "srcDoc", + "helpText": "Inline HTML to embed, overriding the src attribute", + "label": "srcDoc", + "controlType": "INPUT_TEXT", + "placeholderText": "

Inline HTML

", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "title", + "helpText": "Label the content of the page to embed", + "label": "Title", + "controlType": "INPUT_TEXT", + "placeholderText": "Documentation", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the source URL is changed", + "propertyName": "onURLChanged", + "label": "onURLChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the srcDoc is changed", + "propertyName": "onSrcDocChanged", + "label": "onSrcDocChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when a message event is received", + "propertyName": "onMessageReceived", + "label": "onMessageReceived", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Controls the color of the border", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderWidth", + "label": "Border width (px)", + "helpText": "Controls the size of the border in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "inputType": "NUMBER", + "validation": { + "type": "NUMBER", + "params": { + "min": 0, + "default": 1 + } + } + }, + { + "propertyName": "borderOpacity", + "label": "Border opacity (%)", + "helpText": "Controls the opacity of the border in percentage", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "inputType": "NUMBER", + "validation": { + "type": "NUMBER", + "params": { + "min": 0, + "max": 100, + "default": 100 + } + } + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "TABS_MIGRATOR_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Takes an array of tab names to render tabs", + "propertyName": "tabs", + "isJSConvertible": true, + "label": "Tabs", + "controlType": "TABS_INPUT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "children": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "label", + "type": "TEXT" + }, + { + "name": "id", + "type": "TEXT", + "default": "jl5lq76ks4" + }, + { + "name": "widgetId", + "type": "TEXT", + "default": "ke58c7rkgw" + } + ] + } + } + } + } + }, + { + "propertyName": "shouldShowTabs", + "helpText": "Hides the tabs so that different widgets can be displayed based on the default tab", + "label": "Show tabs", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "defaultTab", + "helpText": "Selects a tab name specified by default", + "placeholderText": "Enter tab name", + "label": "Default tab", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Tab Name (string)", + "example": "Tab 1", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["tabsObj", "tabs"] + }, + { + "helpText": "Enables scrolling for content inside the widget", + "propertyName": "shouldScrollContents", + "label": "Scroll contents", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the button is clicked", + "propertyName": "onTabSelected", + "label": "onTabSelected", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "DIVIDER_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls widget orientation", + "propertyName": "orientation", + "label": "Direction", + "controlType": "ICON_TABS", + "defaultValue": "horizontal", + "fullWidth": true, + "options": [ + { + "label": "Horizontal", + "value": "horizontal" + }, + { + "label": "Vertical", + "value": "vertical" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Stroke", + "children": [ + { + "helpText": "Controls the stroke color of divider", + "propertyName": "dividerColor", + "label": "Color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "helpText": "Controls the style of the divider", + "propertyName": "strokeStyle", + "label": "Style", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Solid", + "value": "solid", + "icon": "cap-solid" + }, + { + "label": "Dashed", + "value": "dashed", + "icon": "line-dashed" + }, + { + "label": "Dotted", + "value": "dotted", + "icon": "line-dotted" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Controls the thickness of divider", + "propertyName": "thickness", + "label": "Thickness", + "controlType": "INPUT_TEXT", + "placeholderText": "5", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": 0, + "default": 0 + } + } + } + ] + }, + { + "sectionName": "Cap", + "children": [ + { + "helpText": "Controls the type of divider cap", + "propertyName": "capType", + "label": "Cap", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "options": [ + { + "label": "No cap", + "value": "nc", + "icon": "cap-solid" + }, + { + "label": "Arrow", + "value": "arrow", + "icon": "arrow-forward" + }, + { + "label": "Dot", + "value": "dot", + "icon": "cap-dot" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["nc", "arrow", "dot"], + "required": true, + "default": "nc" + } + } + }, + { + "helpText": "Changes the position of the cap if a valid cap is selected.", + "propertyName": "capSide", + "label": "Cap position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "startIcon": "contract-left-line", + "value": -1 + }, + { + "startIcon": "column-freeze", + "value": 0, + "width": 48 + }, + { + "startIcon": "contract-right-line", + "value": 1 + } + ], + "defaultValue": 0, + "isBindProperty": false, + "isTriggerProperty": false + } + ] + } + ], + "features": null + }, + "MENU_BUTTON_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label of a menu", + "label": "Label", + "controlType": "INPUT_TEXT", + "placeholderText": "Open", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "menuItemsSource", + "helpText": "Sets the source for the menu items", + "label": "Menu items source", + "controlType": "ICON_TABS", + "defaultValue": "STATIC", + "fullWidth": true, + "options": [ + { + "label": "Static", + "value": "STATIC" + }, + { + "label": "Dynamic", + "value": "DYNAMIC" + } + ], + "isJSConvertible": false, + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["sourceData", "configureMenuItems"] + }, + { + "helpText": "Menu items", + "propertyName": "menuItems", + "controlType": "MENU_ITEMS", + "label": "Menu items", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["menuItemsSource"], + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "contentChildren": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label of a menu item", + "label": "Label", + "controlType": "INPUT_TEXT", + "placeholderText": "Download", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "when the menu item is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "styleChildren": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for a menu item", + "controlType": "ICON_SELECT", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of a menu item", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "iconColor", + "helpText": "Sets the icon color of a menu item", + "label": "Icon color", + "controlType": "COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "textColor", + "helpText": "Sets the text color of a menu item", + "label": "Text color", + "controlType": "COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of a menu item", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false + } + ] + } + ] + } + }, + { + "helpText": "Takes in an array of items to display the menu items.", + "propertyName": "sourceData", + "label": "Source data", + "controlType": "INPUT_TEXT", + "placeholderText": "{{Query1.data}}", + "inputType": "ARRAY", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['option1', 'option2'] | [{ \"label\": \"label1\", \"value\": \"value1\" }]", + "autocompleteDataType": "ARRAY" + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["menuItemsSource"] + }, + { + "helpText": "Configure how each menu item will appear.", + "propertyName": "configureMenuItems", + "controlType": "OPEN_CONFIG_PANEL", + "buttonConfig": { + "label": "Configure", + "icon": "settings-2-line" + }, + "label": "Configure menu items", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["menuItemsSource", "sourceData"], + "panelConfig": { + "editableTitle": false, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "contentChildren": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label of a menu item using the {{currentItem}} binding.", + "label": "Label", + "controlType": "MENU_BUTTON_DYNAMIC_ITEMS", + "placeholderText": "{{currentItem.name}}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "evaluatedDependencies": ["sourceData"] + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget. Can also be configured the using {{currentItem}} binding.", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["sourceData"] + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget. Can also be configured the using {{currentItem}} binding.", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["sourceData"] + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the menu item is clicked. Can also be configured the using {{currentItem}} binding.", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "evaluatedDependencies": ["sourceData"] + } + ] + } + ], + "styleChildren": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for a menu item. Can also be configured the using {{currentItem}} binding.", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + } + }, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["sourceData"] + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of a menu item. Can also be configured the using {{currentItem}} binding.", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + } + }, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["sourceData"] + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "iconColor", + "helpText": "Sets the icon color of a menu item. Can also be configured the using {{currentItem}} binding.", + "label": "Icon color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["sourceData"], + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "regex": {} + } + } + }, + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of a menu item. Can also be configured the using {{currentItem}} binding.", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["sourceData"], + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "regex": {} + } + } + }, + { + "propertyName": "textColor", + "helpText": "Sets the text color of a menu item. Can also be configured the using {{currentItem}} binding.", + "label": "Text color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["sourceData"], + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "regex": {} + } + } + } + ] + } + ] + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isCompact", + "helpText": "Decides if menu items will consume lesser space", + "label": "Compact", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "menuVariant", + "label": "Button variant", + "controlType": "DROP_DOWN", + "helpText": "Sets the variant of the menu button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"], + "default": "PRIMARY" + } + } + } + ] + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the menu button", + "controlType": "ICON_SELECT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["iconAlign"], + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the menu button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + } + }, + { + "propertyName": "placement", + "label": "Placement", + "controlType": "DROP_DOWN", + "helpText": "Sets the space between items", + "options": [ + { + "label": "Start", + "value": "START" + }, + { + "label": "Between", + "value": "BETWEEN" + }, + { + "label": "Center", + "value": "CENTER" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["START", "BETWEEN", "CENTER"], + "default": "CENTER" + } + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "menuColor", + "helpText": "Sets the style of the Menu button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "ICON_BUTTON_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the icon button", + "controlType": "ICON_SELECT", + "defaultIconName": "plus", + "hideNoneIcon": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ], + "default": "plus" + } + } + }, + { + "helpText": "when the button is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show helper text with button on hover", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Add Input Field", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "buttonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "defaultValue": "PRIMARY", + "fullWidth": true, + "helpText": "Sets the variant of the icon button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"], + "default": "PRIMARY" + } + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "buttonColor", + "helpText": "Sets the style of the icon button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "CHECKBOX_GROUP_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Displays a list of unique checkbox options", + "propertyName": "options", + "label": "Options", + "controlType": "OPTION_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "default": [], + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "" + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Sets the values of the options checked by default", + "propertyName": "defaultSelectedValues", + "label": "Default selected values", + "placeholderText": "[\"apple\", \"orange\"]", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "String or Array", + "example": "apple | [\"apple\", \"orange\"]", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables input to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isInline", + "label": "Inline", + "controlType": "SWITCH", + "helpText": "Displays the checkboxes horizontally", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isSelectAll", + "label": "Select all options", + "controlType": "SWITCH", + "helpText": "Controls whether select all option is shown", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the check state is changed", + "propertyName": "onSelectionChange", + "label": "onSelectionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "optionAlignment", + "label": "Alignment", + "controlType": "DROP_DOWN", + "helpText": "Sets alignment between options.", + "options": [ + { + "label": "None", + "value": "unset" + }, + { + "label": "Start", + "value": "flex-start" + }, + { + "label": "End", + "value": "flex-end" + }, + { + "label": "Center", + "value": "center" + }, + { + "label": "Between", + "value": "space-between" + }, + { + "label": "Around", + "value": "space-around" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "unset", + "flex-start", + "flex-end", + "center", + "space-between", + "space-around" + ] + } + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the checked state color of the checkbox", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "active": true + } + } + }, + "FILE_PICKER_WIDGET_V2": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "allowedFileTypes", + "helpText": "Restricts the type of files which can be uploaded", + "label": "Allowed file types", + "controlType": "DROP_DOWN", + "isMultiSelect": true, + "placeholderText": "Select File types", + "options": [ + { + "label": "Any File", + "value": "*" + }, + { + "label": "Images", + "value": "image/*" + }, + { + "label": "Videos", + "value": "video/*" + }, + { + "label": "Audio", + "value": "audio/*" + }, + { + "label": "Text", + "value": "text/*" + }, + { + "label": "MS Word", + "value": ".doc" + }, + { + "label": "JPEG", + "value": "image/jpeg" + }, + { + "label": "PNG", + "value": ".png" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": true, + "children": { + "type": "TEXT" + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Set the format of the data read from the files", + "propertyName": "fileDataType", + "label": "Data format", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Base64", + "value": "Base64" + }, + { + "label": "Binary", + "value": "Binary" + }, + { + "label": "Text", + "value": "Text" + }, + { + "label": "Array of Objects (CSV, XLS(X), JSON, TSV)", + "value": "Array" + } + ], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "dynamicTyping", + "label": "Infer data-types from CSV", + "helpText": "Controls if the arrays should try to infer the best possible data type based on the values in CSV file", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["fileDataType"], + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "maxNumFiles", + "label": "Max no. of files", + "helpText": "Sets the maximum number of files that can be uploaded at once", + "controlType": "INPUT_TEXT", + "placeholderText": "1", + "inputType": "INTEGER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "helpText": "Sets the label of the button", + "placeholderText": "Select Files", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "maxFileSize", + "helpText": "Sets the maximum size of each file that can be uploaded", + "label": "Max file size(Mb)", + "controlType": "INPUT_TEXT", + "placeholderText": "5", + "inputType": "INTEGER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": 1, + "max": 100, + "default": 5, + "passThroughOnZero": false + } + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disable", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the user selects a file. Upload files to a CDN and stores their URLs in filepicker.files", + "propertyName": "onFilesSelected", + "label": "onFilesSelected", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "propertyName": "buttonColor", + "helpText": "Changes the color of the button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "STATBOX_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "shouldScrollContents", + "helpText": "Enables scrolling for content inside the widget", + "label": "Scroll contents", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "propertyName": "backgroundColor", + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "borderColor", + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "label": "Border color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "postUpdateAction": "CHECK_CONTAINERS_FOR_AUTO_HEIGHT" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 0, + "active": true + } + } + }, + "AUDIO_RECORDER_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables input to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the recording starts", + "propertyName": "onRecordingStart", + "label": "onRecordingStart", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the recording ends", + "propertyName": "onRecordingComplete", + "label": "onRecordingComplete", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "iconColor", + "helpText": "Sets the icon color of the widget", + "label": "Icon color", + "controlType": "COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "accentColor", + "helpText": "Changes the color of the recorder button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "DOCUMENT_VIEWER_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Preview document URL supports txt, pdf, docx, ppt, pptx, xlsx file formats, but base64 ppt/pptx are not supported.", + "propertyName": "docUrl", + "label": "Document link", + "controlType": "INPUT_TEXT", + "placeholderText": "URL / Base64", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "URL / Base64", + "example": "https://www.example.com", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [], + "features": null + }, + "BUTTON_GROUP_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Group Buttons", + "propertyName": "groupButtons", + "controlType": "GROUP_BUTTONS", + "label": "Buttons", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["childStylesheet"], + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "contentChildren": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "buttonType", + "label": "Button type", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets button type", + "options": [ + { + "label": "Simple", + "value": "SIMPLE" + }, + { + "label": "Menu", + "value": "MENU" + } + ], + "defaultValue": "SIMPLE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["SIMPLE", "MENU"] + } + } + }, + { + "dependencies": ["groupButtons"], + "helpText": "Menu items", + "propertyName": "menuItems", + "controlType": "MENU_ITEMS", + "label": "Menu items", + "isBindProperty": false, + "isTriggerProperty": false, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "contentChildren": [ + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label of a menu item", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of menu item", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "helpText": "Disables menu item", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the menu item is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "styleChildren": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for a menu item", + "controlType": "ICON_SELECT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of a menu item", + "controlType": "ICON_TABS", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "defaultValue": "left", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of a menu item", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconColor", + "helpText": "Sets the icon color of a menu item", + "label": "Icon Color", + "controlType": "COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "textColor", + "helpText": "Sets the text color of a menu item", + "label": "Text color", + "controlType": "COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false + } + ] + } + ] + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label of a menu item", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the button is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "styleChildren": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for a button", + "controlType": "ICON_SELECT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of a button", + "controlType": "ICON_TABS", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "defaultValue": "left", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "placement", + "label": "Placement", + "controlType": "DROP_DOWN", + "helpText": "Sets the space between items", + "options": [ + { + "label": "Start", + "value": "START" + }, + { + "label": "Between", + "value": "BETWEEN" + }, + { + "label": "Center", + "value": "CENTER" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["START", "BETWEEN", "CENTER"], + "default": "CENTER" + } + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "buttonColor", + "helpText": "Changes the color of the button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ] + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables clicks to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "buttonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the variant of the button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "defaultValue": "PRIMARY", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"], + "default": "PRIMARY" + } + } + }, + { + "helpText": "Controls widget orientation", + "propertyName": "orientation", + "label": "Orientation", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Horizontal", + "value": "horizontal" + }, + { + "label": "Vertical", + "value": "vertical" + } + ], + "defaultValue": "horizontal", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "MULTI_SELECT_TREE_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Allows users to select multiple options. Values must be unique", + "propertyName": "options", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter option value", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": false, + "validation": { + "type": "NESTED_OBJECT_ARRAY", + "params": { + "unique": ["value"], + "default": [], + "children": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "" + } + }, + { + "name": "children", + "type": "ARRAY", + "required": false, + "params": { + "children": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "" + } + } + ] + } + } + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Selects the option with value by default", + "propertyName": "defaultOptionValue", + "label": "Default selected values", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter option value", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['value1', 'value2']", + "autocompleteDataType": "ARRAY" + } + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current selection", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Add tooltip text here", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Mode to Display options", + "propertyName": "mode", + "label": "Mode", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Display only parent items", + "value": "SHOW_PARENT" + }, + { + "label": "Display only child items", + "value": "SHOW_CHILD" + }, + { + "label": "Display all items", + "value": "SHOW_ALL" + } + ], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "helpText": "Sets a Placeholder Text", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "allowClear", + "label": "Allow clearing value", + "helpText": "Enables Icon to clear all Selections", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "expandAll", + "label": "Expand all by default", + "helpText": "Expand All nested options", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a user selects an option", + "propertyName": "onOptionChange", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the dropdown opens", + "propertyName": "onDropdownOpen", + "label": "onDropdownOpen", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the dropdown closes", + "propertyName": "onDropdownClose", + "label": "onDropdownClose", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "defaultValue": "FIXED", + "active": true + } + } + }, + "SINGLE_SELECT_TREE_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Allows users to select multiple options. Values must be unique", + "propertyName": "options", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter option value", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": false, + "validation": { + "type": "NESTED_OBJECT_ARRAY", + "params": { + "unique": ["value"], + "default": [], + "children": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "" + } + }, + { + "name": "children", + "type": "ARRAY", + "required": false, + "params": { + "children": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "" + } + } + ] + } + } + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Selects the option with value by default", + "propertyName": "defaultOptionValue", + "label": "Default selected value", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter option value", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "value", + "example": "value1", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current selection", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Add tooltip text here", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets a Placeholder Text", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "allowClear", + "label": "Allow clearing value", + "helpText": "Enables Icon to clear all Selections", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "expandAll", + "label": "Expand all by default", + "helpText": "Expand All nested options", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a user selects an option", + "propertyName": "onOptionChange", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the dropdown opens", + "propertyName": "onDropdownOpen", + "label": "onDropdownOpen", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the dropdown closes", + "propertyName": "onDropdownClose", + "label": "onDropdownClose", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "defaultValue": "FIXED", + "active": true + } + } + }, + "SWITCH_GROUP_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Displays a list of options for a user to select. Values must be unique", + "propertyName": "options", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "children": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true, + "unique": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "", + "unique": true + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Selects values of the options checked by default. Enter comma separated values for multiple selected", + "propertyName": "defaultSelectedValues", + "label": "Default selected values", + "placeholderText": "Enter option values", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "default": [], + "children": { + "type": "TEXT" + }, + "strict": true + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isInline", + "helpText": "Whether switches are to be displayed inline horizontally", + "label": "Inline", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a switch state inside the group is changed", + "propertyName": "onSelectionChange", + "label": "onSelectionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "alignment", + "helpText": "Sets the alignment of the widget", + "label": "Alignment", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ] + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the background color of the widget", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "active": true + } + } + }, + "AUDIO_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "url", + "label": "URL", + "helpText": "Link to the audio file which should be played", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter url", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {}, + "expected": { + "type": "Audio URL", + "example": "https://assets.appsmith.com/widgets/birds_chirping.mp3", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "autoPlay", + "label": "Auto play", + "helpText": "Audio will be automatically played", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the audio is played", + "propertyName": "onPlay", + "label": "onPlay", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the audio is paused", + "propertyName": "onPause", + "label": "onPause", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the audio ends", + "propertyName": "onEnd", + "label": "onEnd", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [], + "features": null + }, + "PROGRESSBAR_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Sets progress bar type", + "propertyName": "barType", + "label": "Type", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Indeterminate", + "value": "indeterminate" + }, + { + "label": "Determinate", + "value": "determinate" + } + ], + "defaultValue": "indeterminate", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "helpText": "Provide progress value", + "propertyName": "progress", + "label": "Progress", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter progress value", + "isBindProperty": true, + "isTriggerProperty": false, + "defaultValue": 50, + "validation": { + "type": "NUMBER", + "params": { + "min": 0, + "max": 100, + "default": 50 + } + } + }, + { + "helpText": "Sets a number of steps", + "propertyName": "steps", + "label": "Number of steps", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter number of steps", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": 1, + "max": 100, + "default": 1, + "natural": true, + "passThroughOnZero": false + } + }, + "dependencies": ["barType"] + }, + { + "helpText": "Controls the visibility of progress value", + "propertyName": "showResult", + "label": "Show result", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Styles", + "children": [ + { + "helpText": "Controls the progress color of progress bar", + "propertyName": "fillColor", + "label": "Fill color", + "controlType": "COLOR_PICKER", + "defaultColor": "#03B365", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "CAMERA_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "mode", + "label": "Mode", + "controlType": "ICON_TABS", + "defaultValue": "CAMERA", + "fullWidth": true, + "helpText": "Whether a picture is taken or a video is recorded", + "options": [ + { + "label": "Image", + "value": "CAMERA" + }, + { + "label": "Video", + "value": "VIDEO" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["CAMERA", "VIDEO"] + } + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables clicks to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isMirrored", + "label": "Mirrored", + "helpText": "Show camera preview and get the screenshot mirrored", + "controlType": "SWITCH", + "dependencies": ["mode"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "defaultCamera", + "label": "Default mobile camera", + "helpText": "Default choice for mobile users. Not applicable for other devices", + "controlType": "DROP_DOWN", + "defaultValue": "environment", + "options": [ + { + "label": "Front (Selfie)", + "value": "user" + }, + { + "label": "Back (Rear)", + "value": "environment" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["user", "environment"], + "default": "environment" + } + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the image is captured", + "propertyName": "onImageCapture", + "label": "OnImageCapture", + "controlType": "ACTION_SELECTOR", + "dependencies": ["mode"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the image is saved", + "propertyName": "onImageSave", + "label": "onImageCapture", + "controlType": "ACTION_SELECTOR", + "dependencies": ["mode"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the video recording get started", + "propertyName": "onRecordingStart", + "label": "OnRecordingStart", + "controlType": "ACTION_SELECTOR", + "dependencies": ["mode"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the video recording stops", + "propertyName": "onRecordingStop", + "label": "OnRecordingStop", + "controlType": "ACTION_SELECTOR", + "dependencies": ["mode"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the video recording is saved", + "propertyName": "onVideoSave", + "label": "onVideoSave", + "controlType": "ACTION_SELECTOR", + "dependencies": ["mode"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "MAP_CHART_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Sets the map type", + "propertyName": "mapType", + "label": "Map Type", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "World", + "value": "WORLD" + }, + { + "label": "World with Antarctica", + "value": "WORLD_WITH_ANTARCTICA" + }, + { + "label": "Europe", + "value": "EUROPE" + }, + { + "label": "North America", + "value": "NORTH_AMERICA" + }, + { + "label": "South America", + "value": "SOURTH_AMERICA" + }, + { + "label": "Asia", + "value": "ASIA" + }, + { + "label": "Oceania", + "value": "OCEANIA" + }, + { + "label": "Africa", + "value": "AFRICA" + }, + { + "label": "USA", + "value": "USA" + } + ], + "isJSconvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "WORLD", + "WORLD_WITH_ANTARCTICA", + "EUROPE", + "NORTH_AMERICA", + "SOURTH_AMERICA", + "ASIA", + "OCEANIA", + "AFRICA", + "USA" + ] + } + } + }, + { + "helpText": "Populates the map with the data", + "propertyName": "data", + "label": "Chart Data", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": true, + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "id", + "type": "TEXT", + "params": { + "unique": true, + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "required": true + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Sets the map title", + "placeholderText": "Enter title", + "propertyName": "mapTitle", + "label": "Title", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "showLabels", + "label": "Show Labels", + "helpText": "Sets whether entity labels will be shown or hidden", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the map chart data point is clicked", + "propertyName": "onDataPointClick", + "label": "onDataPointClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Defines ranges for categorizing entities on a map based on their data values.", + "propertyName": "colorRange", + "label": "Color Range", + "controlType": "INPUT_TEXT", + "placeholderText": "Color range object", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": true, + "children": { + "type": "OBJECT", + "params": { + "allowedKeys": [ + { + "name": "minValue", + "type": "NUMBER", + "params": { + "required": true + } + }, + { + "name": "maxValue", + "type": "NUMBER", + "params": { + "required": true + } + }, + { + "name": "displayValue", + "type": "TEXT" + }, + { + "name": "code", + "type": "TEXT", + "params": { + "expected": { + "type": "Hex color (6-digit)", + "example": "#FF04D7", + "autocompleteDataType": "STRING" + } + } + }, + { + "name": "alpha", + "type": "NUMBER", + "params": { + "min": 0, + "max": 100 + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "SELECT_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Takes in an array of objects to display options. Bind data from an API using {{}}", + "propertyName": "sourceData", + "label": "Source Data", + "controlType": "ONE_CLICK_BINDING_CONTROL", + "controlConfig": { + "aliases": [ + { + "name": "label", + "isSearcheable": true, + "isRequired": true + }, + { + "name": "value", + "isRequired": true + } + ], + "sampleData": "[\n {\n \"name\": \"Blue\",\n \"code\": \"BLUE\"\n },\n {\n \"name\": \"Green\",\n \"code\": \"GREEN\"\n },\n {\n \"name\": \"Red\",\n \"code\": \"RED\"\n }\n]" + }, + "isJSConvertible": true, + "placeholderText": "[{ \"label\": \"label1\", \"value\": \"value1\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "children": { + "type": "OBJECT", + "params": { + "required": true + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Choose or set a field from source data as the display label", + "propertyName": "optionLabel", + "label": "Label key", + "controlType": "DROP_DOWN", + "customJSControl": "WRAPPED_CODE_EDITOR", + "controlConfig": { + "wrapperCode": { + "suffix": "))}}" + } + }, + "placeholderText": "", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "evaluatedDependencies": ["sourceData"], + "alwaysShowSelected": true, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "String or Array", + "example": "color | [\"blue\", \"green\"]", + "autocompleteDataType": "STRING" + } + }, + "dependentPaths": ["sourceData"] + } + }, + { + "helpText": "Choose or set a field from source data as the value", + "propertyName": "optionValue", + "label": "Value key", + "controlType": "DROP_DOWN", + "customJSControl": "WRAPPED_CODE_EDITOR", + "controlConfig": { + "wrapperCode": { + "suffix": "))}}" + } + }, + "placeholderText": "", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "evaluatedDependencies": ["sourceData"], + "alwaysShowSelected": true, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "String or Array", + "example": "color | [1, \"orange\"]", + "autocompleteDataType": "STRING" + } + }, + "dependentPaths": ["sourceData"] + } + }, + { + "helpText": "Selects the option with value by default", + "propertyName": "defaultOptionValue", + "label": "Default selected value", + "controlType": "WRAPPED_CODE_EDITOR", + "controlConfig": { + "wrapperCode": { + "prefix": "{{ ((options, serverSideFiltering) => ( " + } + }, + "placeholderText": "{ \"label\": \"label1\", \"value\": \"value1\" }", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "value1 or { \"label\": \"label1\", \"value\": \"value1\" }", + "example": "value1 | { \"label\": \"label1\", \"value\": \"value1\" }", + "autocompleteDataType": "STRING" + } + }, + "dependentPaths": ["serverSideFiltering", "options"] + }, + "dependencies": ["serverSideFiltering", "options"] + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + }, + { + "label": "Auto", + "value": "Auto" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Search & filters", + "children": [ + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables server side filtering of the data", + "propertyName": "serverSideFiltering", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Trigger an action on change of filterText", + "dependencies": ["serverSideFiltering"], + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current selection", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Add tooltip text here", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets a Placeholder Text", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a user selects an option", + "propertyName": "onOptionChange", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the dropdown opens", + "propertyName": "onDropdownOpen", + "label": "onDropdownOpen", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the dropdown closes", + "propertyName": "onDropdownClose", + "label": "onDropdownClose", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 4, + "defaultValue": "FIXED", + "active": true + } + } + }, + "MULTI_SELECT_WIDGET_V2": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Takes in an array of objects to display options. Bind data from an API using {{}}", + "propertyName": "sourceData", + "label": "Source Data", + "controlType": "ONE_CLICK_BINDING_CONTROL", + "controlConfig": { + "aliases": [ + { + "name": "label", + "isSearcheable": true, + "isRequired": true + }, + { + "name": "value", + "isRequired": true + } + ], + "sampleData": "[\n {\n \"name\": \"Blue\",\n \"code\": \"BLUE\"\n },\n {\n \"name\": \"Green\",\n \"code\": \"GREEN\"\n },\n {\n \"name\": \"Red\",\n \"code\": \"RED\"\n }\n]" + }, + "isJSConvertible": true, + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "children": { + "type": "OBJECT", + "params": { + "required": true + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Choose or set a field from source data as the display label", + "propertyName": "optionLabel", + "label": "Label key", + "controlType": "DROP_DOWN", + "customJSControl": "WRAPPED_CODE_EDITOR", + "controlConfig": { + "wrapperCode": { + "suffix": "))}}" + } + }, + "placeholderText": "", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "evaluatedDependencies": ["sourceData"], + "alwaysShowSelected": true, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "String or Array", + "example": "color | [\"blue\", \"green\"]", + "autocompleteDataType": "STRING" + } + } + } + }, + { + "helpText": "Choose or set a field from source data as the value", + "propertyName": "optionValue", + "label": "Value key", + "controlType": "DROP_DOWN", + "customJSControl": "WRAPPED_CODE_EDITOR", + "controlConfig": { + "wrapperCode": { + "suffix": "))}}" + } + }, + "placeholderText": "", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "evaluatedDependencies": ["sourceData"], + "alwaysShowSelected": true, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "String or Array", + "example": "color | [1, \"orange\"]", + "autocompleteDataType": "STRING" + } + }, + "dependentPaths": ["sourceData"] + } + }, + { + "helpText": "Selects the option(s) with value by default", + "propertyName": "defaultOptionValue", + "label": "Default selected values", + "controlType": "WRAPPED_CODE_EDITOR", + "controlConfig": { + "wrapperCode": { + "prefix": "{{ ((options, serverSideFiltering) => ( " + } + }, + "placeholderText": "[GREEN]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": " \"option1, option2\" | ['option1', 'option2'] | [{ \"label\": \"label1\", \"value\": \"value1\" }]", + "autocompleteDataType": "ARRAY" + } + }, + "dependentPaths": ["serverSideFiltering", "options"] + }, + "dependencies": ["serverSideFiltering", "options"] + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Search & filters", + "children": [ + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables server side filtering of the data", + "propertyName": "serverSideFiltering", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Trigger an action on change of filterText", + "dependencies": ["serverSideFiltering"], + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "Validations", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current selection", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Add tooltip text here", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets a Placeholder Text", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Search", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls the visibility of select all option in dropdown.", + "propertyName": "allowSelectAll", + "label": "Allow select all", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a user selects an option", + "propertyName": "onOptionChange", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the dropdown opens", + "propertyName": "onDropdownOpen", + "label": "onDropdownOpen", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the dropdown closes", + "propertyName": "onDropdownClose", + "label": "onDropdownClose", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "2xl", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3xl", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 4, + "defaultValue": "FIXED", + "active": true + } + } + }, + "INPUT_WIDGET_V2": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Changes the type of data captured in the input", + "propertyName": "inputType", + "label": "Data type", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Single-line text", + "value": "TEXT" + }, + { + "label": "Multi-line text", + "value": "MULTI_LINE_TEXT" + }, + { + "label": "Number", + "value": "NUMBER" + }, + { + "label": "Password", + "value": "PASSWORD" + }, + { + "label": "Email", + "value": "EMAIL" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["dynamicHeight"] + }, + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultText", + "label": "Default value", + "controlType": "INPUT_TEXT", + "placeholderText": "John Doe", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["inputType"] + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Sets maximum allowed text length", + "propertyName": "maxChars", + "label": "Max characters", + "controlType": "INPUT_TEXT", + "placeholderText": "255", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": 1, + "natural": true, + "passThroughOnZero": false + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Sets the minimum allowed value", + "propertyName": "minNum", + "label": "Min", + "controlType": "INPUT_TEXT", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + } + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Sets the maximum allowed value", + "propertyName": "maxNum", + "label": "Max", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + } + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Adds a validation to the input which displays an error on failure", + "propertyName": "regex", + "label": "Regex", + "controlType": "INPUT_TEXT", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + } + }, + { + "helpText": "Sets the input validity based on a JS expression", + "propertyName": "validation", + "label": "Valid", + "controlType": "INPUT_TEXT", + "placeholderText": "{{ Input1.text.length > 0 }}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + } + }, + { + "helpText": "The error message to display if the regex or valid property check fails", + "propertyName": "errorMessage", + "label": "Error message", + "controlType": "INPUT_TEXT", + "placeholderText": "Not a valid value!", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets a placeholder text for the input", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Show arrows to increase or decrease values", + "propertyName": "showStepArrows", + "label": "Show step arrows", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": false + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Disables input to this widget", + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Focus input automatically on load", + "propertyName": "autoFocus", + "label": "Auto focus", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + }, + { + "propertyName": "allowFormatting", + "label": "Enable formatting", + "helpText": "Formats the phone number as per the country selected", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the text is changed", + "propertyName": "onTextChanged", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the input field receives focus", + "propertyName": "onFocus", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the input field loses focus", + "propertyName": "onBlur", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "on submit (when the enter key is pressed)", + "propertyName": "onSubmit", + "label": "onSubmit", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "Clears the input value after submit", + "propertyName": "resetOnSubmit", + "label": "Reset on submit", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used in input field", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of input field", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["iconName"] + } + ] + }, + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "defaultValue": "FIXED", + "active": true + } + } + }, + "PHONE_INPUT_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultText", + "label": "Default value", + "controlType": "INPUT_TEXT", + "placeholderText": "(000) 000-0000", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string", + "example": "(000) 000-0000", + "autocompleteDataType": "STRING" + } + } + } + }, + { + "helpText": "Changes the country code", + "propertyName": "defaultDialCode", + "label": "Default country code", + "enableSearch": true, + "dropdownHeight": "156px", + "controlType": "DROP_DOWN", + "searchPlaceholderText": "Search by code or country name", + "options": [ + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "Afghanistan (+93)", + "value": "+93", + "id": "+93" + }, + { + "leftElement": "🇦🇽", + "searchText": "Aland Islands", + "label": "Aland Islands (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "Albania (+355)", + "value": "+355", + "id": "+355" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "Algeria (+213)", + "value": "+213", + "id": "+213" + }, + { + "leftElement": "🇦🇸", + "searchText": "AmericanSamoa", + "label": "AmericanSamoa (+1684)", + "value": "+1684", + "id": "+1684" + }, + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "Andorra (+376)", + "value": "+376", + "id": "+376" + }, + { + "leftElement": "🇦🇴", + "searchText": "Angola", + "label": "Angola (+244)", + "value": "+244", + "id": "+244" + }, + { + "leftElement": "🇦🇮", + "searchText": "Anguilla", + "label": "Anguilla (+1264)", + "value": "+1264", + "id": "+1264" + }, + { + "leftElement": "🇦🇶", + "searchText": "Antarctica", + "label": "Antarctica (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇦🇬", + "searchText": "Antigua and Barbuda", + "label": "Antigua and Barbuda (+1268)", + "value": "+1268", + "id": "+1268" + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "Argentina (+54)", + "value": "+54", + "id": "+54" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "Armenia (+374)", + "value": "+374", + "id": "+374" + }, + { + "leftElement": "🇦🇼", + "searchText": "Aruba", + "label": "Aruba (+297)", + "value": "+297", + "id": "+297" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "Australia (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "Austria (+43)", + "value": "+43", + "id": "+43" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "Azerbaijan (+994)", + "value": "+994", + "id": "+994" + }, + { + "leftElement": "🇧🇸", + "searchText": "Bahamas", + "label": "Bahamas (+1242)", + "value": "+1242", + "id": "+1242" + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "Bahrain (+973)", + "value": "+973", + "id": "+973" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "Bangladesh (+880)", + "value": "+880", + "id": "+880" + }, + { + "leftElement": "🇧🇧", + "searchText": "Barbados", + "label": "Barbados (+1246)", + "value": "+1246", + "id": "+1246" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "Belarus (+375)", + "value": "+375", + "id": "+375" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "Belgium (+32)", + "value": "+32", + "id": "+32" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "Belize (+501)", + "value": "+501", + "id": "+501" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "Benin (+229)", + "value": "+229", + "id": "+229" + }, + { + "leftElement": "🇧🇲", + "searchText": "Bermuda", + "label": "Bermuda (+1441)", + "value": "+1441", + "id": "+1441" + }, + { + "leftElement": "🇧🇹", + "searchText": "Bhutan", + "label": "Bhutan (+975)", + "value": "+975", + "id": "+975" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia, Plurinational State of", + "label": "Bolivia, Plurinational State of (+591)", + "value": "+591", + "id": "+591" + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "Bosnia and Herzegovina (+387)", + "value": "+387", + "id": "+387" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "Botswana (+267)", + "value": "+267", + "id": "+267" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "Brazil (+55)", + "value": "+55", + "id": "+55" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "British Indian Ocean Territory (+246)", + "value": "+246", + "id": "+246" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "Brunei Darussalam (+673)", + "value": "+673", + "id": "+673" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "Bulgaria (+359)", + "value": "+359", + "id": "+359" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "Burkina Faso (+226)", + "value": "+226", + "id": "+226" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "Burundi (+257)", + "value": "+257", + "id": "+257" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "Cambodia (+855)", + "value": "+855", + "id": "+855" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "Cameroon (+237)", + "value": "+237", + "id": "+237" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "Cape Verde (+238)", + "value": "+238", + "id": "+238" + }, + { + "leftElement": "🇰🇾", + "searchText": "Cayman Islands", + "label": "Cayman Islands (+ 345)", + "value": "+ 345", + "id": "+ 345" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "Central African Republic (+236)", + "value": "+236", + "id": "+236" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "Chad (+235)", + "value": "+235", + "id": "+235" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "Chile (+56)", + "value": "+56", + "id": "+56" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "China (+86)", + "value": "+86", + "id": "+86" + }, + { + "leftElement": "🇦🇺", + "searchText": "Christmas Island", + "label": "Christmas Island (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇺", + "searchText": "Cocos (Keeling) Islands", + "label": "Cocos (Keeling) Islands (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "Colombia (+57)", + "value": "+57", + "id": "+57" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "Comoros (+269)", + "value": "+269", + "id": "+269" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo", + "label": "Congo (+242)", + "value": "+242", + "id": "+242" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, The Democratic Republic of the Congo", + "label": "Congo, The Democratic Republic of the Congo (+243)", + "value": "+243", + "id": "+243" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "Cook Islands (+682)", + "value": "+682", + "id": "+682" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "Costa Rica (+506)", + "value": "+506", + "id": "+506" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "Cote d'Ivoire (+225)", + "value": "+225", + "id": "+225" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "Croatia (+385)", + "value": "+385", + "id": "+385" + }, + { + "leftElement": "🇨🇺", + "searchText": "Cuba", + "label": "Cuba (+53)", + "value": "+53", + "id": "+53" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "Cyprus (+357)", + "value": "+357", + "id": "+357" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "Czech Republic (+420)", + "value": "+420", + "id": "+420" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "Denmark (+45)", + "value": "+45", + "id": "+45" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "Djibouti (+253)", + "value": "+253", + "id": "+253" + }, + { + "leftElement": "🇩🇲", + "searchText": "Dominica", + "label": "Dominica (+1767)", + "value": "+1767", + "id": "+1767" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "Dominican Republic (+1849)", + "value": "+1849", + "id": "+1849" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "Ecuador (+593)", + "value": "+593", + "id": "+593" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "Egypt (+20)", + "value": "+20", + "id": "+20" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "El Salvador (+503)", + "value": "+503", + "id": "+503" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "Equatorial Guinea (+240)", + "value": "+240", + "id": "+240" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "Eritrea (+291)", + "value": "+291", + "id": "+291" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "Estonia (+372)", + "value": "+372", + "id": "+372" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "Ethiopia (+251)", + "value": "+251", + "id": "+251" + }, + { + "leftElement": "🇫🇰", + "searchText": "Falkland Islands (Malvinas)", + "label": "Falkland Islands (Malvinas) (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "Faroe Islands (+298)", + "value": "+298", + "id": "+298" + }, + { + "leftElement": "🇫🇯", + "searchText": "Fiji", + "label": "Fiji (+679)", + "value": "+679", + "id": "+679" + }, + { + "leftElement": "🇦🇽", + "searchText": "Finland", + "label": "Finland (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "France (+33)", + "value": "+33", + "id": "+33" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "French Guiana (+594)", + "value": "+594", + "id": "+594" + }, + { + "leftElement": "🇵🇫", + "searchText": "French Polynesia", + "label": "French Polynesia (+689)", + "value": "+689", + "id": "+689" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "Gabon (+241)", + "value": "+241", + "id": "+241" + }, + { + "leftElement": "🇬🇲", + "searchText": "Gambia", + "label": "Gambia (+220)", + "value": "+220", + "id": "+220" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "Georgia (+995)", + "value": "+995", + "id": "+995" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "Germany (+49)", + "value": "+49", + "id": "+49" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "Ghana (+233)", + "value": "+233", + "id": "+233" + }, + { + "leftElement": "🇬🇮", + "searchText": "Gibraltar", + "label": "Gibraltar (+350)", + "value": "+350", + "id": "+350" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "Greece (+30)", + "value": "+30", + "id": "+30" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "Greenland (+299)", + "value": "+299", + "id": "+299" + }, + { + "leftElement": "🇬🇩", + "searchText": "Grenada", + "label": "Grenada (+1473)", + "value": "+1473", + "id": "+1473" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "Guadeloupe (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "Guam (+1671)", + "value": "+1671", + "id": "+1671" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "Guatemala (+502)", + "value": "+502", + "id": "+502" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "Guernsey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "Guinea (+224)", + "value": "+224", + "id": "+224" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "Guinea-Bissau (+245)", + "value": "+245", + "id": "+245" + }, + { + "leftElement": "🇬🇾", + "searchText": "Guyana", + "label": "Guyana (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇭🇹", + "searchText": "Haiti", + "label": "Haiti (+509)", + "value": "+509", + "id": "+509" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "Holy See (Vatican City State) (+379)", + "value": "+379", + "id": "+379" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "Honduras (+504)", + "value": "+504", + "id": "+504" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "Hong Kong (+852)", + "value": "+852", + "id": "+852" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "Hungary (+36)", + "value": "+36", + "id": "+36" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "Iceland (+354)", + "value": "+354", + "id": "+354" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "India (+91)", + "value": "+91", + "id": "+91" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "Indonesia (+62)", + "value": "+62", + "id": "+62" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of Persian Gulf", + "label": "Iran, Islamic Republic of Persian Gulf (+98)", + "value": "+98", + "id": "+98" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "Iraq (+964)", + "value": "+964", + "id": "+964" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "Ireland (+353)", + "value": "+353", + "id": "+353" + }, + { + "leftElement": "🇬🇬", + "searchText": "Isle of Man", + "label": "Isle of Man (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "Israel (+972)", + "value": "+972", + "id": "+972" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "Italy (+39)", + "value": "+39", + "id": "+39" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "Jamaica (+1876)", + "value": "+1876", + "id": "+1876" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "Japan (+81)", + "value": "+81", + "id": "+81" + }, + { + "leftElement": "🇬🇬", + "searchText": "Jersey", + "label": "Jersey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "Jordan (+962)", + "value": "+962", + "id": "+962" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "Kazakhstan (+77)", + "value": "+77", + "id": "+77" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "Kenya (+254)", + "value": "+254", + "id": "+254" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "Kiribati (+686)", + "value": "+686", + "id": "+686" + }, + { + "leftElement": "🇰🇵", + "searchText": "Korea, Democratic People's Republic of Korea", + "label": "Korea, Democratic People's Republic of Korea (+850)", + "value": "+850", + "id": "+850" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of South Korea", + "label": "Korea, Republic of South Korea (+82)", + "value": "+82", + "id": "+82" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "Kuwait (+965)", + "value": "+965", + "id": "+965" + }, + { + "leftElement": "🇰🇬", + "searchText": "Kyrgyzstan", + "label": "Kyrgyzstan (+996)", + "value": "+996", + "id": "+996" + }, + { + "leftElement": "🇱🇦", + "searchText": "Laos", + "label": "Laos (+856)", + "value": "+856", + "id": "+856" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "Latvia (+371)", + "value": "+371", + "id": "+371" + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "Lebanon (+961)", + "value": "+961", + "id": "+961" + }, + { + "leftElement": "🇱🇸", + "searchText": "Lesotho", + "label": "Lesotho (+266)", + "value": "+266", + "id": "+266" + }, + { + "leftElement": "🇱🇷", + "searchText": "Liberia", + "label": "Liberia (+231)", + "value": "+231", + "id": "+231" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libyan Arab Jamahiriya", + "label": "Libyan Arab Jamahiriya (+218)", + "value": "+218", + "id": "+218" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "Liechtenstein (+423)", + "value": "+423", + "id": "+423" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "Lithuania (+370)", + "value": "+370", + "id": "+370" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "Luxembourg (+352)", + "value": "+352", + "id": "+352" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "Macao (+853)", + "value": "+853", + "id": "+853" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia", + "label": "Macedonia (+389)", + "value": "+389", + "id": "+389" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "Madagascar (+261)", + "value": "+261", + "id": "+261" + }, + { + "leftElement": "🇲🇼", + "searchText": "Malawi", + "label": "Malawi (+265)", + "value": "+265", + "id": "+265" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "Malaysia (+60)", + "value": "+60", + "id": "+60" + }, + { + "leftElement": "🇲🇻", + "searchText": "Maldives", + "label": "Maldives (+960)", + "value": "+960", + "id": "+960" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "Mali (+223)", + "value": "+223", + "id": "+223" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "Malta (+356)", + "value": "+356", + "id": "+356" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "Marshall Islands (+692)", + "value": "+692", + "id": "+692" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "Martinique (+596)", + "value": "+596", + "id": "+596" + }, + { + "leftElement": "🇲🇷", + "searchText": "Mauritania", + "label": "Mauritania (+222)", + "value": "+222", + "id": "+222" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "Mauritius (+230)", + "value": "+230", + "id": "+230" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "Mayotte (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "Mexico (+52)", + "value": "+52", + "id": "+52" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of Micronesia", + "label": "Micronesia, Federated States of Micronesia (+691)", + "value": "+691", + "id": "+691" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova", + "label": "Moldova (+373)", + "value": "+373", + "id": "+373" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "Monaco (+377)", + "value": "+377", + "id": "+377" + }, + { + "leftElement": "🇲🇳", + "searchText": "Mongolia", + "label": "Mongolia (+976)", + "value": "+976", + "id": "+976" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "Montenegro (+382)", + "value": "+382", + "id": "+382" + }, + { + "leftElement": "🇲🇸", + "searchText": "Montserrat", + "label": "Montserrat (+1664)", + "value": "+1664", + "id": "+1664" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "Morocco (+212)", + "value": "+212", + "id": "+212" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "Mozambique (+258)", + "value": "+258", + "id": "+258" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "Myanmar (+95)", + "value": "+95", + "id": "+95" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "Namibia (+264)", + "value": "+264", + "id": "+264" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "Nauru (+674)", + "value": "+674", + "id": "+674" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "Nepal (+977)", + "value": "+977", + "id": "+977" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "Netherlands (+31)", + "value": "+31", + "id": "+31" + }, + { + "leftElement": "🇦🇳", + "searchText": "Netherlands Antilles", + "label": "Netherlands Antilles (+599)", + "value": "+599", + "id": "+599" + }, + { + "leftElement": "🇳🇨", + "searchText": "New Caledonia", + "label": "New Caledonia (+687)", + "value": "+687", + "id": "+687" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "New Zealand (+64)", + "value": "+64", + "id": "+64" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "Nicaragua (+505)", + "value": "+505", + "id": "+505" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "Niger (+227)", + "value": "+227", + "id": "+227" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "Nigeria (+234)", + "value": "+234", + "id": "+234" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "Niue (+683)", + "value": "+683", + "id": "+683" + }, + { + "leftElement": "🇦🇶", + "searchText": "Norfolk Island", + "label": "Norfolk Island (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "Northern Mariana Islands (+1670)", + "value": "+1670", + "id": "+1670" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "Norway (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "Oman (+968)", + "value": "+968", + "id": "+968" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "Pakistan (+92)", + "value": "+92", + "id": "+92" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "Palau (+680)", + "value": "+680", + "id": "+680" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestinian Territory, Occupied", + "label": "Palestinian Territory, Occupied (+970)", + "value": "+970", + "id": "+970" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "Panama (+507)", + "value": "+507", + "id": "+507" + }, + { + "leftElement": "🇵🇬", + "searchText": "Papua New Guinea", + "label": "Papua New Guinea (+675)", + "value": "+675", + "id": "+675" + }, + { + "leftElement": "🇬🇾", + "searchText": "Paraguay", + "label": "Paraguay (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "Peru (+51)", + "value": "+51", + "id": "+51" + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "Philippines (+63)", + "value": "+63", + "id": "+63" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "Pitcairn (+872)", + "value": "+872", + "id": "+872" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "Poland (+48)", + "value": "+48", + "id": "+48" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "Portugal (+351)", + "value": "+351", + "id": "+351" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "Puerto Rico (+1939)", + "value": "+1939", + "id": "+1939" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "Qatar (+974)", + "value": "+974", + "id": "+974" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "Romania (+40)", + "value": "+40", + "id": "+40" + }, + { + "leftElement": "🇷🇺", + "searchText": "Russia", + "label": "Russia (+7)", + "value": "+7", + "id": "+7" + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "Rwanda (+250)", + "value": "+250", + "id": "+250" + }, + { + "leftElement": "🇾🇹", + "searchText": "Reunion", + "label": "Reunion (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Barthelemy", + "label": "Saint Barthelemy (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇸🇭", + "searchText": "Saint Helena, Ascension and Tristan Da Cunha", + "label": "Saint Helena, Ascension and Tristan Da Cunha (+290)", + "value": "+290", + "id": "+290" + }, + { + "leftElement": "🇰🇳", + "searchText": "Saint Kitts and Nevis", + "label": "Saint Kitts and Nevis (+1869)", + "value": "+1869", + "id": "+1869" + }, + { + "leftElement": "🇱🇨", + "searchText": "Saint Lucia", + "label": "Saint Lucia (+1758)", + "value": "+1758", + "id": "+1758" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Martin", + "label": "Saint Martin (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "Saint Pierre and Miquelon (+508)", + "value": "+508", + "id": "+508" + }, + { + "leftElement": "🇻🇨", + "searchText": "Saint Vincent and the Grenadines", + "label": "Saint Vincent and the Grenadines (+1784)", + "value": "+1784", + "id": "+1784" + }, + { + "leftElement": "🇼🇸", + "searchText": "Samoa", + "label": "Samoa (+685)", + "value": "+685", + "id": "+685" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "San Marino (+378)", + "value": "+378", + "id": "+378" + }, + { + "leftElement": "🇸🇹", + "searchText": "Sao Tome and Principe", + "label": "Sao Tome and Principe (+239)", + "value": "+239", + "id": "+239" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "Saudi Arabia (+966)", + "value": "+966", + "id": "+966" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "Senegal (+221)", + "value": "+221", + "id": "+221" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "Serbia (+381)", + "value": "+381", + "id": "+381" + }, + { + "leftElement": "🇸🇨", + "searchText": "Seychelles", + "label": "Seychelles (+248)", + "value": "+248", + "id": "+248" + }, + { + "leftElement": "🇸🇱", + "searchText": "Sierra Leone", + "label": "Sierra Leone (+232)", + "value": "+232", + "id": "+232" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "Singapore (+65)", + "value": "+65", + "id": "+65" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "Slovakia (+421)", + "value": "+421", + "id": "+421" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "Slovenia (+386)", + "value": "+386", + "id": "+386" + }, + { + "leftElement": "🇸🇧", + "searchText": "Solomon Islands", + "label": "Solomon Islands (+677)", + "value": "+677", + "id": "+677" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "Somalia (+252)", + "value": "+252", + "id": "+252" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "South Africa (+27)", + "value": "+27", + "id": "+27" + }, + { + "leftElement": "🇸🇸", + "searchText": "South Sudan", + "label": "South Sudan (+211)", + "value": "+211", + "id": "+211" + }, + { + "leftElement": "🇫🇰", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "South Georgia and the South Sandwich Islands (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "Spain (+34)", + "value": "+34", + "id": "+34" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "Sri Lanka (+94)", + "value": "+94", + "id": "+94" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "Sudan (+249)", + "value": "+249", + "id": "+249" + }, + { + "leftElement": "🇸🇷", + "searchText": "Suriname", + "label": "Suriname (+597)", + "value": "+597", + "id": "+597" + }, + { + "leftElement": "🇳🇴", + "searchText": "Svalbard and Jan Mayen", + "label": "Svalbard and Jan Mayen (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇸🇿", + "searchText": "Swaziland", + "label": "Swaziland (+268)", + "value": "+268", + "id": "+268" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "Sweden (+46)", + "value": "+46", + "id": "+46" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "Switzerland (+41)", + "value": "+41", + "id": "+41" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "Syrian Arab Republic (+963)", + "value": "+963", + "id": "+963" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan", + "label": "Taiwan (+886)", + "value": "+886", + "id": "+886" + }, + { + "leftElement": "🇹🇯", + "searchText": "Tajikistan", + "label": "Tajikistan (+992)", + "value": "+992", + "id": "+992" + }, + { + "leftElement": "🇹🇿", + "searchText": "Tanzania, United Republic of Tanzania", + "label": "Tanzania, United Republic of Tanzania (+255)", + "value": "+255", + "id": "+255" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "Thailand (+66)", + "value": "+66", + "id": "+66" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "Timor-Leste (+670)", + "value": "+670", + "id": "+670" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "Togo (+228)", + "value": "+228", + "id": "+228" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "Tokelau (+690)", + "value": "+690", + "id": "+690" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "Tonga (+676)", + "value": "+676", + "id": "+676" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "Trinidad and Tobago (+1868)", + "value": "+1868", + "id": "+1868" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "Tunisia (+216)", + "value": "+216", + "id": "+216" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "Turkey (+90)", + "value": "+90", + "id": "+90" + }, + { + "leftElement": "🇹🇲", + "searchText": "Turkmenistan", + "label": "Turkmenistan (+993)", + "value": "+993", + "id": "+993" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "Turks and Caicos Islands (+1649)", + "value": "+1649", + "id": "+1649" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "Tuvalu (+688)", + "value": "+688", + "id": "+688" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "Uganda (+256)", + "value": "+256", + "id": "+256" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "Ukraine (+380)", + "value": "+380", + "id": "+380" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "United Arab Emirates (+971)", + "value": "+971", + "id": "+971" + }, + { + "leftElement": "🇬🇬", + "searchText": "United Kingdom", + "label": "United Kingdom (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States / Canada", + "label": "United States / Canada (+1)", + "value": "+1", + "id": "+1" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "Uruguay (+598)", + "value": "+598", + "id": "+598" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "Uzbekistan (+998)", + "value": "+998", + "id": "+998" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "Vanuatu (+678)", + "value": "+678", + "id": "+678" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela, Bolivarian Republic of Venezuela", + "label": "Venezuela, Bolivarian Republic of Venezuela (+58)", + "value": "+58", + "id": "+58" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "Vietnam (+84)", + "value": "+84", + "id": "+84" + }, + { + "leftElement": "🇻🇬", + "searchText": "Virgin Islands, British", + "label": "Virgin Islands, British (+1284)", + "value": "+1284", + "id": "+1284" + }, + { + "leftElement": "🇻🇮", + "searchText": "Virgin Islands, U.S.", + "label": "Virgin Islands, U.S. (+1340)", + "value": "+1340", + "id": "+1340" + }, + { + "leftElement": "🇼🇫", + "searchText": "Wallis and Futuna", + "label": "Wallis and Futuna (+681)", + "value": "+681", + "id": "+681" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "Yemen (+967)", + "value": "+967", + "id": "+967" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "Zambia (+260)", + "value": "+260", + "id": "+260" + }, + { + "leftElement": "🇿🇼", + "searchText": "Zimbabwe", + "label": "Zimbabwe (+263)", + "value": "+263", + "id": "+263" + } + ], + "virtual": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "allowDialCodeChange", + "label": "Change country code", + "helpText": "Search by country", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Adds a validation to the input which displays an error on failure", + "propertyName": "regex", + "label": "Regex", + "controlType": "INPUT_TEXT", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + } + }, + { + "helpText": "Sets the input validity based on a JS expression", + "propertyName": "validation", + "label": "Valid", + "controlType": "INPUT_TEXT", + "placeholderText": "{{ Input1.text.length > 0 }}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + } + }, + { + "helpText": "The error message to display if the regex or valid property check fails", + "propertyName": "errorMessage", + "label": "Error message", + "controlType": "INPUT_TEXT", + "placeholderText": "Not a valid value!", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets a placeholder text for the input", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Show arrows to increase or decrease values", + "propertyName": "showStepArrows", + "label": "Show step arrows", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": false + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Disables input to this widget", + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Focus input automatically on load", + "propertyName": "autoFocus", + "label": "Auto focus", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + }, + { + "propertyName": "allowFormatting", + "label": "Enable formatting", + "helpText": "Formats the phone number as per the country selected", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the text is changed", + "propertyName": "onTextChanged", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the input field receives focus", + "propertyName": "onFocus", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the input field loses focus", + "propertyName": "onBlur", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "on submit (when the enter key is pressed)", + "propertyName": "onSubmit", + "label": "onSubmit", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "Clears the input value after submit", + "propertyName": "resetOnSubmit", + "label": "Reset on submit", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "defaultValue": "FIXED", + "active": true + } + } + }, + "CURRENCY_INPUT_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultText", + "label": "Default value", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["decimals"] + }, + { + "helpText": "Changes the type of currency", + "propertyName": "defaultCurrencyCode", + "label": "Currency", + "enableSearch": true, + "dropdownHeight": "156px", + "controlType": "DROP_DOWN", + "searchPlaceholderText": "Search by code or name", + "options": [ + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "AED - United Arab Emirates Dirham", + "value": "AED", + "id": "د.إ.‏" + }, + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "AFN - Afghan Afghani", + "value": "AFN", + "id": "؋" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "ALL - Albanian Lek", + "value": "ALL", + "id": "Lek" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "AMD - Armenian Dram", + "value": "AMD", + "id": "դր." + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "ARS - Argentine Peso", + "value": "ARS", + "id": "$" + }, + { + "leftElement": "🇦🇸", + "searchText": "American Samoa", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇦🇽", + "searchText": "Alland Islands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "AZN - Azerbaijani Manat", + "value": "AZN", + "id": "ман." + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "BAM - Bosnia-Herzegovina Convertible Mark", + "value": "BAM", + "id": "KM" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "BDT - Bangladeshi Taka", + "value": "BDT", + "id": "৳" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "BGN - Bulgarian Lev", + "value": "BGN", + "id": "лв." + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "BHD - Bahraini Dinar", + "value": "BHD", + "id": "د.ب.‏" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "BIF - Burundian Franc", + "value": "BIF", + "id": "FBu" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇱", + "searchText": "Saint Barthelemy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "BND - Brunei Dollar", + "value": "BND", + "id": "$" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia", + "label": "BOB - Bolivian Boliviano", + "value": "BOB", + "id": "Bs" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "BRL - Brazilian Real", + "value": "BRL", + "id": "R$" + }, + { + "leftElement": "🇧🇻", + "searchText": "Bouvet Island", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "BWP - Botswanan Pula", + "value": "BWP", + "id": "P" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "BYR - Belarusian Ruble", + "value": "BYR", + "id": "BYR" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "BZD - Belize Dollar", + "value": "BZD", + "id": "$" + }, + { + "leftElement": "🇨🇦", + "searchText": "Canada", + "label": "CAD - Canadian Dollar", + "value": "CAD", + "id": "$" + }, + { + "leftElement": "🇨🇨", + "searchText": "Cocos (Keeling) Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, Democratic Republic of the", + "label": "CDF - Congolese Franc", + "value": "CDF", + "id": "FrCD" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo, Republic of the", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "CLP - Chilean Peso", + "value": "CLP", + "id": "$" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "CNY - Chinese Yuan", + "value": "CNY", + "id": "CN¥" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "COP - Colombian Peso", + "value": "COP", + "id": "$" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "CRC - Costa Rican Colón", + "value": "CRC", + "id": "₡" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "CVE - Cape Verdean Escudo", + "value": "CVE", + "id": "CV$" + }, + { + "leftElement": "🇨🇽", + "searchText": "Christmas Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "CZK - Czech Republic Koruna", + "value": "CZK", + "id": "Kč" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "DJF - Djiboutian Franc", + "value": "DJF", + "id": "Fdj" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "DOP - Dominican Peso", + "value": "DOP", + "id": "RD$" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "DZD - Algerian Dinar", + "value": "DZD", + "id": "د.ج.‏" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "EGP - Egyptian Pound", + "value": "EGP", + "id": "ج.م.‏" + }, + { + "leftElement": "🇪🇭", + "searchText": "Western Sahara", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "ERN - Eritrean Nakfa", + "value": "ERN", + "id": "Nfk" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "ETB - Ethiopian Birr", + "value": "ETB", + "id": "Br" + }, + { + "leftElement": "🇫🇮", + "searchText": "Finland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇧", + "searchText": "United Kingdom", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "GEL - Georgian Lari", + "value": "GEL", + "id": "GEL" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "GHS - Ghanaian Cedi", + "value": "GHS", + "id": "GH₵" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "GNF - Guinean Franc", + "value": "GNF", + "id": "FG" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇸", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "GTQ - Guatemalan Quetzal", + "value": "GTQ", + "id": "Q" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "HKD - Hong Kong Dollar", + "value": "HKD", + "id": "$" + }, + { + "leftElement": "🇭🇲", + "searchText": "Heard Island and McDonald Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "HNL - Honduran Lempira", + "value": "HNL", + "id": "L" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "HRK - Croatian Kuna", + "value": "HRK", + "id": "kn" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "HUF - Hungarian Forint", + "value": "HUF", + "id": "Ft" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "IDR - Indonesian Rupiah", + "value": "IDR", + "id": "Rp" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇮🇲", + "searchText": "Isle of Man", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "INR - Indian Rupee", + "value": "INR", + "id": "₹" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "IQD - Iraqi Dinar", + "value": "IQD", + "id": "د.ع.‏" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of", + "label": "IRR - Iranian Rial", + "value": "IRR", + "id": "﷼" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "ISK - Icelandic Króna", + "value": "ISK", + "id": "kr" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇯🇪", + "searchText": "Jersey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "JMD - Jamaican Dollar", + "value": "JMD", + "id": "$" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "JOD - Jordanian Dinar", + "value": "JOD", + "id": "د.أ.‏" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "JPY - Japanese Yen", + "value": "JPY", + "id": "¥" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "KES - Kenyan Shilling", + "value": "KES", + "id": "Ksh" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "KHR - Cambodian Riel", + "value": "KHR", + "id": "៛" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "KMF - Comorian Franc", + "value": "KMF", + "id": "FC" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of", + "label": "KRW - South Korean Won", + "value": "KRW", + "id": "₩" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "KWD - Kuwaiti Dinar", + "value": "KWD", + "id": "د.ك.‏" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "KZT - Kazakhstani Tenge", + "value": "KZT", + "id": "тңг." + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "LBP - Lebanese Pound", + "value": "LBP", + "id": "ل.ل.‏" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "LKR - Sri Lankan Rupee", + "value": "LKR", + "id": "SL Re" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "LTL - Lithuanian Litas", + "value": "LTL", + "id": "Lt" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libya", + "label": "LYD - Libyan Dinar", + "value": "LYD", + "id": "د.ل.‏" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova, Republic of", + "label": "MDL - Moldovan Leu", + "value": "MDL", + "id": "MDL" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇫", + "searchText": "Saint Martin (French part)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "MGA - Malagasy Ariary", + "value": "MGA", + "id": "MGA" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia, the Former Yugoslav Republic of", + "label": "MKD - Macedonian Denar", + "value": "MKD", + "id": "MKD" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "MMK - Myanma Kyat", + "value": "MMK", + "id": "K" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "MOP - Macanese Pataca", + "value": "MOP", + "id": "MOP$" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "MUR - Mauritian Rupee", + "value": "MUR", + "id": "MURs" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "MXN - Mexican Peso", + "value": "MXN", + "id": "$" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "MYR - Malaysian Ringgit", + "value": "MYR", + "id": "RM" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "MZN - Mozambican Metical", + "value": "MZN", + "id": "MTn" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "NAD - Namibian Dollar", + "value": "NAD", + "id": "N$" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇳🇫", + "searchText": "Norfolk Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "NGN - Nigerian Naira", + "value": "NGN", + "id": "₦" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "NIO - Nicaraguan Córdoba", + "value": "NIO", + "id": "C$" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "NPR - Nepalese Rupee", + "value": "NPR", + "id": "नेरू" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "OMR - Omani Rial", + "value": "OMR", + "id": "ر.ع.‏" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "PAB - Panamanian Balboa", + "value": "PAB", + "id": "B/." + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "PEN - Peruvian Nuevo Sol", + "value": "PEN", + "id": "S/." + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "PHP - Philippine Peso", + "value": "PHP", + "id": "₱" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "PKR - Pakistani Rupee", + "value": "PKR", + "id": "₨" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "PLN - Polish Zloty", + "value": "PLN", + "id": "zł" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestine, State of", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇾", + "searchText": "Paraguay", + "label": "PYG - Paraguayan Guarani", + "value": "PYG", + "id": "₲" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "QAR - Qatari Rial", + "value": "QAR", + "id": "ر.ق.‏" + }, + { + "leftElement": "🇷🇪", + "searchText": "Reunion", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "RON - Romanian Leu", + "value": "RON", + "id": "RON" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "RSD - Serbian Dinar", + "value": "RSD", + "id": "дин." + }, + { + "leftElement": "🇷🇺", + "searchText": "Russian Federation", + "label": "RUB - Russian Ruble", + "value": "RUB", + "id": "руб." + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "RWF - Rwandan Franc", + "value": "RWF", + "id": "FR" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "SAR - Saudi Riyal", + "value": "SAR", + "id": "ر.س.‏" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "SDG - Sudanese Pound", + "value": "SDG", + "id": "SDG" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "SEK - Swedish Krona", + "value": "SEK", + "id": "kr" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "SGD - Singapore Dollar", + "value": "SGD", + "id": "$" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇯", + "searchText": "Svalbard and Jan Mayen", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "SOS - Somali Shilling", + "value": "SOS", + "id": "Ssh" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "SYP - Syrian Pound", + "value": "SYP", + "id": "ل.س.‏" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇹🇫", + "searchText": "French Southern Territories", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "THB - Thai Baht", + "value": "THB", + "id": "฿" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "TND - Tunisian Dinar", + "value": "TND", + "id": "د.ت.‏" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "TOP - Tongan Paʻanga", + "value": "TOP", + "id": "T$" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "TRY - Turkish Lira", + "value": "TRY", + "id": "TL" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "TTD - Trinidad and Tobago Dollar", + "value": "TTD", + "id": "$" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan, Province of China", + "label": "TWD - New Taiwan Dollar", + "value": "TWD", + "id": "NT$" + }, + { + "leftElement": "🇹🇿", + "searchText": "United Republic of Tanzania", + "label": "TZS - Tanzanian Shilling", + "value": "TZS", + "id": "TSh" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "UAH - Ukrainian Hryvnia", + "value": "UAH", + "id": "₴" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "UGX - Ugandan Shilling", + "value": "UGX", + "id": "USh" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "UYU - Uruguayan Peso", + "value": "UYU", + "id": "$" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "UZS - Uzbekistan Som", + "value": "UZS", + "id": "UZS" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela", + "label": "VEF - Venezuelan Bolívar", + "value": "VEF", + "id": "Bs.F." + }, + { + "leftElement": "🇻🇬", + "searchText": "British Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇮", + "searchText": "US Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "VND - Vietnamese Dong", + "value": "VND", + "id": "₫" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "VUV - Vanuatu Vatu", + "value": "VUV", + "id": "VT" + }, + { + "leftElement": "🇽🇰", + "searchText": "Kosovo", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "YER - Yemeni Rial", + "value": "YER", + "id": "ر.ي.‏" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "ZAR - South African Rand", + "value": "ZAR", + "id": "R" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "ZMK - Zambian Kwacha", + "value": "ZMK", + "id": "ZK" + } + ], + "virtual": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "allowCurrencyChange", + "label": "Allow currency change", + "helpText": "Search by currency or country", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "No. of decimals in currency input", + "propertyName": "decimals", + "label": "Decimals allowed", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "0", + "value": 0 + }, + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": 0, + "max": 2 + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Auto", + "value": "Auto" + }, + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Adds a validation to the input which displays an error on failure", + "propertyName": "regex", + "label": "Regex", + "controlType": "INPUT_TEXT", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + } + }, + { + "helpText": "Sets the input validity based on a JS expression", + "propertyName": "validation", + "label": "Valid", + "controlType": "INPUT_TEXT", + "placeholderText": "{{ Input1.text.length > 0 }}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + } + }, + { + "helpText": "The error message to display if the regex or valid property check fails", + "propertyName": "errorMessage", + "label": "Error message", + "controlType": "INPUT_TEXT", + "placeholderText": "Not a valid value!", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets a placeholder text for the input", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Show arrows to increase or decrease values", + "propertyName": "showStepArrows", + "label": "Show step arrows", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": false + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Disables input to this widget", + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Focus input automatically on load", + "propertyName": "autoFocus", + "label": "Auto focus", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + }, + { + "propertyName": "allowFormatting", + "label": "Enable formatting", + "helpText": "Formats the phone number as per the country selected", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the text is changed", + "propertyName": "onTextChanged", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the input field receives focus", + "propertyName": "onFocus", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the input field loses focus", + "propertyName": "onBlur", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "on submit (when the enter key is pressed)", + "propertyName": "onSubmit", + "label": "onSubmit", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "Clears the input value after submit", + "propertyName": "resetOnSubmit", + "label": "Reset on submit", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "defaultValue": "FIXED", + "active": true + } + } + }, + "JSON_FORM_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "sourceData", + "helpText": "Input JSON sample for default form layout", + "label": "Source data", + "controlType": "INPUT_TEXT", + "placeholderText": "{ \"name\": \"John\", \"age\": 24 }", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "JSON", + "example": "{ \"name\": \"John Doe\", \"age\": 29 }", + "autocompleteDataType": "OBJECT" + }, + "fnString": "function sourceDataValidationFn(value, props, _) {\n if (value === \"\") {\n return {\n isValid: false,\n parsed: {},\n messages: [{\n name: \"ValidationError\",\n message: \"Source data cannot be empty.\"\n }]\n };\n }\n if (_.isNumber(value) || _.isBoolean(value)) {\n return {\n isValid: false,\n parsed: {},\n messages: [{\n name: \"ValidationError\",\n message: \"Source data cannot be \".concat(value)\n }]\n };\n }\n if (_.isNil(value)) {\n return {\n isValid: true,\n parsed: {}\n };\n }\n if (_.isPlainObject(value)) {\n return {\n isValid: true,\n parsed: value\n };\n }\n try {\n return {\n isValid: true,\n parsed: JSON.parse(value)\n };\n } catch (e) {\n return {\n isValid: false,\n parsed: {},\n messages: [e]\n };\n }\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "id": "pktojgy44v" + }, + { + "propertyName": "autoGenerateForm", + "helpText": "Caution: When auto generate form is enabled, the form fields would regenerate if there is any change of source data (keys change or value type changes eg from string to number). If disabled then the fields and their configuration won't change with the change of source data.", + "label": "Auto generate form", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "customJSControl": "INPUT_TEXT", + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "5tgyu2m5ge" + }, + { + "propertyName": "generateFormButton", + "label": "", + "controlType": "BUTTON", + "isJSConvertible": false, + "isBindProperty": false, + "buttonLabel": "Generate form", + "isTriggerProperty": false, + "dependencies": [ + "autoGenerateForm", + "schema", + "fieldLimitExceeded", + "childStylesheet", + "dynamicPropertyPathList" + ], + "evaluatedDependencies": ["sourceData"], + "id": "3abowfhxsp" + }, + { + "propertyName": "schema.__root_schema__.children", + "helpText": "Field configuration", + "label": "Field configuration", + "controlType": "FIELD_CONFIGURATION", + "isBindProperty": false, + "isTriggerProperty": false, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "identifier", + "contentChildren": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "fieldType", + "label": "Field Type", + "helpText": "Type of the widget to be used corresponding to the field", + "controlType": "DROP_DOWN", + "isBindProperty": false, + "isTriggerProperty": false, + "options": [ + { + "label": "Array", + "value": "Array" + }, + { + "label": "Checkbox", + "value": "Checkbox" + }, + { + "label": "Currency Input", + "value": "Currency Input" + }, + { + "label": "Datepicker", + "value": "Datepicker" + }, + { + "label": "Email Input", + "value": "Email Input" + }, + { + "label": "Multiselect", + "value": "Multiselect" + }, + { + "label": "Multiline Text Input", + "value": "Multiline Text Input" + }, + { + "label": "Number Input", + "value": "Number Input" + }, + { + "label": "Object", + "value": "Object" + }, + { + "label": "Password Input", + "value": "Password Input" + }, + { + "label": "Phone Number Input", + "value": "Phone Number Input" + }, + { + "label": "Radio Group", + "value": "Radio Group" + }, + { + "label": "Select", + "value": "Select" + }, + { + "label": "Switch", + "value": "Switch" + }, + { + "label": "Text Input", + "value": "Text Input" + } + ], + "dependencies": [ + "schema", + "childStylesheet", + "dynamicBindingPathList" + ], + "id": "4k7sd8nc5f" + }, + { + "propertyName": "accessor", + "helpText": "Sets the property name of the field which can be used to access the value in formData and fieldState.", + "label": "Property Name", + "controlType": "INPUT_TEXT", + "placeholderText": "name", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "unique string", + "example": "firstName | last_name | age14", + "autocompleteDataType": "STRING" + }, + "fnString": "function accessorValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var grandParentPath = propertyPathChunks.slice(0, -2).join(\".\");\n var schemaItemIdentifier = propertyPathChunks.slice(-2)[0]; // ['schema', '__root_field__', 'children', 'age', 'name'] -> age\n var schema = lodash.cloneDeep(lodash.get(props, grandParentPath));\n var RESTRICTED_KEYS = [\"__array_item__\", \"__root_schema__\"];\n var currentSchemaItem = lodash.cloneDeep(schema[schemaItemIdentifier]);\n // Remove the current edited schemaItem from schema so it doesn't\n // get picked in the existing keys list\n delete schema[schemaItemIdentifier];\n\n // If the field is not _id (mongo id) then it shouldn't be allowed\n if (currentSchemaItem.originalIdentifier !== \"_id\") {\n RESTRICTED_KEYS.push(\"_id\");\n }\n if (value === \"\") {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"ValidationError\",\n message: \"Property Name cannot be empty\"\n }]\n };\n }\n var existingKeys = (Object.values(schema) || []).map(\n // @ts-expect-error: Types are not available\n function (schemaItem) {\n return schemaItem.name;\n });\n if (existingKeys.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"Property name already in use.\"\n }]\n };\n }\n if (RESTRICTED_KEYS.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"This is a restricted Property Name\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "jiqycfk515" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema", "sourceData"], + "id": "n1ssipf1c6" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets the default text of the field. The text is updated if the default text changes", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "John Doe", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "5dy5xhr2r0" + }, + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "(000) 000-0000", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string", + "example": "(000) 000-0000", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "ac9b0hxif9" + }, + { + "propertyName": "dialCode", + "helpText": "Changes the country code", + "label": "Default country code", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or country name", + "options": [ + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "Afghanistan (+93)", + "value": "+93", + "id": "+93" + }, + { + "leftElement": "🇦🇽", + "searchText": "Aland Islands", + "label": "Aland Islands (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "Albania (+355)", + "value": "+355", + "id": "+355" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "Algeria (+213)", + "value": "+213", + "id": "+213" + }, + { + "leftElement": "🇦🇸", + "searchText": "AmericanSamoa", + "label": "AmericanSamoa (+1684)", + "value": "+1684", + "id": "+1684" + }, + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "Andorra (+376)", + "value": "+376", + "id": "+376" + }, + { + "leftElement": "🇦🇴", + "searchText": "Angola", + "label": "Angola (+244)", + "value": "+244", + "id": "+244" + }, + { + "leftElement": "🇦🇮", + "searchText": "Anguilla", + "label": "Anguilla (+1264)", + "value": "+1264", + "id": "+1264" + }, + { + "leftElement": "🇦🇶", + "searchText": "Antarctica", + "label": "Antarctica (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇦🇬", + "searchText": "Antigua and Barbuda", + "label": "Antigua and Barbuda (+1268)", + "value": "+1268", + "id": "+1268" + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "Argentina (+54)", + "value": "+54", + "id": "+54" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "Armenia (+374)", + "value": "+374", + "id": "+374" + }, + { + "leftElement": "🇦🇼", + "searchText": "Aruba", + "label": "Aruba (+297)", + "value": "+297", + "id": "+297" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "Australia (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "Austria (+43)", + "value": "+43", + "id": "+43" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "Azerbaijan (+994)", + "value": "+994", + "id": "+994" + }, + { + "leftElement": "🇧🇸", + "searchText": "Bahamas", + "label": "Bahamas (+1242)", + "value": "+1242", + "id": "+1242" + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "Bahrain (+973)", + "value": "+973", + "id": "+973" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "Bangladesh (+880)", + "value": "+880", + "id": "+880" + }, + { + "leftElement": "🇧🇧", + "searchText": "Barbados", + "label": "Barbados (+1246)", + "value": "+1246", + "id": "+1246" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "Belarus (+375)", + "value": "+375", + "id": "+375" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "Belgium (+32)", + "value": "+32", + "id": "+32" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "Belize (+501)", + "value": "+501", + "id": "+501" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "Benin (+229)", + "value": "+229", + "id": "+229" + }, + { + "leftElement": "🇧🇲", + "searchText": "Bermuda", + "label": "Bermuda (+1441)", + "value": "+1441", + "id": "+1441" + }, + { + "leftElement": "🇧🇹", + "searchText": "Bhutan", + "label": "Bhutan (+975)", + "value": "+975", + "id": "+975" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia, Plurinational State of", + "label": "Bolivia, Plurinational State of (+591)", + "value": "+591", + "id": "+591" + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "Bosnia and Herzegovina (+387)", + "value": "+387", + "id": "+387" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "Botswana (+267)", + "value": "+267", + "id": "+267" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "Brazil (+55)", + "value": "+55", + "id": "+55" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "British Indian Ocean Territory (+246)", + "value": "+246", + "id": "+246" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "Brunei Darussalam (+673)", + "value": "+673", + "id": "+673" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "Bulgaria (+359)", + "value": "+359", + "id": "+359" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "Burkina Faso (+226)", + "value": "+226", + "id": "+226" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "Burundi (+257)", + "value": "+257", + "id": "+257" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "Cambodia (+855)", + "value": "+855", + "id": "+855" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "Cameroon (+237)", + "value": "+237", + "id": "+237" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "Cape Verde (+238)", + "value": "+238", + "id": "+238" + }, + { + "leftElement": "🇰🇾", + "searchText": "Cayman Islands", + "label": "Cayman Islands (+ 345)", + "value": "+ 345", + "id": "+ 345" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "Central African Republic (+236)", + "value": "+236", + "id": "+236" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "Chad (+235)", + "value": "+235", + "id": "+235" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "Chile (+56)", + "value": "+56", + "id": "+56" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "China (+86)", + "value": "+86", + "id": "+86" + }, + { + "leftElement": "🇦🇺", + "searchText": "Christmas Island", + "label": "Christmas Island (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇺", + "searchText": "Cocos (Keeling) Islands", + "label": "Cocos (Keeling) Islands (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "Colombia (+57)", + "value": "+57", + "id": "+57" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "Comoros (+269)", + "value": "+269", + "id": "+269" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo", + "label": "Congo (+242)", + "value": "+242", + "id": "+242" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, The Democratic Republic of the Congo", + "label": "Congo, The Democratic Republic of the Congo (+243)", + "value": "+243", + "id": "+243" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "Cook Islands (+682)", + "value": "+682", + "id": "+682" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "Costa Rica (+506)", + "value": "+506", + "id": "+506" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "Cote d'Ivoire (+225)", + "value": "+225", + "id": "+225" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "Croatia (+385)", + "value": "+385", + "id": "+385" + }, + { + "leftElement": "🇨🇺", + "searchText": "Cuba", + "label": "Cuba (+53)", + "value": "+53", + "id": "+53" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "Cyprus (+357)", + "value": "+357", + "id": "+357" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "Czech Republic (+420)", + "value": "+420", + "id": "+420" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "Denmark (+45)", + "value": "+45", + "id": "+45" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "Djibouti (+253)", + "value": "+253", + "id": "+253" + }, + { + "leftElement": "🇩🇲", + "searchText": "Dominica", + "label": "Dominica (+1767)", + "value": "+1767", + "id": "+1767" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "Dominican Republic (+1849)", + "value": "+1849", + "id": "+1849" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "Ecuador (+593)", + "value": "+593", + "id": "+593" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "Egypt (+20)", + "value": "+20", + "id": "+20" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "El Salvador (+503)", + "value": "+503", + "id": "+503" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "Equatorial Guinea (+240)", + "value": "+240", + "id": "+240" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "Eritrea (+291)", + "value": "+291", + "id": "+291" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "Estonia (+372)", + "value": "+372", + "id": "+372" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "Ethiopia (+251)", + "value": "+251", + "id": "+251" + }, + { + "leftElement": "🇫🇰", + "searchText": "Falkland Islands (Malvinas)", + "label": "Falkland Islands (Malvinas) (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "Faroe Islands (+298)", + "value": "+298", + "id": "+298" + }, + { + "leftElement": "🇫🇯", + "searchText": "Fiji", + "label": "Fiji (+679)", + "value": "+679", + "id": "+679" + }, + { + "leftElement": "🇦🇽", + "searchText": "Finland", + "label": "Finland (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "France (+33)", + "value": "+33", + "id": "+33" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "French Guiana (+594)", + "value": "+594", + "id": "+594" + }, + { + "leftElement": "🇵🇫", + "searchText": "French Polynesia", + "label": "French Polynesia (+689)", + "value": "+689", + "id": "+689" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "Gabon (+241)", + "value": "+241", + "id": "+241" + }, + { + "leftElement": "🇬🇲", + "searchText": "Gambia", + "label": "Gambia (+220)", + "value": "+220", + "id": "+220" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "Georgia (+995)", + "value": "+995", + "id": "+995" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "Germany (+49)", + "value": "+49", + "id": "+49" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "Ghana (+233)", + "value": "+233", + "id": "+233" + }, + { + "leftElement": "🇬🇮", + "searchText": "Gibraltar", + "label": "Gibraltar (+350)", + "value": "+350", + "id": "+350" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "Greece (+30)", + "value": "+30", + "id": "+30" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "Greenland (+299)", + "value": "+299", + "id": "+299" + }, + { + "leftElement": "🇬🇩", + "searchText": "Grenada", + "label": "Grenada (+1473)", + "value": "+1473", + "id": "+1473" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "Guadeloupe (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "Guam (+1671)", + "value": "+1671", + "id": "+1671" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "Guatemala (+502)", + "value": "+502", + "id": "+502" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "Guernsey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "Guinea (+224)", + "value": "+224", + "id": "+224" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "Guinea-Bissau (+245)", + "value": "+245", + "id": "+245" + }, + { + "leftElement": "🇬🇾", + "searchText": "Guyana", + "label": "Guyana (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇭🇹", + "searchText": "Haiti", + "label": "Haiti (+509)", + "value": "+509", + "id": "+509" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "Holy See (Vatican City State) (+379)", + "value": "+379", + "id": "+379" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "Honduras (+504)", + "value": "+504", + "id": "+504" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "Hong Kong (+852)", + "value": "+852", + "id": "+852" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "Hungary (+36)", + "value": "+36", + "id": "+36" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "Iceland (+354)", + "value": "+354", + "id": "+354" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "India (+91)", + "value": "+91", + "id": "+91" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "Indonesia (+62)", + "value": "+62", + "id": "+62" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of Persian Gulf", + "label": "Iran, Islamic Republic of Persian Gulf (+98)", + "value": "+98", + "id": "+98" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "Iraq (+964)", + "value": "+964", + "id": "+964" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "Ireland (+353)", + "value": "+353", + "id": "+353" + }, + { + "leftElement": "🇬🇬", + "searchText": "Isle of Man", + "label": "Isle of Man (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "Israel (+972)", + "value": "+972", + "id": "+972" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "Italy (+39)", + "value": "+39", + "id": "+39" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "Jamaica (+1876)", + "value": "+1876", + "id": "+1876" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "Japan (+81)", + "value": "+81", + "id": "+81" + }, + { + "leftElement": "🇬🇬", + "searchText": "Jersey", + "label": "Jersey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "Jordan (+962)", + "value": "+962", + "id": "+962" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "Kazakhstan (+77)", + "value": "+77", + "id": "+77" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "Kenya (+254)", + "value": "+254", + "id": "+254" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "Kiribati (+686)", + "value": "+686", + "id": "+686" + }, + { + "leftElement": "🇰🇵", + "searchText": "Korea, Democratic People's Republic of Korea", + "label": "Korea, Democratic People's Republic of Korea (+850)", + "value": "+850", + "id": "+850" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of South Korea", + "label": "Korea, Republic of South Korea (+82)", + "value": "+82", + "id": "+82" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "Kuwait (+965)", + "value": "+965", + "id": "+965" + }, + { + "leftElement": "🇰🇬", + "searchText": "Kyrgyzstan", + "label": "Kyrgyzstan (+996)", + "value": "+996", + "id": "+996" + }, + { + "leftElement": "🇱🇦", + "searchText": "Laos", + "label": "Laos (+856)", + "value": "+856", + "id": "+856" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "Latvia (+371)", + "value": "+371", + "id": "+371" + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "Lebanon (+961)", + "value": "+961", + "id": "+961" + }, + { + "leftElement": "🇱🇸", + "searchText": "Lesotho", + "label": "Lesotho (+266)", + "value": "+266", + "id": "+266" + }, + { + "leftElement": "🇱🇷", + "searchText": "Liberia", + "label": "Liberia (+231)", + "value": "+231", + "id": "+231" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libyan Arab Jamahiriya", + "label": "Libyan Arab Jamahiriya (+218)", + "value": "+218", + "id": "+218" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "Liechtenstein (+423)", + "value": "+423", + "id": "+423" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "Lithuania (+370)", + "value": "+370", + "id": "+370" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "Luxembourg (+352)", + "value": "+352", + "id": "+352" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "Macao (+853)", + "value": "+853", + "id": "+853" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia", + "label": "Macedonia (+389)", + "value": "+389", + "id": "+389" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "Madagascar (+261)", + "value": "+261", + "id": "+261" + }, + { + "leftElement": "🇲🇼", + "searchText": "Malawi", + "label": "Malawi (+265)", + "value": "+265", + "id": "+265" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "Malaysia (+60)", + "value": "+60", + "id": "+60" + }, + { + "leftElement": "🇲🇻", + "searchText": "Maldives", + "label": "Maldives (+960)", + "value": "+960", + "id": "+960" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "Mali (+223)", + "value": "+223", + "id": "+223" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "Malta (+356)", + "value": "+356", + "id": "+356" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "Marshall Islands (+692)", + "value": "+692", + "id": "+692" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "Martinique (+596)", + "value": "+596", + "id": "+596" + }, + { + "leftElement": "🇲🇷", + "searchText": "Mauritania", + "label": "Mauritania (+222)", + "value": "+222", + "id": "+222" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "Mauritius (+230)", + "value": "+230", + "id": "+230" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "Mayotte (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "Mexico (+52)", + "value": "+52", + "id": "+52" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of Micronesia", + "label": "Micronesia, Federated States of Micronesia (+691)", + "value": "+691", + "id": "+691" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova", + "label": "Moldova (+373)", + "value": "+373", + "id": "+373" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "Monaco (+377)", + "value": "+377", + "id": "+377" + }, + { + "leftElement": "🇲🇳", + "searchText": "Mongolia", + "label": "Mongolia (+976)", + "value": "+976", + "id": "+976" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "Montenegro (+382)", + "value": "+382", + "id": "+382" + }, + { + "leftElement": "🇲🇸", + "searchText": "Montserrat", + "label": "Montserrat (+1664)", + "value": "+1664", + "id": "+1664" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "Morocco (+212)", + "value": "+212", + "id": "+212" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "Mozambique (+258)", + "value": "+258", + "id": "+258" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "Myanmar (+95)", + "value": "+95", + "id": "+95" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "Namibia (+264)", + "value": "+264", + "id": "+264" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "Nauru (+674)", + "value": "+674", + "id": "+674" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "Nepal (+977)", + "value": "+977", + "id": "+977" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "Netherlands (+31)", + "value": "+31", + "id": "+31" + }, + { + "leftElement": "🇦🇳", + "searchText": "Netherlands Antilles", + "label": "Netherlands Antilles (+599)", + "value": "+599", + "id": "+599" + }, + { + "leftElement": "🇳🇨", + "searchText": "New Caledonia", + "label": "New Caledonia (+687)", + "value": "+687", + "id": "+687" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "New Zealand (+64)", + "value": "+64", + "id": "+64" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "Nicaragua (+505)", + "value": "+505", + "id": "+505" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "Niger (+227)", + "value": "+227", + "id": "+227" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "Nigeria (+234)", + "value": "+234", + "id": "+234" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "Niue (+683)", + "value": "+683", + "id": "+683" + }, + { + "leftElement": "🇦🇶", + "searchText": "Norfolk Island", + "label": "Norfolk Island (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "Northern Mariana Islands (+1670)", + "value": "+1670", + "id": "+1670" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "Norway (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "Oman (+968)", + "value": "+968", + "id": "+968" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "Pakistan (+92)", + "value": "+92", + "id": "+92" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "Palau (+680)", + "value": "+680", + "id": "+680" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestinian Territory, Occupied", + "label": "Palestinian Territory, Occupied (+970)", + "value": "+970", + "id": "+970" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "Panama (+507)", + "value": "+507", + "id": "+507" + }, + { + "leftElement": "🇵🇬", + "searchText": "Papua New Guinea", + "label": "Papua New Guinea (+675)", + "value": "+675", + "id": "+675" + }, + { + "leftElement": "🇬🇾", + "searchText": "Paraguay", + "label": "Paraguay (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "Peru (+51)", + "value": "+51", + "id": "+51" + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "Philippines (+63)", + "value": "+63", + "id": "+63" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "Pitcairn (+872)", + "value": "+872", + "id": "+872" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "Poland (+48)", + "value": "+48", + "id": "+48" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "Portugal (+351)", + "value": "+351", + "id": "+351" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "Puerto Rico (+1939)", + "value": "+1939", + "id": "+1939" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "Qatar (+974)", + "value": "+974", + "id": "+974" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "Romania (+40)", + "value": "+40", + "id": "+40" + }, + { + "leftElement": "🇷🇺", + "searchText": "Russia", + "label": "Russia (+7)", + "value": "+7", + "id": "+7" + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "Rwanda (+250)", + "value": "+250", + "id": "+250" + }, + { + "leftElement": "🇾🇹", + "searchText": "Reunion", + "label": "Reunion (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Barthelemy", + "label": "Saint Barthelemy (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇸🇭", + "searchText": "Saint Helena, Ascension and Tristan Da Cunha", + "label": "Saint Helena, Ascension and Tristan Da Cunha (+290)", + "value": "+290", + "id": "+290" + }, + { + "leftElement": "🇰🇳", + "searchText": "Saint Kitts and Nevis", + "label": "Saint Kitts and Nevis (+1869)", + "value": "+1869", + "id": "+1869" + }, + { + "leftElement": "🇱🇨", + "searchText": "Saint Lucia", + "label": "Saint Lucia (+1758)", + "value": "+1758", + "id": "+1758" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Martin", + "label": "Saint Martin (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "Saint Pierre and Miquelon (+508)", + "value": "+508", + "id": "+508" + }, + { + "leftElement": "🇻🇨", + "searchText": "Saint Vincent and the Grenadines", + "label": "Saint Vincent and the Grenadines (+1784)", + "value": "+1784", + "id": "+1784" + }, + { + "leftElement": "🇼🇸", + "searchText": "Samoa", + "label": "Samoa (+685)", + "value": "+685", + "id": "+685" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "San Marino (+378)", + "value": "+378", + "id": "+378" + }, + { + "leftElement": "🇸🇹", + "searchText": "Sao Tome and Principe", + "label": "Sao Tome and Principe (+239)", + "value": "+239", + "id": "+239" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "Saudi Arabia (+966)", + "value": "+966", + "id": "+966" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "Senegal (+221)", + "value": "+221", + "id": "+221" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "Serbia (+381)", + "value": "+381", + "id": "+381" + }, + { + "leftElement": "🇸🇨", + "searchText": "Seychelles", + "label": "Seychelles (+248)", + "value": "+248", + "id": "+248" + }, + { + "leftElement": "🇸🇱", + "searchText": "Sierra Leone", + "label": "Sierra Leone (+232)", + "value": "+232", + "id": "+232" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "Singapore (+65)", + "value": "+65", + "id": "+65" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "Slovakia (+421)", + "value": "+421", + "id": "+421" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "Slovenia (+386)", + "value": "+386", + "id": "+386" + }, + { + "leftElement": "🇸🇧", + "searchText": "Solomon Islands", + "label": "Solomon Islands (+677)", + "value": "+677", + "id": "+677" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "Somalia (+252)", + "value": "+252", + "id": "+252" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "South Africa (+27)", + "value": "+27", + "id": "+27" + }, + { + "leftElement": "🇸🇸", + "searchText": "South Sudan", + "label": "South Sudan (+211)", + "value": "+211", + "id": "+211" + }, + { + "leftElement": "🇫🇰", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "South Georgia and the South Sandwich Islands (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "Spain (+34)", + "value": "+34", + "id": "+34" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "Sri Lanka (+94)", + "value": "+94", + "id": "+94" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "Sudan (+249)", + "value": "+249", + "id": "+249" + }, + { + "leftElement": "🇸🇷", + "searchText": "Suriname", + "label": "Suriname (+597)", + "value": "+597", + "id": "+597" + }, + { + "leftElement": "🇳🇴", + "searchText": "Svalbard and Jan Mayen", + "label": "Svalbard and Jan Mayen (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇸🇿", + "searchText": "Swaziland", + "label": "Swaziland (+268)", + "value": "+268", + "id": "+268" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "Sweden (+46)", + "value": "+46", + "id": "+46" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "Switzerland (+41)", + "value": "+41", + "id": "+41" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "Syrian Arab Republic (+963)", + "value": "+963", + "id": "+963" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan", + "label": "Taiwan (+886)", + "value": "+886", + "id": "+886" + }, + { + "leftElement": "🇹🇯", + "searchText": "Tajikistan", + "label": "Tajikistan (+992)", + "value": "+992", + "id": "+992" + }, + { + "leftElement": "🇹🇿", + "searchText": "Tanzania, United Republic of Tanzania", + "label": "Tanzania, United Republic of Tanzania (+255)", + "value": "+255", + "id": "+255" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "Thailand (+66)", + "value": "+66", + "id": "+66" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "Timor-Leste (+670)", + "value": "+670", + "id": "+670" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "Togo (+228)", + "value": "+228", + "id": "+228" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "Tokelau (+690)", + "value": "+690", + "id": "+690" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "Tonga (+676)", + "value": "+676", + "id": "+676" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "Trinidad and Tobago (+1868)", + "value": "+1868", + "id": "+1868" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "Tunisia (+216)", + "value": "+216", + "id": "+216" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "Turkey (+90)", + "value": "+90", + "id": "+90" + }, + { + "leftElement": "🇹🇲", + "searchText": "Turkmenistan", + "label": "Turkmenistan (+993)", + "value": "+993", + "id": "+993" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "Turks and Caicos Islands (+1649)", + "value": "+1649", + "id": "+1649" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "Tuvalu (+688)", + "value": "+688", + "id": "+688" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "Uganda (+256)", + "value": "+256", + "id": "+256" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "Ukraine (+380)", + "value": "+380", + "id": "+380" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "United Arab Emirates (+971)", + "value": "+971", + "id": "+971" + }, + { + "leftElement": "🇬🇬", + "searchText": "United Kingdom", + "label": "United Kingdom (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States / Canada", + "label": "United States / Canada (+1)", + "value": "+1", + "id": "+1" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "Uruguay (+598)", + "value": "+598", + "id": "+598" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "Uzbekistan (+998)", + "value": "+998", + "id": "+998" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "Vanuatu (+678)", + "value": "+678", + "id": "+678" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela, Bolivarian Republic of Venezuela", + "label": "Venezuela, Bolivarian Republic of Venezuela (+58)", + "value": "+58", + "id": "+58" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "Vietnam (+84)", + "value": "+84", + "id": "+84" + }, + { + "leftElement": "🇻🇬", + "searchText": "Virgin Islands, British", + "label": "Virgin Islands, British (+1284)", + "value": "+1284", + "id": "+1284" + }, + { + "leftElement": "🇻🇮", + "searchText": "Virgin Islands, U.S.", + "label": "Virgin Islands, U.S. (+1340)", + "value": "+1340", + "id": "+1340" + }, + { + "leftElement": "🇼🇫", + "searchText": "Wallis and Futuna", + "label": "Wallis and Futuna (+681)", + "value": "+681", + "id": "+681" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "Yemen (+967)", + "value": "+967", + "id": "+967" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "Zambia (+260)", + "value": "+260", + "id": "+260" + }, + { + "leftElement": "🇿🇼", + "searchText": "Zimbabwe", + "label": "Zimbabwe (+263)", + "value": "+263", + "id": "+263" + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "1gk30aq6vg" + }, + { + "propertyName": "currencyCountryCode", + "helpText": "Changes the type of currency", + "label": "Currency", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or name", + "options": [ + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "AED - United Arab Emirates Dirham", + "value": "AED", + "id": "د.إ.‏" + }, + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "AFN - Afghan Afghani", + "value": "AFN", + "id": "؋" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "ALL - Albanian Lek", + "value": "ALL", + "id": "Lek" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "AMD - Armenian Dram", + "value": "AMD", + "id": "դր." + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "ARS - Argentine Peso", + "value": "ARS", + "id": "$" + }, + { + "leftElement": "🇦🇸", + "searchText": "American Samoa", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇦🇽", + "searchText": "Alland Islands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "AZN - Azerbaijani Manat", + "value": "AZN", + "id": "ман." + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "BAM - Bosnia-Herzegovina Convertible Mark", + "value": "BAM", + "id": "KM" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "BDT - Bangladeshi Taka", + "value": "BDT", + "id": "৳" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "BGN - Bulgarian Lev", + "value": "BGN", + "id": "лв." + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "BHD - Bahraini Dinar", + "value": "BHD", + "id": "د.ب.‏" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "BIF - Burundian Franc", + "value": "BIF", + "id": "FBu" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇱", + "searchText": "Saint Barthelemy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "BND - Brunei Dollar", + "value": "BND", + "id": "$" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia", + "label": "BOB - Bolivian Boliviano", + "value": "BOB", + "id": "Bs" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "BRL - Brazilian Real", + "value": "BRL", + "id": "R$" + }, + { + "leftElement": "🇧🇻", + "searchText": "Bouvet Island", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "BWP - Botswanan Pula", + "value": "BWP", + "id": "P" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "BYR - Belarusian Ruble", + "value": "BYR", + "id": "BYR" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "BZD - Belize Dollar", + "value": "BZD", + "id": "$" + }, + { + "leftElement": "🇨🇦", + "searchText": "Canada", + "label": "CAD - Canadian Dollar", + "value": "CAD", + "id": "$" + }, + { + "leftElement": "🇨🇨", + "searchText": "Cocos (Keeling) Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, Democratic Republic of the", + "label": "CDF - Congolese Franc", + "value": "CDF", + "id": "FrCD" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo, Republic of the", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "CLP - Chilean Peso", + "value": "CLP", + "id": "$" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "CNY - Chinese Yuan", + "value": "CNY", + "id": "CN¥" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "COP - Colombian Peso", + "value": "COP", + "id": "$" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "CRC - Costa Rican Colón", + "value": "CRC", + "id": "₡" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "CVE - Cape Verdean Escudo", + "value": "CVE", + "id": "CV$" + }, + { + "leftElement": "🇨🇽", + "searchText": "Christmas Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "CZK - Czech Republic Koruna", + "value": "CZK", + "id": "Kč" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "DJF - Djiboutian Franc", + "value": "DJF", + "id": "Fdj" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "DOP - Dominican Peso", + "value": "DOP", + "id": "RD$" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "DZD - Algerian Dinar", + "value": "DZD", + "id": "د.ج.‏" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "EGP - Egyptian Pound", + "value": "EGP", + "id": "ج.م.‏" + }, + { + "leftElement": "🇪🇭", + "searchText": "Western Sahara", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "ERN - Eritrean Nakfa", + "value": "ERN", + "id": "Nfk" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "ETB - Ethiopian Birr", + "value": "ETB", + "id": "Br" + }, + { + "leftElement": "🇫🇮", + "searchText": "Finland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇧", + "searchText": "United Kingdom", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "GEL - Georgian Lari", + "value": "GEL", + "id": "GEL" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "GHS - Ghanaian Cedi", + "value": "GHS", + "id": "GH₵" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "GNF - Guinean Franc", + "value": "GNF", + "id": "FG" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇸", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "GTQ - Guatemalan Quetzal", + "value": "GTQ", + "id": "Q" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "HKD - Hong Kong Dollar", + "value": "HKD", + "id": "$" + }, + { + "leftElement": "🇭🇲", + "searchText": "Heard Island and McDonald Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "HNL - Honduran Lempira", + "value": "HNL", + "id": "L" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "HRK - Croatian Kuna", + "value": "HRK", + "id": "kn" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "HUF - Hungarian Forint", + "value": "HUF", + "id": "Ft" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "IDR - Indonesian Rupiah", + "value": "IDR", + "id": "Rp" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇮🇲", + "searchText": "Isle of Man", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "INR - Indian Rupee", + "value": "INR", + "id": "₹" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "IQD - Iraqi Dinar", + "value": "IQD", + "id": "د.ع.‏" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of", + "label": "IRR - Iranian Rial", + "value": "IRR", + "id": "﷼" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "ISK - Icelandic Króna", + "value": "ISK", + "id": "kr" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇯🇪", + "searchText": "Jersey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "JMD - Jamaican Dollar", + "value": "JMD", + "id": "$" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "JOD - Jordanian Dinar", + "value": "JOD", + "id": "د.أ.‏" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "JPY - Japanese Yen", + "value": "JPY", + "id": "¥" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "KES - Kenyan Shilling", + "value": "KES", + "id": "Ksh" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "KHR - Cambodian Riel", + "value": "KHR", + "id": "៛" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "KMF - Comorian Franc", + "value": "KMF", + "id": "FC" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of", + "label": "KRW - South Korean Won", + "value": "KRW", + "id": "₩" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "KWD - Kuwaiti Dinar", + "value": "KWD", + "id": "د.ك.‏" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "KZT - Kazakhstani Tenge", + "value": "KZT", + "id": "тңг." + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "LBP - Lebanese Pound", + "value": "LBP", + "id": "ل.ل.‏" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "LKR - Sri Lankan Rupee", + "value": "LKR", + "id": "SL Re" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "LTL - Lithuanian Litas", + "value": "LTL", + "id": "Lt" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libya", + "label": "LYD - Libyan Dinar", + "value": "LYD", + "id": "د.ل.‏" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova, Republic of", + "label": "MDL - Moldovan Leu", + "value": "MDL", + "id": "MDL" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇫", + "searchText": "Saint Martin (French part)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "MGA - Malagasy Ariary", + "value": "MGA", + "id": "MGA" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia, the Former Yugoslav Republic of", + "label": "MKD - Macedonian Denar", + "value": "MKD", + "id": "MKD" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "MMK - Myanma Kyat", + "value": "MMK", + "id": "K" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "MOP - Macanese Pataca", + "value": "MOP", + "id": "MOP$" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "MUR - Mauritian Rupee", + "value": "MUR", + "id": "MURs" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "MXN - Mexican Peso", + "value": "MXN", + "id": "$" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "MYR - Malaysian Ringgit", + "value": "MYR", + "id": "RM" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "MZN - Mozambican Metical", + "value": "MZN", + "id": "MTn" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "NAD - Namibian Dollar", + "value": "NAD", + "id": "N$" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇳🇫", + "searchText": "Norfolk Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "NGN - Nigerian Naira", + "value": "NGN", + "id": "₦" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "NIO - Nicaraguan Córdoba", + "value": "NIO", + "id": "C$" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "NPR - Nepalese Rupee", + "value": "NPR", + "id": "नेरू" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "OMR - Omani Rial", + "value": "OMR", + "id": "ر.ع.‏" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "PAB - Panamanian Balboa", + "value": "PAB", + "id": "B/." + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "PEN - Peruvian Nuevo Sol", + "value": "PEN", + "id": "S/." + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "PHP - Philippine Peso", + "value": "PHP", + "id": "₱" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "PKR - Pakistani Rupee", + "value": "PKR", + "id": "₨" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "PLN - Polish Zloty", + "value": "PLN", + "id": "zł" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestine, State of", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇾", + "searchText": "Paraguay", + "label": "PYG - Paraguayan Guarani", + "value": "PYG", + "id": "₲" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "QAR - Qatari Rial", + "value": "QAR", + "id": "ر.ق.‏" + }, + { + "leftElement": "🇷🇪", + "searchText": "Reunion", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "RON - Romanian Leu", + "value": "RON", + "id": "RON" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "RSD - Serbian Dinar", + "value": "RSD", + "id": "дин." + }, + { + "leftElement": "🇷🇺", + "searchText": "Russian Federation", + "label": "RUB - Russian Ruble", + "value": "RUB", + "id": "руб." + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "RWF - Rwandan Franc", + "value": "RWF", + "id": "FR" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "SAR - Saudi Riyal", + "value": "SAR", + "id": "ر.س.‏" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "SDG - Sudanese Pound", + "value": "SDG", + "id": "SDG" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "SEK - Swedish Krona", + "value": "SEK", + "id": "kr" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "SGD - Singapore Dollar", + "value": "SGD", + "id": "$" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇯", + "searchText": "Svalbard and Jan Mayen", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "SOS - Somali Shilling", + "value": "SOS", + "id": "Ssh" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "SYP - Syrian Pound", + "value": "SYP", + "id": "ل.س.‏" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇹🇫", + "searchText": "French Southern Territories", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "THB - Thai Baht", + "value": "THB", + "id": "฿" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "TND - Tunisian Dinar", + "value": "TND", + "id": "د.ت.‏" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "TOP - Tongan Paʻanga", + "value": "TOP", + "id": "T$" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "TRY - Turkish Lira", + "value": "TRY", + "id": "TL" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "TTD - Trinidad and Tobago Dollar", + "value": "TTD", + "id": "$" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan, Province of China", + "label": "TWD - New Taiwan Dollar", + "value": "TWD", + "id": "NT$" + }, + { + "leftElement": "🇹🇿", + "searchText": "United Republic of Tanzania", + "label": "TZS - Tanzanian Shilling", + "value": "TZS", + "id": "TSh" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "UAH - Ukrainian Hryvnia", + "value": "UAH", + "id": "₴" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "UGX - Ugandan Shilling", + "value": "UGX", + "id": "USh" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "UYU - Uruguayan Peso", + "value": "UYU", + "id": "$" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "UZS - Uzbekistan Som", + "value": "UZS", + "id": "UZS" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela", + "label": "VEF - Venezuelan Bolívar", + "value": "VEF", + "id": "Bs.F." + }, + { + "leftElement": "🇻🇬", + "searchText": "British Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇮", + "searchText": "US Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "VND - Vietnamese Dong", + "value": "VND", + "id": "₫" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "VUV - Vanuatu Vatu", + "value": "VUV", + "id": "VT" + }, + { + "leftElement": "🇽🇰", + "searchText": "Kosovo", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "YER - Yemeni Rial", + "value": "YER", + "id": "ر.ي.‏" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "ZAR - South African Rand", + "value": "ZAR", + "id": "R" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "ZMK - Zambian Kwacha", + "value": "ZMK", + "id": "ZK" + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "r4rc2gl7yv" + }, + { + "propertyName": "allowDialCodeChange", + "label": "Allow Country Code Change", + "helpText": "Search by country", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["schema"], + "validation": { + "type": "BOOLEAN" + }, + "id": "o4qnc8g5ck" + }, + { + "propertyName": "allowCurrencyChange", + "label": "Allow currency change", + "helpText": "Search by currency or country", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "8ka8k3fe0f" + }, + { + "propertyName": "decimalsInCurrency", + "helpText": "No. of decimals in currency input", + "label": "Decimals allowed", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "0", + "value": 0 + }, + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "bkfl5tqpt9" + }, + { + "propertyName": "defaultValue", + "label": "Default Selected", + "helpText": "Sets the On/Off default state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "tfd0w3ng3p" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{ \"label\": \"Option1\", \"value\": \"Option2\" }", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "value1 or { \"label\": \"label1\", \"value\": \"value1\" }", + "example": "value1 | { \"label\": \"label1\", \"value\": \"value1\" }", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: 'value should match: string | { \"label\": \"label1\", \"value\": \"value1\" }'\n };\n var value = inputValue;\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n return {\n isValid: true,\n parsed: inputValue,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (typeof inputValue === \"string\") {\n try {\n value = JSON.parse(inputValue);\n } catch (e) {}\n }\n if (_.isString(value) || _.isFinite(value)) {\n // When value is \"\", \"green\", 444\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (hasLabelValueProperties(value)) {\n // When value is {label: \"green\", value: \"green\"}\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n return {\n isValid: false,\n parsed: {},\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema"], + "id": "7d1t5sb9n6" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": \"string\", \"value\": \"string\" | number}>", + "example": "[{\"label\": \"One\", \"value\": \"one\"}]", + "autocompleteDataType": "STRING" + }, + "fnString": "function optionsCustomValidation(options, props, _) {\n var validationUtil = function validationUtil(options, _) {\n var _isValid = true;\n var message = {\n name: \"\",\n message: \"\"\n };\n var valueType = \"\";\n var uniqueLabels = {};\n for (var i = 0; i < options.length; i++) {\n var _options$i = options[i],\n label = _options$i.label,\n value = _options$i.value;\n if (!valueType) {\n valueType = typeof value;\n }\n //Checks the uniqueness all the values in the options\n if (!uniqueLabels.hasOwnProperty(value)) {\n uniqueLabels[value] = \"\";\n } else {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"path:value must be unique. Duplicate values found\"\n };\n break;\n }\n\n //Check if the required field \"label\" is present:\n if (!label) {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Missing required key: label\"\n };\n break;\n }\n\n //Validation checks for the the label.\n if (_.isNil(label) || label === \"\" || typeof label !== \"string\" && typeof label !== \"number\") {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Value of key: label is invalid: This value does not evaluate to type string\"\n };\n break;\n }\n\n //Check if all the data types for the value prop is the same.\n if (typeof value !== valueType) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: \"All value properties in options must have the same type\"\n };\n break;\n }\n\n //Check if the each object has value property.\n if (_.isNil(value)) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n };\n break;\n }\n }\n return {\n isValid: _isValid,\n parsed: _isValid ? options : [],\n messages: [message]\n };\n };\n var invalidResponse = {\n isValid: false,\n parsed: [],\n messages: [{\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n }]\n };\n try {\n if (_.isString(options)) {\n options = JSON.parse(options);\n }\n if (Array.isArray(options)) {\n return validationUtil(options, _);\n } else {\n return invalidResponse;\n }\n } catch (e) {\n return invalidResponse;\n }\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema"], + "id": "9fcmbz6h9w" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets a default selected option", + "label": "Default selected value", + "placeholderText": "Y", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string |\nnumber (only works in mustache syntax)", + "example": "abc | {{1}}", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValidation(value, props, _) {\n //Checks if the value is not of object type in {{}}\n if (_.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n\n //Checks if the value is not of boolean type in {{}}\n if (_.isBoolean(value)) {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value\n };\n}" + } + }, + "dependencies": ["schema", "sourceData"], + "id": "6991frkbwg" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected values", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[GREEN]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['option1', 'option2'] | [{ \"label\": \"label1\", \"value\": \"value1\" }]", + "autocompleteDataType": "ARRAY" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: \"value should match: Array | Array<{label: string, value: string | number}>\"\n };\n var UNIQUE_ERROR_MESSAGE = {\n name: \"ValidationError\",\n message: \"value must be unique. Duplicate values found\"\n };\n var hasUniqueValues = function hasUniqueValues(arr) {\n var uniqueValues = new Set(arr);\n return uniqueValues.size === arr.length;\n };\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // When value is \"['green', 'red']\", \"[{label: 'green', value: 'green'}]\" and \"green, red\"\n var convertToArray = function convertToArray(value) {\n if (typeof value === \"string\" && value.trim() !== \"\") {\n try {\n var parsedValue = JSON.parse(value);\n if (Array.isArray(parsedValue)) return parsedValue;\n } catch (e) {\n return value.split(\",\").map(function (s) {\n return s.trim();\n });\n }\n }\n if (Array.isArray(value)) return value;\n return [];\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n var parsed = inputValue === \"\" ? undefined : inputValue;\n return {\n isValid: true,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n var values = convertToArray(inputValue);\n\n // If there is inputValue but was not converted to proper array\n // or the input value is not string and not an array then error is returned\n if (typeof inputValue === \"string\" && inputValue.trim() !== \"\" && !values.length || typeof inputValue !== \"string\" && !Array.isArray(inputValue)) {\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n\n // When value is [\"green\", \"red\"]\n if (values.every(function (val) {\n return _.isString(val) || _.isFinite(val);\n })) {\n if (!hasUniqueValues(values)) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n // When value is [{label: \"green\", value: \"red\"}]\n } else if (values.every(hasLabelValueProperties)) {\n if (!hasUniqueValues(values.map(function (val) {\n return val.value;\n }))) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n } else {\n // When value is [true, false], [undefined, undefined] etc.\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n return {\n isValid: true,\n parsed: values,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema", "sourceData"], + "id": "yxuk3toabw" + }, + { + "helpText": "Sets the format of the selected date", + "propertyName": "dateFormat", + "label": "Date format", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "optionWidth": "340px", + "options": [ + { + "label": "2023-09-28T17:44:40.4040+05:30", + "subText": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.sssZ" + }, + { + "label": "September 28, 2023 5:44 PM", + "subText": "LLL", + "value": "LLL" + }, + { + "label": "September 28, 2023", + "subText": "LL", + "value": "LL" + }, + { + "label": "2023-09-28 17:44", + "subText": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "2023-09-28T17:44:40", + "subText": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "2023-09-28 05:44:40 PM", + "subText": "YYYY-MM-DD hh:mm:ss A", + "value": "YYYY-MM-DD hh:mm:ss A" + }, + { + "label": "28/09/2023 17:44", + "subText": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "28 September, 2023", + "subText": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "17:44 PM 28 September, 2023", + "subText": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "2023-09-28", + "subText": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "09-28-2023", + "subText": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "28-09-2023", + "subText": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "09/28/2023", + "subText": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "28/09/2023", + "subText": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "28/09/23", + "subText": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "09/28/23", + "subText": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "hideSubText": true, + "dependencies": ["schema"], + "id": "lse0zoc2va" + }, + { + "propertyName": "defaultValue", + "label": "Default Date", + "helpText": "Sets the default date of the widget. The date is updated if the default date changes", + "controlType": "DATE_PICKER", + "placeholderText": "Enter Default Date", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "ja2ajih4dt" + }, + { + "propertyName": "timePrecision", + "label": "Time precision", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the different time picker or hide.", + "defaultValue": "minute", + "options": [ + { + "label": "None", + "value": "None" + }, + { + "label": "Minute", + "value": "minute" + }, + { + "label": "Second", + "value": "second" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["None", "minute", "second"], + "default": "minute" + } + }, + "dependencies": ["schema"], + "id": "shyiw0wg5q" + }, + { + "propertyName": "defaultValue", + "label": "Default state", + "helpText": "Sets the default checked state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "501hx5c3o5" + }, + { + "helpText": "Sets the default value of the field. The array is updated when the default value changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY" + }, + "dependencies": ["schema"], + "id": "1i1jbad2uv" + }, + { + "propertyName": "children", + "label": "Field configuration", + "helpText": "Field configuration", + "controlType": "FIELD_CONFIGURATION", + "isBindProperty": false, + "isTriggerProperty": false, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "identifier", + "contentChildren": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "fieldType", + "label": "Field Type", + "helpText": "Type of the widget to be used corresponding to the field", + "controlType": "DROP_DOWN", + "isBindProperty": false, + "isTriggerProperty": false, + "options": [ + { + "label": "Array", + "value": "Array" + }, + { + "label": "Checkbox", + "value": "Checkbox" + }, + { + "label": "Currency Input", + "value": "Currency Input" + }, + { + "label": "Datepicker", + "value": "Datepicker" + }, + { + "label": "Email Input", + "value": "Email Input" + }, + { + "label": "Multiselect", + "value": "Multiselect" + }, + { + "label": "Multiline Text Input", + "value": "Multiline Text Input" + }, + { + "label": "Number Input", + "value": "Number Input" + }, + { + "label": "Object", + "value": "Object" + }, + { + "label": "Password Input", + "value": "Password Input" + }, + { + "label": "Phone Number Input", + "value": "Phone Number Input" + }, + { + "label": "Radio Group", + "value": "Radio Group" + }, + { + "label": "Select", + "value": "Select" + }, + { + "label": "Switch", + "value": "Switch" + }, + { + "label": "Text Input", + "value": "Text Input" + } + ], + "dependencies": [ + "schema", + "childStylesheet", + "dynamicBindingPathList" + ], + "id": "4k7sd8nc5f" + }, + { + "propertyName": "accessor", + "helpText": "Sets the property name of the field which can be used to access the value in formData and fieldState.", + "label": "Property Name", + "controlType": "INPUT_TEXT", + "placeholderText": "name", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "unique string", + "example": "firstName | last_name | age14", + "autocompleteDataType": "STRING" + }, + "fnString": "function accessorValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var grandParentPath = propertyPathChunks.slice(0, -2).join(\".\");\n var schemaItemIdentifier = propertyPathChunks.slice(-2)[0]; // ['schema', '__root_field__', 'children', 'age', 'name'] -> age\n var schema = lodash.cloneDeep(lodash.get(props, grandParentPath));\n var RESTRICTED_KEYS = [\"__array_item__\", \"__root_schema__\"];\n var currentSchemaItem = lodash.cloneDeep(schema[schemaItemIdentifier]);\n // Remove the current edited schemaItem from schema so it doesn't\n // get picked in the existing keys list\n delete schema[schemaItemIdentifier];\n\n // If the field is not _id (mongo id) then it shouldn't be allowed\n if (currentSchemaItem.originalIdentifier !== \"_id\") {\n RESTRICTED_KEYS.push(\"_id\");\n }\n if (value === \"\") {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"ValidationError\",\n message: \"Property Name cannot be empty\"\n }]\n };\n }\n var existingKeys = (Object.values(schema) || []).map(\n // @ts-expect-error: Types are not available\n function (schemaItem) {\n return schemaItem.name;\n });\n if (existingKeys.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"Property name already in use.\"\n }]\n };\n }\n if (RESTRICTED_KEYS.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"This is a restricted Property Name\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "jiqycfk515" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema", "sourceData"], + "id": "n1ssipf1c6" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets the default text of the field. The text is updated if the default text changes", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "John Doe", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "5dy5xhr2r0" + }, + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "(000) 000-0000", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string", + "example": "(000) 000-0000", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "ac9b0hxif9" + }, + { + "propertyName": "dialCode", + "helpText": "Changes the country code", + "label": "Default country code", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or country name", + "options": [ + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "Afghanistan (+93)", + "value": "+93", + "id": "+93" + }, + { + "leftElement": "🇦🇽", + "searchText": "Aland Islands", + "label": "Aland Islands (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "Albania (+355)", + "value": "+355", + "id": "+355" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "Algeria (+213)", + "value": "+213", + "id": "+213" + }, + { + "leftElement": "🇦🇸", + "searchText": "AmericanSamoa", + "label": "AmericanSamoa (+1684)", + "value": "+1684", + "id": "+1684" + }, + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "Andorra (+376)", + "value": "+376", + "id": "+376" + }, + { + "leftElement": "🇦🇴", + "searchText": "Angola", + "label": "Angola (+244)", + "value": "+244", + "id": "+244" + }, + { + "leftElement": "🇦🇮", + "searchText": "Anguilla", + "label": "Anguilla (+1264)", + "value": "+1264", + "id": "+1264" + }, + { + "leftElement": "🇦🇶", + "searchText": "Antarctica", + "label": "Antarctica (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇦🇬", + "searchText": "Antigua and Barbuda", + "label": "Antigua and Barbuda (+1268)", + "value": "+1268", + "id": "+1268" + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "Argentina (+54)", + "value": "+54", + "id": "+54" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "Armenia (+374)", + "value": "+374", + "id": "+374" + }, + { + "leftElement": "🇦🇼", + "searchText": "Aruba", + "label": "Aruba (+297)", + "value": "+297", + "id": "+297" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "Australia (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "Austria (+43)", + "value": "+43", + "id": "+43" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "Azerbaijan (+994)", + "value": "+994", + "id": "+994" + }, + { + "leftElement": "🇧🇸", + "searchText": "Bahamas", + "label": "Bahamas (+1242)", + "value": "+1242", + "id": "+1242" + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "Bahrain (+973)", + "value": "+973", + "id": "+973" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "Bangladesh (+880)", + "value": "+880", + "id": "+880" + }, + { + "leftElement": "🇧🇧", + "searchText": "Barbados", + "label": "Barbados (+1246)", + "value": "+1246", + "id": "+1246" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "Belarus (+375)", + "value": "+375", + "id": "+375" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "Belgium (+32)", + "value": "+32", + "id": "+32" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "Belize (+501)", + "value": "+501", + "id": "+501" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "Benin (+229)", + "value": "+229", + "id": "+229" + }, + { + "leftElement": "🇧🇲", + "searchText": "Bermuda", + "label": "Bermuda (+1441)", + "value": "+1441", + "id": "+1441" + }, + { + "leftElement": "🇧🇹", + "searchText": "Bhutan", + "label": "Bhutan (+975)", + "value": "+975", + "id": "+975" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia, Plurinational State of", + "label": "Bolivia, Plurinational State of (+591)", + "value": "+591", + "id": "+591" + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "Bosnia and Herzegovina (+387)", + "value": "+387", + "id": "+387" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "Botswana (+267)", + "value": "+267", + "id": "+267" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "Brazil (+55)", + "value": "+55", + "id": "+55" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "British Indian Ocean Territory (+246)", + "value": "+246", + "id": "+246" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "Brunei Darussalam (+673)", + "value": "+673", + "id": "+673" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "Bulgaria (+359)", + "value": "+359", + "id": "+359" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "Burkina Faso (+226)", + "value": "+226", + "id": "+226" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "Burundi (+257)", + "value": "+257", + "id": "+257" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "Cambodia (+855)", + "value": "+855", + "id": "+855" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "Cameroon (+237)", + "value": "+237", + "id": "+237" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "Cape Verde (+238)", + "value": "+238", + "id": "+238" + }, + { + "leftElement": "🇰🇾", + "searchText": "Cayman Islands", + "label": "Cayman Islands (+ 345)", + "value": "+ 345", + "id": "+ 345" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "Central African Republic (+236)", + "value": "+236", + "id": "+236" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "Chad (+235)", + "value": "+235", + "id": "+235" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "Chile (+56)", + "value": "+56", + "id": "+56" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "China (+86)", + "value": "+86", + "id": "+86" + }, + { + "leftElement": "🇦🇺", + "searchText": "Christmas Island", + "label": "Christmas Island (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇺", + "searchText": "Cocos (Keeling) Islands", + "label": "Cocos (Keeling) Islands (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "Colombia (+57)", + "value": "+57", + "id": "+57" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "Comoros (+269)", + "value": "+269", + "id": "+269" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo", + "label": "Congo (+242)", + "value": "+242", + "id": "+242" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, The Democratic Republic of the Congo", + "label": "Congo, The Democratic Republic of the Congo (+243)", + "value": "+243", + "id": "+243" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "Cook Islands (+682)", + "value": "+682", + "id": "+682" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "Costa Rica (+506)", + "value": "+506", + "id": "+506" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "Cote d'Ivoire (+225)", + "value": "+225", + "id": "+225" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "Croatia (+385)", + "value": "+385", + "id": "+385" + }, + { + "leftElement": "🇨🇺", + "searchText": "Cuba", + "label": "Cuba (+53)", + "value": "+53", + "id": "+53" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "Cyprus (+357)", + "value": "+357", + "id": "+357" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "Czech Republic (+420)", + "value": "+420", + "id": "+420" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "Denmark (+45)", + "value": "+45", + "id": "+45" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "Djibouti (+253)", + "value": "+253", + "id": "+253" + }, + { + "leftElement": "🇩🇲", + "searchText": "Dominica", + "label": "Dominica (+1767)", + "value": "+1767", + "id": "+1767" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "Dominican Republic (+1849)", + "value": "+1849", + "id": "+1849" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "Ecuador (+593)", + "value": "+593", + "id": "+593" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "Egypt (+20)", + "value": "+20", + "id": "+20" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "El Salvador (+503)", + "value": "+503", + "id": "+503" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "Equatorial Guinea (+240)", + "value": "+240", + "id": "+240" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "Eritrea (+291)", + "value": "+291", + "id": "+291" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "Estonia (+372)", + "value": "+372", + "id": "+372" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "Ethiopia (+251)", + "value": "+251", + "id": "+251" + }, + { + "leftElement": "🇫🇰", + "searchText": "Falkland Islands (Malvinas)", + "label": "Falkland Islands (Malvinas) (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "Faroe Islands (+298)", + "value": "+298", + "id": "+298" + }, + { + "leftElement": "🇫🇯", + "searchText": "Fiji", + "label": "Fiji (+679)", + "value": "+679", + "id": "+679" + }, + { + "leftElement": "🇦🇽", + "searchText": "Finland", + "label": "Finland (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "France (+33)", + "value": "+33", + "id": "+33" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "French Guiana (+594)", + "value": "+594", + "id": "+594" + }, + { + "leftElement": "🇵🇫", + "searchText": "French Polynesia", + "label": "French Polynesia (+689)", + "value": "+689", + "id": "+689" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "Gabon (+241)", + "value": "+241", + "id": "+241" + }, + { + "leftElement": "🇬🇲", + "searchText": "Gambia", + "label": "Gambia (+220)", + "value": "+220", + "id": "+220" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "Georgia (+995)", + "value": "+995", + "id": "+995" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "Germany (+49)", + "value": "+49", + "id": "+49" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "Ghana (+233)", + "value": "+233", + "id": "+233" + }, + { + "leftElement": "🇬🇮", + "searchText": "Gibraltar", + "label": "Gibraltar (+350)", + "value": "+350", + "id": "+350" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "Greece (+30)", + "value": "+30", + "id": "+30" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "Greenland (+299)", + "value": "+299", + "id": "+299" + }, + { + "leftElement": "🇬🇩", + "searchText": "Grenada", + "label": "Grenada (+1473)", + "value": "+1473", + "id": "+1473" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "Guadeloupe (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "Guam (+1671)", + "value": "+1671", + "id": "+1671" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "Guatemala (+502)", + "value": "+502", + "id": "+502" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "Guernsey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "Guinea (+224)", + "value": "+224", + "id": "+224" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "Guinea-Bissau (+245)", + "value": "+245", + "id": "+245" + }, + { + "leftElement": "🇬🇾", + "searchText": "Guyana", + "label": "Guyana (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇭🇹", + "searchText": "Haiti", + "label": "Haiti (+509)", + "value": "+509", + "id": "+509" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "Holy See (Vatican City State) (+379)", + "value": "+379", + "id": "+379" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "Honduras (+504)", + "value": "+504", + "id": "+504" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "Hong Kong (+852)", + "value": "+852", + "id": "+852" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "Hungary (+36)", + "value": "+36", + "id": "+36" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "Iceland (+354)", + "value": "+354", + "id": "+354" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "India (+91)", + "value": "+91", + "id": "+91" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "Indonesia (+62)", + "value": "+62", + "id": "+62" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of Persian Gulf", + "label": "Iran, Islamic Republic of Persian Gulf (+98)", + "value": "+98", + "id": "+98" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "Iraq (+964)", + "value": "+964", + "id": "+964" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "Ireland (+353)", + "value": "+353", + "id": "+353" + }, + { + "leftElement": "🇬🇬", + "searchText": "Isle of Man", + "label": "Isle of Man (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "Israel (+972)", + "value": "+972", + "id": "+972" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "Italy (+39)", + "value": "+39", + "id": "+39" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "Jamaica (+1876)", + "value": "+1876", + "id": "+1876" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "Japan (+81)", + "value": "+81", + "id": "+81" + }, + { + "leftElement": "🇬🇬", + "searchText": "Jersey", + "label": "Jersey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "Jordan (+962)", + "value": "+962", + "id": "+962" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "Kazakhstan (+77)", + "value": "+77", + "id": "+77" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "Kenya (+254)", + "value": "+254", + "id": "+254" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "Kiribati (+686)", + "value": "+686", + "id": "+686" + }, + { + "leftElement": "🇰🇵", + "searchText": "Korea, Democratic People's Republic of Korea", + "label": "Korea, Democratic People's Republic of Korea (+850)", + "value": "+850", + "id": "+850" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of South Korea", + "label": "Korea, Republic of South Korea (+82)", + "value": "+82", + "id": "+82" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "Kuwait (+965)", + "value": "+965", + "id": "+965" + }, + { + "leftElement": "🇰🇬", + "searchText": "Kyrgyzstan", + "label": "Kyrgyzstan (+996)", + "value": "+996", + "id": "+996" + }, + { + "leftElement": "🇱🇦", + "searchText": "Laos", + "label": "Laos (+856)", + "value": "+856", + "id": "+856" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "Latvia (+371)", + "value": "+371", + "id": "+371" + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "Lebanon (+961)", + "value": "+961", + "id": "+961" + }, + { + "leftElement": "🇱🇸", + "searchText": "Lesotho", + "label": "Lesotho (+266)", + "value": "+266", + "id": "+266" + }, + { + "leftElement": "🇱🇷", + "searchText": "Liberia", + "label": "Liberia (+231)", + "value": "+231", + "id": "+231" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libyan Arab Jamahiriya", + "label": "Libyan Arab Jamahiriya (+218)", + "value": "+218", + "id": "+218" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "Liechtenstein (+423)", + "value": "+423", + "id": "+423" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "Lithuania (+370)", + "value": "+370", + "id": "+370" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "Luxembourg (+352)", + "value": "+352", + "id": "+352" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "Macao (+853)", + "value": "+853", + "id": "+853" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia", + "label": "Macedonia (+389)", + "value": "+389", + "id": "+389" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "Madagascar (+261)", + "value": "+261", + "id": "+261" + }, + { + "leftElement": "🇲🇼", + "searchText": "Malawi", + "label": "Malawi (+265)", + "value": "+265", + "id": "+265" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "Malaysia (+60)", + "value": "+60", + "id": "+60" + }, + { + "leftElement": "🇲🇻", + "searchText": "Maldives", + "label": "Maldives (+960)", + "value": "+960", + "id": "+960" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "Mali (+223)", + "value": "+223", + "id": "+223" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "Malta (+356)", + "value": "+356", + "id": "+356" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "Marshall Islands (+692)", + "value": "+692", + "id": "+692" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "Martinique (+596)", + "value": "+596", + "id": "+596" + }, + { + "leftElement": "🇲🇷", + "searchText": "Mauritania", + "label": "Mauritania (+222)", + "value": "+222", + "id": "+222" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "Mauritius (+230)", + "value": "+230", + "id": "+230" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "Mayotte (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "Mexico (+52)", + "value": "+52", + "id": "+52" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of Micronesia", + "label": "Micronesia, Federated States of Micronesia (+691)", + "value": "+691", + "id": "+691" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova", + "label": "Moldova (+373)", + "value": "+373", + "id": "+373" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "Monaco (+377)", + "value": "+377", + "id": "+377" + }, + { + "leftElement": "🇲🇳", + "searchText": "Mongolia", + "label": "Mongolia (+976)", + "value": "+976", + "id": "+976" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "Montenegro (+382)", + "value": "+382", + "id": "+382" + }, + { + "leftElement": "🇲🇸", + "searchText": "Montserrat", + "label": "Montserrat (+1664)", + "value": "+1664", + "id": "+1664" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "Morocco (+212)", + "value": "+212", + "id": "+212" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "Mozambique (+258)", + "value": "+258", + "id": "+258" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "Myanmar (+95)", + "value": "+95", + "id": "+95" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "Namibia (+264)", + "value": "+264", + "id": "+264" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "Nauru (+674)", + "value": "+674", + "id": "+674" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "Nepal (+977)", + "value": "+977", + "id": "+977" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "Netherlands (+31)", + "value": "+31", + "id": "+31" + }, + { + "leftElement": "🇦🇳", + "searchText": "Netherlands Antilles", + "label": "Netherlands Antilles (+599)", + "value": "+599", + "id": "+599" + }, + { + "leftElement": "🇳🇨", + "searchText": "New Caledonia", + "label": "New Caledonia (+687)", + "value": "+687", + "id": "+687" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "New Zealand (+64)", + "value": "+64", + "id": "+64" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "Nicaragua (+505)", + "value": "+505", + "id": "+505" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "Niger (+227)", + "value": "+227", + "id": "+227" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "Nigeria (+234)", + "value": "+234", + "id": "+234" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "Niue (+683)", + "value": "+683", + "id": "+683" + }, + { + "leftElement": "🇦🇶", + "searchText": "Norfolk Island", + "label": "Norfolk Island (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "Northern Mariana Islands (+1670)", + "value": "+1670", + "id": "+1670" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "Norway (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "Oman (+968)", + "value": "+968", + "id": "+968" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "Pakistan (+92)", + "value": "+92", + "id": "+92" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "Palau (+680)", + "value": "+680", + "id": "+680" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestinian Territory, Occupied", + "label": "Palestinian Territory, Occupied (+970)", + "value": "+970", + "id": "+970" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "Panama (+507)", + "value": "+507", + "id": "+507" + }, + { + "leftElement": "🇵🇬", + "searchText": "Papua New Guinea", + "label": "Papua New Guinea (+675)", + "value": "+675", + "id": "+675" + }, + { + "leftElement": "🇬🇾", + "searchText": "Paraguay", + "label": "Paraguay (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "Peru (+51)", + "value": "+51", + "id": "+51" + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "Philippines (+63)", + "value": "+63", + "id": "+63" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "Pitcairn (+872)", + "value": "+872", + "id": "+872" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "Poland (+48)", + "value": "+48", + "id": "+48" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "Portugal (+351)", + "value": "+351", + "id": "+351" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "Puerto Rico (+1939)", + "value": "+1939", + "id": "+1939" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "Qatar (+974)", + "value": "+974", + "id": "+974" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "Romania (+40)", + "value": "+40", + "id": "+40" + }, + { + "leftElement": "🇷🇺", + "searchText": "Russia", + "label": "Russia (+7)", + "value": "+7", + "id": "+7" + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "Rwanda (+250)", + "value": "+250", + "id": "+250" + }, + { + "leftElement": "🇾🇹", + "searchText": "Reunion", + "label": "Reunion (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Barthelemy", + "label": "Saint Barthelemy (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇸🇭", + "searchText": "Saint Helena, Ascension and Tristan Da Cunha", + "label": "Saint Helena, Ascension and Tristan Da Cunha (+290)", + "value": "+290", + "id": "+290" + }, + { + "leftElement": "🇰🇳", + "searchText": "Saint Kitts and Nevis", + "label": "Saint Kitts and Nevis (+1869)", + "value": "+1869", + "id": "+1869" + }, + { + "leftElement": "🇱🇨", + "searchText": "Saint Lucia", + "label": "Saint Lucia (+1758)", + "value": "+1758", + "id": "+1758" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Martin", + "label": "Saint Martin (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "Saint Pierre and Miquelon (+508)", + "value": "+508", + "id": "+508" + }, + { + "leftElement": "🇻🇨", + "searchText": "Saint Vincent and the Grenadines", + "label": "Saint Vincent and the Grenadines (+1784)", + "value": "+1784", + "id": "+1784" + }, + { + "leftElement": "🇼🇸", + "searchText": "Samoa", + "label": "Samoa (+685)", + "value": "+685", + "id": "+685" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "San Marino (+378)", + "value": "+378", + "id": "+378" + }, + { + "leftElement": "🇸🇹", + "searchText": "Sao Tome and Principe", + "label": "Sao Tome and Principe (+239)", + "value": "+239", + "id": "+239" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "Saudi Arabia (+966)", + "value": "+966", + "id": "+966" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "Senegal (+221)", + "value": "+221", + "id": "+221" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "Serbia (+381)", + "value": "+381", + "id": "+381" + }, + { + "leftElement": "🇸🇨", + "searchText": "Seychelles", + "label": "Seychelles (+248)", + "value": "+248", + "id": "+248" + }, + { + "leftElement": "🇸🇱", + "searchText": "Sierra Leone", + "label": "Sierra Leone (+232)", + "value": "+232", + "id": "+232" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "Singapore (+65)", + "value": "+65", + "id": "+65" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "Slovakia (+421)", + "value": "+421", + "id": "+421" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "Slovenia (+386)", + "value": "+386", + "id": "+386" + }, + { + "leftElement": "🇸🇧", + "searchText": "Solomon Islands", + "label": "Solomon Islands (+677)", + "value": "+677", + "id": "+677" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "Somalia (+252)", + "value": "+252", + "id": "+252" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "South Africa (+27)", + "value": "+27", + "id": "+27" + }, + { + "leftElement": "🇸🇸", + "searchText": "South Sudan", + "label": "South Sudan (+211)", + "value": "+211", + "id": "+211" + }, + { + "leftElement": "🇫🇰", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "South Georgia and the South Sandwich Islands (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "Spain (+34)", + "value": "+34", + "id": "+34" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "Sri Lanka (+94)", + "value": "+94", + "id": "+94" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "Sudan (+249)", + "value": "+249", + "id": "+249" + }, + { + "leftElement": "🇸🇷", + "searchText": "Suriname", + "label": "Suriname (+597)", + "value": "+597", + "id": "+597" + }, + { + "leftElement": "🇳🇴", + "searchText": "Svalbard and Jan Mayen", + "label": "Svalbard and Jan Mayen (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇸🇿", + "searchText": "Swaziland", + "label": "Swaziland (+268)", + "value": "+268", + "id": "+268" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "Sweden (+46)", + "value": "+46", + "id": "+46" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "Switzerland (+41)", + "value": "+41", + "id": "+41" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "Syrian Arab Republic (+963)", + "value": "+963", + "id": "+963" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan", + "label": "Taiwan (+886)", + "value": "+886", + "id": "+886" + }, + { + "leftElement": "🇹🇯", + "searchText": "Tajikistan", + "label": "Tajikistan (+992)", + "value": "+992", + "id": "+992" + }, + { + "leftElement": "🇹🇿", + "searchText": "Tanzania, United Republic of Tanzania", + "label": "Tanzania, United Republic of Tanzania (+255)", + "value": "+255", + "id": "+255" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "Thailand (+66)", + "value": "+66", + "id": "+66" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "Timor-Leste (+670)", + "value": "+670", + "id": "+670" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "Togo (+228)", + "value": "+228", + "id": "+228" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "Tokelau (+690)", + "value": "+690", + "id": "+690" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "Tonga (+676)", + "value": "+676", + "id": "+676" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "Trinidad and Tobago (+1868)", + "value": "+1868", + "id": "+1868" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "Tunisia (+216)", + "value": "+216", + "id": "+216" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "Turkey (+90)", + "value": "+90", + "id": "+90" + }, + { + "leftElement": "🇹🇲", + "searchText": "Turkmenistan", + "label": "Turkmenistan (+993)", + "value": "+993", + "id": "+993" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "Turks and Caicos Islands (+1649)", + "value": "+1649", + "id": "+1649" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "Tuvalu (+688)", + "value": "+688", + "id": "+688" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "Uganda (+256)", + "value": "+256", + "id": "+256" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "Ukraine (+380)", + "value": "+380", + "id": "+380" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "United Arab Emirates (+971)", + "value": "+971", + "id": "+971" + }, + { + "leftElement": "🇬🇬", + "searchText": "United Kingdom", + "label": "United Kingdom (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States / Canada", + "label": "United States / Canada (+1)", + "value": "+1", + "id": "+1" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "Uruguay (+598)", + "value": "+598", + "id": "+598" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "Uzbekistan (+998)", + "value": "+998", + "id": "+998" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "Vanuatu (+678)", + "value": "+678", + "id": "+678" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela, Bolivarian Republic of Venezuela", + "label": "Venezuela, Bolivarian Republic of Venezuela (+58)", + "value": "+58", + "id": "+58" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "Vietnam (+84)", + "value": "+84", + "id": "+84" + }, + { + "leftElement": "🇻🇬", + "searchText": "Virgin Islands, British", + "label": "Virgin Islands, British (+1284)", + "value": "+1284", + "id": "+1284" + }, + { + "leftElement": "🇻🇮", + "searchText": "Virgin Islands, U.S.", + "label": "Virgin Islands, U.S. (+1340)", + "value": "+1340", + "id": "+1340" + }, + { + "leftElement": "🇼🇫", + "searchText": "Wallis and Futuna", + "label": "Wallis and Futuna (+681)", + "value": "+681", + "id": "+681" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "Yemen (+967)", + "value": "+967", + "id": "+967" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "Zambia (+260)", + "value": "+260", + "id": "+260" + }, + { + "leftElement": "🇿🇼", + "searchText": "Zimbabwe", + "label": "Zimbabwe (+263)", + "value": "+263", + "id": "+263" + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "1gk30aq6vg" + }, + { + "propertyName": "currencyCountryCode", + "helpText": "Changes the type of currency", + "label": "Currency", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or name", + "options": [ + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "AED - United Arab Emirates Dirham", + "value": "AED", + "id": "د.إ.‏" + }, + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "AFN - Afghan Afghani", + "value": "AFN", + "id": "؋" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "ALL - Albanian Lek", + "value": "ALL", + "id": "Lek" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "AMD - Armenian Dram", + "value": "AMD", + "id": "դր." + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "ARS - Argentine Peso", + "value": "ARS", + "id": "$" + }, + { + "leftElement": "🇦🇸", + "searchText": "American Samoa", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇦🇽", + "searchText": "Alland Islands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "AZN - Azerbaijani Manat", + "value": "AZN", + "id": "ман." + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "BAM - Bosnia-Herzegovina Convertible Mark", + "value": "BAM", + "id": "KM" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "BDT - Bangladeshi Taka", + "value": "BDT", + "id": "৳" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "BGN - Bulgarian Lev", + "value": "BGN", + "id": "лв." + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "BHD - Bahraini Dinar", + "value": "BHD", + "id": "د.ب.‏" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "BIF - Burundian Franc", + "value": "BIF", + "id": "FBu" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇱", + "searchText": "Saint Barthelemy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "BND - Brunei Dollar", + "value": "BND", + "id": "$" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia", + "label": "BOB - Bolivian Boliviano", + "value": "BOB", + "id": "Bs" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "BRL - Brazilian Real", + "value": "BRL", + "id": "R$" + }, + { + "leftElement": "🇧🇻", + "searchText": "Bouvet Island", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "BWP - Botswanan Pula", + "value": "BWP", + "id": "P" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "BYR - Belarusian Ruble", + "value": "BYR", + "id": "BYR" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "BZD - Belize Dollar", + "value": "BZD", + "id": "$" + }, + { + "leftElement": "🇨🇦", + "searchText": "Canada", + "label": "CAD - Canadian Dollar", + "value": "CAD", + "id": "$" + }, + { + "leftElement": "🇨🇨", + "searchText": "Cocos (Keeling) Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, Democratic Republic of the", + "label": "CDF - Congolese Franc", + "value": "CDF", + "id": "FrCD" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo, Republic of the", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "CLP - Chilean Peso", + "value": "CLP", + "id": "$" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "CNY - Chinese Yuan", + "value": "CNY", + "id": "CN¥" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "COP - Colombian Peso", + "value": "COP", + "id": "$" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "CRC - Costa Rican Colón", + "value": "CRC", + "id": "₡" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "CVE - Cape Verdean Escudo", + "value": "CVE", + "id": "CV$" + }, + { + "leftElement": "🇨🇽", + "searchText": "Christmas Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "CZK - Czech Republic Koruna", + "value": "CZK", + "id": "Kč" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "DJF - Djiboutian Franc", + "value": "DJF", + "id": "Fdj" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "DOP - Dominican Peso", + "value": "DOP", + "id": "RD$" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "DZD - Algerian Dinar", + "value": "DZD", + "id": "د.ج.‏" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "EGP - Egyptian Pound", + "value": "EGP", + "id": "ج.م.‏" + }, + { + "leftElement": "🇪🇭", + "searchText": "Western Sahara", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "ERN - Eritrean Nakfa", + "value": "ERN", + "id": "Nfk" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "ETB - Ethiopian Birr", + "value": "ETB", + "id": "Br" + }, + { + "leftElement": "🇫🇮", + "searchText": "Finland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇧", + "searchText": "United Kingdom", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "GEL - Georgian Lari", + "value": "GEL", + "id": "GEL" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "GHS - Ghanaian Cedi", + "value": "GHS", + "id": "GH₵" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "GNF - Guinean Franc", + "value": "GNF", + "id": "FG" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇸", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "GTQ - Guatemalan Quetzal", + "value": "GTQ", + "id": "Q" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "HKD - Hong Kong Dollar", + "value": "HKD", + "id": "$" + }, + { + "leftElement": "🇭🇲", + "searchText": "Heard Island and McDonald Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "HNL - Honduran Lempira", + "value": "HNL", + "id": "L" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "HRK - Croatian Kuna", + "value": "HRK", + "id": "kn" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "HUF - Hungarian Forint", + "value": "HUF", + "id": "Ft" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "IDR - Indonesian Rupiah", + "value": "IDR", + "id": "Rp" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇮🇲", + "searchText": "Isle of Man", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "INR - Indian Rupee", + "value": "INR", + "id": "₹" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "IQD - Iraqi Dinar", + "value": "IQD", + "id": "د.ع.‏" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of", + "label": "IRR - Iranian Rial", + "value": "IRR", + "id": "﷼" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "ISK - Icelandic Króna", + "value": "ISK", + "id": "kr" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇯🇪", + "searchText": "Jersey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "JMD - Jamaican Dollar", + "value": "JMD", + "id": "$" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "JOD - Jordanian Dinar", + "value": "JOD", + "id": "د.أ.‏" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "JPY - Japanese Yen", + "value": "JPY", + "id": "¥" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "KES - Kenyan Shilling", + "value": "KES", + "id": "Ksh" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "KHR - Cambodian Riel", + "value": "KHR", + "id": "៛" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "KMF - Comorian Franc", + "value": "KMF", + "id": "FC" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of", + "label": "KRW - South Korean Won", + "value": "KRW", + "id": "₩" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "KWD - Kuwaiti Dinar", + "value": "KWD", + "id": "د.ك.‏" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "KZT - Kazakhstani Tenge", + "value": "KZT", + "id": "тңг." + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "LBP - Lebanese Pound", + "value": "LBP", + "id": "ل.ل.‏" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "LKR - Sri Lankan Rupee", + "value": "LKR", + "id": "SL Re" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "LTL - Lithuanian Litas", + "value": "LTL", + "id": "Lt" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libya", + "label": "LYD - Libyan Dinar", + "value": "LYD", + "id": "د.ل.‏" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova, Republic of", + "label": "MDL - Moldovan Leu", + "value": "MDL", + "id": "MDL" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇫", + "searchText": "Saint Martin (French part)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "MGA - Malagasy Ariary", + "value": "MGA", + "id": "MGA" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia, the Former Yugoslav Republic of", + "label": "MKD - Macedonian Denar", + "value": "MKD", + "id": "MKD" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "MMK - Myanma Kyat", + "value": "MMK", + "id": "K" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "MOP - Macanese Pataca", + "value": "MOP", + "id": "MOP$" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "MUR - Mauritian Rupee", + "value": "MUR", + "id": "MURs" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "MXN - Mexican Peso", + "value": "MXN", + "id": "$" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "MYR - Malaysian Ringgit", + "value": "MYR", + "id": "RM" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "MZN - Mozambican Metical", + "value": "MZN", + "id": "MTn" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "NAD - Namibian Dollar", + "value": "NAD", + "id": "N$" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇳🇫", + "searchText": "Norfolk Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "NGN - Nigerian Naira", + "value": "NGN", + "id": "₦" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "NIO - Nicaraguan Córdoba", + "value": "NIO", + "id": "C$" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "NPR - Nepalese Rupee", + "value": "NPR", + "id": "नेरू" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "OMR - Omani Rial", + "value": "OMR", + "id": "ر.ع.‏" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "PAB - Panamanian Balboa", + "value": "PAB", + "id": "B/." + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "PEN - Peruvian Nuevo Sol", + "value": "PEN", + "id": "S/." + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "PHP - Philippine Peso", + "value": "PHP", + "id": "₱" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "PKR - Pakistani Rupee", + "value": "PKR", + "id": "₨" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "PLN - Polish Zloty", + "value": "PLN", + "id": "zł" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestine, State of", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇾", + "searchText": "Paraguay", + "label": "PYG - Paraguayan Guarani", + "value": "PYG", + "id": "₲" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "QAR - Qatari Rial", + "value": "QAR", + "id": "ر.ق.‏" + }, + { + "leftElement": "🇷🇪", + "searchText": "Reunion", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "RON - Romanian Leu", + "value": "RON", + "id": "RON" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "RSD - Serbian Dinar", + "value": "RSD", + "id": "дин." + }, + { + "leftElement": "🇷🇺", + "searchText": "Russian Federation", + "label": "RUB - Russian Ruble", + "value": "RUB", + "id": "руб." + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "RWF - Rwandan Franc", + "value": "RWF", + "id": "FR" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "SAR - Saudi Riyal", + "value": "SAR", + "id": "ر.س.‏" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "SDG - Sudanese Pound", + "value": "SDG", + "id": "SDG" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "SEK - Swedish Krona", + "value": "SEK", + "id": "kr" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "SGD - Singapore Dollar", + "value": "SGD", + "id": "$" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇯", + "searchText": "Svalbard and Jan Mayen", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "SOS - Somali Shilling", + "value": "SOS", + "id": "Ssh" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "SYP - Syrian Pound", + "value": "SYP", + "id": "ل.س.‏" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇹🇫", + "searchText": "French Southern Territories", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "THB - Thai Baht", + "value": "THB", + "id": "฿" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "TND - Tunisian Dinar", + "value": "TND", + "id": "د.ت.‏" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "TOP - Tongan Paʻanga", + "value": "TOP", + "id": "T$" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "TRY - Turkish Lira", + "value": "TRY", + "id": "TL" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "TTD - Trinidad and Tobago Dollar", + "value": "TTD", + "id": "$" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan, Province of China", + "label": "TWD - New Taiwan Dollar", + "value": "TWD", + "id": "NT$" + }, + { + "leftElement": "🇹🇿", + "searchText": "United Republic of Tanzania", + "label": "TZS - Tanzanian Shilling", + "value": "TZS", + "id": "TSh" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "UAH - Ukrainian Hryvnia", + "value": "UAH", + "id": "₴" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "UGX - Ugandan Shilling", + "value": "UGX", + "id": "USh" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "UYU - Uruguayan Peso", + "value": "UYU", + "id": "$" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "UZS - Uzbekistan Som", + "value": "UZS", + "id": "UZS" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela", + "label": "VEF - Venezuelan Bolívar", + "value": "VEF", + "id": "Bs.F." + }, + { + "leftElement": "🇻🇬", + "searchText": "British Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇮", + "searchText": "US Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "VND - Vietnamese Dong", + "value": "VND", + "id": "₫" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "VUV - Vanuatu Vatu", + "value": "VUV", + "id": "VT" + }, + { + "leftElement": "🇽🇰", + "searchText": "Kosovo", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "YER - Yemeni Rial", + "value": "YER", + "id": "ر.ي.‏" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "ZAR - South African Rand", + "value": "ZAR", + "id": "R" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "ZMK - Zambian Kwacha", + "value": "ZMK", + "id": "ZK" + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "r4rc2gl7yv" + }, + { + "propertyName": "allowDialCodeChange", + "label": "Allow Country Code Change", + "helpText": "Search by country", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["schema"], + "validation": { + "type": "BOOLEAN" + }, + "id": "o4qnc8g5ck" + }, + { + "propertyName": "allowCurrencyChange", + "label": "Allow currency change", + "helpText": "Search by currency or country", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "8ka8k3fe0f" + }, + { + "propertyName": "decimalsInCurrency", + "helpText": "No. of decimals in currency input", + "label": "Decimals allowed", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "0", + "value": 0 + }, + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "bkfl5tqpt9" + }, + { + "propertyName": "defaultValue", + "label": "Default Selected", + "helpText": "Sets the On/Off default state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "tfd0w3ng3p" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{ \"label\": \"Option1\", \"value\": \"Option2\" }", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "value1 or { \"label\": \"label1\", \"value\": \"value1\" }", + "example": "value1 | { \"label\": \"label1\", \"value\": \"value1\" }", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: 'value should match: string | { \"label\": \"label1\", \"value\": \"value1\" }'\n };\n var value = inputValue;\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n return {\n isValid: true,\n parsed: inputValue,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (typeof inputValue === \"string\") {\n try {\n value = JSON.parse(inputValue);\n } catch (e) {}\n }\n if (_.isString(value) || _.isFinite(value)) {\n // When value is \"\", \"green\", 444\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (hasLabelValueProperties(value)) {\n // When value is {label: \"green\", value: \"green\"}\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n return {\n isValid: false,\n parsed: {},\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema"], + "id": "7d1t5sb9n6" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": \"string\", \"value\": \"string\" | number}>", + "example": "[{\"label\": \"One\", \"value\": \"one\"}]", + "autocompleteDataType": "STRING" + }, + "fnString": "function optionsCustomValidation(options, props, _) {\n var validationUtil = function validationUtil(options, _) {\n var _isValid = true;\n var message = {\n name: \"\",\n message: \"\"\n };\n var valueType = \"\";\n var uniqueLabels = {};\n for (var i = 0; i < options.length; i++) {\n var _options$i = options[i],\n label = _options$i.label,\n value = _options$i.value;\n if (!valueType) {\n valueType = typeof value;\n }\n //Checks the uniqueness all the values in the options\n if (!uniqueLabels.hasOwnProperty(value)) {\n uniqueLabels[value] = \"\";\n } else {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"path:value must be unique. Duplicate values found\"\n };\n break;\n }\n\n //Check if the required field \"label\" is present:\n if (!label) {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Missing required key: label\"\n };\n break;\n }\n\n //Validation checks for the the label.\n if (_.isNil(label) || label === \"\" || typeof label !== \"string\" && typeof label !== \"number\") {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Value of key: label is invalid: This value does not evaluate to type string\"\n };\n break;\n }\n\n //Check if all the data types for the value prop is the same.\n if (typeof value !== valueType) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: \"All value properties in options must have the same type\"\n };\n break;\n }\n\n //Check if the each object has value property.\n if (_.isNil(value)) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n };\n break;\n }\n }\n return {\n isValid: _isValid,\n parsed: _isValid ? options : [],\n messages: [message]\n };\n };\n var invalidResponse = {\n isValid: false,\n parsed: [],\n messages: [{\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n }]\n };\n try {\n if (_.isString(options)) {\n options = JSON.parse(options);\n }\n if (Array.isArray(options)) {\n return validationUtil(options, _);\n } else {\n return invalidResponse;\n }\n } catch (e) {\n return invalidResponse;\n }\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema"], + "id": "9fcmbz6h9w" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets a default selected option", + "label": "Default selected value", + "placeholderText": "Y", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string |\nnumber (only works in mustache syntax)", + "example": "abc | {{1}}", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValidation(value, props, _) {\n //Checks if the value is not of object type in {{}}\n if (_.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n\n //Checks if the value is not of boolean type in {{}}\n if (_.isBoolean(value)) {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value\n };\n}" + } + }, + "dependencies": ["schema", "sourceData"], + "id": "6991frkbwg" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected values", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[GREEN]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['option1', 'option2'] | [{ \"label\": \"label1\", \"value\": \"value1\" }]", + "autocompleteDataType": "ARRAY" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: \"value should match: Array | Array<{label: string, value: string | number}>\"\n };\n var UNIQUE_ERROR_MESSAGE = {\n name: \"ValidationError\",\n message: \"value must be unique. Duplicate values found\"\n };\n var hasUniqueValues = function hasUniqueValues(arr) {\n var uniqueValues = new Set(arr);\n return uniqueValues.size === arr.length;\n };\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // When value is \"['green', 'red']\", \"[{label: 'green', value: 'green'}]\" and \"green, red\"\n var convertToArray = function convertToArray(value) {\n if (typeof value === \"string\" && value.trim() !== \"\") {\n try {\n var parsedValue = JSON.parse(value);\n if (Array.isArray(parsedValue)) return parsedValue;\n } catch (e) {\n return value.split(\",\").map(function (s) {\n return s.trim();\n });\n }\n }\n if (Array.isArray(value)) return value;\n return [];\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n var parsed = inputValue === \"\" ? undefined : inputValue;\n return {\n isValid: true,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n var values = convertToArray(inputValue);\n\n // If there is inputValue but was not converted to proper array\n // or the input value is not string and not an array then error is returned\n if (typeof inputValue === \"string\" && inputValue.trim() !== \"\" && !values.length || typeof inputValue !== \"string\" && !Array.isArray(inputValue)) {\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n\n // When value is [\"green\", \"red\"]\n if (values.every(function (val) {\n return _.isString(val) || _.isFinite(val);\n })) {\n if (!hasUniqueValues(values)) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n // When value is [{label: \"green\", value: \"red\"}]\n } else if (values.every(hasLabelValueProperties)) {\n if (!hasUniqueValues(values.map(function (val) {\n return val.value;\n }))) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n } else {\n // When value is [true, false], [undefined, undefined] etc.\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n return {\n isValid: true,\n parsed: values,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema", "sourceData"], + "id": "yxuk3toabw" + }, + { + "helpText": "Sets the format of the selected date", + "propertyName": "dateFormat", + "label": "Date format", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "optionWidth": "340px", + "options": [ + { + "label": "2023-09-28T17:44:40.4040+05:30", + "subText": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.sssZ" + }, + { + "label": "September 28, 2023 5:44 PM", + "subText": "LLL", + "value": "LLL" + }, + { + "label": "September 28, 2023", + "subText": "LL", + "value": "LL" + }, + { + "label": "2023-09-28 17:44", + "subText": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "2023-09-28T17:44:40", + "subText": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "2023-09-28 05:44:40 PM", + "subText": "YYYY-MM-DD hh:mm:ss A", + "value": "YYYY-MM-DD hh:mm:ss A" + }, + { + "label": "28/09/2023 17:44", + "subText": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "28 September, 2023", + "subText": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "17:44 PM 28 September, 2023", + "subText": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "2023-09-28", + "subText": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "09-28-2023", + "subText": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "28-09-2023", + "subText": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "09/28/2023", + "subText": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "28/09/2023", + "subText": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "28/09/23", + "subText": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "09/28/23", + "subText": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "hideSubText": true, + "dependencies": ["schema"], + "id": "lse0zoc2va" + }, + { + "propertyName": "defaultValue", + "label": "Default Date", + "helpText": "Sets the default date of the widget. The date is updated if the default date changes", + "controlType": "DATE_PICKER", + "placeholderText": "Enter Default Date", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "ja2ajih4dt" + }, + { + "propertyName": "timePrecision", + "label": "Time precision", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the different time picker or hide.", + "defaultValue": "minute", + "options": [ + { + "label": "None", + "value": "None" + }, + { + "label": "Minute", + "value": "minute" + }, + { + "label": "Second", + "value": "second" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "None", + "minute", + "second" + ], + "default": "minute" + } + }, + "dependencies": ["schema"], + "id": "shyiw0wg5q" + }, + { + "propertyName": "defaultValue", + "label": "Default state", + "helpText": "Sets the default checked state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "501hx5c3o5" + }, + { + "helpText": "Sets the default value of the field. The array is updated when the default value changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY" + }, + "dependencies": ["schema"], + "id": "1i1jbad2uv" + }, + { + "propertyName": "children", + "label": "Field configuration", + "helpText": "Field configuration", + "controlType": "FIELD_CONFIGURATION", + "isBindProperty": false, + "isTriggerProperty": false, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "identifier", + "contentChildren": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "fieldType", + "label": "Field Type", + "helpText": "Type of the widget to be used corresponding to the field", + "controlType": "DROP_DOWN", + "isBindProperty": false, + "isTriggerProperty": false, + "options": [ + { + "label": "Array", + "value": "Array" + }, + { + "label": "Checkbox", + "value": "Checkbox" + }, + { + "label": "Currency Input", + "value": "Currency Input" + }, + { + "label": "Datepicker", + "value": "Datepicker" + }, + { + "label": "Email Input", + "value": "Email Input" + }, + { + "label": "Multiselect", + "value": "Multiselect" + }, + { + "label": "Multiline Text Input", + "value": "Multiline Text Input" + }, + { + "label": "Number Input", + "value": "Number Input" + }, + { + "label": "Object", + "value": "Object" + }, + { + "label": "Password Input", + "value": "Password Input" + }, + { + "label": "Phone Number Input", + "value": "Phone Number Input" + }, + { + "label": "Radio Group", + "value": "Radio Group" + }, + { + "label": "Select", + "value": "Select" + }, + { + "label": "Switch", + "value": "Switch" + }, + { + "label": "Text Input", + "value": "Text Input" + } + ], + "dependencies": [ + "schema", + "childStylesheet", + "dynamicBindingPathList" + ], + "id": "4k7sd8nc5f" + }, + { + "propertyName": "accessor", + "helpText": "Sets the property name of the field which can be used to access the value in formData and fieldState.", + "label": "Property Name", + "controlType": "INPUT_TEXT", + "placeholderText": "name", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "unique string", + "example": "firstName | last_name | age14", + "autocompleteDataType": "STRING" + }, + "fnString": "function accessorValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var grandParentPath = propertyPathChunks.slice(0, -2).join(\".\");\n var schemaItemIdentifier = propertyPathChunks.slice(-2)[0]; // ['schema', '__root_field__', 'children', 'age', 'name'] -> age\n var schema = lodash.cloneDeep(lodash.get(props, grandParentPath));\n var RESTRICTED_KEYS = [\"__array_item__\", \"__root_schema__\"];\n var currentSchemaItem = lodash.cloneDeep(schema[schemaItemIdentifier]);\n // Remove the current edited schemaItem from schema so it doesn't\n // get picked in the existing keys list\n delete schema[schemaItemIdentifier];\n\n // If the field is not _id (mongo id) then it shouldn't be allowed\n if (currentSchemaItem.originalIdentifier !== \"_id\") {\n RESTRICTED_KEYS.push(\"_id\");\n }\n if (value === \"\") {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"ValidationError\",\n message: \"Property Name cannot be empty\"\n }]\n };\n }\n var existingKeys = (Object.values(schema) || []).map(\n // @ts-expect-error: Types are not available\n function (schemaItem) {\n return schemaItem.name;\n });\n if (existingKeys.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"Property name already in use.\"\n }]\n };\n }\n if (RESTRICTED_KEYS.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"This is a restricted Property Name\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "jiqycfk515" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "schema", + "sourceData" + ], + "id": "n1ssipf1c6" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets the default text of the field. The text is updated if the default text changes", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "John Doe", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "5dy5xhr2r0" + }, + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "(000) 000-0000", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string", + "example": "(000) 000-0000", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "ac9b0hxif9" + }, + { + "propertyName": "dialCode", + "helpText": "Changes the country code", + "label": "Default country code", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or country name", + "options": [ + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "Afghanistan (+93)", + "value": "+93", + "id": "+93" + }, + { + "leftElement": "🇦🇽", + "searchText": "Aland Islands", + "label": "Aland Islands (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "Albania (+355)", + "value": "+355", + "id": "+355" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "Algeria (+213)", + "value": "+213", + "id": "+213" + }, + { + "leftElement": "🇦🇸", + "searchText": "AmericanSamoa", + "label": "AmericanSamoa (+1684)", + "value": "+1684", + "id": "+1684" + }, + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "Andorra (+376)", + "value": "+376", + "id": "+376" + }, + { + "leftElement": "🇦🇴", + "searchText": "Angola", + "label": "Angola (+244)", + "value": "+244", + "id": "+244" + }, + { + "leftElement": "🇦🇮", + "searchText": "Anguilla", + "label": "Anguilla (+1264)", + "value": "+1264", + "id": "+1264" + }, + { + "leftElement": "🇦🇶", + "searchText": "Antarctica", + "label": "Antarctica (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇦🇬", + "searchText": "Antigua and Barbuda", + "label": "Antigua and Barbuda (+1268)", + "value": "+1268", + "id": "+1268" + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "Argentina (+54)", + "value": "+54", + "id": "+54" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "Armenia (+374)", + "value": "+374", + "id": "+374" + }, + { + "leftElement": "🇦🇼", + "searchText": "Aruba", + "label": "Aruba (+297)", + "value": "+297", + "id": "+297" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "Australia (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "Austria (+43)", + "value": "+43", + "id": "+43" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "Azerbaijan (+994)", + "value": "+994", + "id": "+994" + }, + { + "leftElement": "🇧🇸", + "searchText": "Bahamas", + "label": "Bahamas (+1242)", + "value": "+1242", + "id": "+1242" + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "Bahrain (+973)", + "value": "+973", + "id": "+973" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "Bangladesh (+880)", + "value": "+880", + "id": "+880" + }, + { + "leftElement": "🇧🇧", + "searchText": "Barbados", + "label": "Barbados (+1246)", + "value": "+1246", + "id": "+1246" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "Belarus (+375)", + "value": "+375", + "id": "+375" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "Belgium (+32)", + "value": "+32", + "id": "+32" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "Belize (+501)", + "value": "+501", + "id": "+501" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "Benin (+229)", + "value": "+229", + "id": "+229" + }, + { + "leftElement": "🇧🇲", + "searchText": "Bermuda", + "label": "Bermuda (+1441)", + "value": "+1441", + "id": "+1441" + }, + { + "leftElement": "🇧🇹", + "searchText": "Bhutan", + "label": "Bhutan (+975)", + "value": "+975", + "id": "+975" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia, Plurinational State of", + "label": "Bolivia, Plurinational State of (+591)", + "value": "+591", + "id": "+591" + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "Bosnia and Herzegovina (+387)", + "value": "+387", + "id": "+387" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "Botswana (+267)", + "value": "+267", + "id": "+267" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "Brazil (+55)", + "value": "+55", + "id": "+55" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "British Indian Ocean Territory (+246)", + "value": "+246", + "id": "+246" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "Brunei Darussalam (+673)", + "value": "+673", + "id": "+673" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "Bulgaria (+359)", + "value": "+359", + "id": "+359" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "Burkina Faso (+226)", + "value": "+226", + "id": "+226" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "Burundi (+257)", + "value": "+257", + "id": "+257" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "Cambodia (+855)", + "value": "+855", + "id": "+855" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "Cameroon (+237)", + "value": "+237", + "id": "+237" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "Cape Verde (+238)", + "value": "+238", + "id": "+238" + }, + { + "leftElement": "🇰🇾", + "searchText": "Cayman Islands", + "label": "Cayman Islands (+ 345)", + "value": "+ 345", + "id": "+ 345" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "Central African Republic (+236)", + "value": "+236", + "id": "+236" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "Chad (+235)", + "value": "+235", + "id": "+235" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "Chile (+56)", + "value": "+56", + "id": "+56" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "China (+86)", + "value": "+86", + "id": "+86" + }, + { + "leftElement": "🇦🇺", + "searchText": "Christmas Island", + "label": "Christmas Island (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇺", + "searchText": "Cocos (Keeling) Islands", + "label": "Cocos (Keeling) Islands (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "Colombia (+57)", + "value": "+57", + "id": "+57" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "Comoros (+269)", + "value": "+269", + "id": "+269" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo", + "label": "Congo (+242)", + "value": "+242", + "id": "+242" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, The Democratic Republic of the Congo", + "label": "Congo, The Democratic Republic of the Congo (+243)", + "value": "+243", + "id": "+243" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "Cook Islands (+682)", + "value": "+682", + "id": "+682" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "Costa Rica (+506)", + "value": "+506", + "id": "+506" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "Cote d'Ivoire (+225)", + "value": "+225", + "id": "+225" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "Croatia (+385)", + "value": "+385", + "id": "+385" + }, + { + "leftElement": "🇨🇺", + "searchText": "Cuba", + "label": "Cuba (+53)", + "value": "+53", + "id": "+53" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "Cyprus (+357)", + "value": "+357", + "id": "+357" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "Czech Republic (+420)", + "value": "+420", + "id": "+420" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "Denmark (+45)", + "value": "+45", + "id": "+45" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "Djibouti (+253)", + "value": "+253", + "id": "+253" + }, + { + "leftElement": "🇩🇲", + "searchText": "Dominica", + "label": "Dominica (+1767)", + "value": "+1767", + "id": "+1767" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "Dominican Republic (+1849)", + "value": "+1849", + "id": "+1849" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "Ecuador (+593)", + "value": "+593", + "id": "+593" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "Egypt (+20)", + "value": "+20", + "id": "+20" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "El Salvador (+503)", + "value": "+503", + "id": "+503" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "Equatorial Guinea (+240)", + "value": "+240", + "id": "+240" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "Eritrea (+291)", + "value": "+291", + "id": "+291" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "Estonia (+372)", + "value": "+372", + "id": "+372" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "Ethiopia (+251)", + "value": "+251", + "id": "+251" + }, + { + "leftElement": "🇫🇰", + "searchText": "Falkland Islands (Malvinas)", + "label": "Falkland Islands (Malvinas) (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "Faroe Islands (+298)", + "value": "+298", + "id": "+298" + }, + { + "leftElement": "🇫🇯", + "searchText": "Fiji", + "label": "Fiji (+679)", + "value": "+679", + "id": "+679" + }, + { + "leftElement": "🇦🇽", + "searchText": "Finland", + "label": "Finland (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "France (+33)", + "value": "+33", + "id": "+33" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "French Guiana (+594)", + "value": "+594", + "id": "+594" + }, + { + "leftElement": "🇵🇫", + "searchText": "French Polynesia", + "label": "French Polynesia (+689)", + "value": "+689", + "id": "+689" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "Gabon (+241)", + "value": "+241", + "id": "+241" + }, + { + "leftElement": "🇬🇲", + "searchText": "Gambia", + "label": "Gambia (+220)", + "value": "+220", + "id": "+220" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "Georgia (+995)", + "value": "+995", + "id": "+995" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "Germany (+49)", + "value": "+49", + "id": "+49" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "Ghana (+233)", + "value": "+233", + "id": "+233" + }, + { + "leftElement": "🇬🇮", + "searchText": "Gibraltar", + "label": "Gibraltar (+350)", + "value": "+350", + "id": "+350" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "Greece (+30)", + "value": "+30", + "id": "+30" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "Greenland (+299)", + "value": "+299", + "id": "+299" + }, + { + "leftElement": "🇬🇩", + "searchText": "Grenada", + "label": "Grenada (+1473)", + "value": "+1473", + "id": "+1473" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "Guadeloupe (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "Guam (+1671)", + "value": "+1671", + "id": "+1671" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "Guatemala (+502)", + "value": "+502", + "id": "+502" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "Guernsey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "Guinea (+224)", + "value": "+224", + "id": "+224" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "Guinea-Bissau (+245)", + "value": "+245", + "id": "+245" + }, + { + "leftElement": "🇬🇾", + "searchText": "Guyana", + "label": "Guyana (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇭🇹", + "searchText": "Haiti", + "label": "Haiti (+509)", + "value": "+509", + "id": "+509" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "Holy See (Vatican City State) (+379)", + "value": "+379", + "id": "+379" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "Honduras (+504)", + "value": "+504", + "id": "+504" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "Hong Kong (+852)", + "value": "+852", + "id": "+852" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "Hungary (+36)", + "value": "+36", + "id": "+36" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "Iceland (+354)", + "value": "+354", + "id": "+354" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "India (+91)", + "value": "+91", + "id": "+91" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "Indonesia (+62)", + "value": "+62", + "id": "+62" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of Persian Gulf", + "label": "Iran, Islamic Republic of Persian Gulf (+98)", + "value": "+98", + "id": "+98" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "Iraq (+964)", + "value": "+964", + "id": "+964" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "Ireland (+353)", + "value": "+353", + "id": "+353" + }, + { + "leftElement": "🇬🇬", + "searchText": "Isle of Man", + "label": "Isle of Man (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "Israel (+972)", + "value": "+972", + "id": "+972" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "Italy (+39)", + "value": "+39", + "id": "+39" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "Jamaica (+1876)", + "value": "+1876", + "id": "+1876" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "Japan (+81)", + "value": "+81", + "id": "+81" + }, + { + "leftElement": "🇬🇬", + "searchText": "Jersey", + "label": "Jersey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "Jordan (+962)", + "value": "+962", + "id": "+962" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "Kazakhstan (+77)", + "value": "+77", + "id": "+77" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "Kenya (+254)", + "value": "+254", + "id": "+254" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "Kiribati (+686)", + "value": "+686", + "id": "+686" + }, + { + "leftElement": "🇰🇵", + "searchText": "Korea, Democratic People's Republic of Korea", + "label": "Korea, Democratic People's Republic of Korea (+850)", + "value": "+850", + "id": "+850" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of South Korea", + "label": "Korea, Republic of South Korea (+82)", + "value": "+82", + "id": "+82" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "Kuwait (+965)", + "value": "+965", + "id": "+965" + }, + { + "leftElement": "🇰🇬", + "searchText": "Kyrgyzstan", + "label": "Kyrgyzstan (+996)", + "value": "+996", + "id": "+996" + }, + { + "leftElement": "🇱🇦", + "searchText": "Laos", + "label": "Laos (+856)", + "value": "+856", + "id": "+856" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "Latvia (+371)", + "value": "+371", + "id": "+371" + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "Lebanon (+961)", + "value": "+961", + "id": "+961" + }, + { + "leftElement": "🇱🇸", + "searchText": "Lesotho", + "label": "Lesotho (+266)", + "value": "+266", + "id": "+266" + }, + { + "leftElement": "🇱🇷", + "searchText": "Liberia", + "label": "Liberia (+231)", + "value": "+231", + "id": "+231" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libyan Arab Jamahiriya", + "label": "Libyan Arab Jamahiriya (+218)", + "value": "+218", + "id": "+218" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "Liechtenstein (+423)", + "value": "+423", + "id": "+423" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "Lithuania (+370)", + "value": "+370", + "id": "+370" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "Luxembourg (+352)", + "value": "+352", + "id": "+352" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "Macao (+853)", + "value": "+853", + "id": "+853" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia", + "label": "Macedonia (+389)", + "value": "+389", + "id": "+389" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "Madagascar (+261)", + "value": "+261", + "id": "+261" + }, + { + "leftElement": "🇲🇼", + "searchText": "Malawi", + "label": "Malawi (+265)", + "value": "+265", + "id": "+265" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "Malaysia (+60)", + "value": "+60", + "id": "+60" + }, + { + "leftElement": "🇲🇻", + "searchText": "Maldives", + "label": "Maldives (+960)", + "value": "+960", + "id": "+960" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "Mali (+223)", + "value": "+223", + "id": "+223" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "Malta (+356)", + "value": "+356", + "id": "+356" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "Marshall Islands (+692)", + "value": "+692", + "id": "+692" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "Martinique (+596)", + "value": "+596", + "id": "+596" + }, + { + "leftElement": "🇲🇷", + "searchText": "Mauritania", + "label": "Mauritania (+222)", + "value": "+222", + "id": "+222" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "Mauritius (+230)", + "value": "+230", + "id": "+230" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "Mayotte (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "Mexico (+52)", + "value": "+52", + "id": "+52" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of Micronesia", + "label": "Micronesia, Federated States of Micronesia (+691)", + "value": "+691", + "id": "+691" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova", + "label": "Moldova (+373)", + "value": "+373", + "id": "+373" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "Monaco (+377)", + "value": "+377", + "id": "+377" + }, + { + "leftElement": "🇲🇳", + "searchText": "Mongolia", + "label": "Mongolia (+976)", + "value": "+976", + "id": "+976" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "Montenegro (+382)", + "value": "+382", + "id": "+382" + }, + { + "leftElement": "🇲🇸", + "searchText": "Montserrat", + "label": "Montserrat (+1664)", + "value": "+1664", + "id": "+1664" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "Morocco (+212)", + "value": "+212", + "id": "+212" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "Mozambique (+258)", + "value": "+258", + "id": "+258" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "Myanmar (+95)", + "value": "+95", + "id": "+95" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "Namibia (+264)", + "value": "+264", + "id": "+264" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "Nauru (+674)", + "value": "+674", + "id": "+674" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "Nepal (+977)", + "value": "+977", + "id": "+977" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "Netherlands (+31)", + "value": "+31", + "id": "+31" + }, + { + "leftElement": "🇦🇳", + "searchText": "Netherlands Antilles", + "label": "Netherlands Antilles (+599)", + "value": "+599", + "id": "+599" + }, + { + "leftElement": "🇳🇨", + "searchText": "New Caledonia", + "label": "New Caledonia (+687)", + "value": "+687", + "id": "+687" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "New Zealand (+64)", + "value": "+64", + "id": "+64" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "Nicaragua (+505)", + "value": "+505", + "id": "+505" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "Niger (+227)", + "value": "+227", + "id": "+227" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "Nigeria (+234)", + "value": "+234", + "id": "+234" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "Niue (+683)", + "value": "+683", + "id": "+683" + }, + { + "leftElement": "🇦🇶", + "searchText": "Norfolk Island", + "label": "Norfolk Island (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "Northern Mariana Islands (+1670)", + "value": "+1670", + "id": "+1670" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "Norway (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "Oman (+968)", + "value": "+968", + "id": "+968" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "Pakistan (+92)", + "value": "+92", + "id": "+92" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "Palau (+680)", + "value": "+680", + "id": "+680" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestinian Territory, Occupied", + "label": "Palestinian Territory, Occupied (+970)", + "value": "+970", + "id": "+970" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "Panama (+507)", + "value": "+507", + "id": "+507" + }, + { + "leftElement": "🇵🇬", + "searchText": "Papua New Guinea", + "label": "Papua New Guinea (+675)", + "value": "+675", + "id": "+675" + }, + { + "leftElement": "🇬🇾", + "searchText": "Paraguay", + "label": "Paraguay (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "Peru (+51)", + "value": "+51", + "id": "+51" + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "Philippines (+63)", + "value": "+63", + "id": "+63" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "Pitcairn (+872)", + "value": "+872", + "id": "+872" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "Poland (+48)", + "value": "+48", + "id": "+48" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "Portugal (+351)", + "value": "+351", + "id": "+351" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "Puerto Rico (+1939)", + "value": "+1939", + "id": "+1939" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "Qatar (+974)", + "value": "+974", + "id": "+974" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "Romania (+40)", + "value": "+40", + "id": "+40" + }, + { + "leftElement": "🇷🇺", + "searchText": "Russia", + "label": "Russia (+7)", + "value": "+7", + "id": "+7" + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "Rwanda (+250)", + "value": "+250", + "id": "+250" + }, + { + "leftElement": "🇾🇹", + "searchText": "Reunion", + "label": "Reunion (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Barthelemy", + "label": "Saint Barthelemy (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇸🇭", + "searchText": "Saint Helena, Ascension and Tristan Da Cunha", + "label": "Saint Helena, Ascension and Tristan Da Cunha (+290)", + "value": "+290", + "id": "+290" + }, + { + "leftElement": "🇰🇳", + "searchText": "Saint Kitts and Nevis", + "label": "Saint Kitts and Nevis (+1869)", + "value": "+1869", + "id": "+1869" + }, + { + "leftElement": "🇱🇨", + "searchText": "Saint Lucia", + "label": "Saint Lucia (+1758)", + "value": "+1758", + "id": "+1758" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Martin", + "label": "Saint Martin (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "Saint Pierre and Miquelon (+508)", + "value": "+508", + "id": "+508" + }, + { + "leftElement": "🇻🇨", + "searchText": "Saint Vincent and the Grenadines", + "label": "Saint Vincent and the Grenadines (+1784)", + "value": "+1784", + "id": "+1784" + }, + { + "leftElement": "🇼🇸", + "searchText": "Samoa", + "label": "Samoa (+685)", + "value": "+685", + "id": "+685" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "San Marino (+378)", + "value": "+378", + "id": "+378" + }, + { + "leftElement": "🇸🇹", + "searchText": "Sao Tome and Principe", + "label": "Sao Tome and Principe (+239)", + "value": "+239", + "id": "+239" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "Saudi Arabia (+966)", + "value": "+966", + "id": "+966" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "Senegal (+221)", + "value": "+221", + "id": "+221" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "Serbia (+381)", + "value": "+381", + "id": "+381" + }, + { + "leftElement": "🇸🇨", + "searchText": "Seychelles", + "label": "Seychelles (+248)", + "value": "+248", + "id": "+248" + }, + { + "leftElement": "🇸🇱", + "searchText": "Sierra Leone", + "label": "Sierra Leone (+232)", + "value": "+232", + "id": "+232" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "Singapore (+65)", + "value": "+65", + "id": "+65" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "Slovakia (+421)", + "value": "+421", + "id": "+421" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "Slovenia (+386)", + "value": "+386", + "id": "+386" + }, + { + "leftElement": "🇸🇧", + "searchText": "Solomon Islands", + "label": "Solomon Islands (+677)", + "value": "+677", + "id": "+677" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "Somalia (+252)", + "value": "+252", + "id": "+252" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "South Africa (+27)", + "value": "+27", + "id": "+27" + }, + { + "leftElement": "🇸🇸", + "searchText": "South Sudan", + "label": "South Sudan (+211)", + "value": "+211", + "id": "+211" + }, + { + "leftElement": "🇫🇰", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "South Georgia and the South Sandwich Islands (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "Spain (+34)", + "value": "+34", + "id": "+34" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "Sri Lanka (+94)", + "value": "+94", + "id": "+94" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "Sudan (+249)", + "value": "+249", + "id": "+249" + }, + { + "leftElement": "🇸🇷", + "searchText": "Suriname", + "label": "Suriname (+597)", + "value": "+597", + "id": "+597" + }, + { + "leftElement": "🇳🇴", + "searchText": "Svalbard and Jan Mayen", + "label": "Svalbard and Jan Mayen (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇸🇿", + "searchText": "Swaziland", + "label": "Swaziland (+268)", + "value": "+268", + "id": "+268" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "Sweden (+46)", + "value": "+46", + "id": "+46" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "Switzerland (+41)", + "value": "+41", + "id": "+41" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "Syrian Arab Republic (+963)", + "value": "+963", + "id": "+963" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan", + "label": "Taiwan (+886)", + "value": "+886", + "id": "+886" + }, + { + "leftElement": "🇹🇯", + "searchText": "Tajikistan", + "label": "Tajikistan (+992)", + "value": "+992", + "id": "+992" + }, + { + "leftElement": "🇹🇿", + "searchText": "Tanzania, United Republic of Tanzania", + "label": "Tanzania, United Republic of Tanzania (+255)", + "value": "+255", + "id": "+255" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "Thailand (+66)", + "value": "+66", + "id": "+66" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "Timor-Leste (+670)", + "value": "+670", + "id": "+670" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "Togo (+228)", + "value": "+228", + "id": "+228" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "Tokelau (+690)", + "value": "+690", + "id": "+690" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "Tonga (+676)", + "value": "+676", + "id": "+676" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "Trinidad and Tobago (+1868)", + "value": "+1868", + "id": "+1868" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "Tunisia (+216)", + "value": "+216", + "id": "+216" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "Turkey (+90)", + "value": "+90", + "id": "+90" + }, + { + "leftElement": "🇹🇲", + "searchText": "Turkmenistan", + "label": "Turkmenistan (+993)", + "value": "+993", + "id": "+993" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "Turks and Caicos Islands (+1649)", + "value": "+1649", + "id": "+1649" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "Tuvalu (+688)", + "value": "+688", + "id": "+688" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "Uganda (+256)", + "value": "+256", + "id": "+256" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "Ukraine (+380)", + "value": "+380", + "id": "+380" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "United Arab Emirates (+971)", + "value": "+971", + "id": "+971" + }, + { + "leftElement": "🇬🇬", + "searchText": "United Kingdom", + "label": "United Kingdom (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States / Canada", + "label": "United States / Canada (+1)", + "value": "+1", + "id": "+1" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "Uruguay (+598)", + "value": "+598", + "id": "+598" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "Uzbekistan (+998)", + "value": "+998", + "id": "+998" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "Vanuatu (+678)", + "value": "+678", + "id": "+678" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela, Bolivarian Republic of Venezuela", + "label": "Venezuela, Bolivarian Republic of Venezuela (+58)", + "value": "+58", + "id": "+58" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "Vietnam (+84)", + "value": "+84", + "id": "+84" + }, + { + "leftElement": "🇻🇬", + "searchText": "Virgin Islands, British", + "label": "Virgin Islands, British (+1284)", + "value": "+1284", + "id": "+1284" + }, + { + "leftElement": "🇻🇮", + "searchText": "Virgin Islands, U.S.", + "label": "Virgin Islands, U.S. (+1340)", + "value": "+1340", + "id": "+1340" + }, + { + "leftElement": "🇼🇫", + "searchText": "Wallis and Futuna", + "label": "Wallis and Futuna (+681)", + "value": "+681", + "id": "+681" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "Yemen (+967)", + "value": "+967", + "id": "+967" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "Zambia (+260)", + "value": "+260", + "id": "+260" + }, + { + "leftElement": "🇿🇼", + "searchText": "Zimbabwe", + "label": "Zimbabwe (+263)", + "value": "+263", + "id": "+263" + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "1gk30aq6vg" + }, + { + "propertyName": "currencyCountryCode", + "helpText": "Changes the type of currency", + "label": "Currency", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or name", + "options": [ + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "AED - United Arab Emirates Dirham", + "value": "AED", + "id": "د.إ.‏" + }, + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "AFN - Afghan Afghani", + "value": "AFN", + "id": "؋" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "ALL - Albanian Lek", + "value": "ALL", + "id": "Lek" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "AMD - Armenian Dram", + "value": "AMD", + "id": "դր." + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "ARS - Argentine Peso", + "value": "ARS", + "id": "$" + }, + { + "leftElement": "🇦🇸", + "searchText": "American Samoa", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇦🇽", + "searchText": "Alland Islands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "AZN - Azerbaijani Manat", + "value": "AZN", + "id": "ман." + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "BAM - Bosnia-Herzegovina Convertible Mark", + "value": "BAM", + "id": "KM" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "BDT - Bangladeshi Taka", + "value": "BDT", + "id": "৳" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "BGN - Bulgarian Lev", + "value": "BGN", + "id": "лв." + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "BHD - Bahraini Dinar", + "value": "BHD", + "id": "د.ب.‏" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "BIF - Burundian Franc", + "value": "BIF", + "id": "FBu" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇱", + "searchText": "Saint Barthelemy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "BND - Brunei Dollar", + "value": "BND", + "id": "$" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia", + "label": "BOB - Bolivian Boliviano", + "value": "BOB", + "id": "Bs" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "BRL - Brazilian Real", + "value": "BRL", + "id": "R$" + }, + { + "leftElement": "🇧🇻", + "searchText": "Bouvet Island", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "BWP - Botswanan Pula", + "value": "BWP", + "id": "P" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "BYR - Belarusian Ruble", + "value": "BYR", + "id": "BYR" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "BZD - Belize Dollar", + "value": "BZD", + "id": "$" + }, + { + "leftElement": "🇨🇦", + "searchText": "Canada", + "label": "CAD - Canadian Dollar", + "value": "CAD", + "id": "$" + }, + { + "leftElement": "🇨🇨", + "searchText": "Cocos (Keeling) Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, Democratic Republic of the", + "label": "CDF - Congolese Franc", + "value": "CDF", + "id": "FrCD" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo, Republic of the", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "CLP - Chilean Peso", + "value": "CLP", + "id": "$" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "CNY - Chinese Yuan", + "value": "CNY", + "id": "CN¥" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "COP - Colombian Peso", + "value": "COP", + "id": "$" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "CRC - Costa Rican Colón", + "value": "CRC", + "id": "₡" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "CVE - Cape Verdean Escudo", + "value": "CVE", + "id": "CV$" + }, + { + "leftElement": "🇨🇽", + "searchText": "Christmas Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "CZK - Czech Republic Koruna", + "value": "CZK", + "id": "Kč" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "DJF - Djiboutian Franc", + "value": "DJF", + "id": "Fdj" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "DOP - Dominican Peso", + "value": "DOP", + "id": "RD$" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "DZD - Algerian Dinar", + "value": "DZD", + "id": "د.ج.‏" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "EGP - Egyptian Pound", + "value": "EGP", + "id": "ج.م.‏" + }, + { + "leftElement": "🇪🇭", + "searchText": "Western Sahara", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "ERN - Eritrean Nakfa", + "value": "ERN", + "id": "Nfk" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "ETB - Ethiopian Birr", + "value": "ETB", + "id": "Br" + }, + { + "leftElement": "🇫🇮", + "searchText": "Finland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇧", + "searchText": "United Kingdom", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "GEL - Georgian Lari", + "value": "GEL", + "id": "GEL" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "GHS - Ghanaian Cedi", + "value": "GHS", + "id": "GH₵" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "GNF - Guinean Franc", + "value": "GNF", + "id": "FG" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇸", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "GTQ - Guatemalan Quetzal", + "value": "GTQ", + "id": "Q" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "HKD - Hong Kong Dollar", + "value": "HKD", + "id": "$" + }, + { + "leftElement": "🇭🇲", + "searchText": "Heard Island and McDonald Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "HNL - Honduran Lempira", + "value": "HNL", + "id": "L" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "HRK - Croatian Kuna", + "value": "HRK", + "id": "kn" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "HUF - Hungarian Forint", + "value": "HUF", + "id": "Ft" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "IDR - Indonesian Rupiah", + "value": "IDR", + "id": "Rp" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇮🇲", + "searchText": "Isle of Man", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "INR - Indian Rupee", + "value": "INR", + "id": "₹" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "IQD - Iraqi Dinar", + "value": "IQD", + "id": "د.ع.‏" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of", + "label": "IRR - Iranian Rial", + "value": "IRR", + "id": "﷼" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "ISK - Icelandic Króna", + "value": "ISK", + "id": "kr" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇯🇪", + "searchText": "Jersey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "JMD - Jamaican Dollar", + "value": "JMD", + "id": "$" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "JOD - Jordanian Dinar", + "value": "JOD", + "id": "د.أ.‏" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "JPY - Japanese Yen", + "value": "JPY", + "id": "¥" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "KES - Kenyan Shilling", + "value": "KES", + "id": "Ksh" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "KHR - Cambodian Riel", + "value": "KHR", + "id": "៛" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "KMF - Comorian Franc", + "value": "KMF", + "id": "FC" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of", + "label": "KRW - South Korean Won", + "value": "KRW", + "id": "₩" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "KWD - Kuwaiti Dinar", + "value": "KWD", + "id": "د.ك.‏" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "KZT - Kazakhstani Tenge", + "value": "KZT", + "id": "тңг." + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "LBP - Lebanese Pound", + "value": "LBP", + "id": "ل.ل.‏" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "LKR - Sri Lankan Rupee", + "value": "LKR", + "id": "SL Re" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "LTL - Lithuanian Litas", + "value": "LTL", + "id": "Lt" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libya", + "label": "LYD - Libyan Dinar", + "value": "LYD", + "id": "د.ل.‏" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova, Republic of", + "label": "MDL - Moldovan Leu", + "value": "MDL", + "id": "MDL" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇫", + "searchText": "Saint Martin (French part)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "MGA - Malagasy Ariary", + "value": "MGA", + "id": "MGA" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia, the Former Yugoslav Republic of", + "label": "MKD - Macedonian Denar", + "value": "MKD", + "id": "MKD" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "MMK - Myanma Kyat", + "value": "MMK", + "id": "K" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "MOP - Macanese Pataca", + "value": "MOP", + "id": "MOP$" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "MUR - Mauritian Rupee", + "value": "MUR", + "id": "MURs" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "MXN - Mexican Peso", + "value": "MXN", + "id": "$" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "MYR - Malaysian Ringgit", + "value": "MYR", + "id": "RM" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "MZN - Mozambican Metical", + "value": "MZN", + "id": "MTn" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "NAD - Namibian Dollar", + "value": "NAD", + "id": "N$" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇳🇫", + "searchText": "Norfolk Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "NGN - Nigerian Naira", + "value": "NGN", + "id": "₦" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "NIO - Nicaraguan Córdoba", + "value": "NIO", + "id": "C$" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "NPR - Nepalese Rupee", + "value": "NPR", + "id": "नेरू" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "OMR - Omani Rial", + "value": "OMR", + "id": "ر.ع.‏" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "PAB - Panamanian Balboa", + "value": "PAB", + "id": "B/." + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "PEN - Peruvian Nuevo Sol", + "value": "PEN", + "id": "S/." + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "PHP - Philippine Peso", + "value": "PHP", + "id": "₱" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "PKR - Pakistani Rupee", + "value": "PKR", + "id": "₨" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "PLN - Polish Zloty", + "value": "PLN", + "id": "zł" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestine, State of", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇾", + "searchText": "Paraguay", + "label": "PYG - Paraguayan Guarani", + "value": "PYG", + "id": "₲" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "QAR - Qatari Rial", + "value": "QAR", + "id": "ر.ق.‏" + }, + { + "leftElement": "🇷🇪", + "searchText": "Reunion", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "RON - Romanian Leu", + "value": "RON", + "id": "RON" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "RSD - Serbian Dinar", + "value": "RSD", + "id": "дин." + }, + { + "leftElement": "🇷🇺", + "searchText": "Russian Federation", + "label": "RUB - Russian Ruble", + "value": "RUB", + "id": "руб." + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "RWF - Rwandan Franc", + "value": "RWF", + "id": "FR" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "SAR - Saudi Riyal", + "value": "SAR", + "id": "ر.س.‏" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "SDG - Sudanese Pound", + "value": "SDG", + "id": "SDG" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "SEK - Swedish Krona", + "value": "SEK", + "id": "kr" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "SGD - Singapore Dollar", + "value": "SGD", + "id": "$" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇯", + "searchText": "Svalbard and Jan Mayen", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "SOS - Somali Shilling", + "value": "SOS", + "id": "Ssh" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "SYP - Syrian Pound", + "value": "SYP", + "id": "ل.س.‏" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇹🇫", + "searchText": "French Southern Territories", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "THB - Thai Baht", + "value": "THB", + "id": "฿" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "TND - Tunisian Dinar", + "value": "TND", + "id": "د.ت.‏" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "TOP - Tongan Paʻanga", + "value": "TOP", + "id": "T$" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "TRY - Turkish Lira", + "value": "TRY", + "id": "TL" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "TTD - Trinidad and Tobago Dollar", + "value": "TTD", + "id": "$" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan, Province of China", + "label": "TWD - New Taiwan Dollar", + "value": "TWD", + "id": "NT$" + }, + { + "leftElement": "🇹🇿", + "searchText": "United Republic of Tanzania", + "label": "TZS - Tanzanian Shilling", + "value": "TZS", + "id": "TSh" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "UAH - Ukrainian Hryvnia", + "value": "UAH", + "id": "₴" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "UGX - Ugandan Shilling", + "value": "UGX", + "id": "USh" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "UYU - Uruguayan Peso", + "value": "UYU", + "id": "$" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "UZS - Uzbekistan Som", + "value": "UZS", + "id": "UZS" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela", + "label": "VEF - Venezuelan Bolívar", + "value": "VEF", + "id": "Bs.F." + }, + { + "leftElement": "🇻🇬", + "searchText": "British Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇮", + "searchText": "US Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "VND - Vietnamese Dong", + "value": "VND", + "id": "₫" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "VUV - Vanuatu Vatu", + "value": "VUV", + "id": "VT" + }, + { + "leftElement": "🇽🇰", + "searchText": "Kosovo", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "YER - Yemeni Rial", + "value": "YER", + "id": "ر.ي.‏" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "ZAR - South African Rand", + "value": "ZAR", + "id": "R" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "ZMK - Zambian Kwacha", + "value": "ZMK", + "id": "ZK" + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "r4rc2gl7yv" + }, + { + "propertyName": "allowDialCodeChange", + "label": "Allow Country Code Change", + "helpText": "Search by country", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["schema"], + "validation": { + "type": "BOOLEAN" + }, + "id": "o4qnc8g5ck" + }, + { + "propertyName": "allowCurrencyChange", + "label": "Allow currency change", + "helpText": "Search by currency or country", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "8ka8k3fe0f" + }, + { + "propertyName": "decimalsInCurrency", + "helpText": "No. of decimals in currency input", + "label": "Decimals allowed", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "0", + "value": 0 + }, + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "bkfl5tqpt9" + }, + { + "propertyName": "defaultValue", + "label": "Default Selected", + "helpText": "Sets the On/Off default state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "tfd0w3ng3p" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{ \"label\": \"Option1\", \"value\": \"Option2\" }", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "value1 or { \"label\": \"label1\", \"value\": \"value1\" }", + "example": "value1 | { \"label\": \"label1\", \"value\": \"value1\" }", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: 'value should match: string | { \"label\": \"label1\", \"value\": \"value1\" }'\n };\n var value = inputValue;\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n return {\n isValid: true,\n parsed: inputValue,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (typeof inputValue === \"string\") {\n try {\n value = JSON.parse(inputValue);\n } catch (e) {}\n }\n if (_.isString(value) || _.isFinite(value)) {\n // When value is \"\", \"green\", 444\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (hasLabelValueProperties(value)) {\n // When value is {label: \"green\", value: \"green\"}\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n return {\n isValid: false,\n parsed: {},\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema"], + "id": "7d1t5sb9n6" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": \"string\", \"value\": \"string\" | number}>", + "example": "[{\"label\": \"One\", \"value\": \"one\"}]", + "autocompleteDataType": "STRING" + }, + "fnString": "function optionsCustomValidation(options, props, _) {\n var validationUtil = function validationUtil(options, _) {\n var _isValid = true;\n var message = {\n name: \"\",\n message: \"\"\n };\n var valueType = \"\";\n var uniqueLabels = {};\n for (var i = 0; i < options.length; i++) {\n var _options$i = options[i],\n label = _options$i.label,\n value = _options$i.value;\n if (!valueType) {\n valueType = typeof value;\n }\n //Checks the uniqueness all the values in the options\n if (!uniqueLabels.hasOwnProperty(value)) {\n uniqueLabels[value] = \"\";\n } else {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"path:value must be unique. Duplicate values found\"\n };\n break;\n }\n\n //Check if the required field \"label\" is present:\n if (!label) {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Missing required key: label\"\n };\n break;\n }\n\n //Validation checks for the the label.\n if (_.isNil(label) || label === \"\" || typeof label !== \"string\" && typeof label !== \"number\") {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Value of key: label is invalid: This value does not evaluate to type string\"\n };\n break;\n }\n\n //Check if all the data types for the value prop is the same.\n if (typeof value !== valueType) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: \"All value properties in options must have the same type\"\n };\n break;\n }\n\n //Check if the each object has value property.\n if (_.isNil(value)) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n };\n break;\n }\n }\n return {\n isValid: _isValid,\n parsed: _isValid ? options : [],\n messages: [message]\n };\n };\n var invalidResponse = {\n isValid: false,\n parsed: [],\n messages: [{\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n }]\n };\n try {\n if (_.isString(options)) {\n options = JSON.parse(options);\n }\n if (Array.isArray(options)) {\n return validationUtil(options, _);\n } else {\n return invalidResponse;\n }\n } catch (e) {\n return invalidResponse;\n }\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema"], + "id": "9fcmbz6h9w" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets a default selected option", + "label": "Default selected value", + "placeholderText": "Y", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string |\nnumber (only works in mustache syntax)", + "example": "abc | {{1}}", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValidation(value, props, _) {\n //Checks if the value is not of object type in {{}}\n if (_.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n\n //Checks if the value is not of boolean type in {{}}\n if (_.isBoolean(value)) {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value\n };\n}" + } + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "6991frkbwg" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected values", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[GREEN]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['option1', 'option2'] | [{ \"label\": \"label1\", \"value\": \"value1\" }]", + "autocompleteDataType": "ARRAY" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: \"value should match: Array | Array<{label: string, value: string | number}>\"\n };\n var UNIQUE_ERROR_MESSAGE = {\n name: \"ValidationError\",\n message: \"value must be unique. Duplicate values found\"\n };\n var hasUniqueValues = function hasUniqueValues(arr) {\n var uniqueValues = new Set(arr);\n return uniqueValues.size === arr.length;\n };\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // When value is \"['green', 'red']\", \"[{label: 'green', value: 'green'}]\" and \"green, red\"\n var convertToArray = function convertToArray(value) {\n if (typeof value === \"string\" && value.trim() !== \"\") {\n try {\n var parsedValue = JSON.parse(value);\n if (Array.isArray(parsedValue)) return parsedValue;\n } catch (e) {\n return value.split(\",\").map(function (s) {\n return s.trim();\n });\n }\n }\n if (Array.isArray(value)) return value;\n return [];\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n var parsed = inputValue === \"\" ? undefined : inputValue;\n return {\n isValid: true,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n var values = convertToArray(inputValue);\n\n // If there is inputValue but was not converted to proper array\n // or the input value is not string and not an array then error is returned\n if (typeof inputValue === \"string\" && inputValue.trim() !== \"\" && !values.length || typeof inputValue !== \"string\" && !Array.isArray(inputValue)) {\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n\n // When value is [\"green\", \"red\"]\n if (values.every(function (val) {\n return _.isString(val) || _.isFinite(val);\n })) {\n if (!hasUniqueValues(values)) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n // When value is [{label: \"green\", value: \"red\"}]\n } else if (values.every(hasLabelValueProperties)) {\n if (!hasUniqueValues(values.map(function (val) {\n return val.value;\n }))) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n } else {\n // When value is [true, false], [undefined, undefined] etc.\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n return {\n isValid: true,\n parsed: values,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "schema", + "sourceData" + ], + "id": "yxuk3toabw" + }, + { + "helpText": "Sets the format of the selected date", + "propertyName": "dateFormat", + "label": "Date format", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "optionWidth": "340px", + "options": [ + { + "label": "2023-09-28T17:44:40.4040+05:30", + "subText": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.sssZ" + }, + { + "label": "September 28, 2023 5:44 PM", + "subText": "LLL", + "value": "LLL" + }, + { + "label": "September 28, 2023", + "subText": "LL", + "value": "LL" + }, + { + "label": "2023-09-28 17:44", + "subText": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "2023-09-28T17:44:40", + "subText": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "2023-09-28 05:44:40 PM", + "subText": "YYYY-MM-DD hh:mm:ss A", + "value": "YYYY-MM-DD hh:mm:ss A" + }, + { + "label": "28/09/2023 17:44", + "subText": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "28 September, 2023", + "subText": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "17:44 PM 28 September, 2023", + "subText": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "2023-09-28", + "subText": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "09-28-2023", + "subText": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "28-09-2023", + "subText": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "09/28/2023", + "subText": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "28/09/2023", + "subText": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "28/09/23", + "subText": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "09/28/23", + "subText": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "hideSubText": true, + "dependencies": ["schema"], + "id": "lse0zoc2va" + }, + { + "propertyName": "defaultValue", + "label": "Default Date", + "helpText": "Sets the default date of the widget. The date is updated if the default date changes", + "controlType": "DATE_PICKER", + "placeholderText": "Enter Default Date", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "ja2ajih4dt" + }, + { + "propertyName": "timePrecision", + "label": "Time precision", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the different time picker or hide.", + "defaultValue": "minute", + "options": [ + { + "label": "None", + "value": "None" + }, + { + "label": "Minute", + "value": "minute" + }, + { + "label": "Second", + "value": "second" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "None", + "minute", + "second" + ], + "default": "minute" + } + }, + "dependencies": ["schema"], + "id": "shyiw0wg5q" + }, + { + "propertyName": "defaultValue", + "label": "Default state", + "helpText": "Sets the default checked state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "501hx5c3o5" + }, + { + "helpText": "Sets the default value of the field. The array is updated when the default value changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY" + }, + "dependencies": ["schema"], + "id": "1i1jbad2uv" + }, + { + "propertyName": "children", + "label": "Field configuration", + "helpText": "Field configuration", + "controlType": "FIELD_CONFIGURATION", + "isBindProperty": false, + "isTriggerProperty": false, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "identifier", + "contentChildren": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "fieldType", + "label": "Field Type", + "helpText": "Type of the widget to be used corresponding to the field", + "controlType": "DROP_DOWN", + "isBindProperty": false, + "isTriggerProperty": false, + "options": [ + { + "label": "Array", + "value": "Array" + }, + { + "label": "Checkbox", + "value": "Checkbox" + }, + { + "label": "Currency Input", + "value": "Currency Input" + }, + { + "label": "Datepicker", + "value": "Datepicker" + }, + { + "label": "Email Input", + "value": "Email Input" + }, + { + "label": "Multiselect", + "value": "Multiselect" + }, + { + "label": "Multiline Text Input", + "value": "Multiline Text Input" + }, + { + "label": "Number Input", + "value": "Number Input" + }, + { + "label": "Object", + "value": "Object" + }, + { + "label": "Password Input", + "value": "Password Input" + }, + { + "label": "Phone Number Input", + "value": "Phone Number Input" + }, + { + "label": "Radio Group", + "value": "Radio Group" + }, + { + "label": "Select", + "value": "Select" + }, + { + "label": "Switch", + "value": "Switch" + }, + { + "label": "Text Input", + "value": "Text Input" + } + ], + "dependencies": [ + "schema", + "childStylesheet", + "dynamicBindingPathList" + ], + "id": "4k7sd8nc5f" + }, + { + "propertyName": "accessor", + "helpText": "Sets the property name of the field which can be used to access the value in formData and fieldState.", + "label": "Property Name", + "controlType": "INPUT_TEXT", + "placeholderText": "name", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "unique string", + "example": "firstName | last_name | age14", + "autocompleteDataType": "STRING" + }, + "fnString": "function accessorValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var grandParentPath = propertyPathChunks.slice(0, -2).join(\".\");\n var schemaItemIdentifier = propertyPathChunks.slice(-2)[0]; // ['schema', '__root_field__', 'children', 'age', 'name'] -> age\n var schema = lodash.cloneDeep(lodash.get(props, grandParentPath));\n var RESTRICTED_KEYS = [\"__array_item__\", \"__root_schema__\"];\n var currentSchemaItem = lodash.cloneDeep(schema[schemaItemIdentifier]);\n // Remove the current edited schemaItem from schema so it doesn't\n // get picked in the existing keys list\n delete schema[schemaItemIdentifier];\n\n // If the field is not _id (mongo id) then it shouldn't be allowed\n if (currentSchemaItem.originalIdentifier !== \"_id\") {\n RESTRICTED_KEYS.push(\"_id\");\n }\n if (value === \"\") {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"ValidationError\",\n message: \"Property Name cannot be empty\"\n }]\n };\n }\n var existingKeys = (Object.values(schema) || []).map(\n // @ts-expect-error: Types are not available\n function (schemaItem) {\n return schemaItem.name;\n });\n if (existingKeys.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"Property name already in use.\"\n }]\n };\n }\n if (RESTRICTED_KEYS.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"This is a restricted Property Name\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "jiqycfk515" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "schema", + "sourceData" + ], + "id": "n1ssipf1c6" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets the default text of the field. The text is updated if the default text changes", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "John Doe", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "5dy5xhr2r0" + }, + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "(000) 000-0000", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string", + "example": "(000) 000-0000", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": ["schema"], + "id": "ac9b0hxif9" + }, + { + "propertyName": "dialCode", + "helpText": "Changes the country code", + "label": "Default country code", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or country name", + "options": [ + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "Afghanistan (+93)", + "value": "+93", + "id": "+93" + }, + { + "leftElement": "🇦🇽", + "searchText": "Aland Islands", + "label": "Aland Islands (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "Albania (+355)", + "value": "+355", + "id": "+355" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "Algeria (+213)", + "value": "+213", + "id": "+213" + }, + { + "leftElement": "🇦🇸", + "searchText": "AmericanSamoa", + "label": "AmericanSamoa (+1684)", + "value": "+1684", + "id": "+1684" + }, + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "Andorra (+376)", + "value": "+376", + "id": "+376" + }, + { + "leftElement": "🇦🇴", + "searchText": "Angola", + "label": "Angola (+244)", + "value": "+244", + "id": "+244" + }, + { + "leftElement": "🇦🇮", + "searchText": "Anguilla", + "label": "Anguilla (+1264)", + "value": "+1264", + "id": "+1264" + }, + { + "leftElement": "🇦🇶", + "searchText": "Antarctica", + "label": "Antarctica (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇦🇬", + "searchText": "Antigua and Barbuda", + "label": "Antigua and Barbuda (+1268)", + "value": "+1268", + "id": "+1268" + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "Argentina (+54)", + "value": "+54", + "id": "+54" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "Armenia (+374)", + "value": "+374", + "id": "+374" + }, + { + "leftElement": "🇦🇼", + "searchText": "Aruba", + "label": "Aruba (+297)", + "value": "+297", + "id": "+297" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "Australia (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "Austria (+43)", + "value": "+43", + "id": "+43" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "Azerbaijan (+994)", + "value": "+994", + "id": "+994" + }, + { + "leftElement": "🇧🇸", + "searchText": "Bahamas", + "label": "Bahamas (+1242)", + "value": "+1242", + "id": "+1242" + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "Bahrain (+973)", + "value": "+973", + "id": "+973" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "Bangladesh (+880)", + "value": "+880", + "id": "+880" + }, + { + "leftElement": "🇧🇧", + "searchText": "Barbados", + "label": "Barbados (+1246)", + "value": "+1246", + "id": "+1246" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "Belarus (+375)", + "value": "+375", + "id": "+375" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "Belgium (+32)", + "value": "+32", + "id": "+32" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "Belize (+501)", + "value": "+501", + "id": "+501" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "Benin (+229)", + "value": "+229", + "id": "+229" + }, + { + "leftElement": "🇧🇲", + "searchText": "Bermuda", + "label": "Bermuda (+1441)", + "value": "+1441", + "id": "+1441" + }, + { + "leftElement": "🇧🇹", + "searchText": "Bhutan", + "label": "Bhutan (+975)", + "value": "+975", + "id": "+975" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia, Plurinational State of", + "label": "Bolivia, Plurinational State of (+591)", + "value": "+591", + "id": "+591" + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "Bosnia and Herzegovina (+387)", + "value": "+387", + "id": "+387" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "Botswana (+267)", + "value": "+267", + "id": "+267" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "Brazil (+55)", + "value": "+55", + "id": "+55" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "British Indian Ocean Territory (+246)", + "value": "+246", + "id": "+246" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "Brunei Darussalam (+673)", + "value": "+673", + "id": "+673" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "Bulgaria (+359)", + "value": "+359", + "id": "+359" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "Burkina Faso (+226)", + "value": "+226", + "id": "+226" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "Burundi (+257)", + "value": "+257", + "id": "+257" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "Cambodia (+855)", + "value": "+855", + "id": "+855" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "Cameroon (+237)", + "value": "+237", + "id": "+237" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "Cape Verde (+238)", + "value": "+238", + "id": "+238" + }, + { + "leftElement": "🇰🇾", + "searchText": "Cayman Islands", + "label": "Cayman Islands (+ 345)", + "value": "+ 345", + "id": "+ 345" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "Central African Republic (+236)", + "value": "+236", + "id": "+236" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "Chad (+235)", + "value": "+235", + "id": "+235" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "Chile (+56)", + "value": "+56", + "id": "+56" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "China (+86)", + "value": "+86", + "id": "+86" + }, + { + "leftElement": "🇦🇺", + "searchText": "Christmas Island", + "label": "Christmas Island (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇺", + "searchText": "Cocos (Keeling) Islands", + "label": "Cocos (Keeling) Islands (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "Colombia (+57)", + "value": "+57", + "id": "+57" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "Comoros (+269)", + "value": "+269", + "id": "+269" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo", + "label": "Congo (+242)", + "value": "+242", + "id": "+242" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, The Democratic Republic of the Congo", + "label": "Congo, The Democratic Republic of the Congo (+243)", + "value": "+243", + "id": "+243" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "Cook Islands (+682)", + "value": "+682", + "id": "+682" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "Costa Rica (+506)", + "value": "+506", + "id": "+506" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "Cote d'Ivoire (+225)", + "value": "+225", + "id": "+225" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "Croatia (+385)", + "value": "+385", + "id": "+385" + }, + { + "leftElement": "🇨🇺", + "searchText": "Cuba", + "label": "Cuba (+53)", + "value": "+53", + "id": "+53" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "Cyprus (+357)", + "value": "+357", + "id": "+357" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "Czech Republic (+420)", + "value": "+420", + "id": "+420" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "Denmark (+45)", + "value": "+45", + "id": "+45" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "Djibouti (+253)", + "value": "+253", + "id": "+253" + }, + { + "leftElement": "🇩🇲", + "searchText": "Dominica", + "label": "Dominica (+1767)", + "value": "+1767", + "id": "+1767" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "Dominican Republic (+1849)", + "value": "+1849", + "id": "+1849" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "Ecuador (+593)", + "value": "+593", + "id": "+593" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "Egypt (+20)", + "value": "+20", + "id": "+20" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "El Salvador (+503)", + "value": "+503", + "id": "+503" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "Equatorial Guinea (+240)", + "value": "+240", + "id": "+240" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "Eritrea (+291)", + "value": "+291", + "id": "+291" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "Estonia (+372)", + "value": "+372", + "id": "+372" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "Ethiopia (+251)", + "value": "+251", + "id": "+251" + }, + { + "leftElement": "🇫🇰", + "searchText": "Falkland Islands (Malvinas)", + "label": "Falkland Islands (Malvinas) (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "Faroe Islands (+298)", + "value": "+298", + "id": "+298" + }, + { + "leftElement": "🇫🇯", + "searchText": "Fiji", + "label": "Fiji (+679)", + "value": "+679", + "id": "+679" + }, + { + "leftElement": "🇦🇽", + "searchText": "Finland", + "label": "Finland (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "France (+33)", + "value": "+33", + "id": "+33" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "French Guiana (+594)", + "value": "+594", + "id": "+594" + }, + { + "leftElement": "🇵🇫", + "searchText": "French Polynesia", + "label": "French Polynesia (+689)", + "value": "+689", + "id": "+689" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "Gabon (+241)", + "value": "+241", + "id": "+241" + }, + { + "leftElement": "🇬🇲", + "searchText": "Gambia", + "label": "Gambia (+220)", + "value": "+220", + "id": "+220" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "Georgia (+995)", + "value": "+995", + "id": "+995" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "Germany (+49)", + "value": "+49", + "id": "+49" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "Ghana (+233)", + "value": "+233", + "id": "+233" + }, + { + "leftElement": "🇬🇮", + "searchText": "Gibraltar", + "label": "Gibraltar (+350)", + "value": "+350", + "id": "+350" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "Greece (+30)", + "value": "+30", + "id": "+30" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "Greenland (+299)", + "value": "+299", + "id": "+299" + }, + { + "leftElement": "🇬🇩", + "searchText": "Grenada", + "label": "Grenada (+1473)", + "value": "+1473", + "id": "+1473" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "Guadeloupe (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "Guam (+1671)", + "value": "+1671", + "id": "+1671" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "Guatemala (+502)", + "value": "+502", + "id": "+502" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "Guernsey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "Guinea (+224)", + "value": "+224", + "id": "+224" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "Guinea-Bissau (+245)", + "value": "+245", + "id": "+245" + }, + { + "leftElement": "🇬🇾", + "searchText": "Guyana", + "label": "Guyana (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇭🇹", + "searchText": "Haiti", + "label": "Haiti (+509)", + "value": "+509", + "id": "+509" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "Holy See (Vatican City State) (+379)", + "value": "+379", + "id": "+379" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "Honduras (+504)", + "value": "+504", + "id": "+504" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "Hong Kong (+852)", + "value": "+852", + "id": "+852" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "Hungary (+36)", + "value": "+36", + "id": "+36" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "Iceland (+354)", + "value": "+354", + "id": "+354" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "India (+91)", + "value": "+91", + "id": "+91" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "Indonesia (+62)", + "value": "+62", + "id": "+62" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of Persian Gulf", + "label": "Iran, Islamic Republic of Persian Gulf (+98)", + "value": "+98", + "id": "+98" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "Iraq (+964)", + "value": "+964", + "id": "+964" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "Ireland (+353)", + "value": "+353", + "id": "+353" + }, + { + "leftElement": "🇬🇬", + "searchText": "Isle of Man", + "label": "Isle of Man (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "Israel (+972)", + "value": "+972", + "id": "+972" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "Italy (+39)", + "value": "+39", + "id": "+39" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "Jamaica (+1876)", + "value": "+1876", + "id": "+1876" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "Japan (+81)", + "value": "+81", + "id": "+81" + }, + { + "leftElement": "🇬🇬", + "searchText": "Jersey", + "label": "Jersey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "Jordan (+962)", + "value": "+962", + "id": "+962" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "Kazakhstan (+77)", + "value": "+77", + "id": "+77" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "Kenya (+254)", + "value": "+254", + "id": "+254" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "Kiribati (+686)", + "value": "+686", + "id": "+686" + }, + { + "leftElement": "🇰🇵", + "searchText": "Korea, Democratic People's Republic of Korea", + "label": "Korea, Democratic People's Republic of Korea (+850)", + "value": "+850", + "id": "+850" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of South Korea", + "label": "Korea, Republic of South Korea (+82)", + "value": "+82", + "id": "+82" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "Kuwait (+965)", + "value": "+965", + "id": "+965" + }, + { + "leftElement": "🇰🇬", + "searchText": "Kyrgyzstan", + "label": "Kyrgyzstan (+996)", + "value": "+996", + "id": "+996" + }, + { + "leftElement": "🇱🇦", + "searchText": "Laos", + "label": "Laos (+856)", + "value": "+856", + "id": "+856" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "Latvia (+371)", + "value": "+371", + "id": "+371" + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "Lebanon (+961)", + "value": "+961", + "id": "+961" + }, + { + "leftElement": "🇱🇸", + "searchText": "Lesotho", + "label": "Lesotho (+266)", + "value": "+266", + "id": "+266" + }, + { + "leftElement": "🇱🇷", + "searchText": "Liberia", + "label": "Liberia (+231)", + "value": "+231", + "id": "+231" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libyan Arab Jamahiriya", + "label": "Libyan Arab Jamahiriya (+218)", + "value": "+218", + "id": "+218" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "Liechtenstein (+423)", + "value": "+423", + "id": "+423" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "Lithuania (+370)", + "value": "+370", + "id": "+370" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "Luxembourg (+352)", + "value": "+352", + "id": "+352" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "Macao (+853)", + "value": "+853", + "id": "+853" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia", + "label": "Macedonia (+389)", + "value": "+389", + "id": "+389" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "Madagascar (+261)", + "value": "+261", + "id": "+261" + }, + { + "leftElement": "🇲🇼", + "searchText": "Malawi", + "label": "Malawi (+265)", + "value": "+265", + "id": "+265" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "Malaysia (+60)", + "value": "+60", + "id": "+60" + }, + { + "leftElement": "🇲🇻", + "searchText": "Maldives", + "label": "Maldives (+960)", + "value": "+960", + "id": "+960" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "Mali (+223)", + "value": "+223", + "id": "+223" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "Malta (+356)", + "value": "+356", + "id": "+356" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "Marshall Islands (+692)", + "value": "+692", + "id": "+692" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "Martinique (+596)", + "value": "+596", + "id": "+596" + }, + { + "leftElement": "🇲🇷", + "searchText": "Mauritania", + "label": "Mauritania (+222)", + "value": "+222", + "id": "+222" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "Mauritius (+230)", + "value": "+230", + "id": "+230" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "Mayotte (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "Mexico (+52)", + "value": "+52", + "id": "+52" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of Micronesia", + "label": "Micronesia, Federated States of Micronesia (+691)", + "value": "+691", + "id": "+691" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova", + "label": "Moldova (+373)", + "value": "+373", + "id": "+373" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "Monaco (+377)", + "value": "+377", + "id": "+377" + }, + { + "leftElement": "🇲🇳", + "searchText": "Mongolia", + "label": "Mongolia (+976)", + "value": "+976", + "id": "+976" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "Montenegro (+382)", + "value": "+382", + "id": "+382" + }, + { + "leftElement": "🇲🇸", + "searchText": "Montserrat", + "label": "Montserrat (+1664)", + "value": "+1664", + "id": "+1664" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "Morocco (+212)", + "value": "+212", + "id": "+212" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "Mozambique (+258)", + "value": "+258", + "id": "+258" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "Myanmar (+95)", + "value": "+95", + "id": "+95" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "Namibia (+264)", + "value": "+264", + "id": "+264" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "Nauru (+674)", + "value": "+674", + "id": "+674" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "Nepal (+977)", + "value": "+977", + "id": "+977" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "Netherlands (+31)", + "value": "+31", + "id": "+31" + }, + { + "leftElement": "🇦🇳", + "searchText": "Netherlands Antilles", + "label": "Netherlands Antilles (+599)", + "value": "+599", + "id": "+599" + }, + { + "leftElement": "🇳🇨", + "searchText": "New Caledonia", + "label": "New Caledonia (+687)", + "value": "+687", + "id": "+687" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "New Zealand (+64)", + "value": "+64", + "id": "+64" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "Nicaragua (+505)", + "value": "+505", + "id": "+505" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "Niger (+227)", + "value": "+227", + "id": "+227" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "Nigeria (+234)", + "value": "+234", + "id": "+234" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "Niue (+683)", + "value": "+683", + "id": "+683" + }, + { + "leftElement": "🇦🇶", + "searchText": "Norfolk Island", + "label": "Norfolk Island (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "Northern Mariana Islands (+1670)", + "value": "+1670", + "id": "+1670" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "Norway (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "Oman (+968)", + "value": "+968", + "id": "+968" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "Pakistan (+92)", + "value": "+92", + "id": "+92" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "Palau (+680)", + "value": "+680", + "id": "+680" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestinian Territory, Occupied", + "label": "Palestinian Territory, Occupied (+970)", + "value": "+970", + "id": "+970" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "Panama (+507)", + "value": "+507", + "id": "+507" + }, + { + "leftElement": "🇵🇬", + "searchText": "Papua New Guinea", + "label": "Papua New Guinea (+675)", + "value": "+675", + "id": "+675" + }, + { + "leftElement": "🇬🇾", + "searchText": "Paraguay", + "label": "Paraguay (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "Peru (+51)", + "value": "+51", + "id": "+51" + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "Philippines (+63)", + "value": "+63", + "id": "+63" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "Pitcairn (+872)", + "value": "+872", + "id": "+872" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "Poland (+48)", + "value": "+48", + "id": "+48" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "Portugal (+351)", + "value": "+351", + "id": "+351" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "Puerto Rico (+1939)", + "value": "+1939", + "id": "+1939" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "Qatar (+974)", + "value": "+974", + "id": "+974" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "Romania (+40)", + "value": "+40", + "id": "+40" + }, + { + "leftElement": "🇷🇺", + "searchText": "Russia", + "label": "Russia (+7)", + "value": "+7", + "id": "+7" + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "Rwanda (+250)", + "value": "+250", + "id": "+250" + }, + { + "leftElement": "🇾🇹", + "searchText": "Reunion", + "label": "Reunion (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Barthelemy", + "label": "Saint Barthelemy (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇸🇭", + "searchText": "Saint Helena, Ascension and Tristan Da Cunha", + "label": "Saint Helena, Ascension and Tristan Da Cunha (+290)", + "value": "+290", + "id": "+290" + }, + { + "leftElement": "🇰🇳", + "searchText": "Saint Kitts and Nevis", + "label": "Saint Kitts and Nevis (+1869)", + "value": "+1869", + "id": "+1869" + }, + { + "leftElement": "🇱🇨", + "searchText": "Saint Lucia", + "label": "Saint Lucia (+1758)", + "value": "+1758", + "id": "+1758" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Martin", + "label": "Saint Martin (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "Saint Pierre and Miquelon (+508)", + "value": "+508", + "id": "+508" + }, + { + "leftElement": "🇻🇨", + "searchText": "Saint Vincent and the Grenadines", + "label": "Saint Vincent and the Grenadines (+1784)", + "value": "+1784", + "id": "+1784" + }, + { + "leftElement": "🇼🇸", + "searchText": "Samoa", + "label": "Samoa (+685)", + "value": "+685", + "id": "+685" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "San Marino (+378)", + "value": "+378", + "id": "+378" + }, + { + "leftElement": "🇸🇹", + "searchText": "Sao Tome and Principe", + "label": "Sao Tome and Principe (+239)", + "value": "+239", + "id": "+239" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "Saudi Arabia (+966)", + "value": "+966", + "id": "+966" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "Senegal (+221)", + "value": "+221", + "id": "+221" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "Serbia (+381)", + "value": "+381", + "id": "+381" + }, + { + "leftElement": "🇸🇨", + "searchText": "Seychelles", + "label": "Seychelles (+248)", + "value": "+248", + "id": "+248" + }, + { + "leftElement": "🇸🇱", + "searchText": "Sierra Leone", + "label": "Sierra Leone (+232)", + "value": "+232", + "id": "+232" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "Singapore (+65)", + "value": "+65", + "id": "+65" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "Slovakia (+421)", + "value": "+421", + "id": "+421" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "Slovenia (+386)", + "value": "+386", + "id": "+386" + }, + { + "leftElement": "🇸🇧", + "searchText": "Solomon Islands", + "label": "Solomon Islands (+677)", + "value": "+677", + "id": "+677" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "Somalia (+252)", + "value": "+252", + "id": "+252" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "South Africa (+27)", + "value": "+27", + "id": "+27" + }, + { + "leftElement": "🇸🇸", + "searchText": "South Sudan", + "label": "South Sudan (+211)", + "value": "+211", + "id": "+211" + }, + { + "leftElement": "🇫🇰", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "South Georgia and the South Sandwich Islands (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "Spain (+34)", + "value": "+34", + "id": "+34" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "Sri Lanka (+94)", + "value": "+94", + "id": "+94" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "Sudan (+249)", + "value": "+249", + "id": "+249" + }, + { + "leftElement": "🇸🇷", + "searchText": "Suriname", + "label": "Suriname (+597)", + "value": "+597", + "id": "+597" + }, + { + "leftElement": "🇳🇴", + "searchText": "Svalbard and Jan Mayen", + "label": "Svalbard and Jan Mayen (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇸🇿", + "searchText": "Swaziland", + "label": "Swaziland (+268)", + "value": "+268", + "id": "+268" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "Sweden (+46)", + "value": "+46", + "id": "+46" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "Switzerland (+41)", + "value": "+41", + "id": "+41" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "Syrian Arab Republic (+963)", + "value": "+963", + "id": "+963" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan", + "label": "Taiwan (+886)", + "value": "+886", + "id": "+886" + }, + { + "leftElement": "🇹🇯", + "searchText": "Tajikistan", + "label": "Tajikistan (+992)", + "value": "+992", + "id": "+992" + }, + { + "leftElement": "🇹🇿", + "searchText": "Tanzania, United Republic of Tanzania", + "label": "Tanzania, United Republic of Tanzania (+255)", + "value": "+255", + "id": "+255" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "Thailand (+66)", + "value": "+66", + "id": "+66" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "Timor-Leste (+670)", + "value": "+670", + "id": "+670" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "Togo (+228)", + "value": "+228", + "id": "+228" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "Tokelau (+690)", + "value": "+690", + "id": "+690" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "Tonga (+676)", + "value": "+676", + "id": "+676" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "Trinidad and Tobago (+1868)", + "value": "+1868", + "id": "+1868" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "Tunisia (+216)", + "value": "+216", + "id": "+216" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "Turkey (+90)", + "value": "+90", + "id": "+90" + }, + { + "leftElement": "🇹🇲", + "searchText": "Turkmenistan", + "label": "Turkmenistan (+993)", + "value": "+993", + "id": "+993" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "Turks and Caicos Islands (+1649)", + "value": "+1649", + "id": "+1649" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "Tuvalu (+688)", + "value": "+688", + "id": "+688" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "Uganda (+256)", + "value": "+256", + "id": "+256" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "Ukraine (+380)", + "value": "+380", + "id": "+380" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "United Arab Emirates (+971)", + "value": "+971", + "id": "+971" + }, + { + "leftElement": "🇬🇬", + "searchText": "United Kingdom", + "label": "United Kingdom (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States / Canada", + "label": "United States / Canada (+1)", + "value": "+1", + "id": "+1" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "Uruguay (+598)", + "value": "+598", + "id": "+598" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "Uzbekistan (+998)", + "value": "+998", + "id": "+998" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "Vanuatu (+678)", + "value": "+678", + "id": "+678" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela, Bolivarian Republic of Venezuela", + "label": "Venezuela, Bolivarian Republic of Venezuela (+58)", + "value": "+58", + "id": "+58" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "Vietnam (+84)", + "value": "+84", + "id": "+84" + }, + { + "leftElement": "🇻🇬", + "searchText": "Virgin Islands, British", + "label": "Virgin Islands, British (+1284)", + "value": "+1284", + "id": "+1284" + }, + { + "leftElement": "🇻🇮", + "searchText": "Virgin Islands, U.S.", + "label": "Virgin Islands, U.S. (+1340)", + "value": "+1340", + "id": "+1340" + }, + { + "leftElement": "🇼🇫", + "searchText": "Wallis and Futuna", + "label": "Wallis and Futuna (+681)", + "value": "+681", + "id": "+681" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "Yemen (+967)", + "value": "+967", + "id": "+967" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "Zambia (+260)", + "value": "+260", + "id": "+260" + }, + { + "leftElement": "🇿🇼", + "searchText": "Zimbabwe", + "label": "Zimbabwe (+263)", + "value": "+263", + "id": "+263" + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "1gk30aq6vg" + }, + { + "propertyName": "currencyCountryCode", + "helpText": "Changes the type of currency", + "label": "Currency", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or name", + "options": [ + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "AED - United Arab Emirates Dirham", + "value": "AED", + "id": "د.إ.‏" + }, + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "AFN - Afghan Afghani", + "value": "AFN", + "id": "؋" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "ALL - Albanian Lek", + "value": "ALL", + "id": "Lek" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "AMD - Armenian Dram", + "value": "AMD", + "id": "դր." + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "ARS - Argentine Peso", + "value": "ARS", + "id": "$" + }, + { + "leftElement": "🇦🇸", + "searchText": "American Samoa", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇦🇽", + "searchText": "Alland Islands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "AZN - Azerbaijani Manat", + "value": "AZN", + "id": "ман." + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "BAM - Bosnia-Herzegovina Convertible Mark", + "value": "BAM", + "id": "KM" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "BDT - Bangladeshi Taka", + "value": "BDT", + "id": "৳" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "BGN - Bulgarian Lev", + "value": "BGN", + "id": "лв." + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "BHD - Bahraini Dinar", + "value": "BHD", + "id": "د.ب.‏" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "BIF - Burundian Franc", + "value": "BIF", + "id": "FBu" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇱", + "searchText": "Saint Barthelemy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "BND - Brunei Dollar", + "value": "BND", + "id": "$" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia", + "label": "BOB - Bolivian Boliviano", + "value": "BOB", + "id": "Bs" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "BRL - Brazilian Real", + "value": "BRL", + "id": "R$" + }, + { + "leftElement": "🇧🇻", + "searchText": "Bouvet Island", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "BWP - Botswanan Pula", + "value": "BWP", + "id": "P" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "BYR - Belarusian Ruble", + "value": "BYR", + "id": "BYR" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "BZD - Belize Dollar", + "value": "BZD", + "id": "$" + }, + { + "leftElement": "🇨🇦", + "searchText": "Canada", + "label": "CAD - Canadian Dollar", + "value": "CAD", + "id": "$" + }, + { + "leftElement": "🇨🇨", + "searchText": "Cocos (Keeling) Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, Democratic Republic of the", + "label": "CDF - Congolese Franc", + "value": "CDF", + "id": "FrCD" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo, Republic of the", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "CLP - Chilean Peso", + "value": "CLP", + "id": "$" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "CNY - Chinese Yuan", + "value": "CNY", + "id": "CN¥" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "COP - Colombian Peso", + "value": "COP", + "id": "$" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "CRC - Costa Rican Colón", + "value": "CRC", + "id": "₡" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "CVE - Cape Verdean Escudo", + "value": "CVE", + "id": "CV$" + }, + { + "leftElement": "🇨🇽", + "searchText": "Christmas Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "CZK - Czech Republic Koruna", + "value": "CZK", + "id": "Kč" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "DJF - Djiboutian Franc", + "value": "DJF", + "id": "Fdj" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "DOP - Dominican Peso", + "value": "DOP", + "id": "RD$" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "DZD - Algerian Dinar", + "value": "DZD", + "id": "د.ج.‏" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "EGP - Egyptian Pound", + "value": "EGP", + "id": "ج.م.‏" + }, + { + "leftElement": "🇪🇭", + "searchText": "Western Sahara", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "ERN - Eritrean Nakfa", + "value": "ERN", + "id": "Nfk" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "ETB - Ethiopian Birr", + "value": "ETB", + "id": "Br" + }, + { + "leftElement": "🇫🇮", + "searchText": "Finland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇧", + "searchText": "United Kingdom", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "GEL - Georgian Lari", + "value": "GEL", + "id": "GEL" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "GHS - Ghanaian Cedi", + "value": "GHS", + "id": "GH₵" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "GNF - Guinean Franc", + "value": "GNF", + "id": "FG" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇸", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "GTQ - Guatemalan Quetzal", + "value": "GTQ", + "id": "Q" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "HKD - Hong Kong Dollar", + "value": "HKD", + "id": "$" + }, + { + "leftElement": "🇭🇲", + "searchText": "Heard Island and McDonald Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "HNL - Honduran Lempira", + "value": "HNL", + "id": "L" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "HRK - Croatian Kuna", + "value": "HRK", + "id": "kn" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "HUF - Hungarian Forint", + "value": "HUF", + "id": "Ft" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "IDR - Indonesian Rupiah", + "value": "IDR", + "id": "Rp" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇮🇲", + "searchText": "Isle of Man", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "INR - Indian Rupee", + "value": "INR", + "id": "₹" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "IQD - Iraqi Dinar", + "value": "IQD", + "id": "د.ع.‏" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of", + "label": "IRR - Iranian Rial", + "value": "IRR", + "id": "﷼" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "ISK - Icelandic Króna", + "value": "ISK", + "id": "kr" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇯🇪", + "searchText": "Jersey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "JMD - Jamaican Dollar", + "value": "JMD", + "id": "$" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "JOD - Jordanian Dinar", + "value": "JOD", + "id": "د.أ.‏" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "JPY - Japanese Yen", + "value": "JPY", + "id": "¥" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "KES - Kenyan Shilling", + "value": "KES", + "id": "Ksh" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "KHR - Cambodian Riel", + "value": "KHR", + "id": "៛" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "KMF - Comorian Franc", + "value": "KMF", + "id": "FC" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of", + "label": "KRW - South Korean Won", + "value": "KRW", + "id": "₩" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "KWD - Kuwaiti Dinar", + "value": "KWD", + "id": "د.ك.‏" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "KZT - Kazakhstani Tenge", + "value": "KZT", + "id": "тңг." + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "LBP - Lebanese Pound", + "value": "LBP", + "id": "ل.ل.‏" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "LKR - Sri Lankan Rupee", + "value": "LKR", + "id": "SL Re" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "LTL - Lithuanian Litas", + "value": "LTL", + "id": "Lt" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libya", + "label": "LYD - Libyan Dinar", + "value": "LYD", + "id": "د.ل.‏" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova, Republic of", + "label": "MDL - Moldovan Leu", + "value": "MDL", + "id": "MDL" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇫", + "searchText": "Saint Martin (French part)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "MGA - Malagasy Ariary", + "value": "MGA", + "id": "MGA" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia, the Former Yugoslav Republic of", + "label": "MKD - Macedonian Denar", + "value": "MKD", + "id": "MKD" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "MMK - Myanma Kyat", + "value": "MMK", + "id": "K" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "MOP - Macanese Pataca", + "value": "MOP", + "id": "MOP$" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "MUR - Mauritian Rupee", + "value": "MUR", + "id": "MURs" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "MXN - Mexican Peso", + "value": "MXN", + "id": "$" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "MYR - Malaysian Ringgit", + "value": "MYR", + "id": "RM" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "MZN - Mozambican Metical", + "value": "MZN", + "id": "MTn" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "NAD - Namibian Dollar", + "value": "NAD", + "id": "N$" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇳🇫", + "searchText": "Norfolk Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "NGN - Nigerian Naira", + "value": "NGN", + "id": "₦" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "NIO - Nicaraguan Córdoba", + "value": "NIO", + "id": "C$" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "NPR - Nepalese Rupee", + "value": "NPR", + "id": "नेरू" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "OMR - Omani Rial", + "value": "OMR", + "id": "ر.ع.‏" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "PAB - Panamanian Balboa", + "value": "PAB", + "id": "B/." + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "PEN - Peruvian Nuevo Sol", + "value": "PEN", + "id": "S/." + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "PHP - Philippine Peso", + "value": "PHP", + "id": "₱" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "PKR - Pakistani Rupee", + "value": "PKR", + "id": "₨" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "PLN - Polish Zloty", + "value": "PLN", + "id": "zł" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestine, State of", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇾", + "searchText": "Paraguay", + "label": "PYG - Paraguayan Guarani", + "value": "PYG", + "id": "₲" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "QAR - Qatari Rial", + "value": "QAR", + "id": "ر.ق.‏" + }, + { + "leftElement": "🇷🇪", + "searchText": "Reunion", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "RON - Romanian Leu", + "value": "RON", + "id": "RON" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "RSD - Serbian Dinar", + "value": "RSD", + "id": "дин." + }, + { + "leftElement": "🇷🇺", + "searchText": "Russian Federation", + "label": "RUB - Russian Ruble", + "value": "RUB", + "id": "руб." + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "RWF - Rwandan Franc", + "value": "RWF", + "id": "FR" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "SAR - Saudi Riyal", + "value": "SAR", + "id": "ر.س.‏" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "SDG - Sudanese Pound", + "value": "SDG", + "id": "SDG" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "SEK - Swedish Krona", + "value": "SEK", + "id": "kr" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "SGD - Singapore Dollar", + "value": "SGD", + "id": "$" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇯", + "searchText": "Svalbard and Jan Mayen", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "SOS - Somali Shilling", + "value": "SOS", + "id": "Ssh" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "SYP - Syrian Pound", + "value": "SYP", + "id": "ل.س.‏" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇹🇫", + "searchText": "French Southern Territories", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "THB - Thai Baht", + "value": "THB", + "id": "฿" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "TND - Tunisian Dinar", + "value": "TND", + "id": "د.ت.‏" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "TOP - Tongan Paʻanga", + "value": "TOP", + "id": "T$" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "TRY - Turkish Lira", + "value": "TRY", + "id": "TL" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "TTD - Trinidad and Tobago Dollar", + "value": "TTD", + "id": "$" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan, Province of China", + "label": "TWD - New Taiwan Dollar", + "value": "TWD", + "id": "NT$" + }, + { + "leftElement": "🇹🇿", + "searchText": "United Republic of Tanzania", + "label": "TZS - Tanzanian Shilling", + "value": "TZS", + "id": "TSh" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "UAH - Ukrainian Hryvnia", + "value": "UAH", + "id": "₴" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "UGX - Ugandan Shilling", + "value": "UGX", + "id": "USh" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "UYU - Uruguayan Peso", + "value": "UYU", + "id": "$" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "UZS - Uzbekistan Som", + "value": "UZS", + "id": "UZS" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela", + "label": "VEF - Venezuelan Bolívar", + "value": "VEF", + "id": "Bs.F." + }, + { + "leftElement": "🇻🇬", + "searchText": "British Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇮", + "searchText": "US Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "VND - Vietnamese Dong", + "value": "VND", + "id": "₫" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "VUV - Vanuatu Vatu", + "value": "VUV", + "id": "VT" + }, + { + "leftElement": "🇽🇰", + "searchText": "Kosovo", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "YER - Yemeni Rial", + "value": "YER", + "id": "ر.ي.‏" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "ZAR - South African Rand", + "value": "ZAR", + "id": "R" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "ZMK - Zambian Kwacha", + "value": "ZMK", + "id": "ZK" + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "r4rc2gl7yv" + }, + { + "propertyName": "allowDialCodeChange", + "label": "Allow Country Code Change", + "helpText": "Search by country", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["schema"], + "validation": { + "type": "BOOLEAN" + }, + "id": "o4qnc8g5ck" + }, + { + "propertyName": "allowCurrencyChange", + "label": "Allow currency change", + "helpText": "Search by currency or country", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "8ka8k3fe0f" + }, + { + "propertyName": "decimalsInCurrency", + "helpText": "No. of decimals in currency input", + "label": "Decimals allowed", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "0", + "value": 0 + }, + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + } + ], + "dependencies": ["schema"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "bkfl5tqpt9" + }, + { + "propertyName": "defaultValue", + "label": "Default Selected", + "helpText": "Sets the On/Off default state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "tfd0w3ng3p" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{ \"label\": \"Option1\", \"value\": \"Option2\" }", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "value1 or { \"label\": \"label1\", \"value\": \"value1\" }", + "example": "value1 | { \"label\": \"label1\", \"value\": \"value1\" }", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: 'value should match: string | { \"label\": \"label1\", \"value\": \"value1\" }'\n };\n var value = inputValue;\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n return {\n isValid: true,\n parsed: inputValue,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (typeof inputValue === \"string\") {\n try {\n value = JSON.parse(inputValue);\n } catch (e) {}\n }\n if (_.isString(value) || _.isFinite(value)) {\n // When value is \"\", \"green\", 444\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (hasLabelValueProperties(value)) {\n // When value is {label: \"green\", value: \"green\"}\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n return {\n isValid: false,\n parsed: {},\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema"], + "id": "7d1t5sb9n6" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": \"string\", \"value\": \"string\" | number}>", + "example": "[{\"label\": \"One\", \"value\": \"one\"}]", + "autocompleteDataType": "STRING" + }, + "fnString": "function optionsCustomValidation(options, props, _) {\n var validationUtil = function validationUtil(options, _) {\n var _isValid = true;\n var message = {\n name: \"\",\n message: \"\"\n };\n var valueType = \"\";\n var uniqueLabels = {};\n for (var i = 0; i < options.length; i++) {\n var _options$i = options[i],\n label = _options$i.label,\n value = _options$i.value;\n if (!valueType) {\n valueType = typeof value;\n }\n //Checks the uniqueness all the values in the options\n if (!uniqueLabels.hasOwnProperty(value)) {\n uniqueLabels[value] = \"\";\n } else {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"path:value must be unique. Duplicate values found\"\n };\n break;\n }\n\n //Check if the required field \"label\" is present:\n if (!label) {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Missing required key: label\"\n };\n break;\n }\n\n //Validation checks for the the label.\n if (_.isNil(label) || label === \"\" || typeof label !== \"string\" && typeof label !== \"number\") {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Value of key: label is invalid: This value does not evaluate to type string\"\n };\n break;\n }\n\n //Check if all the data types for the value prop is the same.\n if (typeof value !== valueType) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: \"All value properties in options must have the same type\"\n };\n break;\n }\n\n //Check if the each object has value property.\n if (_.isNil(value)) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n };\n break;\n }\n }\n return {\n isValid: _isValid,\n parsed: _isValid ? options : [],\n messages: [message]\n };\n };\n var invalidResponse = {\n isValid: false,\n parsed: [],\n messages: [{\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n }]\n };\n try {\n if (_.isString(options)) {\n options = JSON.parse(options);\n }\n if (Array.isArray(options)) {\n return validationUtil(options, _);\n } else {\n return invalidResponse;\n }\n } catch (e) {\n return invalidResponse;\n }\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": ["schema"], + "id": "9fcmbz6h9w" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets a default selected option", + "label": "Default selected value", + "placeholderText": "Y", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string |\nnumber (only works in mustache syntax)", + "example": "abc | {{1}}", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValidation(value, props, _) {\n //Checks if the value is not of object type in {{}}\n if (_.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n\n //Checks if the value is not of boolean type in {{}}\n if (_.isBoolean(value)) {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value\n };\n}" + } + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "6991frkbwg" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected values", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[GREEN]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['option1', 'option2'] | [{ \"label\": \"label1\", \"value\": \"value1\" }]", + "autocompleteDataType": "ARRAY" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: \"value should match: Array | Array<{label: string, value: string | number}>\"\n };\n var UNIQUE_ERROR_MESSAGE = {\n name: \"ValidationError\",\n message: \"value must be unique. Duplicate values found\"\n };\n var hasUniqueValues = function hasUniqueValues(arr) {\n var uniqueValues = new Set(arr);\n return uniqueValues.size === arr.length;\n };\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // When value is \"['green', 'red']\", \"[{label: 'green', value: 'green'}]\" and \"green, red\"\n var convertToArray = function convertToArray(value) {\n if (typeof value === \"string\" && value.trim() !== \"\") {\n try {\n var parsedValue = JSON.parse(value);\n if (Array.isArray(parsedValue)) return parsedValue;\n } catch (e) {\n return value.split(\",\").map(function (s) {\n return s.trim();\n });\n }\n }\n if (Array.isArray(value)) return value;\n return [];\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n var parsed = inputValue === \"\" ? undefined : inputValue;\n return {\n isValid: true,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n var values = convertToArray(inputValue);\n\n // If there is inputValue but was not converted to proper array\n // or the input value is not string and not an array then error is returned\n if (typeof inputValue === \"string\" && inputValue.trim() !== \"\" && !values.length || typeof inputValue !== \"string\" && !Array.isArray(inputValue)) {\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n\n // When value is [\"green\", \"red\"]\n if (values.every(function (val) {\n return _.isString(val) || _.isFinite(val);\n })) {\n if (!hasUniqueValues(values)) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n // When value is [{label: \"green\", value: \"red\"}]\n } else if (values.every(hasLabelValueProperties)) {\n if (!hasUniqueValues(values.map(function (val) {\n return val.value;\n }))) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n } else {\n // When value is [true, false], [undefined, undefined] etc.\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n return {\n isValid: true,\n parsed: values,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "schema", + "sourceData" + ], + "id": "yxuk3toabw" + }, + { + "helpText": "Sets the format of the selected date", + "propertyName": "dateFormat", + "label": "Date format", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "optionWidth": "340px", + "options": [ + { + "label": "2023-09-28T17:44:40.4040+05:30", + "subText": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.sssZ" + }, + { + "label": "September 28, 2023 5:44 PM", + "subText": "LLL", + "value": "LLL" + }, + { + "label": "September 28, 2023", + "subText": "LL", + "value": "LL" + }, + { + "label": "2023-09-28 17:44", + "subText": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "2023-09-28T17:44:40", + "subText": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "2023-09-28 05:44:40 PM", + "subText": "YYYY-MM-DD hh:mm:ss A", + "value": "YYYY-MM-DD hh:mm:ss A" + }, + { + "label": "28/09/2023 17:44", + "subText": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "28 September, 2023", + "subText": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "17:44 PM 28 September, 2023", + "subText": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "2023-09-28", + "subText": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "09-28-2023", + "subText": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "28-09-2023", + "subText": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "09/28/2023", + "subText": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "28/09/2023", + "subText": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "28/09/23", + "subText": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "09/28/23", + "subText": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "hideSubText": true, + "dependencies": ["schema"], + "id": "lse0zoc2va" + }, + { + "propertyName": "defaultValue", + "label": "Default Date", + "helpText": "Sets the default date of the widget. The date is updated if the default date changes", + "controlType": "DATE_PICKER", + "placeholderText": "Enter Default Date", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "ja2ajih4dt" + }, + { + "propertyName": "timePrecision", + "label": "Time precision", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the different time picker or hide.", + "defaultValue": "minute", + "options": [ + { + "label": "None", + "value": "None" + }, + { + "label": "Minute", + "value": "minute" + }, + { + "label": "Second", + "value": "second" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "None", + "minute", + "second" + ], + "default": "minute" + } + }, + "dependencies": ["schema"], + "id": "shyiw0wg5q" + }, + { + "propertyName": "defaultValue", + "label": "Default state", + "helpText": "Sets the default checked state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "501hx5c3o5" + }, + { + "helpText": "Sets the default value of the field. The array is updated when the default value changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY" + }, + "dependencies": ["schema"], + "id": "1i1jbad2uv" + }, + { + "propertyName": "children", + "label": "Field configuration", + "helpText": "Field configuration", + "controlType": "FIELD_CONFIGURATION", + "isBindProperty": false, + "isTriggerProperty": false, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "identifier", + "contentChildren": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "fieldType", + "label": "Field Type", + "helpText": "Type of the widget to be used corresponding to the field", + "controlType": "DROP_DOWN", + "isBindProperty": false, + "isTriggerProperty": false, + "options": [ + { + "label": "Array", + "value": "Array" + }, + { + "label": "Checkbox", + "value": "Checkbox" + }, + { + "label": "Currency Input", + "value": "Currency Input" + }, + { + "label": "Datepicker", + "value": "Datepicker" + }, + { + "label": "Email Input", + "value": "Email Input" + }, + { + "label": "Multiselect", + "value": "Multiselect" + }, + { + "label": "Multiline Text Input", + "value": "Multiline Text Input" + }, + { + "label": "Number Input", + "value": "Number Input" + }, + { + "label": "Object", + "value": "Object" + }, + { + "label": "Password Input", + "value": "Password Input" + }, + { + "label": "Phone Number Input", + "value": "Phone Number Input" + }, + { + "label": "Radio Group", + "value": "Radio Group" + }, + { + "label": "Select", + "value": "Select" + }, + { + "label": "Switch", + "value": "Switch" + }, + { + "label": "Text Input", + "value": "Text Input" + } + ], + "dependencies": [ + "schema", + "childStylesheet", + "dynamicBindingPathList" + ], + "id": "4k7sd8nc5f" + }, + { + "propertyName": "accessor", + "helpText": "Sets the property name of the field which can be used to access the value in formData and fieldState.", + "label": "Property Name", + "controlType": "INPUT_TEXT", + "placeholderText": "name", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "unique string", + "example": "firstName | last_name | age14", + "autocompleteDataType": "STRING" + }, + "fnString": "function accessorValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var grandParentPath = propertyPathChunks.slice(0, -2).join(\".\");\n var schemaItemIdentifier = propertyPathChunks.slice(-2)[0]; // ['schema', '__root_field__', 'children', 'age', 'name'] -> age\n var schema = lodash.cloneDeep(lodash.get(props, grandParentPath));\n var RESTRICTED_KEYS = [\"__array_item__\", \"__root_schema__\"];\n var currentSchemaItem = lodash.cloneDeep(schema[schemaItemIdentifier]);\n // Remove the current edited schemaItem from schema so it doesn't\n // get picked in the existing keys list\n delete schema[schemaItemIdentifier];\n\n // If the field is not _id (mongo id) then it shouldn't be allowed\n if (currentSchemaItem.originalIdentifier !== \"_id\") {\n RESTRICTED_KEYS.push(\"_id\");\n }\n if (value === \"\") {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"ValidationError\",\n message: \"Property Name cannot be empty\"\n }]\n };\n }\n var existingKeys = (Object.values(schema) || []).map(\n // @ts-expect-error: Types are not available\n function (schemaItem) {\n return schemaItem.name;\n });\n if (existingKeys.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"Property name already in use.\"\n }]\n };\n }\n if (RESTRICTED_KEYS.includes(value)) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"ValidationError\",\n message: \"This is a restricted Property Name\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": [ + "schema" + ], + "id": "jiqycfk515" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": [ + "value" + ], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "schema", + "sourceData" + ], + "id": "n1ssipf1c6" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets the default text of the field. The text is updated if the default text changes", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "John Doe", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": [ + "schema" + ], + "id": "5dy5xhr2r0" + }, + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "(000) 000-0000", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string", + "example": "(000) 000-0000", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultValueValidation(value, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var fieldType = schemaItem.fieldType;\n if (value === null || value === undefined) {\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n\n // Cannot use FieldType typing check as this whole method is passed as string and executed on worker, so it results\n // any methods/variable (closure) usage as reference error.\n // CAUTION! - make sure the correct fieldType is used here as string.\n if (fieldType === \"Number Input\" || fieldType === \"Currency Input\") {\n var _parsed = Number(value);\n if (typeof value === \"string\") {\n if (value.trim() === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (!Number.isFinite(_parsed)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be a number\"\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: _parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (lodash.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n var parsed = value;\n var isValid = lodash.isString(parsed);\n if (!isValid) {\n try {\n parsed = lodash.toString(parsed);\n isValid = true;\n } catch (e) {\n return {\n isValid: false,\n parsed: \"\",\n messages: [{\n name: \"TypeError\",\n message: \"This value must be string\"\n }]\n };\n }\n }\n return {\n isValid: isValid,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "dependencies": [ + "schema" + ], + "id": "ac9b0hxif9" + }, + { + "propertyName": "dialCode", + "helpText": "Changes the country code", + "label": "Default country code", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or country name", + "options": [ + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "Afghanistan (+93)", + "value": "+93", + "id": "+93" + }, + { + "leftElement": "🇦🇽", + "searchText": "Aland Islands", + "label": "Aland Islands (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "Albania (+355)", + "value": "+355", + "id": "+355" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "Algeria (+213)", + "value": "+213", + "id": "+213" + }, + { + "leftElement": "🇦🇸", + "searchText": "AmericanSamoa", + "label": "AmericanSamoa (+1684)", + "value": "+1684", + "id": "+1684" + }, + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "Andorra (+376)", + "value": "+376", + "id": "+376" + }, + { + "leftElement": "🇦🇴", + "searchText": "Angola", + "label": "Angola (+244)", + "value": "+244", + "id": "+244" + }, + { + "leftElement": "🇦🇮", + "searchText": "Anguilla", + "label": "Anguilla (+1264)", + "value": "+1264", + "id": "+1264" + }, + { + "leftElement": "🇦🇶", + "searchText": "Antarctica", + "label": "Antarctica (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇦🇬", + "searchText": "Antigua and Barbuda", + "label": "Antigua and Barbuda (+1268)", + "value": "+1268", + "id": "+1268" + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "Argentina (+54)", + "value": "+54", + "id": "+54" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "Armenia (+374)", + "value": "+374", + "id": "+374" + }, + { + "leftElement": "🇦🇼", + "searchText": "Aruba", + "label": "Aruba (+297)", + "value": "+297", + "id": "+297" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "Australia (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "Austria (+43)", + "value": "+43", + "id": "+43" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "Azerbaijan (+994)", + "value": "+994", + "id": "+994" + }, + { + "leftElement": "🇧🇸", + "searchText": "Bahamas", + "label": "Bahamas (+1242)", + "value": "+1242", + "id": "+1242" + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "Bahrain (+973)", + "value": "+973", + "id": "+973" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "Bangladesh (+880)", + "value": "+880", + "id": "+880" + }, + { + "leftElement": "🇧🇧", + "searchText": "Barbados", + "label": "Barbados (+1246)", + "value": "+1246", + "id": "+1246" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "Belarus (+375)", + "value": "+375", + "id": "+375" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "Belgium (+32)", + "value": "+32", + "id": "+32" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "Belize (+501)", + "value": "+501", + "id": "+501" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "Benin (+229)", + "value": "+229", + "id": "+229" + }, + { + "leftElement": "🇧🇲", + "searchText": "Bermuda", + "label": "Bermuda (+1441)", + "value": "+1441", + "id": "+1441" + }, + { + "leftElement": "🇧🇹", + "searchText": "Bhutan", + "label": "Bhutan (+975)", + "value": "+975", + "id": "+975" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia, Plurinational State of", + "label": "Bolivia, Plurinational State of (+591)", + "value": "+591", + "id": "+591" + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "Bosnia and Herzegovina (+387)", + "value": "+387", + "id": "+387" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "Botswana (+267)", + "value": "+267", + "id": "+267" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "Brazil (+55)", + "value": "+55", + "id": "+55" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "British Indian Ocean Territory (+246)", + "value": "+246", + "id": "+246" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "Brunei Darussalam (+673)", + "value": "+673", + "id": "+673" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "Bulgaria (+359)", + "value": "+359", + "id": "+359" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "Burkina Faso (+226)", + "value": "+226", + "id": "+226" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "Burundi (+257)", + "value": "+257", + "id": "+257" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "Cambodia (+855)", + "value": "+855", + "id": "+855" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "Cameroon (+237)", + "value": "+237", + "id": "+237" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "Cape Verde (+238)", + "value": "+238", + "id": "+238" + }, + { + "leftElement": "🇰🇾", + "searchText": "Cayman Islands", + "label": "Cayman Islands (+ 345)", + "value": "+ 345", + "id": "+ 345" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "Central African Republic (+236)", + "value": "+236", + "id": "+236" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "Chad (+235)", + "value": "+235", + "id": "+235" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "Chile (+56)", + "value": "+56", + "id": "+56" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "China (+86)", + "value": "+86", + "id": "+86" + }, + { + "leftElement": "🇦🇺", + "searchText": "Christmas Island", + "label": "Christmas Island (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇦🇺", + "searchText": "Cocos (Keeling) Islands", + "label": "Cocos (Keeling) Islands (+61)", + "value": "+61", + "id": "+61" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "Colombia (+57)", + "value": "+57", + "id": "+57" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "Comoros (+269)", + "value": "+269", + "id": "+269" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo", + "label": "Congo (+242)", + "value": "+242", + "id": "+242" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, The Democratic Republic of the Congo", + "label": "Congo, The Democratic Republic of the Congo (+243)", + "value": "+243", + "id": "+243" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "Cook Islands (+682)", + "value": "+682", + "id": "+682" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "Costa Rica (+506)", + "value": "+506", + "id": "+506" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "Cote d'Ivoire (+225)", + "value": "+225", + "id": "+225" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "Croatia (+385)", + "value": "+385", + "id": "+385" + }, + { + "leftElement": "🇨🇺", + "searchText": "Cuba", + "label": "Cuba (+53)", + "value": "+53", + "id": "+53" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "Cyprus (+357)", + "value": "+357", + "id": "+357" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "Czech Republic (+420)", + "value": "+420", + "id": "+420" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "Denmark (+45)", + "value": "+45", + "id": "+45" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "Djibouti (+253)", + "value": "+253", + "id": "+253" + }, + { + "leftElement": "🇩🇲", + "searchText": "Dominica", + "label": "Dominica (+1767)", + "value": "+1767", + "id": "+1767" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "Dominican Republic (+1849)", + "value": "+1849", + "id": "+1849" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "Ecuador (+593)", + "value": "+593", + "id": "+593" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "Egypt (+20)", + "value": "+20", + "id": "+20" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "El Salvador (+503)", + "value": "+503", + "id": "+503" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "Equatorial Guinea (+240)", + "value": "+240", + "id": "+240" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "Eritrea (+291)", + "value": "+291", + "id": "+291" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "Estonia (+372)", + "value": "+372", + "id": "+372" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "Ethiopia (+251)", + "value": "+251", + "id": "+251" + }, + { + "leftElement": "🇫🇰", + "searchText": "Falkland Islands (Malvinas)", + "label": "Falkland Islands (Malvinas) (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "Faroe Islands (+298)", + "value": "+298", + "id": "+298" + }, + { + "leftElement": "🇫🇯", + "searchText": "Fiji", + "label": "Fiji (+679)", + "value": "+679", + "id": "+679" + }, + { + "leftElement": "🇦🇽", + "searchText": "Finland", + "label": "Finland (+358)", + "value": "+358", + "id": "+358" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "France (+33)", + "value": "+33", + "id": "+33" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "French Guiana (+594)", + "value": "+594", + "id": "+594" + }, + { + "leftElement": "🇵🇫", + "searchText": "French Polynesia", + "label": "French Polynesia (+689)", + "value": "+689", + "id": "+689" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "Gabon (+241)", + "value": "+241", + "id": "+241" + }, + { + "leftElement": "🇬🇲", + "searchText": "Gambia", + "label": "Gambia (+220)", + "value": "+220", + "id": "+220" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "Georgia (+995)", + "value": "+995", + "id": "+995" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "Germany (+49)", + "value": "+49", + "id": "+49" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "Ghana (+233)", + "value": "+233", + "id": "+233" + }, + { + "leftElement": "🇬🇮", + "searchText": "Gibraltar", + "label": "Gibraltar (+350)", + "value": "+350", + "id": "+350" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "Greece (+30)", + "value": "+30", + "id": "+30" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "Greenland (+299)", + "value": "+299", + "id": "+299" + }, + { + "leftElement": "🇬🇩", + "searchText": "Grenada", + "label": "Grenada (+1473)", + "value": "+1473", + "id": "+1473" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "Guadeloupe (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "Guam (+1671)", + "value": "+1671", + "id": "+1671" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "Guatemala (+502)", + "value": "+502", + "id": "+502" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "Guernsey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "Guinea (+224)", + "value": "+224", + "id": "+224" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "Guinea-Bissau (+245)", + "value": "+245", + "id": "+245" + }, + { + "leftElement": "🇬🇾", + "searchText": "Guyana", + "label": "Guyana (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇭🇹", + "searchText": "Haiti", + "label": "Haiti (+509)", + "value": "+509", + "id": "+509" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "Holy See (Vatican City State) (+379)", + "value": "+379", + "id": "+379" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "Honduras (+504)", + "value": "+504", + "id": "+504" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "Hong Kong (+852)", + "value": "+852", + "id": "+852" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "Hungary (+36)", + "value": "+36", + "id": "+36" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "Iceland (+354)", + "value": "+354", + "id": "+354" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "India (+91)", + "value": "+91", + "id": "+91" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "Indonesia (+62)", + "value": "+62", + "id": "+62" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of Persian Gulf", + "label": "Iran, Islamic Republic of Persian Gulf (+98)", + "value": "+98", + "id": "+98" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "Iraq (+964)", + "value": "+964", + "id": "+964" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "Ireland (+353)", + "value": "+353", + "id": "+353" + }, + { + "leftElement": "🇬🇬", + "searchText": "Isle of Man", + "label": "Isle of Man (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "Israel (+972)", + "value": "+972", + "id": "+972" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "Italy (+39)", + "value": "+39", + "id": "+39" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "Jamaica (+1876)", + "value": "+1876", + "id": "+1876" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "Japan (+81)", + "value": "+81", + "id": "+81" + }, + { + "leftElement": "🇬🇬", + "searchText": "Jersey", + "label": "Jersey (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "Jordan (+962)", + "value": "+962", + "id": "+962" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "Kazakhstan (+77)", + "value": "+77", + "id": "+77" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "Kenya (+254)", + "value": "+254", + "id": "+254" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "Kiribati (+686)", + "value": "+686", + "id": "+686" + }, + { + "leftElement": "🇰🇵", + "searchText": "Korea, Democratic People's Republic of Korea", + "label": "Korea, Democratic People's Republic of Korea (+850)", + "value": "+850", + "id": "+850" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of South Korea", + "label": "Korea, Republic of South Korea (+82)", + "value": "+82", + "id": "+82" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "Kuwait (+965)", + "value": "+965", + "id": "+965" + }, + { + "leftElement": "🇰🇬", + "searchText": "Kyrgyzstan", + "label": "Kyrgyzstan (+996)", + "value": "+996", + "id": "+996" + }, + { + "leftElement": "🇱🇦", + "searchText": "Laos", + "label": "Laos (+856)", + "value": "+856", + "id": "+856" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "Latvia (+371)", + "value": "+371", + "id": "+371" + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "Lebanon (+961)", + "value": "+961", + "id": "+961" + }, + { + "leftElement": "🇱🇸", + "searchText": "Lesotho", + "label": "Lesotho (+266)", + "value": "+266", + "id": "+266" + }, + { + "leftElement": "🇱🇷", + "searchText": "Liberia", + "label": "Liberia (+231)", + "value": "+231", + "id": "+231" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libyan Arab Jamahiriya", + "label": "Libyan Arab Jamahiriya (+218)", + "value": "+218", + "id": "+218" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "Liechtenstein (+423)", + "value": "+423", + "id": "+423" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "Lithuania (+370)", + "value": "+370", + "id": "+370" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "Luxembourg (+352)", + "value": "+352", + "id": "+352" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "Macao (+853)", + "value": "+853", + "id": "+853" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia", + "label": "Macedonia (+389)", + "value": "+389", + "id": "+389" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "Madagascar (+261)", + "value": "+261", + "id": "+261" + }, + { + "leftElement": "🇲🇼", + "searchText": "Malawi", + "label": "Malawi (+265)", + "value": "+265", + "id": "+265" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "Malaysia (+60)", + "value": "+60", + "id": "+60" + }, + { + "leftElement": "🇲🇻", + "searchText": "Maldives", + "label": "Maldives (+960)", + "value": "+960", + "id": "+960" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "Mali (+223)", + "value": "+223", + "id": "+223" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "Malta (+356)", + "value": "+356", + "id": "+356" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "Marshall Islands (+692)", + "value": "+692", + "id": "+692" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "Martinique (+596)", + "value": "+596", + "id": "+596" + }, + { + "leftElement": "🇲🇷", + "searchText": "Mauritania", + "label": "Mauritania (+222)", + "value": "+222", + "id": "+222" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "Mauritius (+230)", + "value": "+230", + "id": "+230" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "Mayotte (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "Mexico (+52)", + "value": "+52", + "id": "+52" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of Micronesia", + "label": "Micronesia, Federated States of Micronesia (+691)", + "value": "+691", + "id": "+691" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova", + "label": "Moldova (+373)", + "value": "+373", + "id": "+373" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "Monaco (+377)", + "value": "+377", + "id": "+377" + }, + { + "leftElement": "🇲🇳", + "searchText": "Mongolia", + "label": "Mongolia (+976)", + "value": "+976", + "id": "+976" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "Montenegro (+382)", + "value": "+382", + "id": "+382" + }, + { + "leftElement": "🇲🇸", + "searchText": "Montserrat", + "label": "Montserrat (+1664)", + "value": "+1664", + "id": "+1664" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "Morocco (+212)", + "value": "+212", + "id": "+212" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "Mozambique (+258)", + "value": "+258", + "id": "+258" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "Myanmar (+95)", + "value": "+95", + "id": "+95" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "Namibia (+264)", + "value": "+264", + "id": "+264" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "Nauru (+674)", + "value": "+674", + "id": "+674" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "Nepal (+977)", + "value": "+977", + "id": "+977" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "Netherlands (+31)", + "value": "+31", + "id": "+31" + }, + { + "leftElement": "🇦🇳", + "searchText": "Netherlands Antilles", + "label": "Netherlands Antilles (+599)", + "value": "+599", + "id": "+599" + }, + { + "leftElement": "🇳🇨", + "searchText": "New Caledonia", + "label": "New Caledonia (+687)", + "value": "+687", + "id": "+687" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "New Zealand (+64)", + "value": "+64", + "id": "+64" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "Nicaragua (+505)", + "value": "+505", + "id": "+505" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "Niger (+227)", + "value": "+227", + "id": "+227" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "Nigeria (+234)", + "value": "+234", + "id": "+234" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "Niue (+683)", + "value": "+683", + "id": "+683" + }, + { + "leftElement": "🇦🇶", + "searchText": "Norfolk Island", + "label": "Norfolk Island (+672)", + "value": "+672", + "id": "+672" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "Northern Mariana Islands (+1670)", + "value": "+1670", + "id": "+1670" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "Norway (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "Oman (+968)", + "value": "+968", + "id": "+968" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "Pakistan (+92)", + "value": "+92", + "id": "+92" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "Palau (+680)", + "value": "+680", + "id": "+680" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestinian Territory, Occupied", + "label": "Palestinian Territory, Occupied (+970)", + "value": "+970", + "id": "+970" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "Panama (+507)", + "value": "+507", + "id": "+507" + }, + { + "leftElement": "🇵🇬", + "searchText": "Papua New Guinea", + "label": "Papua New Guinea (+675)", + "value": "+675", + "id": "+675" + }, + { + "leftElement": "🇬🇾", + "searchText": "Paraguay", + "label": "Paraguay (+595)", + "value": "+595", + "id": "+595" + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "Peru (+51)", + "value": "+51", + "id": "+51" + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "Philippines (+63)", + "value": "+63", + "id": "+63" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "Pitcairn (+872)", + "value": "+872", + "id": "+872" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "Poland (+48)", + "value": "+48", + "id": "+48" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "Portugal (+351)", + "value": "+351", + "id": "+351" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "Puerto Rico (+1939)", + "value": "+1939", + "id": "+1939" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "Qatar (+974)", + "value": "+974", + "id": "+974" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "Romania (+40)", + "value": "+40", + "id": "+40" + }, + { + "leftElement": "🇷🇺", + "searchText": "Russia", + "label": "Russia (+7)", + "value": "+7", + "id": "+7" + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "Rwanda (+250)", + "value": "+250", + "id": "+250" + }, + { + "leftElement": "🇾🇹", + "searchText": "Reunion", + "label": "Reunion (+262)", + "value": "+262", + "id": "+262" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Barthelemy", + "label": "Saint Barthelemy (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇸🇭", + "searchText": "Saint Helena, Ascension and Tristan Da Cunha", + "label": "Saint Helena, Ascension and Tristan Da Cunha (+290)", + "value": "+290", + "id": "+290" + }, + { + "leftElement": "🇰🇳", + "searchText": "Saint Kitts and Nevis", + "label": "Saint Kitts and Nevis (+1869)", + "value": "+1869", + "id": "+1869" + }, + { + "leftElement": "🇱🇨", + "searchText": "Saint Lucia", + "label": "Saint Lucia (+1758)", + "value": "+1758", + "id": "+1758" + }, + { + "leftElement": "🇬🇵", + "searchText": "Saint Martin", + "label": "Saint Martin (+590)", + "value": "+590", + "id": "+590" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "Saint Pierre and Miquelon (+508)", + "value": "+508", + "id": "+508" + }, + { + "leftElement": "🇻🇨", + "searchText": "Saint Vincent and the Grenadines", + "label": "Saint Vincent and the Grenadines (+1784)", + "value": "+1784", + "id": "+1784" + }, + { + "leftElement": "🇼🇸", + "searchText": "Samoa", + "label": "Samoa (+685)", + "value": "+685", + "id": "+685" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "San Marino (+378)", + "value": "+378", + "id": "+378" + }, + { + "leftElement": "🇸🇹", + "searchText": "Sao Tome and Principe", + "label": "Sao Tome and Principe (+239)", + "value": "+239", + "id": "+239" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "Saudi Arabia (+966)", + "value": "+966", + "id": "+966" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "Senegal (+221)", + "value": "+221", + "id": "+221" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "Serbia (+381)", + "value": "+381", + "id": "+381" + }, + { + "leftElement": "🇸🇨", + "searchText": "Seychelles", + "label": "Seychelles (+248)", + "value": "+248", + "id": "+248" + }, + { + "leftElement": "🇸🇱", + "searchText": "Sierra Leone", + "label": "Sierra Leone (+232)", + "value": "+232", + "id": "+232" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "Singapore (+65)", + "value": "+65", + "id": "+65" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "Slovakia (+421)", + "value": "+421", + "id": "+421" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "Slovenia (+386)", + "value": "+386", + "id": "+386" + }, + { + "leftElement": "🇸🇧", + "searchText": "Solomon Islands", + "label": "Solomon Islands (+677)", + "value": "+677", + "id": "+677" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "Somalia (+252)", + "value": "+252", + "id": "+252" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "South Africa (+27)", + "value": "+27", + "id": "+27" + }, + { + "leftElement": "🇸🇸", + "searchText": "South Sudan", + "label": "South Sudan (+211)", + "value": "+211", + "id": "+211" + }, + { + "leftElement": "🇫🇰", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "South Georgia and the South Sandwich Islands (+500)", + "value": "+500", + "id": "+500" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "Spain (+34)", + "value": "+34", + "id": "+34" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "Sri Lanka (+94)", + "value": "+94", + "id": "+94" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "Sudan (+249)", + "value": "+249", + "id": "+249" + }, + { + "leftElement": "🇸🇷", + "searchText": "Suriname", + "label": "Suriname (+597)", + "value": "+597", + "id": "+597" + }, + { + "leftElement": "🇳🇴", + "searchText": "Svalbard and Jan Mayen", + "label": "Svalbard and Jan Mayen (+47)", + "value": "+47", + "id": "+47" + }, + { + "leftElement": "🇸🇿", + "searchText": "Swaziland", + "label": "Swaziland (+268)", + "value": "+268", + "id": "+268" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "Sweden (+46)", + "value": "+46", + "id": "+46" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "Switzerland (+41)", + "value": "+41", + "id": "+41" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "Syrian Arab Republic (+963)", + "value": "+963", + "id": "+963" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan", + "label": "Taiwan (+886)", + "value": "+886", + "id": "+886" + }, + { + "leftElement": "🇹🇯", + "searchText": "Tajikistan", + "label": "Tajikistan (+992)", + "value": "+992", + "id": "+992" + }, + { + "leftElement": "🇹🇿", + "searchText": "Tanzania, United Republic of Tanzania", + "label": "Tanzania, United Republic of Tanzania (+255)", + "value": "+255", + "id": "+255" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "Thailand (+66)", + "value": "+66", + "id": "+66" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "Timor-Leste (+670)", + "value": "+670", + "id": "+670" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "Togo (+228)", + "value": "+228", + "id": "+228" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "Tokelau (+690)", + "value": "+690", + "id": "+690" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "Tonga (+676)", + "value": "+676", + "id": "+676" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "Trinidad and Tobago (+1868)", + "value": "+1868", + "id": "+1868" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "Tunisia (+216)", + "value": "+216", + "id": "+216" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "Turkey (+90)", + "value": "+90", + "id": "+90" + }, + { + "leftElement": "🇹🇲", + "searchText": "Turkmenistan", + "label": "Turkmenistan (+993)", + "value": "+993", + "id": "+993" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "Turks and Caicos Islands (+1649)", + "value": "+1649", + "id": "+1649" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "Tuvalu (+688)", + "value": "+688", + "id": "+688" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "Uganda (+256)", + "value": "+256", + "id": "+256" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "Ukraine (+380)", + "value": "+380", + "id": "+380" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "United Arab Emirates (+971)", + "value": "+971", + "id": "+971" + }, + { + "leftElement": "🇬🇬", + "searchText": "United Kingdom", + "label": "United Kingdom (+44)", + "value": "+44", + "id": "+44" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States / Canada", + "label": "United States / Canada (+1)", + "value": "+1", + "id": "+1" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "Uruguay (+598)", + "value": "+598", + "id": "+598" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "Uzbekistan (+998)", + "value": "+998", + "id": "+998" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "Vanuatu (+678)", + "value": "+678", + "id": "+678" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela, Bolivarian Republic of Venezuela", + "label": "Venezuela, Bolivarian Republic of Venezuela (+58)", + "value": "+58", + "id": "+58" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "Vietnam (+84)", + "value": "+84", + "id": "+84" + }, + { + "leftElement": "🇻🇬", + "searchText": "Virgin Islands, British", + "label": "Virgin Islands, British (+1284)", + "value": "+1284", + "id": "+1284" + }, + { + "leftElement": "🇻🇮", + "searchText": "Virgin Islands, U.S.", + "label": "Virgin Islands, U.S. (+1340)", + "value": "+1340", + "id": "+1340" + }, + { + "leftElement": "🇼🇫", + "searchText": "Wallis and Futuna", + "label": "Wallis and Futuna (+681)", + "value": "+681", + "id": "+681" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "Yemen (+967)", + "value": "+967", + "id": "+967" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "Zambia (+260)", + "value": "+260", + "id": "+260" + }, + { + "leftElement": "🇿🇼", + "searchText": "Zimbabwe", + "label": "Zimbabwe (+263)", + "value": "+263", + "id": "+263" + } + ], + "dependencies": [ + "schema" + ], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "1gk30aq6vg" + }, + { + "propertyName": "currencyCountryCode", + "helpText": "Changes the type of currency", + "label": "Currency", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "virtual": true, + "searchPlaceholderText": "Search by code or name", + "options": [ + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "AED - United Arab Emirates Dirham", + "value": "AED", + "id": "د.إ.‏" + }, + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "AFN - Afghan Afghani", + "value": "AFN", + "id": "؋" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "ALL - Albanian Lek", + "value": "ALL", + "id": "Lek" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "AMD - Armenian Dram", + "value": "AMD", + "id": "դր." + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "ARS - Argentine Peso", + "value": "ARS", + "id": "$" + }, + { + "leftElement": "🇦🇸", + "searchText": "American Samoa", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇦🇽", + "searchText": "Alland Islands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "AZN - Azerbaijani Manat", + "value": "AZN", + "id": "ман." + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "BAM - Bosnia-Herzegovina Convertible Mark", + "value": "BAM", + "id": "KM" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "BDT - Bangladeshi Taka", + "value": "BDT", + "id": "৳" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "BGN - Bulgarian Lev", + "value": "BGN", + "id": "лв." + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "BHD - Bahraini Dinar", + "value": "BHD", + "id": "د.ب.‏" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "BIF - Burundian Franc", + "value": "BIF", + "id": "FBu" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇧🇱", + "searchText": "Saint Barthelemy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "BND - Brunei Dollar", + "value": "BND", + "id": "$" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia", + "label": "BOB - Bolivian Boliviano", + "value": "BOB", + "id": "Bs" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "BRL - Brazilian Real", + "value": "BRL", + "id": "R$" + }, + { + "leftElement": "🇧🇻", + "searchText": "Bouvet Island", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "BWP - Botswanan Pula", + "value": "BWP", + "id": "P" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "BYR - Belarusian Ruble", + "value": "BYR", + "id": "BYR" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "BZD - Belize Dollar", + "value": "BZD", + "id": "$" + }, + { + "leftElement": "🇨🇦", + "searchText": "Canada", + "label": "CAD - Canadian Dollar", + "value": "CAD", + "id": "$" + }, + { + "leftElement": "🇨🇨", + "searchText": "Cocos (Keeling) Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, Democratic Republic of the", + "label": "CDF - Congolese Franc", + "value": "CDF", + "id": "FrCD" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo, Republic of the", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "CLP - Chilean Peso", + "value": "CLP", + "id": "$" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "CNY - Chinese Yuan", + "value": "CNY", + "id": "CN¥" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "COP - Colombian Peso", + "value": "COP", + "id": "$" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "CRC - Costa Rican Colón", + "value": "CRC", + "id": "₡" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "CVE - Cape Verdean Escudo", + "value": "CVE", + "id": "CV$" + }, + { + "leftElement": "🇨🇽", + "searchText": "Christmas Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "CZK - Czech Republic Koruna", + "value": "CZK", + "id": "Kč" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "DJF - Djiboutian Franc", + "value": "DJF", + "id": "Fdj" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "DOP - Dominican Peso", + "value": "DOP", + "id": "RD$" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "DZD - Algerian Dinar", + "value": "DZD", + "id": "د.ج.‏" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "EGP - Egyptian Pound", + "value": "EGP", + "id": "ج.م.‏" + }, + { + "leftElement": "🇪🇭", + "searchText": "Western Sahara", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "ERN - Eritrean Nakfa", + "value": "ERN", + "id": "Nfk" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "ETB - Ethiopian Birr", + "value": "ETB", + "id": "Br" + }, + { + "leftElement": "🇫🇮", + "searchText": "Finland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇧", + "searchText": "United Kingdom", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "GEL - Georgian Lari", + "value": "GEL", + "id": "GEL" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "GHS - Ghanaian Cedi", + "value": "GHS", + "id": "GH₵" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "DKK - Danish Krone", + "value": "DKK", + "id": "kr" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "GNF - Guinean Franc", + "value": "GNF", + "id": "FG" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇬🇸", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "GTQ - Guatemalan Quetzal", + "value": "GTQ", + "id": "Q" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "HKD - Hong Kong Dollar", + "value": "HKD", + "id": "$" + }, + { + "leftElement": "🇭🇲", + "searchText": "Heard Island and McDonald Islands", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "HNL - Honduran Lempira", + "value": "HNL", + "id": "L" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "HRK - Croatian Kuna", + "value": "HRK", + "id": "kn" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "HUF - Hungarian Forint", + "value": "HUF", + "id": "Ft" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "IDR - Indonesian Rupiah", + "value": "IDR", + "id": "Rp" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇮🇲", + "searchText": "Isle of Man", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "INR - Indian Rupee", + "value": "INR", + "id": "₹" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "IQD - Iraqi Dinar", + "value": "IQD", + "id": "د.ع.‏" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of", + "label": "IRR - Iranian Rial", + "value": "IRR", + "id": "﷼" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "ISK - Icelandic Króna", + "value": "ISK", + "id": "kr" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇯🇪", + "searchText": "Jersey", + "label": "GBP - British Pound Sterling", + "value": "GBP", + "id": "£" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "JMD - Jamaican Dollar", + "value": "JMD", + "id": "$" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "JOD - Jordanian Dinar", + "value": "JOD", + "id": "د.أ.‏" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "JPY - Japanese Yen", + "value": "JPY", + "id": "¥" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "KES - Kenyan Shilling", + "value": "KES", + "id": "Ksh" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "KHR - Cambodian Riel", + "value": "KHR", + "id": "៛" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "KMF - Comorian Franc", + "value": "KMF", + "id": "FC" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of", + "label": "KRW - South Korean Won", + "value": "KRW", + "id": "₩" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "KWD - Kuwaiti Dinar", + "value": "KWD", + "id": "د.ك.‏" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "KZT - Kazakhstani Tenge", + "value": "KZT", + "id": "тңг." + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "LBP - Lebanese Pound", + "value": "LBP", + "id": "ل.ل.‏" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "CHF - Swiss Franc", + "value": "CHF", + "id": "CHF" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "LKR - Sri Lankan Rupee", + "value": "LKR", + "id": "SL Re" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "LTL - Lithuanian Litas", + "value": "LTL", + "id": "Lt" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libya", + "label": "LYD - Libyan Dinar", + "value": "LYD", + "id": "د.ل.‏" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "MAD - Moroccan Dirham", + "value": "MAD", + "id": "د.م.‏" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova, Republic of", + "label": "MDL - Moldovan Leu", + "value": "MDL", + "id": "MDL" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇫", + "searchText": "Saint Martin (French part)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "MGA - Malagasy Ariary", + "value": "MGA", + "id": "MGA" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia, the Former Yugoslav Republic of", + "label": "MKD - Macedonian Denar", + "value": "MKD", + "id": "MKD" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "MMK - Myanma Kyat", + "value": "MMK", + "id": "K" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "MOP - Macanese Pataca", + "value": "MOP", + "id": "MOP$" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "MUR - Mauritian Rupee", + "value": "MUR", + "id": "MURs" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "MXN - Mexican Peso", + "value": "MXN", + "id": "$" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "MYR - Malaysian Ringgit", + "value": "MYR", + "id": "RM" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "MZN - Mozambican Metical", + "value": "MZN", + "id": "MTn" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "NAD - Namibian Dollar", + "value": "NAD", + "id": "N$" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇳🇫", + "searchText": "Norfolk Island", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "NGN - Nigerian Naira", + "value": "NGN", + "id": "₦" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "NIO - Nicaraguan Córdoba", + "value": "NIO", + "id": "C$" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "NPR - Nepalese Rupee", + "value": "NPR", + "id": "नेरू" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "OMR - Omani Rial", + "value": "OMR", + "id": "ر.ع.‏" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "PAB - Panamanian Balboa", + "value": "PAB", + "id": "B/." + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "PEN - Peruvian Nuevo Sol", + "value": "PEN", + "id": "S/." + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "PHP - Philippine Peso", + "value": "PHP", + "id": "₱" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "PKR - Pakistani Rupee", + "value": "PKR", + "id": "₨" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "PLN - Polish Zloty", + "value": "PLN", + "id": "zł" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestine, State of", + "label": "ILS - Israeli New Sheqel", + "value": "ILS", + "id": "₪" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇵🇾", + "searchText": "Paraguay", + "label": "PYG - Paraguayan Guarani", + "value": "PYG", + "id": "₲" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "QAR - Qatari Rial", + "value": "QAR", + "id": "ر.ق.‏" + }, + { + "leftElement": "🇷🇪", + "searchText": "Reunion", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "RON - Romanian Leu", + "value": "RON", + "id": "RON" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "RSD - Serbian Dinar", + "value": "RSD", + "id": "дин." + }, + { + "leftElement": "🇷🇺", + "searchText": "Russian Federation", + "label": "RUB - Russian Ruble", + "value": "RUB", + "id": "руб." + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "RWF - Rwandan Franc", + "value": "RWF", + "id": "FR" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "SAR - Saudi Riyal", + "value": "SAR", + "id": "ر.س.‏" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "SDG - Sudanese Pound", + "value": "SDG", + "id": "SDG" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "SEK - Swedish Krona", + "value": "SEK", + "id": "kr" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "SGD - Singapore Dollar", + "value": "SGD", + "id": "$" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇯", + "searchText": "Svalbard and Jan Mayen", + "label": "NOK - Norwegian Krone", + "value": "NOK", + "id": "kr" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "SOS - Somali Shilling", + "value": "SOS", + "id": "Ssh" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "SYP - Syrian Pound", + "value": "SYP", + "id": "ل.س.‏" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "XAF - CFA Franc BEAC", + "value": "XAF", + "id": "FCFA" + }, + { + "leftElement": "🇹🇫", + "searchText": "French Southern Territories", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "XOF - CFA Franc BCEAO", + "value": "XOF", + "id": "CFA" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "THB - Thai Baht", + "value": "THB", + "id": "฿" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "NZD - New Zealand Dollar", + "value": "NZD", + "id": "$" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "TND - Tunisian Dinar", + "value": "TND", + "id": "د.ت.‏" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "TOP - Tongan Paʻanga", + "value": "TOP", + "id": "T$" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "TRY - Turkish Lira", + "value": "TRY", + "id": "TL" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "TTD - Trinidad and Tobago Dollar", + "value": "TTD", + "id": "$" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "AUD - Australian Dollar", + "value": "AUD", + "id": "$" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan, Province of China", + "label": "TWD - New Taiwan Dollar", + "value": "TWD", + "id": "NT$" + }, + { + "leftElement": "🇹🇿", + "searchText": "United Republic of Tanzania", + "label": "TZS - Tanzanian Shilling", + "value": "TZS", + "id": "TSh" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "UAH - Ukrainian Hryvnia", + "value": "UAH", + "id": "₴" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "UGX - Ugandan Shilling", + "value": "UGX", + "id": "USh" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "UYU - Uruguayan Peso", + "value": "UYU", + "id": "$" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "UZS - Uzbekistan Som", + "value": "UZS", + "id": "UZS" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela", + "label": "VEF - Venezuelan Bolívar", + "value": "VEF", + "id": "Bs.F." + }, + { + "leftElement": "🇻🇬", + "searchText": "British Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇮", + "searchText": "US Virgin Islands", + "label": "USD - US Dollar", + "value": "USD", + "id": "$" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "VND - Vietnamese Dong", + "value": "VND", + "id": "₫" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "VUV - Vanuatu Vatu", + "value": "VUV", + "id": "VT" + }, + { + "leftElement": "🇽🇰", + "searchText": "Kosovo", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "YER - Yemeni Rial", + "value": "YER", + "id": "ر.ي.‏" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "EUR - Euro", + "value": "EUR", + "id": "€" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "ZAR - South African Rand", + "value": "ZAR", + "id": "R" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "ZMK - Zambian Kwacha", + "value": "ZMK", + "id": "ZK" + } + ], + "dependencies": [ + "schema" + ], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "r4rc2gl7yv" + }, + { + "propertyName": "allowDialCodeChange", + "label": "Allow Country Code Change", + "helpText": "Search by country", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": [ + "schema" + ], + "validation": { + "type": "BOOLEAN" + }, + "id": "o4qnc8g5ck" + }, + { + "propertyName": "allowCurrencyChange", + "label": "Allow currency change", + "helpText": "Search by currency or country", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "8ka8k3fe0f" + }, + { + "propertyName": "decimalsInCurrency", + "helpText": "No. of decimals in currency input", + "label": "Decimals allowed", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "0", + "value": 0 + }, + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + } + ], + "dependencies": [ + "schema" + ], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "bkfl5tqpt9" + }, + { + "propertyName": "defaultValue", + "label": "Default Selected", + "helpText": "Sets the On/Off default state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "tfd0w3ng3p" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{ \"label\": \"Option1\", \"value\": \"Option2\" }", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "value1 or { \"label\": \"label1\", \"value\": \"value1\" }", + "example": "value1 | { \"label\": \"label1\", \"value\": \"value1\" }", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: 'value should match: string | { \"label\": \"label1\", \"value\": \"value1\" }'\n };\n var value = inputValue;\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n return {\n isValid: true,\n parsed: inputValue,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (typeof inputValue === \"string\") {\n try {\n value = JSON.parse(inputValue);\n } catch (e) {}\n }\n if (_.isString(value) || _.isFinite(value)) {\n // When value is \"\", \"green\", 444\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n if (hasLabelValueProperties(value)) {\n // When value is {label: \"green\", value: \"green\"}\n return {\n isValid: true,\n parsed: value,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n return {\n isValid: false,\n parsed: {},\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "schema" + ], + "id": "7d1t5sb9n6" + }, + { + "propertyName": "options", + "helpText": "Allows users to select from the given option(s). Values must be unique", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": \"string\", \"value\": \"string\" | number}>", + "example": "[{\"label\": \"One\", \"value\": \"one\"}]", + "autocompleteDataType": "STRING" + }, + "fnString": "function optionsCustomValidation(options, props, _) {\n var validationUtil = function validationUtil(options, _) {\n var _isValid = true;\n var message = {\n name: \"\",\n message: \"\"\n };\n var valueType = \"\";\n var uniqueLabels = {};\n for (var i = 0; i < options.length; i++) {\n var _options$i = options[i],\n label = _options$i.label,\n value = _options$i.value;\n if (!valueType) {\n valueType = typeof value;\n }\n //Checks the uniqueness all the values in the options\n if (!uniqueLabels.hasOwnProperty(value)) {\n uniqueLabels[value] = \"\";\n } else {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"path:value must be unique. Duplicate values found\"\n };\n break;\n }\n\n //Check if the required field \"label\" is present:\n if (!label) {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Missing required key: label\"\n };\n break;\n }\n\n //Validation checks for the the label.\n if (_.isNil(label) || label === \"\" || typeof label !== \"string\" && typeof label !== \"number\") {\n _isValid = false;\n message = {\n name: \"ValidationError\",\n message: \"Invalid entry at index: \" + i + \". Value of key: label is invalid: This value does not evaluate to type string\"\n };\n break;\n }\n\n //Check if all the data types for the value prop is the same.\n if (typeof value !== valueType) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: \"All value properties in options must have the same type\"\n };\n break;\n }\n\n //Check if the each object has value property.\n if (_.isNil(value)) {\n _isValid = false;\n message = {\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n };\n break;\n }\n }\n return {\n isValid: _isValid,\n parsed: _isValid ? options : [],\n messages: [message]\n };\n };\n var invalidResponse = {\n isValid: false,\n parsed: [],\n messages: [{\n name: \"TypeError\",\n message: 'This value does not evaluate to type Array<{ \"label\": \"string\", \"value\": \"string\" | number }>'\n }]\n };\n try {\n if (_.isString(options)) {\n options = JSON.parse(options);\n }\n if (Array.isArray(options)) {\n return validationUtil(options, _);\n } else {\n return invalidResponse;\n }\n } catch (e) {\n return invalidResponse;\n }\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "schema" + ], + "id": "9fcmbz6h9w" + }, + { + "propertyName": "defaultValue", + "helpText": "Sets a default selected option", + "label": "Default selected value", + "placeholderText": "Y", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string |\nnumber (only works in mustache syntax)", + "example": "abc | {{1}}", + "autocompleteDataType": "STRING" + }, + "fnString": "function defaultOptionValidation(value, props, _) {\n //Checks if the value is not of object type in {{}}\n if (_.isObject(value)) {\n return {\n isValid: false,\n parsed: JSON.stringify(value, null, 2),\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n\n //Checks if the value is not of boolean type in {{}}\n if (_.isBoolean(value)) {\n return {\n isValid: false,\n parsed: value,\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type: string or number\"\n }]\n };\n }\n return {\n isValid: true,\n parsed: value\n };\n}" + } + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "6991frkbwg" + }, + { + "propertyName": "defaultValue", + "helpText": "Selects the option with value by default", + "label": "Default selected values", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[GREEN]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['option1', 'option2'] | [{ \"label\": \"label1\", \"value\": \"value1\" }]", + "autocompleteDataType": "ARRAY" + }, + "fnString": "function defaultOptionValueValidation(inputValue, props, _) {\n var DEFAULT_ERROR_MESSAGE = {\n name: \"TypeError\",\n message: \"value should match: Array | Array<{label: string, value: string | number}>\"\n };\n var UNIQUE_ERROR_MESSAGE = {\n name: \"ValidationError\",\n message: \"value must be unique. Duplicate values found\"\n };\n var hasUniqueValues = function hasUniqueValues(arr) {\n var uniqueValues = new Set(arr);\n return uniqueValues.size === arr.length;\n };\n var hasLabelValueProperties = function hasLabelValueProperties(obj) {\n return _.isPlainObject(obj) && obj.hasOwnProperty(\"label\") && obj.hasOwnProperty(\"value\") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n };\n\n // When value is \"['green', 'red']\", \"[{label: 'green', value: 'green'}]\" and \"green, red\"\n var convertToArray = function convertToArray(value) {\n if (typeof value === \"string\" && value.trim() !== \"\") {\n try {\n var parsedValue = JSON.parse(value);\n if (Array.isArray(parsedValue)) return parsedValue;\n } catch (e) {\n return value.split(\",\").map(function (s) {\n return s.trim();\n });\n }\n }\n if (Array.isArray(value)) return value;\n return [];\n };\n\n // If input value is empty string then we can fairly assume that the input\n // was cleared out and can be treated as undefined.\n if (inputValue === undefined || inputValue === null || inputValue === \"\") {\n var parsed = inputValue === \"\" ? undefined : inputValue;\n return {\n isValid: true,\n parsed: parsed,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n var values = convertToArray(inputValue);\n\n // If there is inputValue but was not converted to proper array\n // or the input value is not string and not an array then error is returned\n if (typeof inputValue === \"string\" && inputValue.trim() !== \"\" && !values.length || typeof inputValue !== \"string\" && !Array.isArray(inputValue)) {\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n\n // When value is [\"green\", \"red\"]\n if (values.every(function (val) {\n return _.isString(val) || _.isFinite(val);\n })) {\n if (!hasUniqueValues(values)) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n // When value is [{label: \"green\", value: \"red\"}]\n } else if (values.every(hasLabelValueProperties)) {\n if (!hasUniqueValues(values.map(function (val) {\n return val.value;\n }))) {\n return {\n isValid: false,\n parsed: [],\n messages: [UNIQUE_ERROR_MESSAGE]\n };\n }\n } else {\n // When value is [true, false], [undefined, undefined] etc.\n return {\n isValid: false,\n parsed: [],\n messages: [DEFAULT_ERROR_MESSAGE]\n };\n }\n return {\n isValid: true,\n parsed: values,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "schema", + "sourceData" + ], + "id": "yxuk3toabw" + }, + { + "helpText": "Sets the format of the selected date", + "propertyName": "dateFormat", + "label": "Date format", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "optionWidth": "340px", + "options": [ + { + "label": "2023-09-28T17:44:40.4040+05:30", + "subText": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.sssZ" + }, + { + "label": "September 28, 2023 5:44 PM", + "subText": "LLL", + "value": "LLL" + }, + { + "label": "September 28, 2023", + "subText": "LL", + "value": "LL" + }, + { + "label": "2023-09-28 17:44", + "subText": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "2023-09-28T17:44:40", + "subText": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "2023-09-28 05:44:40 PM", + "subText": "YYYY-MM-DD hh:mm:ss A", + "value": "YYYY-MM-DD hh:mm:ss A" + }, + { + "label": "28/09/2023 17:44", + "subText": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "28 September, 2023", + "subText": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "17:44 PM 28 September, 2023", + "subText": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "2023-09-28", + "subText": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "09-28-2023", + "subText": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "28-09-2023", + "subText": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "09/28/2023", + "subText": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "28/09/2023", + "subText": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "28/09/23", + "subText": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "09/28/23", + "subText": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "hideSubText": true, + "dependencies": [ + "schema" + ], + "id": "lse0zoc2va" + }, + { + "propertyName": "defaultValue", + "label": "Default Date", + "helpText": "Sets the default date of the widget. The date is updated if the default date changes", + "controlType": "DATE_PICKER", + "placeholderText": "Enter Default Date", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": [ + "schema" + ], + "id": "ja2ajih4dt" + }, + { + "propertyName": "timePrecision", + "label": "Time precision", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the different time picker or hide.", + "defaultValue": "minute", + "options": [ + { + "label": "None", + "value": "None" + }, + { + "label": "Minute", + "value": "minute" + }, + { + "label": "Second", + "value": "second" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "None", + "minute", + "second" + ], + "default": "minute" + } + }, + "dependencies": [ + "schema" + ], + "id": "shyiw0wg5q" + }, + { + "propertyName": "defaultValue", + "label": "Default state", + "helpText": "Sets the default checked state of the field", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "501hx5c3o5" + }, + { + "helpText": "Sets the default value of the field. The array is updated when the default value changes", + "propertyName": "defaultValue", + "label": "Default value", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "[]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY" + }, + "dependencies": [ + "schema" + ], + "id": "1i1jbad2uv" + }, + { + "propertyName": "children", + "label": "Field configuration", + "helpText": "Field configuration", + "controlType": "FIELD_CONFIGURATION", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": [ + "schema", + "childStylesheet" + ], + "id": "vm8w6cts18" + } + ], + "id": "noksa9g9wo" + }, + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label text of the field", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "kll4kude66" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the Position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": [ + "schema" + ], + "id": "7l9ttzwphf" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "dependencies": [ + "schema" + ], + "id": "g3flp65do8" + } + ], + "id": "0mx8yae1nf" + }, + { + "sectionName": "Search and Filters", + "children": [ + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "59zt1xqjq4" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "4382m6yai4" + }, + { + "propertyName": "onFilterUpdate", + "helpText": "Trigger an action on change of filterText", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "ocie9vv1ho" + }, + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "iwdwdqh0rq" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "8fd8md2y5x" + }, + { + "helpText": "Trigger an action on change of filterText", + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema" + ], + "id": "r5ylicaotz" + } + ], + "id": "93l9sq2zjw" + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "nqm549kufy" + }, + { + "propertyName": "maxChars", + "helpText": "Sets maximum allowed text length", + "label": "Max Chars", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "255", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "dependencies": [ + "schema" + ], + "id": "4wxxko597u" + }, + { + "propertyName": "minNum", + "helpText": "Sets the minimum allowed value", + "label": "Min", + "controlType": "INPUT_TEXT", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function minValueValidation(min, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var max = schemaItem.maxNum;\n var value = min;\n min = Number(min);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(min)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (max !== undefined && min >= max) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be lesser than max value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: min,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n}" + } + }, + "dependencies": [ + "schema" + ], + "id": "ey7yxc78e6" + }, + { + "propertyName": "maxNum", + "helpText": "Sets the maximum allowed value", + "label": "Max", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function maxValueValidation(max, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var min = schemaItem.minNum;\n var value = max;\n max = Number(max);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(max)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (min !== undefined && max <= min) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be greater than min value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: Number(max),\n messages: [\"\"]\n };\n }\n}" + } + }, + "dependencies": [ + "schema" + ], + "id": "f82iarxa1p" + }, + { + "propertyName": "regex", + "helpText": "Adds a validation to the input which displays an error on failure", + "label": "Regex", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + }, + "dependencies": [ + "schema" + ], + "id": "b4leojqihd" + }, + { + "propertyName": "validation", + "helpText": "Sets the input validity based on a JS expression", + "label": "Valid", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{{ Input1.text.length > 0 }}", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + }, + "dependencies": [ + "schema" + ], + "id": "kuezc0b3ur" + }, + { + "propertyName": "errorMessage", + "helpText": "The error message to display if the regex or valid property check fails", + "label": "Error message", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Not a valid email!", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "zfj17xbxwh" + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "freaqocfto" + }, + { + "propertyName": "minDate", + "label": "Min Date", + "helpText": "Defines the min date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": [ + "schema" + ], + "id": "s6l5zqgpqu" + }, + { + "propertyName": "maxDate", + "label": "Max Date", + "helpText": "Defines the max date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": [ + "schema" + ], + "id": "ztyaeqgbc6" + } + ], + "id": "vacvhozslf" + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "tooltip", + "helpText": "Show help text or details about current field", + "label": "Tooltip", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Passwords must be at-least 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "9pk0t1h5mf" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a placeholder text for the input", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "fip3uuzuql" + }, + { + "propertyName": "placeholderText", + "label": "Placeholder", + "helpText": "Sets a placeholder text", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "uxli9qudru" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a Placeholder text", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Search", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "3yoqe23hbg" + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the field", + "label": "Visible", + "controlType": "SWITCH", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "lu5kgkk6mb" + }, + { + "propertyName": "isDisabled", + "helpText": "Disables the field", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "kwz1bo571r" + }, + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "g9qn64gkwx" + }, + { + "propertyName": "allowSelectAll", + "helpText": "Controls the visibility of select all option in dropdown.", + "label": "Allow select all", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "eg3kzhd42r" + }, + { + "propertyName": "convertToISO", + "label": "Convert to ISO format", + "helpText": "Enabling this always converts the value in ISO form in the formData irrespective of the 'Date format' selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "a06t89j4pu" + }, + { + "propertyName": "shortcuts", + "label": "Show Shortcuts", + "helpText": "Choose to show shortcut menu", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "caywz57f95" + }, + { + "propertyName": "closeOnSelection", + "label": "Close On Selection", + "helpText": "Calender should close when a date is selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "0lvtrqbsdq" + }, + { + "propertyName": "isCollapsible", + "label": "Collapsible", + "helpText": "Makes the array items collapsible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema" + ], + "id": "itn3wl2vq7" + } + ], + "id": "mmkutpk8td" + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the check state is changed", + "propertyName": "onCheckChange", + "label": "onCheckChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema" + ], + "id": "6io2xpct9k" + }, + { + "propertyName": "onDateSelected", + "label": "onDateSelected", + "helpText": "when a date is selected in the calendar", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema" + ], + "id": "8f8wb7jchb" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema" + ], + "id": "xnr1cdzhmg" + }, + { + "propertyName": "onTextChanged", + "helpText": "when the text is changed", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema" + ], + "id": "so7d8nor8o" + }, + { + "propertyName": "onEnterKeyPress", + "helpText": "on submit (when the enter key is pressed)", + "label": "onEnterKeyPress", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema" + ], + "id": "zdd94b7kp6" + }, + { + "helpText": "when the switch state is changed", + "propertyName": "onChange", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "ny8uaf6ef7" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "v5s9c92ocx" + }, + { + "propertyName": "onFocus", + "helpText": "when focused.", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "abxitdwslg" + }, + { + "propertyName": "onBlur", + "helpText": "when the field loses focus.", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "nccu86i3wb" + }, + { + "propertyName": "onSelectionChange", + "helpText": "when a user changes the selected option", + "label": "onSelectionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "0n7jjujv3l" + } + ], + "id": "3fhqjdezs8" + } + ], + "styleChildren": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "pjcui56ptf" + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "defaultValue": "0.875rem", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "out2n1s112" + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "m2dqiognyp" + } + ], + "id": "b3hv18o3h7" + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used in input field", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + }, + "dependencies": [ + "schema" + ], + "id": "4lyzinndd7" + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon position of input field", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "ccrdobz7ay" + } + ], + "id": "vnak6x9d30" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the accent color", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "3ak38anbdw" + } + ], + "id": "76xno36ktr" + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "9pdmfzbvyw" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "jolm7nzzr3" + } + ], + "id": "e81g5uutg3" + }, + { + "sectionName": "Object Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "nggstuo5o0" + } + ], + "id": "ka25437rqc" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "wxx1m2d4es" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "x5e2skt8zy" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "j9noghkhct" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "8k57ofy7ls" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "6xsgkxuo35" + } + ], + "id": "qxfb8b9g6o" + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "nggstuo5o0" + } + ], + "id": "1r581y96cd" + }, + { + "sectionName": "Array Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "hxbk1ra2ye" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "atf6lypp7p" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "fjm416x9qw" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "laxukxqfyf" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "r60he4tnf9" + } + ], + "id": "1x86ntp5a9" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "0z5p423lic" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "vkr0rsf3hj" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema" + ], + "id": "2dawz7bx46" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "4x03eyupsr" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema" + ], + "id": "8jqqm9ezim" + } + ], + "id": "ddu4ev6eiq" + } + ] + }, + "dependencies": [ + "schema", + "childStylesheet" + ], + "id": "66b496uw2u" + } + ], + "id": "1z98l0v885" + }, + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label text of the field", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "kll4kude66" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the Position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["schema"], + "id": "7l9ttzwphf" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "dependencies": ["schema"], + "id": "g3flp65do8" + } + ], + "id": "khu6qoy7r3" + }, + { + "sectionName": "Search and Filters", + "children": [ + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "59zt1xqjq4" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "4382m6yai4" + }, + { + "propertyName": "onFilterUpdate", + "helpText": "Trigger an action on change of filterText", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "ocie9vv1ho" + }, + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "iwdwdqh0rq" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "8fd8md2y5x" + }, + { + "helpText": "Trigger an action on change of filterText", + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "r5ylicaotz" + } + ], + "id": "eb7b39wrc9" + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "nqm549kufy" + }, + { + "propertyName": "maxChars", + "helpText": "Sets maximum allowed text length", + "label": "Max Chars", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "255", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "dependencies": ["schema"], + "id": "4wxxko597u" + }, + { + "propertyName": "minNum", + "helpText": "Sets the minimum allowed value", + "label": "Min", + "controlType": "INPUT_TEXT", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function minValueValidation(min, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var max = schemaItem.maxNum;\n var value = min;\n min = Number(min);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(min)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (max !== undefined && min >= max) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be lesser than max value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: min,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n}" + } + }, + "dependencies": ["schema"], + "id": "ey7yxc78e6" + }, + { + "propertyName": "maxNum", + "helpText": "Sets the maximum allowed value", + "label": "Max", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function maxValueValidation(max, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var min = schemaItem.minNum;\n var value = max;\n max = Number(max);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(max)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (min !== undefined && max <= min) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be greater than min value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: Number(max),\n messages: [\"\"]\n };\n }\n}" + } + }, + "dependencies": ["schema"], + "id": "f82iarxa1p" + }, + { + "propertyName": "regex", + "helpText": "Adds a validation to the input which displays an error on failure", + "label": "Regex", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + }, + "dependencies": ["schema"], + "id": "b4leojqihd" + }, + { + "propertyName": "validation", + "helpText": "Sets the input validity based on a JS expression", + "label": "Valid", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{{ Input1.text.length > 0 }}", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + }, + "dependencies": ["schema"], + "id": "kuezc0b3ur" + }, + { + "propertyName": "errorMessage", + "helpText": "The error message to display if the regex or valid property check fails", + "label": "Error message", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Not a valid email!", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "zfj17xbxwh" + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "freaqocfto" + }, + { + "propertyName": "minDate", + "label": "Min Date", + "helpText": "Defines the min date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "s6l5zqgpqu" + }, + { + "propertyName": "maxDate", + "label": "Max Date", + "helpText": "Defines the max date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "ztyaeqgbc6" + } + ], + "id": "9rmqm9ptie" + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "tooltip", + "helpText": "Show help text or details about current field", + "label": "Tooltip", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Passwords must be at-least 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "9pk0t1h5mf" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a placeholder text for the input", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "fip3uuzuql" + }, + { + "propertyName": "placeholderText", + "label": "Placeholder", + "helpText": "Sets a placeholder text", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "uxli9qudru" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a Placeholder text", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Search", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "3yoqe23hbg" + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the field", + "label": "Visible", + "controlType": "SWITCH", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "lu5kgkk6mb" + }, + { + "propertyName": "isDisabled", + "helpText": "Disables the field", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "kwz1bo571r" + }, + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "g9qn64gkwx" + }, + { + "propertyName": "allowSelectAll", + "helpText": "Controls the visibility of select all option in dropdown.", + "label": "Allow select all", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "eg3kzhd42r" + }, + { + "propertyName": "convertToISO", + "label": "Convert to ISO format", + "helpText": "Enabling this always converts the value in ISO form in the formData irrespective of the 'Date format' selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "a06t89j4pu" + }, + { + "propertyName": "shortcuts", + "label": "Show Shortcuts", + "helpText": "Choose to show shortcut menu", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "caywz57f95" + }, + { + "propertyName": "closeOnSelection", + "label": "Close On Selection", + "helpText": "Calender should close when a date is selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "0lvtrqbsdq" + }, + { + "propertyName": "isCollapsible", + "label": "Collapsible", + "helpText": "Makes the array items collapsible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "itn3wl2vq7" + } + ], + "id": "5l1ymvdeqi" + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the check state is changed", + "propertyName": "onCheckChange", + "label": "onCheckChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "6io2xpct9k" + }, + { + "propertyName": "onDateSelected", + "label": "onDateSelected", + "helpText": "when a date is selected in the calendar", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "8f8wb7jchb" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "xnr1cdzhmg" + }, + { + "propertyName": "onTextChanged", + "helpText": "when the text is changed", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "so7d8nor8o" + }, + { + "propertyName": "onEnterKeyPress", + "helpText": "on submit (when the enter key is pressed)", + "label": "onEnterKeyPress", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "zdd94b7kp6" + }, + { + "helpText": "when the switch state is changed", + "propertyName": "onChange", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "ny8uaf6ef7" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "v5s9c92ocx" + }, + { + "propertyName": "onFocus", + "helpText": "when focused.", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "abxitdwslg" + }, + { + "propertyName": "onBlur", + "helpText": "when the field loses focus.", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "nccu86i3wb" + }, + { + "propertyName": "onSelectionChange", + "helpText": "when a user changes the selected option", + "label": "onSelectionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "0n7jjujv3l" + } + ], + "id": "w24zws8y6z" + } + ], + "styleChildren": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "pjcui56ptf" + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "defaultValue": "0.875rem", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "out2n1s112" + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "m2dqiognyp" + } + ], + "id": "z8fb95o90a" + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used in input field", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + }, + "dependencies": ["schema"], + "id": "4lyzinndd7" + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon position of input field", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "ccrdobz7ay" + } + ], + "id": "gmddpsefcv" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the accent color", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "3ak38anbdw" + } + ], + "id": "uofoum4ag7" + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "9pdmfzbvyw" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "jolm7nzzr3" + } + ], + "id": "d3urdku3d3" + }, + { + "sectionName": "Object Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "nggstuo5o0" + } + ], + "id": "ka25437rqc" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "wxx1m2d4es" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "x5e2skt8zy" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "j9noghkhct" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "8k57ofy7ls" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "6xsgkxuo35" + } + ], + "id": "qxfb8b9g6o" + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "nggstuo5o0" + } + ], + "id": "1r581y96cd" + }, + { + "sectionName": "Array Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "hxbk1ra2ye" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "atf6lypp7p" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "fjm416x9qw" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "laxukxqfyf" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "r60he4tnf9" + } + ], + "id": "1x86ntp5a9" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "0z5p423lic" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "vkr0rsf3hj" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "2dawz7bx46" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4x03eyupsr" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "8jqqm9ezim" + } + ], + "id": "ddu4ev6eiq" + } + ] + }, + "dependencies": [ + "schema", + "childStylesheet" + ], + "id": "w5swej39m8" + } + ], + "id": "2t9qq8g0rd" + }, + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label text of the field", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "kll4kude66" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the Position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["schema"], + "id": "7l9ttzwphf" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "dependencies": ["schema"], + "id": "g3flp65do8" + } + ], + "id": "ll84epl3zf" + }, + { + "sectionName": "Search and Filters", + "children": [ + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "59zt1xqjq4" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "4382m6yai4" + }, + { + "propertyName": "onFilterUpdate", + "helpText": "Trigger an action on change of filterText", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "ocie9vv1ho" + }, + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "iwdwdqh0rq" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "8fd8md2y5x" + }, + { + "helpText": "Trigger an action on change of filterText", + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "r5ylicaotz" + } + ], + "id": "qj0ubz2v03" + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "nqm549kufy" + }, + { + "propertyName": "maxChars", + "helpText": "Sets maximum allowed text length", + "label": "Max Chars", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "255", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "dependencies": ["schema"], + "id": "4wxxko597u" + }, + { + "propertyName": "minNum", + "helpText": "Sets the minimum allowed value", + "label": "Min", + "controlType": "INPUT_TEXT", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function minValueValidation(min, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var max = schemaItem.maxNum;\n var value = min;\n min = Number(min);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(min)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (max !== undefined && min >= max) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be lesser than max value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: min,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n}" + } + }, + "dependencies": ["schema"], + "id": "ey7yxc78e6" + }, + { + "propertyName": "maxNum", + "helpText": "Sets the maximum allowed value", + "label": "Max", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function maxValueValidation(max, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var min = schemaItem.minNum;\n var value = max;\n max = Number(max);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(max)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (min !== undefined && max <= min) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be greater than min value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: Number(max),\n messages: [\"\"]\n };\n }\n}" + } + }, + "dependencies": ["schema"], + "id": "f82iarxa1p" + }, + { + "propertyName": "regex", + "helpText": "Adds a validation to the input which displays an error on failure", + "label": "Regex", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + }, + "dependencies": ["schema"], + "id": "b4leojqihd" + }, + { + "propertyName": "validation", + "helpText": "Sets the input validity based on a JS expression", + "label": "Valid", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{{ Input1.text.length > 0 }}", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + }, + "dependencies": ["schema"], + "id": "kuezc0b3ur" + }, + { + "propertyName": "errorMessage", + "helpText": "The error message to display if the regex or valid property check fails", + "label": "Error message", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Not a valid email!", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "zfj17xbxwh" + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "freaqocfto" + }, + { + "propertyName": "minDate", + "label": "Min Date", + "helpText": "Defines the min date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "s6l5zqgpqu" + }, + { + "propertyName": "maxDate", + "label": "Max Date", + "helpText": "Defines the max date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "ztyaeqgbc6" + } + ], + "id": "lxzurwziei" + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "tooltip", + "helpText": "Show help text or details about current field", + "label": "Tooltip", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Passwords must be at-least 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "9pk0t1h5mf" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a placeholder text for the input", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "fip3uuzuql" + }, + { + "propertyName": "placeholderText", + "label": "Placeholder", + "helpText": "Sets a placeholder text", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "uxli9qudru" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a Placeholder text", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Search", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "3yoqe23hbg" + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the field", + "label": "Visible", + "controlType": "SWITCH", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "lu5kgkk6mb" + }, + { + "propertyName": "isDisabled", + "helpText": "Disables the field", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "kwz1bo571r" + }, + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "g9qn64gkwx" + }, + { + "propertyName": "allowSelectAll", + "helpText": "Controls the visibility of select all option in dropdown.", + "label": "Allow select all", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "eg3kzhd42r" + }, + { + "propertyName": "convertToISO", + "label": "Convert to ISO format", + "helpText": "Enabling this always converts the value in ISO form in the formData irrespective of the 'Date format' selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "a06t89j4pu" + }, + { + "propertyName": "shortcuts", + "label": "Show Shortcuts", + "helpText": "Choose to show shortcut menu", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "caywz57f95" + }, + { + "propertyName": "closeOnSelection", + "label": "Close On Selection", + "helpText": "Calender should close when a date is selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "0lvtrqbsdq" + }, + { + "propertyName": "isCollapsible", + "label": "Collapsible", + "helpText": "Makes the array items collapsible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "itn3wl2vq7" + } + ], + "id": "mcpkrxaryk" + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the check state is changed", + "propertyName": "onCheckChange", + "label": "onCheckChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "6io2xpct9k" + }, + { + "propertyName": "onDateSelected", + "label": "onDateSelected", + "helpText": "when a date is selected in the calendar", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "8f8wb7jchb" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "xnr1cdzhmg" + }, + { + "propertyName": "onTextChanged", + "helpText": "when the text is changed", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "so7d8nor8o" + }, + { + "propertyName": "onEnterKeyPress", + "helpText": "on submit (when the enter key is pressed)", + "label": "onEnterKeyPress", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "zdd94b7kp6" + }, + { + "helpText": "when the switch state is changed", + "propertyName": "onChange", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "ny8uaf6ef7" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "v5s9c92ocx" + }, + { + "propertyName": "onFocus", + "helpText": "when focused.", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "abxitdwslg" + }, + { + "propertyName": "onBlur", + "helpText": "when the field loses focus.", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "nccu86i3wb" + }, + { + "propertyName": "onSelectionChange", + "helpText": "when a user changes the selected option", + "label": "onSelectionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "0n7jjujv3l" + } + ], + "id": "xkqiw7mxfd" + } + ], + "styleChildren": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "pjcui56ptf" + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "defaultValue": "0.875rem", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "out2n1s112" + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "schema", + "sourceData" + ], + "id": "m2dqiognyp" + } + ], + "id": "y7qy78259j" + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used in input field", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + }, + "dependencies": ["schema"], + "id": "4lyzinndd7" + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon position of input field", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "ccrdobz7ay" + } + ], + "id": "9q3cjafmgh" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the accent color", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "3ak38anbdw" + } + ], + "id": "h7yd2w0hfd" + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "9pdmfzbvyw" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "jolm7nzzr3" + } + ], + "id": "f622lir0gg" + }, + { + "sectionName": "Object Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "nggstuo5o0" + } + ], + "id": "ka25437rqc" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "wxx1m2d4es" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "x5e2skt8zy" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "j9noghkhct" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "8k57ofy7ls" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "6xsgkxuo35" + } + ], + "id": "qxfb8b9g6o" + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "nggstuo5o0" + } + ], + "id": "1r581y96cd" + }, + { + "sectionName": "Array Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "hxbk1ra2ye" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "atf6lypp7p" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "fjm416x9qw" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "laxukxqfyf" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "r60he4tnf9" + } + ], + "id": "1x86ntp5a9" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "0z5p423lic" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "vkr0rsf3hj" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "2dawz7bx46" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4x03eyupsr" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "8jqqm9ezim" + } + ], + "id": "ddu4ev6eiq" + } + ] + }, + "dependencies": ["schema", "childStylesheet"], + "id": "fryld7ux9f" + } + ], + "id": "3fgxv0av9b" + }, + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label text of the field", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema", "sourceData"], + "id": "kll4kude66" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the Position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["schema"], + "id": "7l9ttzwphf" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "dependencies": ["schema"], + "id": "g3flp65do8" + } + ], + "id": "5v6g02p3cb" + }, + { + "sectionName": "Search and Filters", + "children": [ + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "59zt1xqjq4" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "4382m6yai4" + }, + { + "propertyName": "onFilterUpdate", + "helpText": "Trigger an action on change of filterText", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "ocie9vv1ho" + }, + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "iwdwdqh0rq" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "8fd8md2y5x" + }, + { + "helpText": "Trigger an action on change of filterText", + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "r5ylicaotz" + } + ], + "id": "2am86neu2v" + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "nqm549kufy" + }, + { + "propertyName": "maxChars", + "helpText": "Sets maximum allowed text length", + "label": "Max Chars", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "255", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "dependencies": ["schema"], + "id": "4wxxko597u" + }, + { + "propertyName": "minNum", + "helpText": "Sets the minimum allowed value", + "label": "Min", + "controlType": "INPUT_TEXT", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function minValueValidation(min, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var max = schemaItem.maxNum;\n var value = min;\n min = Number(min);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(min)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (max !== undefined && min >= max) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be lesser than max value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: min,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n}" + } + }, + "dependencies": ["schema"], + "id": "ey7yxc78e6" + }, + { + "propertyName": "maxNum", + "helpText": "Sets the maximum allowed value", + "label": "Max", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function maxValueValidation(max, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var min = schemaItem.minNum;\n var value = max;\n max = Number(max);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(max)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (min !== undefined && max <= min) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be greater than min value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: Number(max),\n messages: [\"\"]\n };\n }\n}" + } + }, + "dependencies": ["schema"], + "id": "f82iarxa1p" + }, + { + "propertyName": "regex", + "helpText": "Adds a validation to the input which displays an error on failure", + "label": "Regex", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + }, + "dependencies": ["schema"], + "id": "b4leojqihd" + }, + { + "propertyName": "validation", + "helpText": "Sets the input validity based on a JS expression", + "label": "Valid", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{{ Input1.text.length > 0 }}", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + }, + "dependencies": ["schema"], + "id": "kuezc0b3ur" + }, + { + "propertyName": "errorMessage", + "helpText": "The error message to display if the regex or valid property check fails", + "label": "Error message", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Not a valid email!", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "zfj17xbxwh" + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "freaqocfto" + }, + { + "propertyName": "minDate", + "label": "Min Date", + "helpText": "Defines the min date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "s6l5zqgpqu" + }, + { + "propertyName": "maxDate", + "label": "Max Date", + "helpText": "Defines the max date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "ztyaeqgbc6" + } + ], + "id": "y4j5kkmhd6" + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "tooltip", + "helpText": "Show help text or details about current field", + "label": "Tooltip", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Passwords must be at-least 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema", "sourceData"], + "id": "9pk0t1h5mf" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a placeholder text for the input", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "fip3uuzuql" + }, + { + "propertyName": "placeholderText", + "label": "Placeholder", + "helpText": "Sets a placeholder text", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "uxli9qudru" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a Placeholder text", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Search", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "3yoqe23hbg" + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the field", + "label": "Visible", + "controlType": "SWITCH", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "lu5kgkk6mb" + }, + { + "propertyName": "isDisabled", + "helpText": "Disables the field", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "kwz1bo571r" + }, + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "g9qn64gkwx" + }, + { + "propertyName": "allowSelectAll", + "helpText": "Controls the visibility of select all option in dropdown.", + "label": "Allow select all", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "eg3kzhd42r" + }, + { + "propertyName": "convertToISO", + "label": "Convert to ISO format", + "helpText": "Enabling this always converts the value in ISO form in the formData irrespective of the 'Date format' selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "a06t89j4pu" + }, + { + "propertyName": "shortcuts", + "label": "Show Shortcuts", + "helpText": "Choose to show shortcut menu", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "caywz57f95" + }, + { + "propertyName": "closeOnSelection", + "label": "Close On Selection", + "helpText": "Calender should close when a date is selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "0lvtrqbsdq" + }, + { + "propertyName": "isCollapsible", + "label": "Collapsible", + "helpText": "Makes the array items collapsible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "itn3wl2vq7" + } + ], + "id": "9kewv20y6s" + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the check state is changed", + "propertyName": "onCheckChange", + "label": "onCheckChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "6io2xpct9k" + }, + { + "propertyName": "onDateSelected", + "label": "onDateSelected", + "helpText": "when a date is selected in the calendar", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "8f8wb7jchb" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "xnr1cdzhmg" + }, + { + "propertyName": "onTextChanged", + "helpText": "when the text is changed", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "so7d8nor8o" + }, + { + "propertyName": "onEnterKeyPress", + "helpText": "on submit (when the enter key is pressed)", + "label": "onEnterKeyPress", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "zdd94b7kp6" + }, + { + "helpText": "when the switch state is changed", + "propertyName": "onChange", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "ny8uaf6ef7" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "v5s9c92ocx" + }, + { + "propertyName": "onFocus", + "helpText": "when focused.", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "abxitdwslg" + }, + { + "propertyName": "onBlur", + "helpText": "when the field loses focus.", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "nccu86i3wb" + }, + { + "propertyName": "onSelectionChange", + "helpText": "when a user changes the selected option", + "label": "onSelectionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "0n7jjujv3l" + } + ], + "id": "v1cb4p0gks" + } + ], + "styleChildren": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema", "sourceData"], + "id": "pjcui56ptf" + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "defaultValue": "0.875rem", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "out2n1s112" + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema", "sourceData"], + "id": "m2dqiognyp" + } + ], + "id": "ga4ppe8axm" + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used in input field", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + }, + "dependencies": ["schema"], + "id": "4lyzinndd7" + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon position of input field", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "ccrdobz7ay" + } + ], + "id": "h834nqun1m" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the accent color", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "3ak38anbdw" + } + ], + "id": "kdyke5t0kz" + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "9pdmfzbvyw" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "jolm7nzzr3" + } + ], + "id": "w355es4ri1" + }, + { + "sectionName": "Object Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "nggstuo5o0" + } + ], + "id": "ka25437rqc" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "wxx1m2d4es" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "x5e2skt8zy" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "j9noghkhct" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "8k57ofy7ls" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "6xsgkxuo35" + } + ], + "id": "qxfb8b9g6o" + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "nggstuo5o0" + } + ], + "id": "1r581y96cd" + }, + { + "sectionName": "Array Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "hxbk1ra2ye" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "atf6lypp7p" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "fjm416x9qw" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "laxukxqfyf" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "r60he4tnf9" + } + ], + "id": "1x86ntp5a9" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "0z5p423lic" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "vkr0rsf3hj" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "2dawz7bx46" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4x03eyupsr" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "8jqqm9ezim" + } + ], + "id": "ddu4ev6eiq" + } + ] + }, + "dependencies": ["schema", "childStylesheet"], + "id": "4wsw90nwes" + } + ], + "id": "ryx46549ej" + }, + { + "sectionName": "Label", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label text of the field", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema", "sourceData"], + "id": "kll4kude66" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the Position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["schema"], + "id": "7l9ttzwphf" + }, + { + "propertyName": "alignWidget", + "helpText": "Sets the position of the field", + "label": "Position", + "controlType": "ICON_TABS", + "defaultValue": "LEFT", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "label": "Left", + "value": "LEFT" + }, + { + "label": "Right", + "value": "RIGHT" + } + ], + "dependencies": ["schema"], + "id": "g3flp65do8" + } + ], + "id": "u0nsety0v6" + }, + { + "sectionName": "Search and Filters", + "children": [ + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "59zt1xqjq4" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "4382m6yai4" + }, + { + "propertyName": "onFilterUpdate", + "helpText": "Trigger an action on change of filterText", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "ocie9vv1ho" + }, + { + "propertyName": "isFilterable", + "label": "Allow searching", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "iwdwdqh0rq" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "8fd8md2y5x" + }, + { + "helpText": "Trigger an action on change of filterText", + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "r5ylicaotz" + } + ], + "id": "n0v2f6tyaf" + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "nqm549kufy" + }, + { + "propertyName": "maxChars", + "helpText": "Sets maximum allowed text length", + "label": "Max Chars", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "255", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "dependencies": ["schema"], + "id": "4wxxko597u" + }, + { + "propertyName": "minNum", + "helpText": "Sets the minimum allowed value", + "label": "Min", + "controlType": "INPUT_TEXT", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function minValueValidation(min, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var max = schemaItem.maxNum;\n var value = min;\n min = Number(min);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(min)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (max !== undefined && min >= max) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be lesser than max value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: min,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n }\n}" + } + }, + "dependencies": ["schema"], + "id": "ey7yxc78e6" + }, + { + "propertyName": "maxNum", + "helpText": "Sets the maximum allowed value", + "label": "Max", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + }, + "fnString": "function maxValueValidation(max, props, lodash, _, propertyPath) {\n var propertyPathChunks = propertyPath.split(\".\");\n var parentPath = propertyPathChunks.slice(0, -1).join(\".\");\n var schemaItem = lodash.get(props, parentPath);\n var min = schemaItem.minNum;\n var value = max;\n max = Number(max);\n if (lodash !== null && lodash !== void 0 && lodash.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: undefined,\n messages: [{\n name: \"\",\n message: \"\"\n }]\n };\n } else if (!Number.isFinite(max)) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"TypeError\",\n message: \"This value must be number\"\n }]\n };\n } else if (min !== undefined && max <= min) {\n return {\n isValid: false,\n parsed: undefined,\n messages: [{\n name: \"RangeError\",\n message: \"This value must be greater than min value\"\n }]\n };\n } else {\n return {\n isValid: true,\n parsed: Number(max),\n messages: [\"\"]\n };\n }\n}" + } + }, + "dependencies": ["schema"], + "id": "f82iarxa1p" + }, + { + "propertyName": "regex", + "helpText": "Adds a validation to the input which displays an error on failure", + "label": "Regex", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + }, + "dependencies": ["schema"], + "id": "b4leojqihd" + }, + { + "propertyName": "validation", + "helpText": "Sets the input validity based on a JS expression", + "label": "Valid", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "{{ Input1.text.length > 0 }}", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + }, + "dependencies": ["schema"], + "id": "kuezc0b3ur" + }, + { + "propertyName": "errorMessage", + "helpText": "The error message to display if the regex or valid property check fails", + "label": "Error message", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Not a valid email!", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "zfj17xbxwh" + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "freaqocfto" + }, + { + "propertyName": "minDate", + "label": "Min Date", + "helpText": "Defines the min date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "s6l5zqgpqu" + }, + { + "propertyName": "maxDate", + "label": "Max Date", + "helpText": "Defines the max date for the field", + "controlType": "DATE_PICKER", + "useValidationMessage": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "DATE_ISO_STRING" + }, + "dependencies": ["schema"], + "id": "ztyaeqgbc6" + } + ], + "id": "tah7kwvh04" + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "tooltip", + "helpText": "Show help text or details about current field", + "label": "Tooltip", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Passwords must be at-least 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema", "sourceData"], + "id": "9pk0t1h5mf" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a placeholder text for the input", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "fip3uuzuql" + }, + { + "propertyName": "placeholderText", + "label": "Placeholder", + "helpText": "Sets a placeholder text", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "uxli9qudru" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a Placeholder text", + "label": "Placeholder", + "controlType": "JSON_FORM_COMPUTE_VALUE", + "placeholderText": "Search", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "3yoqe23hbg" + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the field", + "label": "Visible", + "controlType": "SWITCH", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "lu5kgkk6mb" + }, + { + "propertyName": "isDisabled", + "helpText": "Disables the field", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "kwz1bo571r" + }, + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema", "sourceData"], + "id": "g9qn64gkwx" + }, + { + "propertyName": "allowSelectAll", + "helpText": "Controls the visibility of select all option in dropdown.", + "label": "Allow select all", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "eg3kzhd42r" + }, + { + "propertyName": "convertToISO", + "label": "Convert to ISO format", + "helpText": "Enabling this always converts the value in ISO form in the formData irrespective of the 'Date format' selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "a06t89j4pu" + }, + { + "propertyName": "shortcuts", + "label": "Show Shortcuts", + "helpText": "Choose to show shortcut menu", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "caywz57f95" + }, + { + "propertyName": "closeOnSelection", + "label": "Close On Selection", + "helpText": "Calender should close when a date is selected", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "0lvtrqbsdq" + }, + { + "propertyName": "isCollapsible", + "label": "Collapsible", + "helpText": "Makes the array items collapsible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["schema"], + "id": "itn3wl2vq7" + } + ], + "id": "ku4iebdf4a" + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the check state is changed", + "propertyName": "onCheckChange", + "label": "onCheckChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "6io2xpct9k" + }, + { + "propertyName": "onDateSelected", + "label": "onDateSelected", + "helpText": "when a date is selected in the calendar", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "8f8wb7jchb" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "xnr1cdzhmg" + }, + { + "propertyName": "onTextChanged", + "helpText": "when the text is changed", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "so7d8nor8o" + }, + { + "propertyName": "onEnterKeyPress", + "helpText": "on submit (when the enter key is pressed)", + "label": "onEnterKeyPress", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema"], + "id": "zdd94b7kp6" + }, + { + "helpText": "when the switch state is changed", + "propertyName": "onChange", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "ny8uaf6ef7" + }, + { + "propertyName": "onOptionChange", + "helpText": "when a user selects an option", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "v5s9c92ocx" + }, + { + "propertyName": "onFocus", + "helpText": "when focused.", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "abxitdwslg" + }, + { + "propertyName": "onBlur", + "helpText": "when the field loses focus.", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "nccu86i3wb" + }, + { + "propertyName": "onSelectionChange", + "helpText": "when a user changes the selected option", + "label": "onSelectionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["schema", "sourceData"], + "id": "0n7jjujv3l" + } + ], + "id": "fsugz00g5u" + } + ], + "styleChildren": [ + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema", "sourceData"], + "id": "pjcui56ptf" + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "defaultValue": "0.875rem", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "out2n1s112" + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema", "sourceData"], + "id": "m2dqiognyp" + } + ], + "id": "6al02r451l" + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used in input field", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + }, + "dependencies": ["schema"], + "id": "4lyzinndd7" + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon position of input field", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "ccrdobz7ay" + } + ], + "id": "gi2ezhli3w" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "accentColor", + "helpText": "Sets the accent color", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "3ak38anbdw" + } + ], + "id": "en45nuydep" + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "9pdmfzbvyw" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "jolm7nzzr3" + } + ], + "id": "q9v8xk1xcz" + }, + { + "sectionName": "Object Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "nggstuo5o0" + } + ], + "id": "ka25437rqc" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "wxx1m2d4es" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "x5e2skt8zy" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "j9noghkhct" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "8k57ofy7ls" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "6xsgkxuo35" + } + ], + "id": "qxfb8b9g6o" + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "pfjlr36mo6" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "nmznzc4qgh" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "l5psa78r57" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4aayq4kj9g" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "nggstuo5o0" + } + ], + "id": "1r581y96cd" + }, + { + "sectionName": "Array Styles", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "hxbk1ra2ye" + }, + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "atf6lypp7p" + }, + { + "propertyName": "borderColor", + "label": "Border color", + "helpText": "Changes the border color of Object", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "fjm416x9qw" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "laxukxqfyf" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "r60he4tnf9" + } + ], + "id": "1x86ntp5a9" + }, + { + "sectionName": "Item Styles", + "children": [ + { + "propertyName": "cellBackgroundColor", + "label": "Background color", + "controlType": "COLOR_PICKER", + "helpText": "Changes the background color of the item", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "0z5p423lic" + }, + { + "propertyName": "cellBorderWidth", + "helpText": "Enter value for border width of the item", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "vkr0rsf3hj" + }, + { + "propertyName": "cellBorderColor", + "label": "Border color", + "helpText": "Changes the border color of the item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["schema"], + "id": "2dawz7bx46" + }, + { + "propertyName": "cellBorderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "4x03eyupsr" + }, + { + "propertyName": "cellBoxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "JSON_FORM_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["schema"], + "id": "8jqqm9ezim" + } + ], + "id": "ddu4ev6eiq" + } + ] + }, + "dependencies": ["schema", "childStylesheet"], + "id": "5di81l2g58" + } + ], + "id": "6xam0mzacb" + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "title", + "label": "Title", + "helpText": "Sets the title of the form", + "controlType": "INPUT_TEXT", + "placeholderText": "Update Order", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "0atouhg4pm" + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "63dvxgxf9k" + }, + { + "propertyName": "useSourceData", + "helpText": "Use source data for hidden fields to show them in form data", + "label": "Hidden fields in data", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "2fbmv5qvj8" + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "7t1ayfvn4l" + }, + { + "propertyName": "disabledWhenInvalid", + "helpText": "Disables the submit button when the parent form has a required widget that is not filled", + "label": "Disabled invalid forms", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "gr027gd6yh" + }, + { + "propertyName": "fixedFooter", + "helpText": "Makes the footer always stick to the bottom of the form", + "label": "Fixed Footer", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["dynamicHeight"], + "id": "niwem7o8wl" + }, + { + "propertyName": "scrollContents", + "helpText": "Allows scrolling of the form", + "label": "Scroll contents", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["dynamicHeight"], + "id": "u7xwwkybcf" + }, + { + "propertyName": "showReset", + "helpText": "Show/hide reset form button", + "label": "Show reset", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "ap9rzgr2d0" + }, + { + "propertyName": "submitButtonLabel", + "helpText": "Changes the label of the submit button", + "label": "Submit button label", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "6n0wtwpbrz" + }, + { + "propertyName": "resetButtonLabel", + "helpText": "Changes the label of the reset button", + "label": "Reset button label", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "wiuuzpoef0" + }, + { + "helpText": "Auto Height: Configure the way the widget height reacts to content changes.", + "propertyName": "dynamicHeight", + "label": "Height", + "controlType": "DROP_DOWN", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": [ + "shouldScrollContents", + "maxDynamicHeight", + "minDynamicHeight", + "bottomRow", + "topRow", + "overflow", + "dynamicHeight", + "isCanvas" + ], + "options": [ + { + "label": "Auto Height", + "value": "AUTO_HEIGHT" + }, + { + "label": "Auto Height with limits", + "value": "AUTO_HEIGHT_WITH_LIMITS" + }, + { + "label": "Fixed", + "value": "FIXED" + } + ], + "postUpdateAction": "CHECK_CONTAINERS_FOR_AUTO_HEIGHT", + "id": "uhi6utkhbo" + } + ], + "id": "cj2763s5bg" + }, + { + "sectionName": "Events", + "children": [ + { + "propertyName": "onSubmit", + "helpText": "when the submit button is clicked", + "label": "onSubmit", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "oiq390aoq2" + } + ], + "id": "w5wu0jk2tz" + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "propertyName": "backgroundColor", + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "07bexe17a1" + }, + { + "propertyName": "borderColor", + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "label": "Border color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "a5membssi4" + } + ], + "id": "o9a1mvkkeo" + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderWidth", + "helpText": "Enter value for border width", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "akyw553uq9" + }, + { + "propertyName": "borderRadius", + "helpText": "Enter value for border radius", + "label": "Border radius", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "eo07vd56gw" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "b72gr6ue2j" + } + ], + "id": "s248hbxo1k" + }, + { + "sectionName": "Submit button styles", + "children": [ + { + "sectionName": "General", + "collapsible": false, + "children": [ + { + "propertyName": "submitButtonStyles.buttonColor", + "helpText": "Changes the color of the button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "1j83zt87b2" + }, + { + "propertyName": "submitButtonStyles.buttonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "defaultValue": "PRIMARY", + "fullWidth": true, + "helpText": "Sets the variant of the icon button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"], + "default": "PRIMARY" + } + }, + "id": "krmiq32fu1" + }, + { + "propertyName": "submitButtonStyles.borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "fcv8hbudmd" + }, + { + "propertyName": "submitButtonStyles.boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "u0tn4dgdaq" + } + ], + "id": "q5eksouidr" + }, + { + "sectionName": "Icon", + "collapsible": false, + "children": [ + { + "propertyName": "submitButtonStyles.iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the button", + "controlType": "ICON_SELECT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "7l4a910dv5" + }, + { + "propertyName": "submitButtonStyles.iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + }, + "id": "z0k1bza43p" + }, + { + "propertyName": "submitButtonStyles.placement", + "label": "Placement", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the space between items", + "options": [ + { + "label": "Start", + "value": "START" + }, + { + "label": "Between", + "value": "BETWEEN" + }, + { + "label": "Center", + "value": "CENTER" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["START", "BETWEEN", "CENTER"], + "default": "CENTER" + } + }, + "id": "9sjwy69k33" + } + ], + "id": "1nztgln5nu" + } + ], + "id": "9pwi8s0cwq" + }, + { + "sectionName": "Reset button styles", + "children": [ + { + "sectionName": "General", + "collapsible": false, + "children": [ + { + "propertyName": "resetButtonStyles.buttonColor", + "helpText": "Changes the color of the button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "kgf1ldp72g" + }, + { + "propertyName": "resetButtonStyles.buttonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "defaultValue": "PRIMARY", + "fullWidth": true, + "helpText": "Sets the variant of the icon button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"], + "default": "PRIMARY" + } + }, + "id": "dkhebslwjn" + }, + { + "propertyName": "resetButtonStyles.borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "n5op9y3anu" + }, + { + "propertyName": "resetButtonStyles.boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "cqkgy3f461" + } + ], + "id": "zhzffkzd96" + }, + { + "sectionName": "Icon", + "collapsible": false, + "children": [ + { + "propertyName": "resetButtonStyles.iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the button", + "controlType": "ICON_SELECT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "sog5jdzfa9" + }, + { + "propertyName": "resetButtonStyles.iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + }, + "id": "dhu6y1fuwn" + }, + { + "propertyName": "resetButtonStyles.placement", + "label": "Placement", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the space between items", + "options": [ + { + "label": "Start", + "value": "START" + }, + { + "label": "Between", + "value": "BETWEEN" + }, + { + "label": "Center", + "value": "CENTER" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["START", "BETWEEN", "CENTER"], + "default": "CENTER" + } + }, + "id": "zx9x547qym" + } + ], + "id": "fd54cbigzl" + } + ], + "dependencies": ["showReset"], + "id": "pt5b0u0wvl" + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 1, + "defaultValue": "AUTO_HEIGHT", + "active": true + } + } + }, + "TABLE_WIDGET_V2": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Takes in an array of objects to display rows in the table. Bind data from an API using {{}}", + "propertyName": "tableData", + "label": "Table data", + "controlType": "ONE_CLICK_BINDING_CONTROL", + "controlConfig": { + "searchableColumn": true + }, + "placeholderText": "[{ \"name\": \"John\" }]", + "inputType": "ARRAY", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array", + "example": "[{ \"name\": \"John\" }]", + "autocompleteDataType": "ARRAY" + }, + "fnString": "function tableDataValidation(value, props, _) {\n var invalidResponse = {\n isValid: false,\n parsed: [],\n messages: [{\n name: \"TypeError\",\n message: \"This value does not evaluate to type Array}\"\n }]\n };\n if (value === \"\") {\n return {\n isValid: true,\n parsed: []\n };\n }\n if (value === undefined || value === null) {\n return {\n isValid: false,\n parsed: [],\n messages: [{\n name: \"ValidationError\",\n message: \"Data is undefined, re-run your query or fix the data\"\n }]\n };\n }\n if (!_.isString(value) && !Array.isArray(value)) {\n return invalidResponse;\n }\n var parsed = value;\n if (_.isString(value)) {\n try {\n parsed = JSON.parse(value);\n } catch (e) {\n return invalidResponse;\n }\n }\n if (Array.isArray(parsed)) {\n if (parsed.length === 0) {\n return {\n isValid: true,\n parsed: []\n };\n }\n for (var i = 0; i < parsed.length; i++) {\n if (!_.isPlainObject(parsed[i])) {\n return {\n isValid: false,\n parsed: [],\n messages: [{\n name: \"ValidationError\",\n message: \"Invalid object at index \".concat(i)\n }]\n };\n }\n }\n return {\n isValid: true,\n parsed: parsed\n };\n }\n return invalidResponse;\n}" + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "id": "l2ghn3li9k" + }, + { + "helpText": "Columns", + "propertyName": "primaryColumns", + "controlType": "PRIMARY_COLUMNS_V2", + "label": "Columns", + "dependencies": [ + "primaryColumns", + "columnOrder", + "childStylesheet", + "inlineEditingSaveOption", + "textColor", + "textSize", + "fontStyle", + "cellBackground", + "verticalAlignment", + "horizontalAlignment" + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Unique column names", + "example": "abc", + "autocompleteDataType": "STRING" + }, + "fnString": "function uniqueColumnNameValidation(value, props, _) {\n var tableColumnLabels = _.map(value, \"label\");\n var duplicates = tableColumnLabels.find(function (val, index, arr) {\n return arr.indexOf(val) !== index;\n });\n if (value && !!duplicates) {\n return {\n isValid: false,\n parsed: value,\n messages: [\"Column names should be unique.\"]\n };\n } else {\n return {\n isValid: true,\n parsed: value,\n messages: [\"\"]\n };\n }\n}" + } + }, + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "dependencies": ["primaryColumns", "columnOrder"], + "contentChildren": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "columnType", + "label": "Column type", + "helpText": "Type of column to be shown corresponding to the data of the column", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Button", + "value": "button" + }, + { + "label": "Checkbox", + "value": "checkbox" + }, + { + "label": "Date", + "value": "date" + }, + { + "label": "Icon button", + "value": "iconButton" + }, + { + "label": "Image", + "value": "image" + }, + { + "label": "Menu button", + "value": "menuButton" + }, + { + "label": "Number", + "value": "number" + }, + { + "label": "Plain text", + "value": "text" + }, + { + "label": "Select", + "value": "select" + }, + { + "label": "Switch", + "value": "switch" + }, + { + "label": "URL", + "value": "url" + }, + { + "label": "Video", + "value": "video" + } + ], + "dependencies": [ + "primaryColumns", + "columnOrder", + "childStylesheet" + ], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "l3zqjf5hlc" + }, + { + "helpText": "The alias that you use in selectedrow", + "propertyName": "alias", + "label": "Property Name", + "controlType": "INPUT_TEXT", + "dependencies": ["primaryColumns"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string", + "example": "abc", + "autocompleteDataType": "STRING" + }, + "fnString": "function uniqueColumnAliasValidation(value, props, _) {\n var aliases = _.map(Object.values(props.primaryColumns), \"alias\");\n var duplicates = aliases.find(function (val, index, arr) {\n return arr.indexOf(val) !== index;\n });\n if (!value) {\n return {\n isValid: false,\n parsed: value,\n messages: [\"Property name should not be empty.\"]\n };\n } else if (value && !!duplicates) {\n return {\n isValid: false,\n parsed: value,\n messages: [\"Property names should be unique.\"]\n };\n } else {\n return {\n isValid: true,\n parsed: value,\n messages: [\"\"]\n };\n }\n}" + } + }, + "id": "siaiwk2vf3" + }, + { + "propertyName": "displayText", + "label": "Display text", + "helpText": "The text to be displayed in the column", + "controlType": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "jeaucn1sym" + }, + { + "helpText": "The value computed & shown in each cell. Use {{currentRow}} to reference each row in the table. This property is not accessible outside the column settings.", + "propertyName": "computedValue", + "label": "Computed value", + "controlType": "TABLE_COMPUTE_VALUE", + "additionalControlData": { + "isArrayValue": true + }, + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "6uxthtakoz" + }, + { + "propertyName": "inputFormat", + "label": "Date format", + "helpText": "Date format of incoming data to the column", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "UNIX timestamp (s)", + "value": "Epoch" + }, + { + "label": "UNIX timestamp (ms)", + "value": "Milliseconds" + }, + { + "label": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.SSSZ" + }, + { + "label": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "YYYY-MM-DD hh:mm:ss", + "value": "YYYY-MM-DD hh:mm:ss" + }, + { + "label": "Do MMM YYYY", + "value": "Do MMM YYYY" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "LLL", + "value": "LLL" + }, + { + "label": "LL", + "value": "LL" + }, + { + "label": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "defaultValue": "YYYY-MM-DD HH:mm", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "YYYY-MM-DDTHH:mm:ss.SSSZ", + "Epoch", + "Milliseconds", + "YYYY-MM-DD", + "YYYY-MM-DD HH:mm", + "YYYY-MM-DDTHH:mm:ss.sssZ", + "YYYY-MM-DDTHH:mm:ss", + "YYYY-MM-DD hh:mm:ss", + "Do MMM YYYY", + "DD/MM/YYYY", + "DD/MM/YYYY HH:mm", + "LLL", + "LL", + "D MMMM, YYYY", + "H:mm A D MMMM, YYYY", + "MM-DD-YYYY", + "DD-MM-YYYY", + "MM/DD/YYYY", + "DD/MM/YYYY", + "DD/MM/YY", + "MM/DD/YY" + ] + } + } + }, + "isTriggerProperty": false, + "id": "9us8ul4jfk" + }, + { + "propertyName": "outputFormat", + "label": "Display format", + "helpText": "Date format to be shown to users", + "controlType": "DROP_DOWN", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "options": [ + { + "label": "UNIX timestamp (s)", + "value": "Epoch" + }, + { + "label": "UNIX timestamp (ms)", + "value": "Milliseconds" + }, + { + "label": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "ISO 8601", + "value": "YYYY-MM-DDTHH:mm:ss.SSSZ" + }, + { + "label": "YYYY-MM-DDTHH:mm:ss", + "value": "YYYY-MM-DDTHH:mm:ss" + }, + { + "label": "YYYY-MM-DD hh:mm:ss", + "value": "YYYY-MM-DD hh:mm:ss" + }, + { + "label": "Do MMM YYYY", + "value": "Do MMM YYYY" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + }, + { + "label": "LLL", + "value": "LLL" + }, + { + "label": "LL", + "value": "LL" + }, + { + "label": "D MMMM, YYYY", + "value": "D MMMM, YYYY" + }, + { + "label": "H:mm A D MMMM, YYYY", + "value": "H:mm A D MMMM, YYYY" + }, + { + "label": "MM-DD-YYYY", + "value": "MM-DD-YYYY" + }, + { + "label": "DD-MM-YYYY", + "value": "DD-MM-YYYY" + }, + { + "label": "MM/DD/YYYY", + "value": "MM/DD/YYYY" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YY", + "value": "DD/MM/YY" + }, + { + "label": "MM/DD/YY", + "value": "MM/DD/YY" + } + ], + "defaultValue": "YYYY-MM-DD HH:mm", + "dependencies": ["primaryColumns", "columnType"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "YYYY-MM-DDTHH:mm:ss.SSSZ", + "Epoch", + "Milliseconds", + "YYYY-MM-DD", + "YYYY-MM-DD HH:mm", + "YYYY-MM-DDTHH:mm:ss.sssZ", + "YYYY-MM-DDTHH:mm:ss", + "YYYY-MM-DD hh:mm:ss", + "Do MMM YYYY", + "DD/MM/YYYY", + "DD/MM/YYYY HH:mm", + "LLL", + "LL", + "D MMMM, YYYY", + "H:mm A D MMMM, YYYY", + "MM-DD-YYYY", + "DD-MM-YYYY", + "MM/DD/YYYY", + "DD/MM/YYYY", + "DD/MM/YY", + "MM/DD/YY" + ] + } + } + }, + "isTriggerProperty": false, + "id": "xsrf0wm0gp" + } + ], + "id": "203ef533lh" + }, + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the icon button", + "dependencies": ["primaryColumns", "columnOrder"], + "controlType": "ICON_SELECT", + "customJSControl": "TABLE_COMPUTE_VALUE", + "defaultIconName": "add", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ], + "default": "add" + } + } + }, + "id": "7obj5aj4c9" + }, + { + "propertyName": "buttonLabel", + "label": "Text", + "helpText": "Sets the label of the button", + "controlType": "TABLE_COMPUTE_VALUE", + "defaultValue": "Action", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "ntjbdktfbb" + }, + { + "propertyName": "menuButtonLabel", + "label": "Text", + "helpText": "Sets the label of the button", + "controlType": "TABLE_COMPUTE_VALUE", + "defaultValue": "Open Menu", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "ybp6uyibcc" + }, + { + "propertyName": "menuItemsSource", + "helpText": "Sets the source for the menu items", + "label": "Menu items source", + "controlType": "ICON_TABS", + "fullWidth": true, + "defaultValue": "STATIC", + "options": [ + { + "label": "Static", + "value": "STATIC" + }, + { + "label": "Dynamic", + "value": "DYNAMIC" + } + ], + "isJSConvertible": false, + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "primaryColumns", + "columnOrder", + "sourceData", + "configureMenuItems" + ], + "id": "1iwf0nt4cq" + }, + { + "helpText": "Takes in an array of items to display the menu items.", + "propertyName": "sourceData", + "label": "Source data", + "controlType": "TABLE_COMPUTE_VALUE", + "placeholderText": "{{Query1.data}}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "required": true, + "default": [], + "children": { + "type": "ARRAY", + "params": { + "required": true, + "default": [], + "children": { + "type": "UNION", + "params": { + "required": true, + "types": [ + { + "type": "TEXT", + "params": { + "required": true + } + }, + { + "type": "NUMBER", + "params": { + "required": true + } + }, + { + "type": "OBJECT", + "params": { + "required": true + } + } + ] + } + } + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "dependencies": [ + "primaryColumns", + "columnOrder", + "menuItemsSource" + ], + "id": "30rwcugloq" + }, + { + "helpText": "Configure how each menu item will appear.", + "propertyName": "configureMenuItems", + "controlType": "OPEN_CONFIG_PANEL", + "buttonConfig": { + "label": "Configure", + "icon": "settings-2-line" + }, + "label": "Configure menu items", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "columnOrder", + "menuItemsSource", + "sourceData" + ], + "panelConfig": { + "editableTitle": false, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "contentChildren": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label of a menu item using the {{currentItem}} binding.", + "label": "Label", + "controlType": "MENU_BUTTON_DYNAMIC_ITEMS", + "placeholderText": "{{currentItem.name}}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['option1', 'option2'] | [{ \"label\": \"label1\", \"value\": \"value1\" }]", + "autocompleteDataType": "ARRAY" + }, + "fnString": "function textForEachRowValidation(value, props, _) {\n var generateResponseAndReturn = function generateResponseAndReturn() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n name: \"\",\n message: \"\"\n };\n return {\n isValid: isValid,\n parsed: isValid ? value : [],\n messages: [message]\n };\n };\n var DEFAULT_MESSAGE = {\n name: \"TypeError\",\n message: \"The evaluated value should be either a string or a number.\"\n };\n if (_.isString(value) || _.isNumber(value) || Array.isArray(value) || value === undefined) {\n if (Array.isArray(value)) {\n var isValid = value.every(function (item) {\n if (_.isString(item) || _.isNumber(item) || item === undefined) {\n return true;\n }\n if (Array.isArray(item)) {\n return item.every(function (subItem) {\n return _.isString(subItem) || _.isNumber(subItem) || subItem === undefined;\n });\n }\n return false;\n });\n return isValid ? generateResponseAndReturn(true) : generateResponseAndReturn(false, DEFAULT_MESSAGE);\n }\n return generateResponseAndReturn(true);\n }\n return generateResponseAndReturn(false, DEFAULT_MESSAGE);\n}" + } + }, + "evaluatedDependencies": ["primaryColumns"], + "id": "shdx0py57k" + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget. Can also be configured the using {{currentItem}} binding.", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "fnString": "function booleanForEachRowValidation(value) {\n var generateResponseAndReturn = function generateResponseAndReturn() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n name: \"\",\n message: \"\"\n };\n return {\n isValid: isValid,\n parsed: isValid ? value : true,\n messages: [message]\n };\n };\n var isBoolean = function isBoolean(value) {\n var isABoolean = value === true || value === false;\n var isStringTrueFalse = value === \"true\" || value === \"false\";\n return isABoolean || isStringTrueFalse || value === undefined;\n };\n var DEFAULT_MESSAGE = {\n name: \"TypeError\",\n message: \"The evaluated value should be a boolean.\"\n };\n if (isBoolean(value)) {\n return generateResponseAndReturn(true);\n }\n if (Array.isArray(value)) {\n var isValid = value.every(function (item) {\n if (isBoolean(item)) {\n return true;\n }\n if (Array.isArray(item)) {\n return item.every(function (subItem) {\n return isBoolean(subItem);\n });\n }\n return false;\n });\n return isValid ? generateResponseAndReturn(true) : generateResponseAndReturn(false, DEFAULT_MESSAGE);\n }\n return generateResponseAndReturn(false, DEFAULT_MESSAGE);\n}" + } + }, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["primaryColumns"], + "id": "tvc8uwytid" + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget. Can also be configured the using {{currentItem}} binding.", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "fnString": "function booleanForEachRowValidation(value) {\n var generateResponseAndReturn = function generateResponseAndReturn() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n name: \"\",\n message: \"\"\n };\n return {\n isValid: isValid,\n parsed: isValid ? value : true,\n messages: [message]\n };\n };\n var isBoolean = function isBoolean(value) {\n var isABoolean = value === true || value === false;\n var isStringTrueFalse = value === \"true\" || value === \"false\";\n return isABoolean || isStringTrueFalse || value === undefined;\n };\n var DEFAULT_MESSAGE = {\n name: \"TypeError\",\n message: \"The evaluated value should be a boolean.\"\n };\n if (isBoolean(value)) {\n return generateResponseAndReturn(true);\n }\n if (Array.isArray(value)) {\n var isValid = value.every(function (item) {\n if (isBoolean(item)) {\n return true;\n }\n if (Array.isArray(item)) {\n return item.every(function (subItem) {\n return isBoolean(subItem);\n });\n }\n return false;\n });\n return isValid ? generateResponseAndReturn(true) : generateResponseAndReturn(false, DEFAULT_MESSAGE);\n }\n return generateResponseAndReturn(false, DEFAULT_MESSAGE);\n}" + } + }, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["primaryColumns"], + "id": "acs9lhbghc" + } + ], + "id": "zbf29lo5mr" + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the menu item is clicked. Can also be configured the using {{currentItem}} binding.", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "evaluatedDependencies": ["primaryColumns"], + "id": "kgojyqzi01" + } + ], + "id": "44y6nmpzv3" + } + ], + "styleChildren": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for a menu item. Can also be configured the using {{currentItem}} binding.", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "FUNCTION", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ], + "fnString": "function iconNamesForEachRowValidation(value, props, _, moment, propertyPath, config) {\n var generateResponseAndReturn = function generateResponseAndReturn() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n name: \"\",\n message: \"\"\n };\n return {\n isValid: isValid,\n parsed: isValid ? value : true,\n messages: [message]\n };\n };\n var DEFAULT_MESSAGE = {\n name: \"TypeError\",\n message: \"The evaluated value should either be an icon name, undefined, null, or an empty string. We currently use the icons from the Blueprint library. You can see the list of icons at https://blueprintjs.com/docs/#icons\"\n };\n var isIconName = function isIconName(value) {\n var _config$params, _config$params$allowe;\n return (config === null || config === void 0 ? void 0 : (_config$params = config.params) === null || _config$params === void 0 ? void 0 : (_config$params$allowe = _config$params.allowedValues) === null || _config$params$allowe === void 0 ? void 0 : _config$params$allowe.includes(value)) || value === undefined || value === null || value === \"\";\n };\n if (isIconName(value)) {\n return generateResponseAndReturn(true);\n }\n if (Array.isArray(value)) {\n var isValid = value.every(function (item) {\n if (isIconName(item)) {\n return true;\n }\n if (Array.isArray(item)) {\n return item.every(function (subItem) {\n return isIconName(subItem);\n });\n }\n return false;\n });\n return isValid ? generateResponseAndReturn(true) : generateResponseAndReturn(false, DEFAULT_MESSAGE);\n }\n return generateResponseAndReturn(false, DEFAULT_MESSAGE);\n}" + } + }, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["primaryColumns"], + "id": "g4be11hclr" + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of a menu item. Can also be configured the using {{currentItem}} binding.", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "FUNCTION", + "params": { + "allowedValues": [ + "center", + "left", + "right" + ], + "fnString": "function iconPositionForEachRowValidation(value, props, _, moment, propertyPath, config) {\n var _config$params2, _config$params2$allow;\n var generateResponseAndReturn = function generateResponseAndReturn() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n name: \"\",\n message: \"\"\n };\n return {\n isValid: isValid,\n parsed: isValid ? value : true,\n messages: [message]\n };\n };\n var DEFAULT_MESSAGE = {\n name: \"TypeError\",\n message: \"The evaluated value should be one of the allowed values => \".concat(config === null || config === void 0 ? void 0 : (_config$params2 = config.params) === null || _config$params2 === void 0 ? void 0 : (_config$params2$allow = _config$params2.allowedValues) === null || _config$params2$allow === void 0 ? void 0 : _config$params2$allow.join(\", \"), \", undefined, null, or an empty string\")\n };\n var isIconPosition = function isIconPosition(value) {\n var _config$params3, _config$params3$allow;\n return (config === null || config === void 0 ? void 0 : (_config$params3 = config.params) === null || _config$params3 === void 0 ? void 0 : (_config$params3$allow = _config$params3.allowedValues) === null || _config$params3$allow === void 0 ? void 0 : _config$params3$allow.includes(value)) || value === undefined || value === null || value === \"\";\n };\n if (isIconPosition(value)) {\n return generateResponseAndReturn(true);\n }\n if (Array.isArray(value)) {\n var isValid = value.every(function (item) {\n if (isIconPosition(item)) {\n return true;\n }\n if (Array.isArray(item)) {\n return item.every(function (subItem) {\n return isIconPosition(subItem);\n });\n }\n return false;\n });\n return isValid ? generateResponseAndReturn(true) : generateResponseAndReturn(false, DEFAULT_MESSAGE);\n }\n return generateResponseAndReturn(false, DEFAULT_MESSAGE);\n}" + } + }, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["primaryColumns"], + "id": "3zjqsqumar" + } + ], + "id": "cr8lssik9z" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "iconColor", + "helpText": "Sets the icon color of a menu item. Can also be configured the using {{currentItem}} binding.", + "label": "Icon color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["primaryColumns"], + "validation": { + "type": "FUNCTION", + "params": { + "regex": {}, + "fnString": "function colorForEachRowValidation(value, props, _, moment, propertyPath, config) {\n var _config$params4;\n var generateResponseAndReturn = function generateResponseAndReturn() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n name: \"\",\n message: \"\"\n };\n return {\n isValid: isValid,\n parsed: isValid ? value : true,\n messages: [message]\n };\n };\n var DEFAULT_MESSAGE = {\n name: \"TypeError\",\n message: \"The evaluated value should match \".concat(config === null || config === void 0 ? void 0 : (_config$params4 = config.params) === null || _config$params4 === void 0 ? void 0 : _config$params4.regex)\n };\n var isColor = function isColor(value) {\n var _config$params5, _config$params5$regex;\n return config === null || config === void 0 ? void 0 : (_config$params5 = config.params) === null || _config$params5 === void 0 ? void 0 : (_config$params5$regex = _config$params5.regex) === null || _config$params5$regex === void 0 ? void 0 : _config$params5$regex.test(value);\n };\n if (isColor(value)) {\n return generateResponseAndReturn(true);\n }\n if (Array.isArray(value)) {\n var isValid = value.every(function (item) {\n if (isColor(item)) {\n return true;\n }\n if (Array.isArray(item)) {\n return item.every(function (subItem) {\n return isColor(subItem);\n });\n }\n return false;\n });\n return isValid ? generateResponseAndReturn(true) : generateResponseAndReturn(false, DEFAULT_MESSAGE);\n }\n return generateResponseAndReturn(false, DEFAULT_MESSAGE);\n}" + } + }, + "id": "y3hsr01xql" + }, + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of a menu item. Can also be configured the using {{currentItem}} binding.", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["primaryColumns"], + "validation": { + "type": "FUNCTION", + "params": { + "regex": {}, + "fnString": "function colorForEachRowValidation(value, props, _, moment, propertyPath, config) {\n var _config$params4;\n var generateResponseAndReturn = function generateResponseAndReturn() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n name: \"\",\n message: \"\"\n };\n return {\n isValid: isValid,\n parsed: isValid ? value : true,\n messages: [message]\n };\n };\n var DEFAULT_MESSAGE = {\n name: \"TypeError\",\n message: \"The evaluated value should match \".concat(config === null || config === void 0 ? void 0 : (_config$params4 = config.params) === null || _config$params4 === void 0 ? void 0 : _config$params4.regex)\n };\n var isColor = function isColor(value) {\n var _config$params5, _config$params5$regex;\n return config === null || config === void 0 ? void 0 : (_config$params5 = config.params) === null || _config$params5 === void 0 ? void 0 : (_config$params5$regex = _config$params5.regex) === null || _config$params5$regex === void 0 ? void 0 : _config$params5$regex.test(value);\n };\n if (isColor(value)) {\n return generateResponseAndReturn(true);\n }\n if (Array.isArray(value)) {\n var isValid = value.every(function (item) {\n if (isColor(item)) {\n return true;\n }\n if (Array.isArray(item)) {\n return item.every(function (subItem) {\n return isColor(subItem);\n });\n }\n return false;\n });\n return isValid ? generateResponseAndReturn(true) : generateResponseAndReturn(false, DEFAULT_MESSAGE);\n }\n return generateResponseAndReturn(false, DEFAULT_MESSAGE);\n}" + } + }, + "id": "cfridjz0je" + }, + { + "propertyName": "textColor", + "helpText": "Sets the text color of a menu item. Can also be configured the using {{currentItem}} binding.", + "label": "Text color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "customJSControl": "MENU_BUTTON_DYNAMIC_ITEMS", + "evaluatedDependencies": ["primaryColumns"], + "validation": { + "type": "FUNCTION", + "params": { + "regex": {}, + "fnString": "function colorForEachRowValidation(value, props, _, moment, propertyPath, config) {\n var _config$params4;\n var generateResponseAndReturn = function generateResponseAndReturn() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n name: \"\",\n message: \"\"\n };\n return {\n isValid: isValid,\n parsed: isValid ? value : true,\n messages: [message]\n };\n };\n var DEFAULT_MESSAGE = {\n name: \"TypeError\",\n message: \"The evaluated value should match \".concat(config === null || config === void 0 ? void 0 : (_config$params4 = config.params) === null || _config$params4 === void 0 ? void 0 : _config$params4.regex)\n };\n var isColor = function isColor(value) {\n var _config$params5, _config$params5$regex;\n return config === null || config === void 0 ? void 0 : (_config$params5 = config.params) === null || _config$params5 === void 0 ? void 0 : (_config$params5$regex = _config$params5.regex) === null || _config$params5$regex === void 0 ? void 0 : _config$params5$regex.test(value);\n };\n if (isColor(value)) {\n return generateResponseAndReturn(true);\n }\n if (Array.isArray(value)) {\n var isValid = value.every(function (item) {\n if (isColor(item)) {\n return true;\n }\n if (Array.isArray(item)) {\n return item.every(function (subItem) {\n return isColor(subItem);\n });\n }\n return false;\n });\n return isValid ? generateResponseAndReturn(true) : generateResponseAndReturn(false, DEFAULT_MESSAGE);\n }\n return generateResponseAndReturn(false, DEFAULT_MESSAGE);\n}" + } + }, + "id": "fm0aox1bwx" + } + ], + "id": "gkbecx444r" + } + ] + }, + "id": "zfsgtvahed" + }, + { + "helpText": "Menu items", + "propertyName": "menuItems", + "controlType": "MENU_ITEMS", + "label": "Menu items", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["primaryColumns", "columnOrder"], + "panelConfig": { + "editableTitle": true, + "titlePropertyName": "label", + "panelIdPropertyName": "id", + "dependencies": ["primaryColumns", "columnOrder"], + "contentChildren": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "label", + "helpText": "Sets the label of a menu item", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "id": "fh1iwtzw5x" + }, + { + "helpText": "when the menu item is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "id": "o7ds8u39g9" + } + ], + "id": "sz3y7ldekb" + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "id": "ucfl2lgqlg" + }, + { + "propertyName": "isDisabled", + "helpText": "Disables input to the widget", + "label": "Disabled", + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "id": "s8s6gkv0z9" + } + ], + "id": "qom45gr1e7" + } + ], + "styleChildren": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for a menu item", + "controlType": "ICON_SELECT", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "id": "mpy369g4qw" + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of a menu item", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "id": "w3omgae631" + } + ], + "id": "2mz2tbyxqz" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "textColor", + "helpText": "Sets the text color of a menu item", + "label": "Text color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "id": "u1y57q4wp4" + }, + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of a menu item", + "label": "Background color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "id": "myaxss2b4i" + }, + { + "propertyName": "iconColor", + "helpText": "Sets the icon color of a menu item", + "label": "Icon color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "columnOrder" + ], + "id": "0k0xc8l0x0" + } + ], + "id": "3mtzhycugi" + } + ] + }, + "id": "8f2hiui45b" + }, + { + "helpText": "when the button is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": true, + "id": "aj2z2y6rg7" + } + ], + "id": "krgmdtxooj" + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isCellVisible", + "dependencies": ["primaryColumns", "columnType"], + "label": "Visible", + "helpText": "Controls the visibility of the cell in the column", + "defaultValue": true, + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "id": "d0ruz3pndv" + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Controls the disabled state of the button", + "defaultValue": false, + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "dependencies": ["primaryColumns", "columnOrder"], + "id": "2iefinnd63" + }, + { + "propertyName": "isCompact", + "helpText": "Decides if menu items will consume lesser space", + "label": "Compact", + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "isTriggerProperty": false, + "dependencies": ["primaryColumns", "columnOrder"], + "id": "kkmd3l4afs" + }, + { + "propertyName": "allowCellWrapping", + "dependencies": ["primaryColumns", "columnType"], + "label": "Cell wrapping", + "helpText": "Allows content of the cell to be wrapped", + "defaultValue": false, + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "id": "rndmhr3ofl" + }, + { + "propertyName": "isCellEditable", + "dependencies": [ + "primaryColumns", + "columnOrder", + "columnType", + "childStylesheet", + "inlineEditingSaveOption" + ], + "label": "Editable", + "helpText": "Controls the cell's editablity", + "defaultValue": false, + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "id": "qig07kczxi" + }, + { + "propertyName": "sticky", + "helpText": "Choose column that needs to be frozen left or right of the table", + "controlType": "ICON_TABS", + "defaultValue": "", + "label": "Column freeze", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["primaryColumns", "columnOrder"], + "options": [ + { + "startIcon": "contract-left-line", + "value": "left" + }, + { + "startIcon": "column-freeze", + "value": "" + }, + { + "startIcon": "contract-right-line", + "value": "right" + } + ], + "id": "hs7tlhe36e" + } + ], + "id": "jfi8bf1yn5" + }, + { + "sectionName": "Validation", + "children": [ + { + "helpText": "Sets the minimum allowed value", + "propertyName": "validation.min", + "label": "Min", + "controlType": "TABLE_INLINE_EDIT_VALIDATION_CONTROL", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "default": null + } + }, + "dependencies": ["primaryColumns"], + "id": "t1cw5afd3l" + }, + { + "helpText": "Sets the maximum allowed value", + "propertyName": "validation.max", + "label": "Max", + "controlType": "TABLE_INLINE_EDIT_VALIDATION_CONTROL", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "default": null + } + }, + "dependencies": ["primaryColumns"], + "id": "6ldycm7hd1" + }, + { + "propertyName": "validation.minDate", + "helpText": "Sets the minimum allowed date", + "label": "Min Date", + "controlType": "DATE_PICKER", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["primaryColumns"], + "id": "x7zsd3i10q" + }, + { + "propertyName": "validation.maxDate", + "helpText": "Sets the maximum allowed value", + "label": "Max Date", + "controlType": "DATE_PICKER", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["primaryColumns"], + "id": "izksseb6ky" + }, + { + "propertyName": "validation.regex", + "helpText": "Adds a validation to the cell value which displays an error on failure", + "label": "Regex", + "controlType": "TABLE_INLINE_EDIT_VALIDATION_CONTROL", + "dependencies": ["primaryColumns"], + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + }, + "id": "qf92tgar8y" + }, + { + "propertyName": "validation.isColumnEditableCellValid", + "helpText": "Shows the validity of the cell validity", + "label": "Valid", + "controlType": "TABLE_INLINE_EDIT_VALID_PROPERTY_CONTROL", + "isJSConvertible": false, + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + }, + "id": "zniy39nfg1" + }, + { + "propertyName": "validation.errorMessage", + "helpText": "The error message to display if the regex or valid property check fails", + "label": "Error message", + "controlType": "TABLE_INLINE_EDIT_VALIDATION_CONTROL", + "dependencies": ["primaryColumns"], + "placeholderText": "Not a valid value!", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "egrvr05p3q" + }, + { + "propertyName": "validation.isColumnEditableCellRequired", + "helpText": "Makes input to the widget mandatory", + "label": "Required", + "controlType": "SWITCH", + "dependencies": ["primaryColumns"], + "customJSControl": "TABLE_INLINE_EDIT_VALIDATION_CONTROL", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "r4qw9z041m" + } + ], + "id": "7ivtzszp20" + }, + { + "sectionName": "Save Button", + "children": [ + { + "sectionName": "Label", + "collapsible": false, + "children": [ + { + "propertyName": "saveActionLabel", + "label": "Text", + "helpText": "Sets the label text of the button", + "controlType": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns"], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "kejxyetuep" + } + ], + "id": "y1e0gza8k6" + }, + { + "sectionName": "General", + "collapsible": false, + "children": [ + { + "propertyName": "onSave", + "label": "onSave", + "helpText": "when the save button is clicked", + "controlType": "ACTION_SELECTOR", + "dependencies": ["primaryColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "vy48lsoxpq" + }, + { + "propertyName": "isSaveVisible", + "dependencies": ["primaryColumns"], + "label": "Visible", + "helpText": "Controls the visibility of the save button", + "defaultValue": true, + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "id": "nlolqkpijg" + }, + { + "propertyName": "isSaveDisabled", + "label": "Disabled", + "helpText": "Disables clicks to the save button", + "defaultValue": false, + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "dependencies": ["primaryColumns"], + "id": "qgh0u97q0q" + } + ], + "id": "k3wlhwrvrh" + } + ], + "id": "onvo5n4gku" + }, + { + "sectionName": "Discard Button", + "children": [ + { + "sectionName": "Label", + "collapsible": false, + "children": [ + { + "propertyName": "discardActionLabel", + "label": "Text", + "helpText": "Sets the label text of the button", + "controlType": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns"], + "isBindProperty": true, + "isTriggerProperty": false, + "id": "hogledglmh" + } + ], + "id": "tnduoib63c" + }, + { + "sectionName": "General", + "collapsible": false, + "children": [ + { + "propertyName": "onDiscard", + "label": "onDiscard", + "helpText": "when the discard button is clicked", + "controlType": "ACTION_SELECTOR", + "dependencies": ["primaryColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "s7y3vezpnj" + }, + { + "propertyName": "isDiscardVisible", + "dependencies": ["primaryColumns"], + "label": "Visible", + "helpText": "Controls the visibility of the discard button", + "defaultValue": true, + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "id": "6l2ckoke09" + }, + { + "propertyName": "isDiscardDisabled", + "label": "Disabled", + "helpText": "Disables clicks to the discard button", + "defaultValue": false, + "controlType": "SWITCH", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "BOOLEAN" + } + }, + "dependencies": ["primaryColumns"], + "id": "fx5dcz3viu" + } + ], + "id": "ki0gkiscjb" + } + ], + "id": "hifayr0k3r" + }, + { + "sectionName": "Select properties", + "children": [ + { + "propertyName": "selectOptions", + "helpText": "Options to be shown on the select dropdown", + "label": "Options", + "controlType": "TABLE_COMPUTE_VALUE", + "isJSConvertible": false, + "isBindProperty": true, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": string | number, \"value\": string | number}>", + "example": "[{\"label\": \"abc\", \"value\": \"abc\"}]" + }, + "fnString": "function selectColumnOptionsValidation(value, props, _) {\n var _isValid = true,\n _parsed,\n _message = \"\";\n var uniqueValues;\n var invalidArrayValueMessage = \"This value does not evaluate to type: { \\\"label\\\": string | number, \\\"value\\\": string | number | boolean }\";\n var invalidMessage = \"This value does not evaluate to type Array<{ \\\"label\\\": string | number, \\\"value\\\": string | number | boolean }>\";\n var allowedValueTypes = [\"string\", \"number\", \"boolean\"];\n var allowedLabelTypes = [\"string\", \"number\"];\n var generateErrorMessagePrefix = function generateErrorMessagePrefix(rowIndex, optionIndex) {\n return \"Invalid entry at\".concat(rowIndex !== null ? \" Row: \".concat(rowIndex) : \"\", \" index: \").concat(optionIndex, \".\");\n };\n var generateInvalidArrayValueMessage = function generateInvalidArrayValueMessage(rowIndex, optionIndex) {\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" \").concat(invalidArrayValueMessage);\n };\n var validateOption = function validateOption(option, rowIndex, optionIndex) {\n /*\n * Option should\n * 1. be an object\n * 2. have label property\n * 3. label should be of type string | number\n * 4. have value property\n * 5. value should be of type string | number | boolean\n * 6. value should be unique amoig the options array\n */\n if (!_.isObject(option)) {\n // 1\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" This value does not evaluate to type: { \\\"label\\\": string | number, \\\"value\\\": string | number | boolean }\");\n }\n if (!option.hasOwnProperty(\"label\")) {\n // 2\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" Missing required key: label\");\n }\n if (!allowedLabelTypes.includes(typeof option.label)) {\n // 3\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" label does not evaluate to type \").concat(allowedLabelTypes.join(\" | \"));\n }\n if (!option.hasOwnProperty(\"value\")) {\n // 4\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" Missing required key: value\");\n }\n if (!allowedValueTypes.includes(typeof option.value)) {\n // 5\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" value does not evaluate to type \").concat(allowedValueTypes.join(\" | \"));\n }\n if (uniqueValues.has(option.value)) {\n // 6\n return \"Duplicate values found for the following properties, in the array entries, that must be unique -- value.\";\n } else {\n uniqueValues.add(option.value);\n }\n return \"\";\n };\n try {\n if (value === \"\" || _.isNil(value)) {\n // empty values\n return {\n isValid: true,\n parsed: [],\n messages: [\"\"]\n };\n } else if (typeof value === \"string\") {\n // json string\n var _value = JSON.parse(value);\n if (Array.isArray(_value)) {\n value = _value;\n } else {\n _isValid = false;\n _message = invalidMessage;\n }\n }\n if (Array.isArray(value)) {\n if (value.length) {\n //when value is array of option json string\n if (value.every(function (d) {\n return _.isString(d);\n })) {\n value = value.map(function (d) {\n return JSON.parse(d);\n });\n }\n if (Array.isArray(value) && Array.isArray(value[0])) {\n // value is array of array of label, value\n //Value should be an array of array\n if (!value.every(function (d) {\n return Array.isArray(d);\n })) {\n _parsed = [];\n _isValid = false;\n _message = invalidMessage;\n } else {\n _parsed = value;\n _isValid = true;\n for (var i = 0; i < value.length; i++) {\n uniqueValues = new Set();\n for (var j = 0; j < value[i].length; j++) {\n if (_.isNil(value[i][j])) {\n _isValid = false;\n _message = generateInvalidArrayValueMessage(i, j);\n _parsed = [];\n break;\n }\n if (_message = validateOption(value[i][j], i, j)) {\n _isValid = false;\n break;\n }\n }\n if (!_isValid) {\n break;\n }\n }\n }\n } else {\n uniqueValues = new Set();\n _parsed = value;\n _isValid = true;\n for (var _i = 0; _i < value.length; _i++) {\n if (_.isNil(value[_i])) {\n _isValid = false;\n _message = generateInvalidArrayValueMessage(null, _i);\n _parsed = [];\n break;\n }\n if (_message = validateOption(value[_i], null, _i)) {\n _isValid = false;\n break;\n }\n }\n }\n } else {\n _isValid = true;\n _parsed = [];\n }\n } else {\n _parsed = [];\n _isValid = false;\n _message = invalidMessage;\n }\n } catch (e) {\n _parsed = [];\n _isValid = false;\n _message = invalidMessage;\n }\n return {\n isValid: _isValid,\n parsed: _parsed,\n messages: [_message]\n };\n}" + } + }, + "isTriggerProperty": false, + "dependencies": ["primaryColumns"], + "id": "38ok1jr5rc" + }, + { + "propertyName": "allowSameOptionsInNewRow", + "defaultValue": true, + "helpText": "Toggle to display same choices for new row and editing existing row in column", + "label": "Same options in new row", + "controlType": "SWITCH", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "dependencies": ["primaryColumns", "allowAddNewRow"], + "validation": { + "type": "BOOLEAN" + }, + "id": "y5jgo75r3w" + }, + { + "propertyName": "newRowSelectOptions", + "helpText": "Options exclusively displayed in the column for new row addition", + "label": "New row options", + "controlType": "INPUT_TEXT", + "isJSConvertible": false, + "isBindProperty": true, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": string | number, \"value\": string | number}>", + "example": "[{\"label\": \"abc\", \"value\": \"abc\"}]" + }, + "fnString": "function selectColumnOptionsValidation(value, props, _) {\n var _isValid = true,\n _parsed,\n _message = \"\";\n var uniqueValues;\n var invalidArrayValueMessage = \"This value does not evaluate to type: { \\\"label\\\": string | number, \\\"value\\\": string | number | boolean }\";\n var invalidMessage = \"This value does not evaluate to type Array<{ \\\"label\\\": string | number, \\\"value\\\": string | number | boolean }>\";\n var allowedValueTypes = [\"string\", \"number\", \"boolean\"];\n var allowedLabelTypes = [\"string\", \"number\"];\n var generateErrorMessagePrefix = function generateErrorMessagePrefix(rowIndex, optionIndex) {\n return \"Invalid entry at\".concat(rowIndex !== null ? \" Row: \".concat(rowIndex) : \"\", \" index: \").concat(optionIndex, \".\");\n };\n var generateInvalidArrayValueMessage = function generateInvalidArrayValueMessage(rowIndex, optionIndex) {\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" \").concat(invalidArrayValueMessage);\n };\n var validateOption = function validateOption(option, rowIndex, optionIndex) {\n /*\n * Option should\n * 1. be an object\n * 2. have label property\n * 3. label should be of type string | number\n * 4. have value property\n * 5. value should be of type string | number | boolean\n * 6. value should be unique amoig the options array\n */\n if (!_.isObject(option)) {\n // 1\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" This value does not evaluate to type: { \\\"label\\\": string | number, \\\"value\\\": string | number | boolean }\");\n }\n if (!option.hasOwnProperty(\"label\")) {\n // 2\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" Missing required key: label\");\n }\n if (!allowedLabelTypes.includes(typeof option.label)) {\n // 3\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" label does not evaluate to type \").concat(allowedLabelTypes.join(\" | \"));\n }\n if (!option.hasOwnProperty(\"value\")) {\n // 4\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" Missing required key: value\");\n }\n if (!allowedValueTypes.includes(typeof option.value)) {\n // 5\n return \"\".concat(generateErrorMessagePrefix(rowIndex, optionIndex), \" value does not evaluate to type \").concat(allowedValueTypes.join(\" | \"));\n }\n if (uniqueValues.has(option.value)) {\n // 6\n return \"Duplicate values found for the following properties, in the array entries, that must be unique -- value.\";\n } else {\n uniqueValues.add(option.value);\n }\n return \"\";\n };\n try {\n if (value === \"\" || _.isNil(value)) {\n // empty values\n return {\n isValid: true,\n parsed: [],\n messages: [\"\"]\n };\n } else if (typeof value === \"string\") {\n // json string\n var _value = JSON.parse(value);\n if (Array.isArray(_value)) {\n value = _value;\n } else {\n _isValid = false;\n _message = invalidMessage;\n }\n }\n if (Array.isArray(value)) {\n if (value.length) {\n //when value is array of option json string\n if (value.every(function (d) {\n return _.isString(d);\n })) {\n value = value.map(function (d) {\n return JSON.parse(d);\n });\n }\n if (Array.isArray(value) && Array.isArray(value[0])) {\n // value is array of array of label, value\n //Value should be an array of array\n if (!value.every(function (d) {\n return Array.isArray(d);\n })) {\n _parsed = [];\n _isValid = false;\n _message = invalidMessage;\n } else {\n _parsed = value;\n _isValid = true;\n for (var i = 0; i < value.length; i++) {\n uniqueValues = new Set();\n for (var j = 0; j < value[i].length; j++) {\n if (_.isNil(value[i][j])) {\n _isValid = false;\n _message = generateInvalidArrayValueMessage(i, j);\n _parsed = [];\n break;\n }\n if (_message = validateOption(value[i][j], i, j)) {\n _isValid = false;\n break;\n }\n }\n if (!_isValid) {\n break;\n }\n }\n }\n } else {\n uniqueValues = new Set();\n _parsed = value;\n _isValid = true;\n for (var _i = 0; _i < value.length; _i++) {\n if (_.isNil(value[_i])) {\n _isValid = false;\n _message = generateInvalidArrayValueMessage(null, _i);\n _parsed = [];\n break;\n }\n if (_message = validateOption(value[_i], null, _i)) {\n _isValid = false;\n break;\n }\n }\n }\n } else {\n _isValid = true;\n _parsed = [];\n }\n } else {\n _parsed = [];\n _isValid = false;\n _message = invalidMessage;\n }\n } catch (e) {\n _parsed = [];\n _isValid = false;\n _message = invalidMessage;\n }\n return {\n isValid: _isValid,\n parsed: _parsed,\n messages: [_message]\n };\n}" + } + }, + "isTriggerProperty": false, + "dependencies": ["primaryColumns", "allowAddNewRow"], + "id": "7ryqgtmter" + }, + { + "propertyName": "placeholderText", + "helpText": "Sets a Placeholder Text", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "y7yc9ucphw" + }, + { + "propertyName": "isFilterable", + "label": "Filterable", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "5r9thrnphn" + }, + { + "propertyName": "resetFilterTextOnClose", + "label": "Reset filter text on close", + "helpText": "Resets the filter text when the dropdown is closed", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "i90ov2x5vi" + }, + { + "propertyName": "serverSideFiltering", + "helpText": "Enables server side filtering of the data", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "tajz6lbfko" + } + ], + "id": "01rqrermfa" + }, + { + "sectionName": "Events", + "children": [ + { + "propertyName": "onClick", + "label": "onClick", + "helpText": "when user clicks on an image", + "controlType": "ACTION_SELECTOR", + "dependencies": ["primaryColumns", "columnOrder"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "hke0ss9pm2" + }, + { + "propertyName": "onSubmit", + "label": "onSubmit", + "helpText": "when the user presses enter or clicks outside the input box", + "controlType": "ACTION_SELECTOR", + "dependencies": [ + "primaryColumns", + "inlineEditingSaveOption" + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "s1oo1166si" + }, + { + "propertyName": "onOptionChange", + "label": "onOptionChange", + "helpText": "when user changes an option", + "controlType": "ACTION_SELECTOR", + "dependencies": ["primaryColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "4xt8icn0dr" + }, + { + "propertyName": "onCheckChange", + "label": "onChange", + "helpText": "when the check state is changed", + "controlType": "ACTION_SELECTOR", + "dependencies": ["primaryColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "uqb1cqg2qk" + }, + { + "propertyName": "onCheckChange", + "label": "onCheckChange", + "helpText": "when the check state is changed", + "controlType": "ACTION_SELECTOR", + "dependencies": ["primaryColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "f2cjhvr60x" + }, + { + "propertyName": "onFilterUpdate", + "helpText": "Trigger an action on change of filterText", + "dependencies": ["primaryColumns"], + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "oyspsurq9j" + }, + { + "propertyName": "onDateSelected", + "label": "onDateSelected", + "helpText": "when a date is selected in the calendar", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["primaryColumns"], + "id": "7gu0in9asx" + } + ], + "id": "byfzq48mvg" + }, + { + "sectionName": "Date Settings", + "children": [ + { + "propertyName": "firstDayOfWeek", + "label": "First Day Of Week", + "helpText": "Defines the first day of the week for calendar", + "controlType": "INPUT_TEXT", + "defaultValue": "0", + "inputType": "NUMBER", + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["primaryColumns", "columnType"], + "validation": { + "type": "FUNCTION", + "params": { + "fnString": "function allowedFirstDayOfWeekRange(value) {\n var allowedValues = [0, 1, 2, 3, 4, 5, 6];\n var isValid = allowedValues.includes(Number(value));\n return {\n isValid: isValid,\n parsed: isValid ? Number(value) : 0,\n messages: isValid ? [] : [\"Number should be between 0-6.\"]\n };\n}", + "expected": { + "type": "0 : sunday\n1 : monday\n2 : tuesday\n3 : wednesday\n4 : thursday\n5 : friday\n6 : saturday", + "example": "0", + "autocompleteDataType": "STRING" + } + } + }, + "id": "2700t4qow4" + }, + { + "propertyName": "shortcuts", + "label": "Show Shortcuts", + "helpText": "Choose to show shortcut menu", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["primaryColumns", "columnType"], + "id": "f8bcs6fqhg" + } + ], + "id": "atsraszxpl" + } + ], + "styleChildren": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "buttonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "fullWidth": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "helpText": "Sets the variant", + "dependencies": ["primaryColumns", "columnOrder"], + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "defaultValue": "PRIMARY", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "default": "PRIMARY", + "allowedValues": [ + "PRIMARY", + "SECONDARY", + "TERTIARY" + ] + } + } + }, + "id": "obocmxxg9e" + }, + { + "propertyName": "menuVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "fullWidth": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "helpText": "Sets the variant of the menu button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "defaultValue": "PRIMARY", + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "default": "PRIMARY", + "allowedValues": [ + "PRIMARY", + "SECONDARY", + "TERTIARY" + ] + } + } + }, + "id": "h5z5o066c1" + }, + { + "propertyName": "imageSize", + "dependencies": ["primaryColumns", "columnType"], + "label": "Image Size", + "helpText": "Sets the size of the image", + "defaultValue": "DEFAULT", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Default", + "value": "DEFAULT" + }, + { + "label": "Medium", + "value": "MEDIUM" + }, + { + "label": "Large", + "value": "LARGE" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "id": "jb28ks9ta0" + } + ], + "id": "9hk5di0bp7" + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "menuButtoniconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the menu button", + "dependencies": ["primaryColumns", "columnOrder"], + "controlType": "ICON_SELECT", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + } + }, + "id": "l0z65rjys6" + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the menu button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["primaryColumns", "columnOrder"], + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["left", "right"] + } + }, + "id": "cpcw7lmfqy" + } + ], + "id": "sro3g7vtyz" + }, + { + "sectionName": "Alignment", + "children": [ + { + "propertyName": "horizontalAlignment", + "label": "Horizontal Alignment", + "helpText": "Sets the horizontal alignment of the content in the column", + "controlType": "ICON_TABS", + "options": [ + { + "startIcon": "align-left", + "value": "LEFT" + }, + { + "startIcon": "align-center", + "value": "CENTER" + }, + { + "startIcon": "align-right", + "value": "RIGHT" + } + ], + "defaultValue": "LEFT", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": ["LEFT", "CENTER", "RIGHT"] + } + } + }, + "isTriggerProperty": false, + "id": "w2cvx4i5lq" + }, + { + "propertyName": "verticalAlignment", + "label": "Vertical alignment", + "helpText": "Sets the vertical alignment of the content in the column", + "controlType": "ICON_TABS", + "options": [ + { + "startIcon": "vertical-align-top", + "value": "TOP" + }, + { + "startIcon": "vertical-align-middle", + "value": "CENTER" + }, + { + "startIcon": "vertical-align-bottom", + "value": "BOTTOM" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": ["TOP", "CENTER", "BOTTOM"] + } + } + }, + "isTriggerProperty": false, + "id": "nfqtqzqqff" + } + ], + "id": "gy7nca3bah" + }, + { + "sectionName": "Text formatting", + "children": [ + { + "propertyName": "textSize", + "label": "Text size", + "helpText": "Controls the size of text in the column", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + } + ], + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "hhddeq6c60" + }, + { + "propertyName": "fontStyle", + "label": "Emphasis", + "helpText": "Controls the style of the text in the column", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + }, + { + "icon": "text-underline", + "value": "UNDERLINE" + } + ], + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "123ddsxwmx" + }, + { + "propertyName": "horizontalAlignment", + "label": "Text align", + "helpText": "Sets the horizontal alignment of the content in the column", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "startIcon": "align-left", + "value": "LEFT" + }, + { + "startIcon": "align-center", + "value": "CENTER" + }, + { + "startIcon": "align-right", + "value": "RIGHT" + } + ], + "defaultValue": "LEFT", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": ["LEFT", "CENTER", "RIGHT"] + } + } + }, + "isTriggerProperty": false, + "id": "g3v1jsfrvb" + }, + { + "propertyName": "verticalAlignment", + "label": "Vertical alignment", + "helpText": "Sets the vertical alignment of the content in the column", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "startIcon": "vertical-align-top", + "value": "TOP" + }, + { + "startIcon": "vertical-align-middle", + "value": "CENTER" + }, + { + "startIcon": "vertical-align-bottom", + "value": "BOTTOM" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": ["TOP", "CENTER", "BOTTOM"] + } + } + }, + "isTriggerProperty": false, + "id": "hobi6s50jj" + } + ], + "id": "uhnbk29qxy" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "buttonColor", + "label": "Button color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "helpText": "Changes the color of the button", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "isTriggerProperty": false, + "id": "bi50jw6z9j" + }, + { + "propertyName": "menuColor", + "helpText": "Sets the custom color preset based on the menu button variant", + "label": "Button color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "dependencies": [ + "primaryColumns", + "columnOrder", + "childStylesheet" + ], + "id": "vugdn00cwv" + }, + { + "propertyName": "cellBackground", + "label": "Cell Background", + "helpText": "Changes the background color of the cell", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "isTriggerProperty": false, + "id": "gduk1zyztw" + }, + { + "propertyName": "textColor", + "label": "Text color", + "helpText": "Controls the color of text in the column", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "isTriggerProperty": false, + "id": "iuxtcj50wr" + } + ], + "id": "8xwwqohsys" + }, + { + "sectionName": "Save Button", + "children": [ + { + "sectionName": "General", + "collapsible": false, + "children": [ + { + "propertyName": "saveButtonColor", + "label": "Button color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "helpText": "Changes the color of the button", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "isTriggerProperty": false, + "id": "34vl9nidp2" + }, + { + "propertyName": "saveButtonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "fullWidth": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "helpText": "Sets the variant of the save button", + "dependencies": ["primaryColumns"], + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "defaultValue": "PRIMARY", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "default": "PRIMARY", + "allowedValues": [ + "PRIMARY", + "SECONDARY", + "TERTIARY" + ] + } + } + }, + "id": "m47n3iw9wi" + }, + { + "propertyName": "saveBorderRadius", + "label": "Border radius", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "helpText": "Rounds the corners of the save button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "dependencies": ["primaryColumns"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "c5jow7x3es" + } + ], + "id": "94c28h3q8p" + }, + { + "sectionName": "Icon", + "collapsible": false, + "children": [ + { + "propertyName": "saveActionIconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the save action button", + "dependencies": ["primaryColumns", "columnOrder"], + "controlType": "ICON_SELECT", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + } + }, + "id": "kiwj377wnp" + }, + { + "propertyName": "saveIconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the save button", + "controlType": "ICON_TABS", + "fullWidth": false, + "defaultValue": "left", + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["primaryColumns"], + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["left", "right"] + } + }, + "id": "fk0ud6rvqc" + } + ], + "id": "fc5juljr68" + } + ], + "id": "yc1nsiakhj" + }, + { + "sectionName": "Discard Button", + "children": [ + { + "sectionName": "General", + "collapsible": false, + "children": [ + { + "propertyName": "discardButtonColor", + "label": "Button color", + "controlType": "PRIMARY_COLUMNS_COLOR_PICKER_V2", + "helpText": "Changes the color of the button", + "isJSConvertible": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "dependencies": ["primaryColumns"], + "isBindProperty": true, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + "isTriggerProperty": false, + "id": "eeb836mp9o" + }, + { + "propertyName": "discardButtonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "fullWidth": true, + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "helpText": "Sets the variant of the discard button", + "dependencies": ["primaryColumns"], + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "defaultValue": "PRIMARY", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "default": "PRIMARY", + "allowedValues": [ + "PRIMARY", + "SECONDARY", + "TERTIARY" + ] + } + } + }, + "id": "qjy72hfr6d" + }, + { + "propertyName": "discardBorderRadius", + "label": "Border radius", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "helpText": "Rounds the corners of the discard button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "dependencies": ["primaryColumns"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "g2c53i34wn" + } + ], + "id": "5c0ttivicc" + }, + { + "sectionName": "Icon", + "collapsible": false, + "children": [ + { + "propertyName": "discardActionIconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the discard action button", + "dependencies": ["primaryColumns", "columnOrder"], + "controlType": "ICON_SELECT", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + } + }, + "id": "msyeavpoho" + }, + { + "propertyName": "discardIconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the discard button", + "controlType": "ICON_TABS", + "fullWidth": false, + "defaultValue": "left", + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["primaryColumns"], + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["left", "right"] + } + }, + "id": "a42dbel7ic" + } + ], + "id": "eqrg2qn5br" + } + ], + "id": "rk9ibk1mly" + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "em2edcmoi8" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "customJSControl": "TABLE_COMPUTE_VALUE", + "isJSConvertible": true, + "dependencies": ["primaryColumns", "columnOrder"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY_OF_TYPE_OR_TYPE", + "params": { + "type": "TEXT" + } + }, + "id": "dbxzk3x48d" + } + ], + "id": "3y5ipoe53y" + } + ] + }, + "id": "7zloijv8vb" + }, + { + "propertyName": "inlineEditingSaveOption", + "helpText": "Choose the save experience to save the edited cell", + "label": "Update mode", + "controlType": "ICON_TABS", + "defaultValue": "ROW_LEVEL", + "fullWidth": true, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": [ + "primaryColumns", + "columnOrder", + "childStylesheet", + "showInlineEditingOptionDropdown" + ], + "options": [ + { + "label": "Single Row", + "value": "ROW_LEVEL" + }, + { + "label": "Multi Row", + "value": "CUSTOM" + } + ], + "id": "regudmi7py" + }, + { + "helpText": "Assigns a unique column which helps maintain selectedRows and triggeredRows based on value", + "propertyName": "primaryColumnId", + "dependencies": ["primaryColumns"], + "label": "Primary key column", + "controlType": "PRIMARY_COLUMNS_DROPDOWN", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "ajb9vedjl3" + } + ], + "id": "t8zg8xazbf" + }, + { + "sectionName": "Pagination", + "children": [ + { + "propertyName": "isVisiblePagination", + "helpText": "Toggle visibility of the pagination", + "label": "Show pagination", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "ve6k83fxrn" + }, + { + "helpText": "Bind the Table.pageNo property in your API and call it onPageChange", + "propertyName": "serverSidePaginationEnabled", + "label": "Server side pagination", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "id": "2mcuyym0gc" + }, + { + "helpText": "It stores the total no. of rows in the table. Helps in calculating the no. of pages that further allows to enable or disable the next/previous control in pagination.", + "propertyName": "totalRecordsCount", + "label": "Total Records", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter total record count", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Number", + "example": "10", + "autocompleteDataType": "STRING" + }, + "fnString": "function totalRecordsCountValidation(value, props, _) {\n var ERROR_MESSAGE = \"This value must be a number\";\n var defaultValue = 0;\n\n /*\n * Undefined, null and empty string\n */\n if (_.isNil(value) || value === \"\") {\n return {\n isValid: true,\n parsed: defaultValue,\n messages: []\n };\n } else if (!_.isFinite(value) && !_.isString(value) || _.isString(value) && !/^\\d+\\.?\\d*$/.test(value)) {\n /*\n * objects, array, string (but not cast-able to number type)\n */\n return {\n isValid: false,\n parsed: defaultValue,\n messages: [{\n name: \"ValidationError\",\n message: ERROR_MESSAGE\n }]\n };\n } else {\n /*\n * Number or number type cast-able\n */\n return {\n isValid: true,\n parsed: Number(value),\n messages: []\n };\n }\n}" + } + }, + "dependencies": ["serverSidePaginationEnabled"], + "id": "192q32jez8" + }, + { + "helpText": "when a table page is changed", + "propertyName": "onPageChange", + "label": "onPageChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["serverSidePaginationEnabled"], + "id": "vha6l94kx0" + }, + { + "helpText": "when a table page size is changed", + "propertyName": "onPageSizeChange", + "label": "onPageSizeChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["serverSidePaginationEnabled"], + "id": "m8bv8vhhhy" + } + ], + "id": "y4g5zmbpq9" + }, + { + "sectionName": "Search & filters", + "children": [ + { + "propertyName": "isVisibleSearch", + "helpText": "Toggle visibility of the search box", + "label": "Allow searching", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "3jofmvmp8r" + }, + { + "propertyName": "enableClientSideSearch", + "label": "Client side search", + "helpText": "Searches all results only on the data which is loaded", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["isVisibleSearch"], + "id": "e40ku8h0y2" + }, + { + "propertyName": "enableServerSideFiltering", + "label": "Server side filtering", + "helpText": "Filters all the results on the server side", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "defaultValue": false, + "id": "d2ixy0ikiy" + }, + { + "propertyName": "onTableFilterUpdate", + "label": "onTableFilterUpdate", + "helpText": "when table filter is modified by the user", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["enableServerSideFiltering"], + "id": "tucb8ise47" + }, + { + "propertyName": "defaultSearchText", + "label": "Default search text", + "helpText": "Adds a search text by default", + "controlType": "INPUT_TEXT", + "placeholderText": "{{appsmith.user.name}}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["isVisibleSearch"], + "id": "a63q0vwszc" + }, + { + "propertyName": "onSearchTextChanged", + "label": "onSearchTextChanged", + "helpText": "when search text is modified by the user", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["isVisibleSearch"], + "id": "gbt57d4pcx" + }, + { + "propertyName": "isVisibleFilters", + "helpText": "Toggle visibility of the filters", + "label": "Allow filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "y11cmstmq7" + } + ], + "id": "my1q9ywbm1" + }, + { + "sectionName": "Row selection", + "children": [ + { + "helpText": "Selects row(s) by default", + "propertyName": "defaultSelectedRowIndices", + "label": "Default selected rows", + "controlType": "INPUT_TEXT", + "placeholderText": "[0]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "children": { + "type": "NUMBER", + "params": { + "min": -1, + "default": -1 + } + } + } + }, + "dependencies": ["multiRowSelection"], + "id": "veccvxuszj" + }, + { + "helpText": "Selects row by default", + "propertyName": "defaultSelectedRowIndex", + "label": "Default selected row", + "controlType": "INPUT_TEXT", + "defaultValue": 0, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": -1, + "default": -1 + } + }, + "dependencies": ["multiRowSelection"], + "id": "fsau595fzs" + }, + { + "propertyName": "multiRowSelection", + "label": "Enable multi-row selection", + "helpText": "Allows users to select multiple rows", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false, + "id": "1k77636et7" + }, + { + "helpText": "when a table row is selected", + "propertyName": "onRowSelected", + "label": "onRowSelected", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "67jr8vfcsz" + } + ], + "id": "mw0n7w3ona" + }, + { + "sectionName": "Sorting", + "children": [ + { + "helpText": "Controls sorting in View Mode", + "propertyName": "isSortable", + "isJSConvertible": true, + "label": "Column sorting", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + }, + "id": "h9gk69hczy" + }, + { + "helpText": "when a table column is sorted", + "propertyName": "onSort", + "label": "onSort", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["isSortable"], + "id": "yax2sdfdo8" + } + ], + "id": "m14q9aatjf" + }, + { + "sectionName": "Adding a row", + "children": [ + { + "propertyName": "allowAddNewRow", + "helpText": "Enables adding a new row", + "isJSConvertible": true, + "label": "Allow adding a row", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "h64k09sh5q" + }, + { + "propertyName": "onAddNewRowSave", + "helpText": "when a add new row save button is clicked", + "label": "onSave", + "controlType": "ACTION_SELECTOR", + "dependencies": ["allowAddNewRow", "primaryColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "oetc3w7vog" + }, + { + "propertyName": "onAddNewRowDiscard", + "helpText": "when a add new row discard button is clicked", + "label": "onDiscard", + "controlType": "ACTION_SELECTOR", + "dependencies": ["allowAddNewRow"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "id": "mvd5xm8qrx" + }, + { + "propertyName": "defaultNewRow", + "helpText": "Default new row values", + "label": "Default values", + "controlType": "INPUT_TEXT", + "dependencies": ["allowAddNewRow"], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "OBJECT", + "params": { + "default": {} + } + }, + "id": "f4lesjnoc6" + } + ], + "id": "mx7cacn4av" + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "isJSConvertible": true, + "label": "Visible", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "d32jtfj6sl" + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "l4d32fza2y" + }, + { + "propertyName": "isVisibleDownload", + "helpText": "Toggle visibility of the data download", + "label": "Allow download", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "0dqunsgawx" + }, + { + "propertyName": "canFreezeColumn", + "helpText": "Controls whether the user can freeze columns", + "label": "Allow column freeze", + "controlType": "SWITCH", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "id": "t6qg62410e" + }, + { + "propertyName": "delimiter", + "label": "CSV separator", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter CSV separator", + "helpText": "The character used for separating the CSV download file.", + "isBindProperty": true, + "isTriggerProperty": false, + "defaultValue": ",", + "validation": { + "type": "TEXT" + }, + "dependencies": ["isVisibleDownload"], + "id": "ljg1aonvwj" + } + ], + "id": "zbuessmrk1" + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "compactMode", + "helpText": "Selects row height", + "label": "Default row height", + "controlType": "ICON_TABS", + "fullWidth": true, + "defaultValue": "DEFAULT", + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "label": "Short", + "value": "SHORT" + }, + { + "label": "Default", + "value": "DEFAULT" + }, + { + "label": "Tall", + "value": "TALL" + } + ], + "id": "mpai0aexua" + } + ], + "id": "aakou6bp6b" + }, + { + "sectionName": "Text formatting", + "children": [ + { + "propertyName": "textSize", + "label": "Text size", + "helpText": "Controls the size of text in the column", + "controlType": "DROP_DOWN", + "dependencies": ["primaryColumns"], + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "o2nqk29sgn" + }, + { + "propertyName": "fontStyle", + "label": "Emphasis", + "helpText": "Controls the style of the text in the column", + "controlType": "BUTTON_GROUP", + "dependencies": ["primaryColumns"], + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "5y1tq6wx79" + }, + { + "propertyName": "horizontalAlignment", + "label": "Text align", + "helpText": "Sets the horizontal alignment of the content in the column", + "controlType": "ICON_TABS", + "fullWidth": true, + "dependencies": ["primaryColumns"], + "options": [ + { + "startIcon": "align-left", + "value": "LEFT" + }, + { + "startIcon": "align-center", + "value": "CENTER" + }, + { + "startIcon": "align-right", + "value": "RIGHT" + } + ], + "defaultValue": "LEFT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["LEFT", "CENTER", "RIGHT"] + } + }, + "id": "w3g5qetqwi" + }, + { + "propertyName": "verticalAlignment", + "label": "Vertical alignment", + "helpText": "Sets the vertical alignment of the content in the column", + "controlType": "ICON_TABS", + "fullWidth": true, + "dependencies": ["primaryColumns"], + "options": [ + { + "startIcon": "vertical-align-top", + "value": "TOP" + }, + { + "startIcon": "vertical-align-middle", + "value": "CENTER" + }, + { + "startIcon": "vertical-align-bottom", + "value": "BOTTOM" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["TOP", "CENTER", "BOTTOM"] + } + }, + "id": "1xd5i3ka27" + } + ], + "id": "35v2ipaao0" + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "cellBackground", + "label": "Cell background color", + "helpText": "Changes the background color of the cell", + "controlType": "COLOR_PICKER", + "dependencies": ["primaryColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "jflcu1ckks" + }, + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true, + "id": "y9k6eh6s8e" + }, + { + "propertyName": "textColor", + "label": "Text color", + "helpText": "Controls the color of text in the column", + "controlType": "COLOR_PICKER", + "dependencies": ["primaryColumns"], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "9m9jc8gps1" + } + ], + "id": "qysvygdz49" + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "variant", + "helpText": "Selects the variant", + "label": "Cell borders", + "controlType": "DROP_DOWN", + "defaultValue": "DEFAULT", + "isBindProperty": true, + "isTriggerProperty": false, + "options": [ + { + "label": "Default", + "value": "DEFAULT" + }, + { + "label": "No borders", + "value": "VARIANT2" + }, + { + "label": "Horizonal borders only", + "value": "VARIANT3" + } + ], + "id": "p6osj22u5a" + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "arl8ctdm21" + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "23sm0zsdfd" + }, + { + "helpText": "Use a html color name, HEX, RGB or RGBA value", + "placeholderText": "#FFFFFF / Gray / rgb(255, 99, 71)", + "propertyName": "borderColor", + "label": "Border color", + "controlType": "COLOR_PICKER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "id": "g2wlgek8sa" + }, + { + "helpText": "Enter value for border width", + "propertyName": "borderWidth", + "label": "Border width", + "placeholderText": "Enter value in px", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "id": "nbhtii9bv1" + } + ], + "id": "e5azksqiss" + } + ], + "features": null + }, + "NUMBER_SLIDER_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "min", + "helpText": "Sets the min value of the widget", + "label": "Min. value", + "controlType": "INPUT_TEXT", + "placeholderText": "0", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "0", + "autocompleteDataType": "NUMBER" + } + } + } + }, + { + "propertyName": "max", + "helpText": "Sets the max value of the widget", + "label": "Max. value", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + } + } + } + }, + { + "propertyName": "step", + "helpText": "The amount by which the slider value should increase", + "label": "Step size", + "controlType": "INPUT_TEXT", + "placeholderText": "10", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + } + } + } + }, + { + "propertyName": "defaultValue", + "helpText": "Sets the value of the widget", + "label": "Default value", + "controlType": "INPUT_TEXT", + "placeholderText": "Value:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "50", + "autocompleteDataType": "NUMBER" + } + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Left", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "showMarksLabel", + "helpText": "Show the marks label below the slider", + "label": "Show marks", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Display Value Marks", + "propertyName": "marks", + "label": "Marks", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"value\": \"20\", \"label\": \"20%\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["showMarksLabel"], + "validation": { + "type": "ARRAY", + "params": { + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "value", + "type": "NUMBER", + "params": { + "default": "", + "requiredKey": true + } + }, + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "requiredKey": true + } + } + ] + } + } + } + } + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables clicks to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "tooltipAlwaysOn", + "helpText": "Keep showing the tooltip with value", + "label": "Show value always", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a user changes the slider value", + "propertyName": "onChange", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the size of the slider", + "propertyName": "sliderSize", + "label": "Size", + "controlType": "ICON_TABS", + "fullWidth": true, + "defaultValue": "m", + "options": [ + { + "label": "S", + "value": "s", + "subText": "4px" + }, + { + "label": "M", + "value": "m", + "subText": "6px" + }, + { + "label": "L", + "value": "l", + "subText": "8px" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "helpText": "Sets the fill color of the widget", + "propertyName": "accentColor", + "label": "Fill color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "RANGE_SLIDER_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "min", + "helpText": "Sets the min value of the widget", + "label": "Min. value", + "controlType": "INPUT_TEXT", + "placeholderText": "0", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "0", + "autocompleteDataType": "NUMBER" + } + } + } + }, + { + "propertyName": "max", + "helpText": "Sets the max value of the widget", + "label": "Max. value", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + } + } + } + }, + { + "propertyName": "step", + "helpText": "The amount by which the slider value should increase", + "label": "Step size", + "controlType": "INPUT_TEXT", + "placeholderText": "10", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + } + } + } + }, + { + "propertyName": "minRange", + "helpText": "Sets the min range of the widget", + "label": "Min. range", + "controlType": "INPUT_TEXT", + "placeholderText": "10", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + } + } + } + }, + { + "propertyName": "defaultStartValue", + "helpText": "Sets the start value of the widget", + "label": "Default start value", + "controlType": "INPUT_TEXT", + "placeholderText": "Start Value:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "20", + "autocompleteDataType": "NUMBER" + } + } + } + }, + { + "propertyName": "defaultEndValue", + "helpText": "Sets the end value of the widget", + "label": "Default end value", + "controlType": "INPUT_TEXT", + "placeholderText": "End Value:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "40", + "autocompleteDataType": "NUMBER" + } + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Left", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "showMarksLabel", + "helpText": "Show the marks label below the slider", + "label": "Show marks", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Display Value Marks", + "propertyName": "marks", + "label": "Marks", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"value\": \"20\", \"label\": \"20%\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["showMarksLabel"], + "validation": { + "type": "ARRAY", + "params": { + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "value", + "type": "NUMBER", + "params": { + "default": "", + "requiredKey": true + } + }, + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "requiredKey": true + } + } + ] + } + } + } + } + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables clicks to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "tooltipAlwaysOn", + "helpText": "Keep showing the label with value", + "label": "Show value always", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a user changes the slider value", + "propertyName": "onStartValueChange", + "label": "onStartValueChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when a user changes the slider value", + "propertyName": "onEndValueChange", + "label": "onEndValueChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the size of the slider", + "propertyName": "sliderSize", + "label": "Size", + "controlType": "ICON_TABS", + "fullWidth": true, + "defaultValue": "m", + "options": [ + { + "label": "S", + "value": "s", + "subText": "4px" + }, + { + "label": "M", + "value": "m", + "subText": "6px" + }, + { + "label": "L", + "value": "l", + "subText": "8px" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Label text size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "helpText": "Sets the fill color of the widget", + "propertyName": "accentColor", + "label": "Fill color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "CATEGORY_SLIDER_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Displays a list of unique options", + "propertyName": "options", + "label": "Options", + "controlType": "OPTION_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array<{ \"label\": \"string\", \"value\": \"string\" | number}>", + "example": "[{\"label\": \"One\", \"value\": \"one\"}]", + "autocompleteDataType": "STRING" + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Sets a default selected option", + "propertyName": "defaultOptionValue", + "label": "Default value", + "placeholderText": "Y", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string |\nnumber (only works in mustache syntax)", + "example": "abc | {{1}}", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + } + ], + "defaultValue": "Left", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show help text or details about current input", + "propertyName": "labelTooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "showMarksLabel", + "helpText": "Controls the visibility of the marks Label widget", + "label": "Show marks", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables clicks to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a user changes the slider value", + "propertyName": "onChange", + "label": "onChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Controls the size of the slider", + "propertyName": "sliderSize", + "label": "Size", + "controlType": "ICON_TABS", + "fullWidth": true, + "defaultValue": "m", + "options": [ + { + "label": "S", + "value": "s", + "subText": "4px" + }, + { + "label": "M", + "value": "m", + "subText": "6px" + }, + { + "label": "L", + "value": "l", + "subText": "8px" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Font color", + "helpText": "Control the color of the label associated", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Font size", + "helpText": "Control the font size of the label associated", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Emphasis", + "helpText": "Control if the label should be bold or italics", + "controlType": "BUTTON_GROUP", + "options": [ + { + "icon": "text-bold", + "value": "BOLD" + }, + { + "icon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "helpText": "Sets the fill color of the widget", + "propertyName": "accentColor", + "label": "Fill color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "CODE_SCANNER_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "scannerLayout", + "label": "Scanner layout", + "controlType": "ICON_TABS", + "defaultValue": "ALWAYS_ON", + "fullWidth": true, + "helpText": "Sets how the code scanner will look and behave. If set to \"Always on\", the scanner will be visible and scanning all the time. If set to \"Click to Scan\", the scanner will pop up inside a modal and start scanning when the user clicks on the button.", + "options": [ + { + "label": "Always on", + "value": "ALWAYS_ON" + }, + { + "label": "Click to scan", + "value": "CLICK_TO_SCAN" + } + ], + "isJSConvertible": false, + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "helpText": "Sets the label of the button", + "placeholderText": "Scan a QR/Barcode", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["scannerLayout"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Show helper text with button on hover", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Add Input Field", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["scannerLayout"] + }, + { + "propertyName": "defaultCamera", + "label": "Default mobile camera", + "helpText": "Default choice for mobile users. Not applicable for other devices", + "controlType": "DROP_DOWN", + "defaultValue": "environment", + "options": [ + { + "label": "Front (Selfie)", + "value": "user" + }, + { + "label": "Back (Rear)", + "value": "environment" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["user", "environment"], + "default": "environment" + } + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a valid code is detected", + "propertyName": "onCodeDetected", + "label": "onCodeDetected", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Select icon", + "helpText": "Sets the icon to be used for the button", + "controlType": "ICON_SELECT", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["iconAlign", "scannerLayout"], + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + }, + "dependencies": ["scannerLayout"] + }, + { + "propertyName": "placement", + "label": "Placement", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the space between items", + "options": [ + { + "label": "Start", + "value": "START" + }, + { + "label": "Between", + "value": "BETWEEN" + }, + { + "label": "Center", + "value": "CENTER" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["START", "BETWEEN", "CENTER"], + "default": "CENTER" + } + }, + "dependencies": ["scannerLayout"] + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "buttonColor", + "helpText": "Sets the background color of the button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + }, + "dependencies": ["scannerLayout"] + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "LIST_WIDGET_V2": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "propertyName": "listData", + "helpText": "Reference or write an array to display in the List.", + "label": "Items", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"name\": \"John\" }]", + "inputType": "ARRAY", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "default": [] + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "propertyName": "primaryKeys", + "helperText": "Like keys in React, you must include a primary data identifier, often a column from your datasource. You could also combine two columns or data attributes.", + "label": "Data Identifier", + "controlType": "DROP_DOWN", + "dropdownUsePropertyValue": true, + "customJSControl": "LIST_COMPUTE_CONTROL", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "dependencies": ["listData"], + "evaluatedDependencies": ["listData"], + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array", + "example": "[\"1\", \"2\", \"3\"]", + "autocompleteDataType": "ARRAY" + } + } + } + } + ] + }, + { + "sectionName": "Pagination", + "children": [ + { + "propertyName": "serverSidePagination", + "helpText": "Triggered by onPageChange, this helps you show your data one page at a time for better performance.", + "label": "Server side pagination", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "totalRecordsCount", + "helpText": "Count of all the records in the source data for the list. This helps us calculate the number of pages to be shown", + "label": "Total Records", + "controlType": "INPUT_TEXT", + "inputType": "INTEGER", + "isBindProperty": true, + "isTriggerProperty": false, + "placeholderText": "Enter total record count", + "validation": { + "type": "NUMBER", + "params": { + "min": 0, + "max": 9007199254740991 + } + }, + "dependencies": ["serverSidePagination"] + }, + { + "propertyName": "onPageChange", + "helpText": "Configure one or chain multiple actions when the page is changed in a List. All nested Actions run at the same time.", + "label": "onPageChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["serverSidePagination"] + } + ] + }, + { + "sectionName": "Item selection", + "children": [ + { + "propertyName": "defaultSelectedItem", + "helpText": "Selects Item by default by using a valid data identifier", + "label": "Default selected item", + "controlType": "INPUT_TEXT", + "placeholderText": "001", + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["serverSidePagination"], + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + } + } + } + }, + { + "propertyName": "onItemClick", + "helpText": "Triggers an action when an item in this List is clicked", + "label": "onItemClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["listData"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Toggles the visibility of this List to end users", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Toggles the loading animation of this List on and off for end-users", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "itemSpacing", + "helpText": "Sets the spacing between items in pixels to a max 16 px", + "placeholderText": "0", + "label": "Item Spacing (px)", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "inputType": "INTEGER", + "validation": { + "type": "NUMBER", + "params": { + "min": 0, + "max": 16 + } + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "backgroundColor", + "label": "Background color", + "helpText": "Sets the background color of this List", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "expected": { + "type": "Color name | hex code", + "example": "#FFFFFF", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the List's border", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Drops a shadow from the frame of this List", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "BUTTON_WIDGET_V2": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "text", + "label": "Label", + "helpText": "Sets the label of the button", + "controlType": "INPUT_TEXT", + "placeholderText": "Submit", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "when the button is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show helper text with button on hover", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Submits Form", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables clicks to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "googleRecaptchaKey", + "label": "Google reCAPTCHA key", + "helpText": "Sets Google reCAPTCHA site key for the button", + "controlType": "INPUT_TEXT", + "placeholderText": "reCAPTCHA Key", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "recaptchaType", + "label": "Google reCAPTCHA version", + "controlType": "DROP_DOWN", + "helpText": "Select reCAPTCHA version", + "options": [ + { + "label": "reCAPTCHA v3", + "value": "V3" + }, + { + "label": "reCAPTCHA v2", + "value": "V2" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["V3", "V2"], + "default": "V3" + } + } + } + ] + }, + { + "sectionName": "Form settings", + "children": [ + { + "helpText": "Disabled if the form is invalid, if this widget exists directly within a Form widget.", + "propertyName": "disabledWhenInvalid", + "label": "Disabled invalid forms", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Resets the fields of the form, on click, if this widget exists directly within a Form widget.", + "propertyName": "resetFormOnClick", + "label": "Reset form on success", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "buttonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the variant of the button", + "options": [ + { + "label": "Filled", + "value": "filled" + }, + { + "label": "Outlined", + "value": "outlined" + }, + { + "label": "Ghost", + "value": "ghost" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["filled", "outlined", "ghost"], + "default": "filled" + } + } + }, + { + "propertyName": "buttonColor", + "label": "Button color", + "controlType": "DROP_DOWN", + "fullWidth": true, + "helpText": "Sets the semantic color of the button", + "options": [ + { + "label": "Accent", + "value": "accent" + }, + { + "label": "Neutral", + "value": "neutral" + }, + { + "label": "Positive", + "value": "positive" + }, + { + "label": "Negative", + "value": "negative" + }, + { + "label": "Warning", + "value": "warning" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "accent", + "neutral", + "positive", + "negative", + "warning" + ], + "default": "accent" + } + } + } + ] + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Select icon", + "helpText": "Sets the icon to be used for the button", + "controlType": "ICON_SELECT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the button", + "controlType": "ICON_TABS", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "start" + }, + { + "startIcon": "skip-right-line", + "value": "end" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["start", "end"] + } + } + } + ] + } + ], + "features": null + }, + "INPUT_WIDGET_V3": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Changes the type of data captured in the input", + "propertyName": "inputType", + "label": "Data type", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Single-line text", + "value": "TEXT" + }, + { + "label": "Multi-line text", + "value": "MULTI_LINE_TEXT" + }, + { + "label": "Number", + "value": "NUMBER" + }, + { + "label": "Password", + "value": "PASSWORD" + }, + { + "label": "Email", + "value": "EMAIL" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["dynamicHeight"] + }, + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultText", + "label": "Default value", + "controlType": "INPUT_TEXT", + "placeholderText": "John Doe", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["inputType"] + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "shouldAllowAutofill", + "label": "Allow autofill", + "helpText": "Allow users to autofill values from browser", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Show help text or details about current input", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Value must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets a placeholder text for the input", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Disables input to this widget", + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Focus input automatically on load", + "propertyName": "autoFocus", + "label": "Auto focus", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "allowFormatting", + "label": "Enable formatting", + "helpText": "Formats the phone number as per the country selected", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Sets maximum allowed text length", + "propertyName": "maxChars", + "label": "Max characters", + "controlType": "INPUT_TEXT", + "placeholderText": "255", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": 1, + "natural": true, + "passThroughOnZero": false + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Sets the minimum allowed value", + "propertyName": "minNum", + "label": "Min", + "controlType": "INPUT_TEXT", + "placeholderText": "1", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "1", + "autocompleteDataType": "NUMBER" + } + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Sets the maximum allowed value", + "propertyName": "maxNum", + "label": "Max", + "controlType": "INPUT_TEXT", + "placeholderText": "100", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "number", + "example": "100", + "autocompleteDataType": "NUMBER" + } + } + }, + "dependencies": ["inputType"] + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Adds a validation to the input which displays an error on failure", + "propertyName": "regex", + "label": "Regex", + "controlType": "INPUT_TEXT", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + } + }, + { + "helpText": "Sets the input validity based on a JS expression", + "propertyName": "validation", + "label": "Valid", + "controlType": "INPUT_TEXT", + "placeholderText": "{{ Input1.text.length > 0 }}", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN", + "params": { + "default": true + } + } + }, + { + "helpText": "The error message to display if the regex or valid property check fails", + "propertyName": "errorMessage", + "label": "Error message", + "controlType": "INPUT_TEXT", + "placeholderText": "Not a valid value!", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the text is changed", + "propertyName": "onTextChanged", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the input field receives focus", + "propertyName": "onFocus", + "label": "onFocus", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "when the input field loses focus", + "propertyName": "onBlur", + "label": "onBlur", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "on submit (when the enter key is pressed)", + "propertyName": "onSubmit", + "label": "onSubmit", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "Clears the input value after submit", + "propertyName": "resetOnSubmit", + "label": "Reset on submit", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used in input field", + "controlType": "ICON_SELECT", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": true, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": [ + "add", + "add-column-left", + "add-column-right", + "add-row-bottom", + "add-row-top", + "add-to-artifact", + "add-to-folder", + "airplane", + "alignment-bottom", + "alignment-horizontal-center", + "alignment-left", + "alignment-right", + "alignment-top", + "alignment-vertical-center", + "align-center", + "align-justify", + "align-left", + "align-right", + "annotation", + "application", + "applications", + "app-header", + "archive", + "array", + "array-boolean", + "array-date", + "array-numeric", + "array-string", + "array-timestamp", + "arrows-horizontal", + "arrows-vertical", + "arrow-bottom-left", + "arrow-bottom-right", + "arrow-down", + "arrow-left", + "arrow-right", + "arrow-top-left", + "arrow-top-right", + "arrow-up", + "asterisk", + "automatic-updates", + "backlink", + "badge", + "bank-account", + "ban-circle", + "barcode", + "blank", + "blocked-person", + "bold", + "book", + "bookmark", + "box", + "briefcase", + "bring-data", + "build", + "calculator", + "calendar", + "camera", + "caret-down", + "caret-left", + "caret-right", + "caret-up", + "cell-tower", + "changes", + "chart", + "chat", + "chevron-backward", + "chevron-down", + "chevron-forward", + "chevron-left", + "chevron-right", + "chevron-up", + "circle", + "circle-arrow-down", + "circle-arrow-left", + "circle-arrow-right", + "circle-arrow-up", + "citation", + "clean", + "clipboard", + "cloud", + "cloud-download", + "cloud-upload", + "code", + "code-block", + "cog", + "collapse-all", + "column-layout", + "comment", + "comparison", + "compass", + "compressed", + "confirm", + "console", + "contrast", + "control", + "credit-card", + "cross", + "crown", + "cube", + "cube-add", + "cube-remove", + "curved-range-chart", + "cut", + "cycle", + "dashboard", + "database", + "data-connection", + "data-lineage", + "delete", + "delta", + "derive-column", + "desktop", + "diagnosis", + "diagram-tree", + "direction-left", + "direction-right", + "disable", + "document", + "document-open", + "document-share", + "dollar", + "dot", + "double-caret-horizontal", + "double-caret-vertical", + "double-chevron-down", + "double-chevron-left", + "double-chevron-right", + "double-chevron-up", + "doughnut-chart", + "download", + "drag-handle-horizontal", + "drag-handle-vertical", + "draw", + "drawer-left", + "drawer-left-filled", + "drawer-right", + "drawer-right-filled", + "drive-time", + "duplicate", + "edit", + "eject", + "endorsed", + "envelope", + "equals", + "eraser", + "error", + "euro", + "exchange", + "exclude-row", + "expand-all", + "export", + "eye-off", + "eye-on", + "eye-open", + "fast-backward", + "fast-forward", + "feed", + "feed-subscribed", + "film", + "filter", + "filter-keep", + "filter-list", + "filter-open", + "filter-remove", + "flag", + "flame", + "flash", + "floppy-disk", + "flows", + "flow-branch", + "flow-end", + "flow-linear", + "flow-review", + "flow-review-branch", + "folder-close", + "folder-new", + "folder-open", + "folder-shared", + "folder-shared-open", + "follower", + "following", + "font", + "fork", + "form", + "fullscreen", + "full-circle", + "full-stacked-chart", + "function", + "gantt-chart", + "geofence", + "geolocation", + "geosearch", + "git-branch", + "git-commit", + "git-merge", + "git-new-branch", + "git-pull", + "git-push", + "git-repo", + "glass", + "globe", + "globe-network", + "graph", + "graph-remove", + "greater-than", + "greater-than-or-equal-to", + "grid", + "grid-view", + "grouped-bar-chart", + "group-objects", + "hand", + "hand-down", + "hand-left", + "hand-right", + "hand-up", + "hat", + "header", + "header-one", + "header-two", + "headset", + "heart", + "heart-broken", + "heatmap", + "heat-grid", + "help", + "helper-management", + "highlight", + "history", + "home", + "horizontal-bar-chart", + "horizontal-bar-chart-asc", + "horizontal-bar-chart-desc", + "horizontal-distribution", + "id-number", + "image-rotate-left", + "image-rotate-right", + "import", + "inbox", + "inbox-filtered", + "inbox-geo", + "inbox-search", + "inbox-update", + "info-sign", + "inheritance", + "inherited-group", + "inner-join", + "insert", + "intersection", + "ip-address", + "issue", + "issue-closed", + "issue-new", + "italic", + "join-table", + "key", + "key-backspace", + "key-command", + "key-control", + "key-delete", + "key-enter", + "key-escape", + "key-option", + "key-shift", + "key-tab", + "known-vehicle", + "label", + "lab-test", + "layer", + "layers", + "layout", + "layout-auto", + "layout-balloon", + "layout-circle", + "layout-grid", + "layout-group-by", + "layout-hierarchy", + "layout-linear", + "layout-skew-grid", + "layout-sorted-clusters", + "learning", + "left-join", + "less-than", + "less-than-or-equal-to", + "lifesaver", + "lightbulb", + "link", + "list", + "list-columns", + "list-detail-view", + "locate", + "lock", + "log-in", + "log-out", + "manual", + "manually-entered-data", + "map", + "map-create", + "map-marker", + "maximize", + "media", + "menu", + "menu-closed", + "menu-open", + "merge-columns", + "merge-links", + "minimize", + "minus", + "mobile-phone", + "mobile-video", + "modal", + "modal-filled", + "moon", + "more", + "mountain", + "move", + "mugshot", + "multi-select", + "music", + "new-drawing", + "new-grid-item", + "new-layer", + "new-layers", + "new-link", + "new-object", + "new-person", + "new-prescription", + "new-text-box", + "ninja", + "notifications", + "notifications-updated", + "not-equal-to", + "numbered-list", + "numerical", + "office", + "offline", + "oil-field", + "one-column", + "outdated", + "page-layout", + "panel-stats", + "panel-table", + "paperclip", + "paragraph", + "path", + "path-search", + "pause", + "people", + "percentage", + "person", + "phone", + "pie-chart", + "pin", + "pivot", + "pivot-table", + "play", + "plus", + "polygon-filter", + "power", + "predictive-analysis", + "prescription", + "presentation", + "print", + "projects", + "properties", + "property", + "publish-function", + "pulse", + "random", + "record", + "redo", + "refresh", + "regression-chart", + "remove", + "remove-column", + "remove-column-left", + "remove-column-right", + "remove-row-bottom", + "remove-row-top", + "repeat", + "reset", + "resolve", + "rig", + "right-join", + "ring", + "rotate-document", + "rotate-page", + "route", + "satellite", + "saved", + "scatter-plot", + "search", + "search-around", + "search-template", + "search-text", + "segmented-control", + "select", + "selection", + "send-message", + "send-to", + "send-to-graph", + "send-to-map", + "series-add", + "series-configuration", + "series-derived", + "series-filtered", + "series-search", + "settings", + "share", + "shield", + "shop", + "shopping-cart", + "signal-search", + "sim-card", + "slash", + "small-cross", + "small-minus", + "small-plus", + "small-tick", + "snowflake", + "social-media", + "sort", + "sort-alphabetical", + "sort-alphabetical-desc", + "sort-asc", + "sort-desc", + "sort-numerical", + "sort-numerical-desc", + "split-columns", + "square", + "stacked-chart", + "star", + "star-empty", + "step-backward", + "step-chart", + "step-forward", + "stop", + "stopwatch", + "strikethrough", + "style", + "swap-horizontal", + "swap-vertical", + "switch", + "symbol-circle", + "symbol-cross", + "symbol-diamond", + "symbol-square", + "symbol-triangle-down", + "symbol-triangle-up", + "tag", + "take-action", + "taxi", + "text-highlight", + "th", + "thumbs-down", + "thumbs-up", + "th-derived", + "th-disconnect", + "th-filtered", + "th-list", + "tick", + "tick-circle", + "time", + "timeline-area-chart", + "timeline-bar-chart", + "timeline-events", + "timeline-line-chart", + "tint", + "torch", + "tractor", + "train", + "translate", + "trash", + "tree", + "trending-down", + "trending-up", + "truck", + "two-columns", + "unarchive", + "underline", + "undo", + "ungroup-objects", + "unknown-vehicle", + "unlock", + "unpin", + "unresolve", + "updated", + "upload", + "user", + "variable", + "vertical-bar-chart-asc", + "vertical-bar-chart-desc", + "vertical-distribution", + "video", + "virus", + "volume-down", + "volume-off", + "volume-up", + "walk", + "warning-sign", + "waterfall-chart", + "widget", + "widget-button", + "widget-footer", + "widget-header", + "wrench", + "zoom-in", + "zoom-out", + "zoom-to-fit" + ] + } + }, + "dependencies": ["inputType"] + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of input field", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["iconName", "inputType"] + } + ] + } + ], + "features": { + "dynamicHeight": { + "sectionIndex": 3, + "defaultValue": "FIXED", + "active": true + } + } + }, + "INPUT_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Changes the type of data captured in the input", + "propertyName": "inputType", + "label": "Data type", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Text", + "value": "TEXT" + }, + { + "label": "Number", + "value": "NUMBER" + }, + { + "label": "Password", + "value": "PASSWORD" + }, + { + "label": "Email", + "value": "EMAIL" + }, + { + "label": "Currency", + "value": "CURRENCY" + }, + { + "label": "Phone Number", + "value": "PHONE_NUMBER" + } + ], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "allowCurrencyChange", + "label": "Allow currency change", + "helpText": "Search by currency or country", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Changes the country code", + "propertyName": "phoneNumberCountryCode", + "label": "Default country code", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "searchPlaceholderText": "Search by code or country name", + "options": [ + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "Afghanistan (+93)", + "value": "AF", + "id": "+93" + }, + { + "leftElement": "🇦🇽", + "searchText": "Aland Islands", + "label": "Aland Islands (+358)", + "value": "AX", + "id": "+358" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "Albania (+355)", + "value": "AL", + "id": "+355" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "Algeria (+213)", + "value": "DZ", + "id": "+213" + }, + { + "leftElement": "🇦🇸", + "searchText": "AmericanSamoa", + "label": "AmericanSamoa (+1684)", + "value": "AS", + "id": "+1684" + }, + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "Andorra (+376)", + "value": "AD", + "id": "+376" + }, + { + "leftElement": "🇦🇴", + "searchText": "Angola", + "label": "Angola (+244)", + "value": "AO", + "id": "+244" + }, + { + "leftElement": "🇦🇮", + "searchText": "Anguilla", + "label": "Anguilla (+1264)", + "value": "AI", + "id": "+1264" + }, + { + "leftElement": "🇦🇶", + "searchText": "Antarctica", + "label": "Antarctica (+672)", + "value": "AQ", + "id": "+672" + }, + { + "leftElement": "🇦🇬", + "searchText": "Antigua and Barbuda", + "label": "Antigua and Barbuda (+1268)", + "value": "AG", + "id": "+1268" + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "Argentina (+54)", + "value": "AR", + "id": "+54" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "Armenia (+374)", + "value": "AM", + "id": "+374" + }, + { + "leftElement": "🇦🇼", + "searchText": "Aruba", + "label": "Aruba (+297)", + "value": "AW", + "id": "+297" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "Australia (+61)", + "value": "AU", + "id": "+61" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "Austria (+43)", + "value": "AT", + "id": "+43" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "Azerbaijan (+994)", + "value": "AZ", + "id": "+994" + }, + { + "leftElement": "🇧🇸", + "searchText": "Bahamas", + "label": "Bahamas (+1242)", + "value": "BS", + "id": "+1242" + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "Bahrain (+973)", + "value": "BH", + "id": "+973" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "Bangladesh (+880)", + "value": "BD", + "id": "+880" + }, + { + "leftElement": "🇧🇧", + "searchText": "Barbados", + "label": "Barbados (+1246)", + "value": "BB", + "id": "+1246" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "Belarus (+375)", + "value": "BY", + "id": "+375" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "Belgium (+32)", + "value": "BE", + "id": "+32" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "Belize (+501)", + "value": "BZ", + "id": "+501" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "Benin (+229)", + "value": "BJ", + "id": "+229" + }, + { + "leftElement": "🇧🇲", + "searchText": "Bermuda", + "label": "Bermuda (+1441)", + "value": "BM", + "id": "+1441" + }, + { + "leftElement": "🇧🇹", + "searchText": "Bhutan", + "label": "Bhutan (+975)", + "value": "BT", + "id": "+975" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia, Plurinational State of", + "label": "Bolivia, Plurinational State of (+591)", + "value": "BO", + "id": "+591" + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "Bosnia and Herzegovina (+387)", + "value": "BA", + "id": "+387" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "Botswana (+267)", + "value": "BW", + "id": "+267" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "Brazil (+55)", + "value": "BR", + "id": "+55" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "British Indian Ocean Territory (+246)", + "value": "IO", + "id": "+246" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "Brunei Darussalam (+673)", + "value": "BN", + "id": "+673" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "Bulgaria (+359)", + "value": "BG", + "id": "+359" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "Burkina Faso (+226)", + "value": "BF", + "id": "+226" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "Burundi (+257)", + "value": "BI", + "id": "+257" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "Cambodia (+855)", + "value": "KH", + "id": "+855" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "Cameroon (+237)", + "value": "CM", + "id": "+237" + }, + { + "leftElement": "🇨🇦", + "searchText": "Canada", + "label": "Canada (+1)", + "value": "CA", + "id": "+1" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "Cape Verde (+238)", + "value": "CV", + "id": "+238" + }, + { + "leftElement": "🇰🇾", + "searchText": "Cayman Islands", + "label": "Cayman Islands (+ 345)", + "value": "KY", + "id": "+ 345" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "Central African Republic (+236)", + "value": "CF", + "id": "+236" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "Chad (+235)", + "value": "TD", + "id": "+235" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "Chile (+56)", + "value": "CL", + "id": "+56" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "China (+86)", + "value": "CN", + "id": "+86" + }, + { + "leftElement": "🇨🇽", + "searchText": "Christmas Island", + "label": "Christmas Island (+61)", + "value": "CX", + "id": "+61" + }, + { + "leftElement": "🇨🇨", + "searchText": "Cocos (Keeling) Islands", + "label": "Cocos (Keeling) Islands (+61)", + "value": "CC", + "id": "+61" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "Colombia (+57)", + "value": "CO", + "id": "+57" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "Comoros (+269)", + "value": "KM", + "id": "+269" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo", + "label": "Congo (+242)", + "value": "CG", + "id": "+242" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, The Democratic Republic of the Congo", + "label": "Congo, The Democratic Republic of the Congo (+243)", + "value": "CD", + "id": "+243" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "Cook Islands (+682)", + "value": "CK", + "id": "+682" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "Costa Rica (+506)", + "value": "CR", + "id": "+506" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "Cote d'Ivoire (+225)", + "value": "CI", + "id": "+225" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "Croatia (+385)", + "value": "HR", + "id": "+385" + }, + { + "leftElement": "🇨🇺", + "searchText": "Cuba", + "label": "Cuba (+53)", + "value": "CU", + "id": "+53" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "Cyprus (+357)", + "value": "CY", + "id": "+357" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "Czech Republic (+420)", + "value": "CZ", + "id": "+420" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "Denmark (+45)", + "value": "DK", + "id": "+45" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "Djibouti (+253)", + "value": "DJ", + "id": "+253" + }, + { + "leftElement": "🇩🇲", + "searchText": "Dominica", + "label": "Dominica (+1767)", + "value": "DM", + "id": "+1767" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "Dominican Republic (+1849)", + "value": "DO", + "id": "+1849" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "Ecuador (+593)", + "value": "EC", + "id": "+593" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "Egypt (+20)", + "value": "EG", + "id": "+20" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "El Salvador (+503)", + "value": "SV", + "id": "+503" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "Equatorial Guinea (+240)", + "value": "GQ", + "id": "+240" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "Eritrea (+291)", + "value": "ER", + "id": "+291" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "Estonia (+372)", + "value": "EE", + "id": "+372" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "Ethiopia (+251)", + "value": "ET", + "id": "+251" + }, + { + "leftElement": "🇫🇰", + "searchText": "Falkland Islands (Malvinas)", + "label": "Falkland Islands (Malvinas) (+500)", + "value": "FK", + "id": "+500" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "Faroe Islands (+298)", + "value": "FO", + "id": "+298" + }, + { + "leftElement": "🇫🇯", + "searchText": "Fiji", + "label": "Fiji (+679)", + "value": "FJ", + "id": "+679" + }, + { + "leftElement": "🇫🇮", + "searchText": "Finland", + "label": "Finland (+358)", + "value": "FI", + "id": "+358" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "France (+33)", + "value": "FR", + "id": "+33" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "French Guiana (+594)", + "value": "GF", + "id": "+594" + }, + { + "leftElement": "🇵🇫", + "searchText": "French Polynesia", + "label": "French Polynesia (+689)", + "value": "PF", + "id": "+689" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "Gabon (+241)", + "value": "GA", + "id": "+241" + }, + { + "leftElement": "🇬🇲", + "searchText": "Gambia", + "label": "Gambia (+220)", + "value": "GM", + "id": "+220" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "Georgia (+995)", + "value": "GE", + "id": "+995" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "Germany (+49)", + "value": "DE", + "id": "+49" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "Ghana (+233)", + "value": "GH", + "id": "+233" + }, + { + "leftElement": "🇬🇮", + "searchText": "Gibraltar", + "label": "Gibraltar (+350)", + "value": "GI", + "id": "+350" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "Greece (+30)", + "value": "GR", + "id": "+30" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "Greenland (+299)", + "value": "GL", + "id": "+299" + }, + { + "leftElement": "🇬🇩", + "searchText": "Grenada", + "label": "Grenada (+1473)", + "value": "GD", + "id": "+1473" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "Guadeloupe (+590)", + "value": "GP", + "id": "+590" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "Guam (+1671)", + "value": "GU", + "id": "+1671" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "Guatemala (+502)", + "value": "GT", + "id": "+502" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "Guernsey (+44)", + "value": "GG", + "id": "+44" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "Guinea (+224)", + "value": "GN", + "id": "+224" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "Guinea-Bissau (+245)", + "value": "GW", + "id": "+245" + }, + { + "leftElement": "🇬🇾", + "searchText": "Guyana", + "label": "Guyana (+595)", + "value": "GY", + "id": "+595" + }, + { + "leftElement": "🇭🇹", + "searchText": "Haiti", + "label": "Haiti (+509)", + "value": "HT", + "id": "+509" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "Holy See (Vatican City State) (+379)", + "value": "VA", + "id": "+379" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "Honduras (+504)", + "value": "HN", + "id": "+504" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "Hong Kong (+852)", + "value": "HK", + "id": "+852" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "Hungary (+36)", + "value": "HU", + "id": "+36" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "Iceland (+354)", + "value": "IS", + "id": "+354" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "India (+91)", + "value": "IN", + "id": "+91" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "Indonesia (+62)", + "value": "ID", + "id": "+62" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of Persian Gulf", + "label": "Iran, Islamic Republic of Persian Gulf (+98)", + "value": "IR", + "id": "+98" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "Iraq (+964)", + "value": "IQ", + "id": "+964" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "Ireland (+353)", + "value": "IE", + "id": "+353" + }, + { + "leftElement": "🇮🇲", + "searchText": "Isle of Man", + "label": "Isle of Man (+44)", + "value": "IM", + "id": "+44" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "Israel (+972)", + "value": "IL", + "id": "+972" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "Italy (+39)", + "value": "IT", + "id": "+39" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "Jamaica (+1876)", + "value": "JM", + "id": "+1876" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "Japan (+81)", + "value": "JP", + "id": "+81" + }, + { + "leftElement": "🇯🇪", + "searchText": "Jersey", + "label": "Jersey (+44)", + "value": "JE", + "id": "+44" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "Jordan (+962)", + "value": "JO", + "id": "+962" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "Kazakhstan (+77)", + "value": "KZ", + "id": "+77" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "Kenya (+254)", + "value": "KE", + "id": "+254" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "Kiribati (+686)", + "value": "KI", + "id": "+686" + }, + { + "leftElement": "🇰🇵", + "searchText": "Korea, Democratic People's Republic of Korea", + "label": "Korea, Democratic People's Republic of Korea (+850)", + "value": "KP", + "id": "+850" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of South Korea", + "label": "Korea, Republic of South Korea (+82)", + "value": "KR", + "id": "+82" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "Kuwait (+965)", + "value": "KW", + "id": "+965" + }, + { + "leftElement": "🇰🇬", + "searchText": "Kyrgyzstan", + "label": "Kyrgyzstan (+996)", + "value": "KG", + "id": "+996" + }, + { + "leftElement": "🇱🇦", + "searchText": "Laos", + "label": "Laos (+856)", + "value": "LA", + "id": "+856" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "Latvia (+371)", + "value": "LV", + "id": "+371" + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "Lebanon (+961)", + "value": "LB", + "id": "+961" + }, + { + "leftElement": "🇱🇸", + "searchText": "Lesotho", + "label": "Lesotho (+266)", + "value": "LS", + "id": "+266" + }, + { + "leftElement": "🇱🇷", + "searchText": "Liberia", + "label": "Liberia (+231)", + "value": "LR", + "id": "+231" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libyan Arab Jamahiriya", + "label": "Libyan Arab Jamahiriya (+218)", + "value": "LY", + "id": "+218" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "Liechtenstein (+423)", + "value": "LI", + "id": "+423" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "Lithuania (+370)", + "value": "LT", + "id": "+370" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "Luxembourg (+352)", + "value": "LU", + "id": "+352" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "Macao (+853)", + "value": "MO", + "id": "+853" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia", + "label": "Macedonia (+389)", + "value": "MK", + "id": "+389" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "Madagascar (+261)", + "value": "MG", + "id": "+261" + }, + { + "leftElement": "🇲🇼", + "searchText": "Malawi", + "label": "Malawi (+265)", + "value": "MW", + "id": "+265" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "Malaysia (+60)", + "value": "MY", + "id": "+60" + }, + { + "leftElement": "🇲🇻", + "searchText": "Maldives", + "label": "Maldives (+960)", + "value": "MV", + "id": "+960" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "Mali (+223)", + "value": "ML", + "id": "+223" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "Malta (+356)", + "value": "MT", + "id": "+356" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "Marshall Islands (+692)", + "value": "MH", + "id": "+692" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "Martinique (+596)", + "value": "MQ", + "id": "+596" + }, + { + "leftElement": "🇲🇷", + "searchText": "Mauritania", + "label": "Mauritania (+222)", + "value": "MR", + "id": "+222" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "Mauritius (+230)", + "value": "MU", + "id": "+230" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "Mayotte (+262)", + "value": "YT", + "id": "+262" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "Mexico (+52)", + "value": "MX", + "id": "+52" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of Micronesia", + "label": "Micronesia, Federated States of Micronesia (+691)", + "value": "FM", + "id": "+691" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova", + "label": "Moldova (+373)", + "value": "MD", + "id": "+373" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "Monaco (+377)", + "value": "MC", + "id": "+377" + }, + { + "leftElement": "🇲🇳", + "searchText": "Mongolia", + "label": "Mongolia (+976)", + "value": "MN", + "id": "+976" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "Montenegro (+382)", + "value": "ME", + "id": "+382" + }, + { + "leftElement": "🇲🇸", + "searchText": "Montserrat", + "label": "Montserrat (+1664)", + "value": "MS", + "id": "+1664" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "Morocco (+212)", + "value": "MA", + "id": "+212" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "Mozambique (+258)", + "value": "MZ", + "id": "+258" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "Myanmar (+95)", + "value": "MM", + "id": "+95" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "Namibia (+264)", + "value": "NA", + "id": "+264" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "Nauru (+674)", + "value": "NR", + "id": "+674" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "Nepal (+977)", + "value": "NP", + "id": "+977" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "Netherlands (+31)", + "value": "NL", + "id": "+31" + }, + { + "leftElement": "🇦🇳", + "searchText": "Netherlands Antilles", + "label": "Netherlands Antilles (+599)", + "value": "AN", + "id": "+599" + }, + { + "leftElement": "🇳🇨", + "searchText": "New Caledonia", + "label": "New Caledonia (+687)", + "value": "NC", + "id": "+687" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "New Zealand (+64)", + "value": "NZ", + "id": "+64" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "Nicaragua (+505)", + "value": "NI", + "id": "+505" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "Niger (+227)", + "value": "NE", + "id": "+227" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "Nigeria (+234)", + "value": "NG", + "id": "+234" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "Niue (+683)", + "value": "NU", + "id": "+683" + }, + { + "leftElement": "🇳🇫", + "searchText": "Norfolk Island", + "label": "Norfolk Island (+672)", + "value": "NF", + "id": "+672" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "Northern Mariana Islands (+1670)", + "value": "MP", + "id": "+1670" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "Norway (+47)", + "value": "NO", + "id": "+47" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "Oman (+968)", + "value": "OM", + "id": "+968" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "Pakistan (+92)", + "value": "PK", + "id": "+92" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "Palau (+680)", + "value": "PW", + "id": "+680" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestinian Territory, Occupied", + "label": "Palestinian Territory, Occupied (+970)", + "value": "PS", + "id": "+970" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "Panama (+507)", + "value": "PA", + "id": "+507" + }, + { + "leftElement": "🇵🇬", + "searchText": "Papua New Guinea", + "label": "Papua New Guinea (+675)", + "value": "PG", + "id": "+675" + }, + { + "leftElement": "🇵🇾", + "searchText": "Paraguay", + "label": "Paraguay (+595)", + "value": "PY", + "id": "+595" + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "Peru (+51)", + "value": "PE", + "id": "+51" + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "Philippines (+63)", + "value": "PH", + "id": "+63" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "Pitcairn (+872)", + "value": "PN", + "id": "+872" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "Poland (+48)", + "value": "PL", + "id": "+48" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "Portugal (+351)", + "value": "PT", + "id": "+351" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "Puerto Rico (+1939)", + "value": "PR", + "id": "+1939" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "Qatar (+974)", + "value": "QA", + "id": "+974" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "Romania (+40)", + "value": "RO", + "id": "+40" + }, + { + "leftElement": "🇷🇺", + "searchText": "Russia", + "label": "Russia (+7)", + "value": "RU", + "id": "+7" + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "Rwanda (+250)", + "value": "RW", + "id": "+250" + }, + { + "leftElement": "🇷🇪", + "searchText": "Reunion", + "label": "Reunion (+262)", + "value": "RE", + "id": "+262" + }, + { + "leftElement": "🇧🇱", + "searchText": "Saint Barthelemy", + "label": "Saint Barthelemy (+590)", + "value": "BL", + "id": "+590" + }, + { + "leftElement": "🇸🇭", + "searchText": "Saint Helena, Ascension and Tristan Da Cunha", + "label": "Saint Helena, Ascension and Tristan Da Cunha (+290)", + "value": "SH", + "id": "+290" + }, + { + "leftElement": "🇰🇳", + "searchText": "Saint Kitts and Nevis", + "label": "Saint Kitts and Nevis (+1869)", + "value": "KN", + "id": "+1869" + }, + { + "leftElement": "🇱🇨", + "searchText": "Saint Lucia", + "label": "Saint Lucia (+1758)", + "value": "LC", + "id": "+1758" + }, + { + "leftElement": "🇲🇫", + "searchText": "Saint Martin", + "label": "Saint Martin (+590)", + "value": "MF", + "id": "+590" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "Saint Pierre and Miquelon (+508)", + "value": "PM", + "id": "+508" + }, + { + "leftElement": "🇻🇨", + "searchText": "Saint Vincent and the Grenadines", + "label": "Saint Vincent and the Grenadines (+1784)", + "value": "VC", + "id": "+1784" + }, + { + "leftElement": "🇼🇸", + "searchText": "Samoa", + "label": "Samoa (+685)", + "value": "WS", + "id": "+685" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "San Marino (+378)", + "value": "SM", + "id": "+378" + }, + { + "leftElement": "🇸🇹", + "searchText": "Sao Tome and Principe", + "label": "Sao Tome and Principe (+239)", + "value": "ST", + "id": "+239" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "Saudi Arabia (+966)", + "value": "SA", + "id": "+966" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "Senegal (+221)", + "value": "SN", + "id": "+221" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "Serbia (+381)", + "value": "RS", + "id": "+381" + }, + { + "leftElement": "🇸🇨", + "searchText": "Seychelles", + "label": "Seychelles (+248)", + "value": "SC", + "id": "+248" + }, + { + "leftElement": "🇸🇱", + "searchText": "Sierra Leone", + "label": "Sierra Leone (+232)", + "value": "SL", + "id": "+232" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "Singapore (+65)", + "value": "SG", + "id": "+65" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "Slovakia (+421)", + "value": "SK", + "id": "+421" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "Slovenia (+386)", + "value": "SI", + "id": "+386" + }, + { + "leftElement": "🇸🇧", + "searchText": "Solomon Islands", + "label": "Solomon Islands (+677)", + "value": "SB", + "id": "+677" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "Somalia (+252)", + "value": "SO", + "id": "+252" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "South Africa (+27)", + "value": "ZA", + "id": "+27" + }, + { + "leftElement": "🇸🇸", + "searchText": "South Sudan", + "label": "South Sudan (+211)", + "value": "SS", + "id": "+211" + }, + { + "leftElement": "🇬🇸", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "South Georgia and the South Sandwich Islands (+500)", + "value": "GS", + "id": "+500" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "Spain (+34)", + "value": "ES", + "id": "+34" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "Sri Lanka (+94)", + "value": "LK", + "id": "+94" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "Sudan (+249)", + "value": "SD", + "id": "+249" + }, + { + "leftElement": "🇸🇷", + "searchText": "Suriname", + "label": "Suriname (+597)", + "value": "SR", + "id": "+597" + }, + { + "leftElement": "🇸🇯", + "searchText": "Svalbard and Jan Mayen", + "label": "Svalbard and Jan Mayen (+47)", + "value": "SJ", + "id": "+47" + }, + { + "leftElement": "🇸🇿", + "searchText": "Swaziland", + "label": "Swaziland (+268)", + "value": "SZ", + "id": "+268" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "Sweden (+46)", + "value": "SE", + "id": "+46" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "Switzerland (+41)", + "value": "CH", + "id": "+41" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "Syrian Arab Republic (+963)", + "value": "SY", + "id": "+963" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan", + "label": "Taiwan (+886)", + "value": "TW", + "id": "+886" + }, + { + "leftElement": "🇹🇯", + "searchText": "Tajikistan", + "label": "Tajikistan (+992)", + "value": "TJ", + "id": "+992" + }, + { + "leftElement": "🇹🇿", + "searchText": "Tanzania, United Republic of Tanzania", + "label": "Tanzania, United Republic of Tanzania (+255)", + "value": "TZ", + "id": "+255" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "Thailand (+66)", + "value": "TH", + "id": "+66" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "Timor-Leste (+670)", + "value": "TL", + "id": "+670" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "Togo (+228)", + "value": "TG", + "id": "+228" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "Tokelau (+690)", + "value": "TK", + "id": "+690" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "Tonga (+676)", + "value": "TO", + "id": "+676" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "Trinidad and Tobago (+1868)", + "value": "TT", + "id": "+1868" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "Tunisia (+216)", + "value": "TN", + "id": "+216" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "Turkey (+90)", + "value": "TR", + "id": "+90" + }, + { + "leftElement": "🇹🇲", + "searchText": "Turkmenistan", + "label": "Turkmenistan (+993)", + "value": "TM", + "id": "+993" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "Turks and Caicos Islands (+1649)", + "value": "TC", + "id": "+1649" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "Tuvalu (+688)", + "value": "TV", + "id": "+688" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "Uganda (+256)", + "value": "UG", + "id": "+256" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "Ukraine (+380)", + "value": "UA", + "id": "+380" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "United Arab Emirates (+971)", + "value": "AE", + "id": "+971" + }, + { + "leftElement": "🇬🇧", + "searchText": "United Kingdom", + "label": "United Kingdom (+44)", + "value": "GB", + "id": "+44" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States", + "label": "United States (+1)", + "value": "US", + "id": "+1" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "Uruguay (+598)", + "value": "UY", + "id": "+598" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "Uzbekistan (+998)", + "value": "UZ", + "id": "+998" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "Vanuatu (+678)", + "value": "VU", + "id": "+678" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela, Bolivarian Republic of Venezuela", + "label": "Venezuela, Bolivarian Republic of Venezuela (+58)", + "value": "VE", + "id": "+58" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "Vietnam (+84)", + "value": "VN", + "id": "+84" + }, + { + "leftElement": "🇻🇬", + "searchText": "Virgin Islands, British", + "label": "Virgin Islands, British (+1284)", + "value": "VG", + "id": "+1284" + }, + { + "leftElement": "🇻🇮", + "searchText": "Virgin Islands, U.S.", + "label": "Virgin Islands, U.S. (+1340)", + "value": "VI", + "id": "+1340" + }, + { + "leftElement": "🇼🇫", + "searchText": "Wallis and Futuna", + "label": "Wallis and Futuna (+681)", + "value": "WF", + "id": "+681" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "Yemen (+967)", + "value": "YE", + "id": "+967" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "Zambia (+260)", + "value": "ZM", + "id": "+260" + }, + { + "leftElement": "🇿🇼", + "searchText": "Zimbabwe", + "label": "Zimbabwe (+263)", + "value": "ZW", + "id": "+263" + } + ], + "dependencies": ["inputType"], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "helpText": "Changes the type of currency", + "propertyName": "currencyCountryCode", + "label": "Currency", + "enableSearch": true, + "dropdownHeight": "195px", + "controlType": "DROP_DOWN", + "searchPlaceholderText": "Search by code or name", + "options": [ + { + "leftElement": "🇦🇩", + "searchText": "Andorra", + "label": "EUR - Euro", + "value": "AD", + "id": "€" + }, + { + "leftElement": "🇦🇪", + "searchText": "United Arab Emirates", + "label": "AED - United Arab Emirates Dirham", + "value": "AE", + "id": "د.إ.‏" + }, + { + "leftElement": "🇦🇫", + "searchText": "Afghanistan", + "label": "AFN - Afghan Afghani", + "value": "AF", + "id": "؋" + }, + { + "leftElement": "🇦🇱", + "searchText": "Albania", + "label": "ALL - Albanian Lek", + "value": "AL", + "id": "Lek" + }, + { + "leftElement": "🇦🇲", + "searchText": "Armenia", + "label": "AMD - Armenian Dram", + "value": "AM", + "id": "դր." + }, + { + "leftElement": "🇦🇷", + "searchText": "Argentina", + "label": "ARS - Argentine Peso", + "value": "AR", + "id": "$" + }, + { + "leftElement": "🇦🇸", + "searchText": "American Samoa", + "label": "USD - US Dollar", + "value": "AS", + "id": "$" + }, + { + "leftElement": "🇦🇹", + "searchText": "Austria", + "label": "EUR - Euro", + "value": "AT", + "id": "€" + }, + { + "leftElement": "🇦🇺", + "searchText": "Australia", + "label": "AUD - Australian Dollar", + "value": "AU", + "id": "$" + }, + { + "leftElement": "🇦🇽", + "searchText": "Alland Islands", + "label": "EUR - Euro", + "value": "AX", + "id": "€" + }, + { + "leftElement": "🇦🇿", + "searchText": "Azerbaijan", + "label": "AZN - Azerbaijani Manat", + "value": "AZ", + "id": "ман." + }, + { + "leftElement": "🇧🇦", + "searchText": "Bosnia and Herzegovina", + "label": "BAM - Bosnia-Herzegovina Convertible Mark", + "value": "BA", + "id": "KM" + }, + { + "leftElement": "🇧🇩", + "searchText": "Bangladesh", + "label": "BDT - Bangladeshi Taka", + "value": "BD", + "id": "৳" + }, + { + "leftElement": "🇧🇪", + "searchText": "Belgium", + "label": "EUR - Euro", + "value": "BE", + "id": "€" + }, + { + "leftElement": "🇧🇫", + "searchText": "Burkina Faso", + "label": "XOF - CFA Franc BCEAO", + "value": "BF", + "id": "CFA" + }, + { + "leftElement": "🇧🇬", + "searchText": "Bulgaria", + "label": "BGN - Bulgarian Lev", + "value": "BG", + "id": "лв." + }, + { + "leftElement": "🇧🇭", + "searchText": "Bahrain", + "label": "BHD - Bahraini Dinar", + "value": "BH", + "id": "د.ب.‏" + }, + { + "leftElement": "🇧🇮", + "searchText": "Burundi", + "label": "BIF - Burundian Franc", + "value": "BI", + "id": "FBu" + }, + { + "leftElement": "🇧🇯", + "searchText": "Benin", + "label": "XOF - CFA Franc BCEAO", + "value": "BJ", + "id": "CFA" + }, + { + "leftElement": "🇧🇱", + "searchText": "Saint Barthelemy", + "label": "EUR - Euro", + "value": "BL", + "id": "€" + }, + { + "leftElement": "🇧🇳", + "searchText": "Brunei Darussalam", + "label": "BND - Brunei Dollar", + "value": "BN", + "id": "$" + }, + { + "leftElement": "🇧🇴", + "searchText": "Bolivia", + "label": "BOB - Bolivian Boliviano", + "value": "BO", + "id": "Bs" + }, + { + "leftElement": "🇧🇷", + "searchText": "Brazil", + "label": "BRL - Brazilian Real", + "value": "BR", + "id": "R$" + }, + { + "leftElement": "🇧🇻", + "searchText": "Bouvet Island", + "label": "NOK - Norwegian Krone", + "value": "BV", + "id": "kr" + }, + { + "leftElement": "🇧🇼", + "searchText": "Botswana", + "label": "BWP - Botswanan Pula", + "value": "BW", + "id": "P" + }, + { + "leftElement": "🇧🇾", + "searchText": "Belarus", + "label": "BYR - Belarusian Ruble", + "value": "BY", + "id": "BYR" + }, + { + "leftElement": "🇧🇿", + "searchText": "Belize", + "label": "BZD - Belize Dollar", + "value": "BZ", + "id": "$" + }, + { + "leftElement": "🇨🇦", + "searchText": "Canada", + "label": "CAD - Canadian Dollar", + "value": "CA", + "id": "$" + }, + { + "leftElement": "🇨🇨", + "searchText": "Cocos (Keeling) Islands", + "label": "AUD - Australian Dollar", + "value": "CC", + "id": "$" + }, + { + "leftElement": "🇨🇩", + "searchText": "Congo, Democratic Republic of the", + "label": "CDF - Congolese Franc", + "value": "CD", + "id": "FrCD" + }, + { + "leftElement": "🇨🇫", + "searchText": "Central African Republic", + "label": "XAF - CFA Franc BEAC", + "value": "CF", + "id": "FCFA" + }, + { + "leftElement": "🇨🇬", + "searchText": "Congo, Republic of the", + "label": "XAF - CFA Franc BEAC", + "value": "CG", + "id": "FCFA" + }, + { + "leftElement": "🇨🇭", + "searchText": "Switzerland", + "label": "CHF - Swiss Franc", + "value": "CH", + "id": "CHF" + }, + { + "leftElement": "🇨🇮", + "searchText": "Cote d'Ivoire", + "label": "XOF - CFA Franc BCEAO", + "value": "CI", + "id": "CFA" + }, + { + "leftElement": "🇨🇰", + "searchText": "Cook Islands", + "label": "NZD - New Zealand Dollar", + "value": "CK", + "id": "$" + }, + { + "leftElement": "🇨🇱", + "searchText": "Chile", + "label": "CLP - Chilean Peso", + "value": "CL", + "id": "$" + }, + { + "leftElement": "🇨🇲", + "searchText": "Cameroon", + "label": "XAF - CFA Franc BEAC", + "value": "CM", + "id": "FCFA" + }, + { + "leftElement": "🇨🇳", + "searchText": "China", + "label": "CNY - Chinese Yuan", + "value": "CN", + "id": "CN¥" + }, + { + "leftElement": "🇨🇴", + "searchText": "Colombia", + "label": "COP - Colombian Peso", + "value": "CO", + "id": "$" + }, + { + "leftElement": "🇨🇷", + "searchText": "Costa Rica", + "label": "CRC - Costa Rican Colón", + "value": "CR", + "id": "₡" + }, + { + "leftElement": "🇨🇻", + "searchText": "Cape Verde", + "label": "CVE - Cape Verdean Escudo", + "value": "CV", + "id": "CV$" + }, + { + "leftElement": "🇨🇽", + "searchText": "Christmas Island", + "label": "AUD - Australian Dollar", + "value": "CX", + "id": "$" + }, + { + "leftElement": "🇨🇾", + "searchText": "Cyprus", + "label": "EUR - Euro", + "value": "CY", + "id": "€" + }, + { + "leftElement": "🇨🇿", + "searchText": "Czech Republic", + "label": "CZK - Czech Republic Koruna", + "value": "CZ", + "id": "Kč" + }, + { + "leftElement": "🇩🇪", + "searchText": "Germany", + "label": "EUR - Euro", + "value": "DE", + "id": "€" + }, + { + "leftElement": "🇩🇯", + "searchText": "Djibouti", + "label": "DJF - Djiboutian Franc", + "value": "DJ", + "id": "Fdj" + }, + { + "leftElement": "🇩🇰", + "searchText": "Denmark", + "label": "DKK - Danish Krone", + "value": "DK", + "id": "kr" + }, + { + "leftElement": "🇩🇴", + "searchText": "Dominican Republic", + "label": "DOP - Dominican Peso", + "value": "DO", + "id": "RD$" + }, + { + "leftElement": "🇩🇿", + "searchText": "Algeria", + "label": "DZD - Algerian Dinar", + "value": "DZ", + "id": "د.ج.‏" + }, + { + "leftElement": "🇪🇨", + "searchText": "Ecuador", + "label": "USD - US Dollar", + "value": "EC", + "id": "$" + }, + { + "leftElement": "🇪🇪", + "searchText": "Estonia", + "label": "EUR - Euro", + "value": "EE", + "id": "€" + }, + { + "leftElement": "🇪🇬", + "searchText": "Egypt", + "label": "EGP - Egyptian Pound", + "value": "EG", + "id": "ج.م.‏" + }, + { + "leftElement": "🇪🇭", + "searchText": "Western Sahara", + "label": "MAD - Moroccan Dirham", + "value": "EH", + "id": "د.م.‏" + }, + { + "leftElement": "🇪🇷", + "searchText": "Eritrea", + "label": "ERN - Eritrean Nakfa", + "value": "ER", + "id": "Nfk" + }, + { + "leftElement": "🇪🇸", + "searchText": "Spain", + "label": "EUR - Euro", + "value": "ES", + "id": "€" + }, + { + "leftElement": "🇪🇹", + "searchText": "Ethiopia", + "label": "ETB - Ethiopian Birr", + "value": "ET", + "id": "Br" + }, + { + "leftElement": "🇫🇮", + "searchText": "Finland", + "label": "EUR - Euro", + "value": "FI", + "id": "€" + }, + { + "leftElement": "🇫🇲", + "searchText": "Micronesia, Federated States of", + "label": "USD - US Dollar", + "value": "FM", + "id": "$" + }, + { + "leftElement": "🇫🇴", + "searchText": "Faroe Islands", + "label": "DKK - Danish Krone", + "value": "FO", + "id": "kr" + }, + { + "leftElement": "🇫🇷", + "searchText": "France", + "label": "EUR - Euro", + "value": "FR", + "id": "€" + }, + { + "leftElement": "🇬🇦", + "searchText": "Gabon", + "label": "XAF - CFA Franc BEAC", + "value": "GA", + "id": "FCFA" + }, + { + "leftElement": "🇬🇧", + "searchText": "United Kingdom", + "label": "GBP - British Pound Sterling", + "value": "GB", + "id": "£" + }, + { + "leftElement": "🇬🇪", + "searchText": "Georgia", + "label": "GEL - Georgian Lari", + "value": "GE", + "id": "GEL" + }, + { + "leftElement": "🇬🇫", + "searchText": "French Guiana", + "label": "EUR - Euro", + "value": "GF", + "id": "€" + }, + { + "leftElement": "🇬🇬", + "searchText": "Guernsey", + "label": "GBP - British Pound Sterling", + "value": "GG", + "id": "£" + }, + { + "leftElement": "🇬🇭", + "searchText": "Ghana", + "label": "GHS - Ghanaian Cedi", + "value": "GH", + "id": "GH₵" + }, + { + "leftElement": "🇬🇱", + "searchText": "Greenland", + "label": "DKK - Danish Krone", + "value": "GL", + "id": "kr" + }, + { + "leftElement": "🇬🇳", + "searchText": "Guinea", + "label": "GNF - Guinean Franc", + "value": "GN", + "id": "FG" + }, + { + "leftElement": "🇬🇵", + "searchText": "Guadeloupe", + "label": "EUR - Euro", + "value": "GP", + "id": "€" + }, + { + "leftElement": "🇬🇶", + "searchText": "Equatorial Guinea", + "label": "XAF - CFA Franc BEAC", + "value": "GQ", + "id": "FCFA" + }, + { + "leftElement": "🇬🇷", + "searchText": "Greece", + "label": "EUR - Euro", + "value": "GR", + "id": "€" + }, + { + "leftElement": "🇬🇸", + "searchText": "South Georgia and the South Sandwich Islands", + "label": "GBP - British Pound Sterling", + "value": "GS", + "id": "£" + }, + { + "leftElement": "🇬🇹", + "searchText": "Guatemala", + "label": "GTQ - Guatemalan Quetzal", + "value": "GT", + "id": "Q" + }, + { + "leftElement": "🇬🇺", + "searchText": "Guam", + "label": "USD - US Dollar", + "value": "GU", + "id": "$" + }, + { + "leftElement": "🇬🇼", + "searchText": "Guinea-Bissau", + "label": "XOF - CFA Franc BCEAO", + "value": "GW", + "id": "CFA" + }, + { + "leftElement": "🇭🇰", + "searchText": "Hong Kong", + "label": "HKD - Hong Kong Dollar", + "value": "HK", + "id": "$" + }, + { + "leftElement": "🇭🇲", + "searchText": "Heard Island and McDonald Islands", + "label": "AUD - Australian Dollar", + "value": "HM", + "id": "$" + }, + { + "leftElement": "🇭🇳", + "searchText": "Honduras", + "label": "HNL - Honduran Lempira", + "value": "HN", + "id": "L" + }, + { + "leftElement": "🇭🇷", + "searchText": "Croatia", + "label": "HRK - Croatian Kuna", + "value": "HR", + "id": "kn" + }, + { + "leftElement": "🇭🇺", + "searchText": "Hungary", + "label": "HUF - Hungarian Forint", + "value": "HU", + "id": "Ft" + }, + { + "leftElement": "🇮🇩", + "searchText": "Indonesia", + "label": "IDR - Indonesian Rupiah", + "value": "ID", + "id": "Rp" + }, + { + "leftElement": "🇮🇪", + "searchText": "Ireland", + "label": "EUR - Euro", + "value": "IE", + "id": "€" + }, + { + "leftElement": "🇮🇱", + "searchText": "Israel", + "label": "ILS - Israeli New Sheqel", + "value": "IL", + "id": "₪" + }, + { + "leftElement": "🇮🇲", + "searchText": "Isle of Man", + "label": "GBP - British Pound Sterling", + "value": "IM", + "id": "£" + }, + { + "leftElement": "🇮🇳", + "searchText": "India", + "label": "INR - Indian Rupee", + "value": "IN", + "id": "₹" + }, + { + "leftElement": "🇮🇴", + "searchText": "British Indian Ocean Territory", + "label": "USD - US Dollar", + "value": "IO", + "id": "$" + }, + { + "leftElement": "🇮🇶", + "searchText": "Iraq", + "label": "IQD - Iraqi Dinar", + "value": "IQ", + "id": "د.ع.‏" + }, + { + "leftElement": "🇮🇷", + "searchText": "Iran, Islamic Republic of", + "label": "IRR - Iranian Rial", + "value": "IR", + "id": "﷼" + }, + { + "leftElement": "🇮🇸", + "searchText": "Iceland", + "label": "ISK - Icelandic Króna", + "value": "IS", + "id": "kr" + }, + { + "leftElement": "🇮🇹", + "searchText": "Italy", + "label": "EUR - Euro", + "value": "IT", + "id": "€" + }, + { + "leftElement": "🇯🇪", + "searchText": "Jersey", + "label": "GBP - British Pound Sterling", + "value": "JE", + "id": "£" + }, + { + "leftElement": "🇯🇲", + "searchText": "Jamaica", + "label": "JMD - Jamaican Dollar", + "value": "JM", + "id": "$" + }, + { + "leftElement": "🇯🇴", + "searchText": "Jordan", + "label": "JOD - Jordanian Dinar", + "value": "JO", + "id": "د.أ.‏" + }, + { + "leftElement": "🇯🇵", + "searchText": "Japan", + "label": "JPY - Japanese Yen", + "value": "JP", + "id": "¥" + }, + { + "leftElement": "🇰🇪", + "searchText": "Kenya", + "label": "KES - Kenyan Shilling", + "value": "KE", + "id": "Ksh" + }, + { + "leftElement": "🇰🇭", + "searchText": "Cambodia", + "label": "KHR - Cambodian Riel", + "value": "KH", + "id": "៛" + }, + { + "leftElement": "🇰🇮", + "searchText": "Kiribati", + "label": "AUD - Australian Dollar", + "value": "KI", + "id": "$" + }, + { + "leftElement": "🇰🇲", + "searchText": "Comoros", + "label": "KMF - Comorian Franc", + "value": "KM", + "id": "FC" + }, + { + "leftElement": "🇰🇷", + "searchText": "Korea, Republic of", + "label": "KRW - South Korean Won", + "value": "KR", + "id": "₩" + }, + { + "leftElement": "🇰🇼", + "searchText": "Kuwait", + "label": "KWD - Kuwaiti Dinar", + "value": "KW", + "id": "د.ك.‏" + }, + { + "leftElement": "🇰🇿", + "searchText": "Kazakhstan", + "label": "KZT - Kazakhstani Tenge", + "value": "KZ", + "id": "тңг." + }, + { + "leftElement": "🇱🇧", + "searchText": "Lebanon", + "label": "LBP - Lebanese Pound", + "value": "LB", + "id": "ل.ل.‏" + }, + { + "leftElement": "🇱🇮", + "searchText": "Liechtenstein", + "label": "CHF - Swiss Franc", + "value": "LI", + "id": "CHF" + }, + { + "leftElement": "🇱🇰", + "searchText": "Sri Lanka", + "label": "LKR - Sri Lankan Rupee", + "value": "LK", + "id": "SL Re" + }, + { + "leftElement": "🇱🇹", + "searchText": "Lithuania", + "label": "LTL - Lithuanian Litas", + "value": "LT", + "id": "Lt" + }, + { + "leftElement": "🇱🇺", + "searchText": "Luxembourg", + "label": "EUR - Euro", + "value": "LU", + "id": "€" + }, + { + "leftElement": "🇱🇻", + "searchText": "Latvia", + "label": "EUR - Euro", + "value": "LV", + "id": "€" + }, + { + "leftElement": "🇱🇾", + "searchText": "Libya", + "label": "LYD - Libyan Dinar", + "value": "LY", + "id": "د.ل.‏" + }, + { + "leftElement": "🇲🇦", + "searchText": "Morocco", + "label": "MAD - Moroccan Dirham", + "value": "MA", + "id": "د.م.‏" + }, + { + "leftElement": "🇲🇨", + "searchText": "Monaco", + "label": "EUR - Euro", + "value": "MC", + "id": "€" + }, + { + "leftElement": "🇲🇩", + "searchText": "Moldova, Republic of", + "label": "MDL - Moldovan Leu", + "value": "MD", + "id": "MDL" + }, + { + "leftElement": "🇲🇪", + "searchText": "Montenegro", + "label": "EUR - Euro", + "value": "ME", + "id": "€" + }, + { + "leftElement": "🇲🇫", + "searchText": "Saint Martin (French part)", + "label": "EUR - Euro", + "value": "MF", + "id": "€" + }, + { + "leftElement": "🇲🇬", + "searchText": "Madagascar", + "label": "MGA - Malagasy Ariary", + "value": "MG", + "id": "MGA" + }, + { + "leftElement": "🇲🇭", + "searchText": "Marshall Islands", + "label": "USD - US Dollar", + "value": "MH", + "id": "$" + }, + { + "leftElement": "🇲🇰", + "searchText": "Macedonia, the Former Yugoslav Republic of", + "label": "MKD - Macedonian Denar", + "value": "MK", + "id": "MKD" + }, + { + "leftElement": "🇲🇱", + "searchText": "Mali", + "label": "XOF - CFA Franc BCEAO", + "value": "ML", + "id": "CFA" + }, + { + "leftElement": "🇲🇲", + "searchText": "Myanmar", + "label": "MMK - Myanma Kyat", + "value": "MM", + "id": "K" + }, + { + "leftElement": "🇲🇴", + "searchText": "Macao", + "label": "MOP - Macanese Pataca", + "value": "MO", + "id": "MOP$" + }, + { + "leftElement": "🇲🇵", + "searchText": "Northern Mariana Islands", + "label": "USD - US Dollar", + "value": "MP", + "id": "$" + }, + { + "leftElement": "🇲🇶", + "searchText": "Martinique", + "label": "EUR - Euro", + "value": "MQ", + "id": "€" + }, + { + "leftElement": "🇲🇹", + "searchText": "Malta", + "label": "EUR - Euro", + "value": "MT", + "id": "€" + }, + { + "leftElement": "🇲🇺", + "searchText": "Mauritius", + "label": "MUR - Mauritian Rupee", + "value": "MU", + "id": "MURs" + }, + { + "leftElement": "🇲🇽", + "searchText": "Mexico", + "label": "MXN - Mexican Peso", + "value": "MX", + "id": "$" + }, + { + "leftElement": "🇲🇾", + "searchText": "Malaysia", + "label": "MYR - Malaysian Ringgit", + "value": "MY", + "id": "RM" + }, + { + "leftElement": "🇲🇿", + "searchText": "Mozambique", + "label": "MZN - Mozambican Metical", + "value": "MZ", + "id": "MTn" + }, + { + "leftElement": "🇳🇦", + "searchText": "Namibia", + "label": "NAD - Namibian Dollar", + "value": "NA", + "id": "N$" + }, + { + "leftElement": "🇳🇪", + "searchText": "Niger", + "label": "XOF - CFA Franc BCEAO", + "value": "NE", + "id": "CFA" + }, + { + "leftElement": "🇳🇫", + "searchText": "Norfolk Island", + "label": "AUD - Australian Dollar", + "value": "NF", + "id": "$" + }, + { + "leftElement": "🇳🇬", + "searchText": "Nigeria", + "label": "NGN - Nigerian Naira", + "value": "NG", + "id": "₦" + }, + { + "leftElement": "🇳🇮", + "searchText": "Nicaragua", + "label": "NIO - Nicaraguan Córdoba", + "value": "NI", + "id": "C$" + }, + { + "leftElement": "🇳🇱", + "searchText": "Netherlands", + "label": "EUR - Euro", + "value": "NL", + "id": "€" + }, + { + "leftElement": "🇳🇴", + "searchText": "Norway", + "label": "NOK - Norwegian Krone", + "value": "NO", + "id": "kr" + }, + { + "leftElement": "🇳🇵", + "searchText": "Nepal", + "label": "NPR - Nepalese Rupee", + "value": "NP", + "id": "नेरू" + }, + { + "leftElement": "🇳🇷", + "searchText": "Nauru", + "label": "AUD - Australian Dollar", + "value": "NR", + "id": "$" + }, + { + "leftElement": "🇳🇺", + "searchText": "Niue", + "label": "NZD - New Zealand Dollar", + "value": "NU", + "id": "$" + }, + { + "leftElement": "🇳🇿", + "searchText": "New Zealand", + "label": "NZD - New Zealand Dollar", + "value": "NZ", + "id": "$" + }, + { + "leftElement": "🇴🇲", + "searchText": "Oman", + "label": "OMR - Omani Rial", + "value": "OM", + "id": "ر.ع.‏" + }, + { + "leftElement": "🇵🇦", + "searchText": "Panama", + "label": "PAB - Panamanian Balboa", + "value": "PA", + "id": "B/." + }, + { + "leftElement": "🇵🇪", + "searchText": "Peru", + "label": "PEN - Peruvian Nuevo Sol", + "value": "PE", + "id": "S/." + }, + { + "leftElement": "🇵🇭", + "searchText": "Philippines", + "label": "PHP - Philippine Peso", + "value": "PH", + "id": "₱" + }, + { + "leftElement": "🇵🇰", + "searchText": "Pakistan", + "label": "PKR - Pakistani Rupee", + "value": "PK", + "id": "₨" + }, + { + "leftElement": "🇵🇱", + "searchText": "Poland", + "label": "PLN - Polish Zloty", + "value": "PL", + "id": "zł" + }, + { + "leftElement": "🇵🇲", + "searchText": "Saint Pierre and Miquelon", + "label": "EUR - Euro", + "value": "PM", + "id": "€" + }, + { + "leftElement": "🇵🇳", + "searchText": "Pitcairn", + "label": "NZD - New Zealand Dollar", + "value": "PN", + "id": "$" + }, + { + "leftElement": "🇵🇷", + "searchText": "Puerto Rico", + "label": "USD - US Dollar", + "value": "PR", + "id": "$" + }, + { + "leftElement": "🇵🇸", + "searchText": "Palestine, State of", + "label": "ILS - Israeli New Sheqel", + "value": "PS", + "id": "₪" + }, + { + "leftElement": "🇵🇹", + "searchText": "Portugal", + "label": "EUR - Euro", + "value": "PT", + "id": "€" + }, + { + "leftElement": "🇵🇼", + "searchText": "Palau", + "label": "USD - US Dollar", + "value": "PW", + "id": "$" + }, + { + "leftElement": "🇵🇾", + "searchText": "Paraguay", + "label": "PYG - Paraguayan Guarani", + "value": "PY", + "id": "₲" + }, + { + "leftElement": "🇶🇦", + "searchText": "Qatar", + "label": "QAR - Qatari Rial", + "value": "QA", + "id": "ر.ق.‏" + }, + { + "leftElement": "🇷🇪", + "searchText": "Reunion", + "label": "EUR - Euro", + "value": "RE", + "id": "€" + }, + { + "leftElement": "🇷🇴", + "searchText": "Romania", + "label": "RON - Romanian Leu", + "value": "RO", + "id": "RON" + }, + { + "leftElement": "🇷🇸", + "searchText": "Serbia", + "label": "RSD - Serbian Dinar", + "value": "RS", + "id": "дин." + }, + { + "leftElement": "🇷🇺", + "searchText": "Russian Federation", + "label": "RUB - Russian Ruble", + "value": "RU", + "id": "руб." + }, + { + "leftElement": "🇷🇼", + "searchText": "Rwanda", + "label": "RWF - Rwandan Franc", + "value": "RW", + "id": "FR" + }, + { + "leftElement": "🇸🇦", + "searchText": "Saudi Arabia", + "label": "SAR - Saudi Riyal", + "value": "SA", + "id": "ر.س.‏" + }, + { + "leftElement": "🇸🇩", + "searchText": "Sudan", + "label": "SDG - Sudanese Pound", + "value": "SD", + "id": "SDG" + }, + { + "leftElement": "🇸🇪", + "searchText": "Sweden", + "label": "SEK - Swedish Krona", + "value": "SE", + "id": "kr" + }, + { + "leftElement": "🇸🇬", + "searchText": "Singapore", + "label": "SGD - Singapore Dollar", + "value": "SG", + "id": "$" + }, + { + "leftElement": "🇸🇮", + "searchText": "Slovenia", + "label": "EUR - Euro", + "value": "SI", + "id": "€" + }, + { + "leftElement": "🇸🇯", + "searchText": "Svalbard and Jan Mayen", + "label": "NOK - Norwegian Krone", + "value": "SJ", + "id": "kr" + }, + { + "leftElement": "🇸🇰", + "searchText": "Slovakia", + "label": "EUR - Euro", + "value": "SK", + "id": "€" + }, + { + "leftElement": "🇸🇲", + "searchText": "San Marino", + "label": "EUR - Euro", + "value": "SM", + "id": "€" + }, + { + "leftElement": "🇸🇳", + "searchText": "Senegal", + "label": "XOF - CFA Franc BCEAO", + "value": "SN", + "id": "CFA" + }, + { + "leftElement": "🇸🇴", + "searchText": "Somalia", + "label": "SOS - Somali Shilling", + "value": "SO", + "id": "Ssh" + }, + { + "leftElement": "🇸🇻", + "searchText": "El Salvador", + "label": "USD - US Dollar", + "value": "SV", + "id": "$" + }, + { + "leftElement": "🇸🇾", + "searchText": "Syrian Arab Republic", + "label": "SYP - Syrian Pound", + "value": "SY", + "id": "ل.س.‏" + }, + { + "leftElement": "🇹🇨", + "searchText": "Turks and Caicos Islands", + "label": "USD - US Dollar", + "value": "TC", + "id": "$" + }, + { + "leftElement": "🇹🇩", + "searchText": "Chad", + "label": "XAF - CFA Franc BEAC", + "value": "TD", + "id": "FCFA" + }, + { + "leftElement": "🇹🇫", + "searchText": "French Southern Territories", + "label": "EUR - Euro", + "value": "TF", + "id": "€" + }, + { + "leftElement": "🇹🇬", + "searchText": "Togo", + "label": "XOF - CFA Franc BCEAO", + "value": "TG", + "id": "CFA" + }, + { + "leftElement": "🇹🇭", + "searchText": "Thailand", + "label": "THB - Thai Baht", + "value": "TH", + "id": "฿" + }, + { + "leftElement": "🇹🇰", + "searchText": "Tokelau", + "label": "NZD - New Zealand Dollar", + "value": "TK", + "id": "$" + }, + { + "leftElement": "🇹🇱", + "searchText": "Timor-Leste", + "label": "USD - US Dollar", + "value": "TL", + "id": "$" + }, + { + "leftElement": "🇹🇳", + "searchText": "Tunisia", + "label": "TND - Tunisian Dinar", + "value": "TN", + "id": "د.ت.‏" + }, + { + "leftElement": "🇹🇴", + "searchText": "Tonga", + "label": "TOP - Tongan Paʻanga", + "value": "TO", + "id": "T$" + }, + { + "leftElement": "🇹🇷", + "searchText": "Turkey", + "label": "TRY - Turkish Lira", + "value": "TR", + "id": "TL" + }, + { + "leftElement": "🇹🇹", + "searchText": "Trinidad and Tobago", + "label": "TTD - Trinidad and Tobago Dollar", + "value": "TT", + "id": "$" + }, + { + "leftElement": "🇹🇻", + "searchText": "Tuvalu", + "label": "AUD - Australian Dollar", + "value": "TV", + "id": "$" + }, + { + "leftElement": "🇹🇼", + "searchText": "Taiwan, Province of China", + "label": "TWD - New Taiwan Dollar", + "value": "TW", + "id": "NT$" + }, + { + "leftElement": "🇹🇿", + "searchText": "United Republic of Tanzania", + "label": "TZS - Tanzanian Shilling", + "value": "TZ", + "id": "TSh" + }, + { + "leftElement": "🇺🇦", + "searchText": "Ukraine", + "label": "UAH - Ukrainian Hryvnia", + "value": "UA", + "id": "₴" + }, + { + "leftElement": "🇺🇬", + "searchText": "Uganda", + "label": "UGX - Ugandan Shilling", + "value": "UG", + "id": "USh" + }, + { + "leftElement": "🇺🇸", + "searchText": "United States", + "label": "USD - US Dollar", + "value": "US", + "id": "$" + }, + { + "leftElement": "🇺🇾", + "searchText": "Uruguay", + "label": "UYU - Uruguayan Peso", + "value": "UY", + "id": "$" + }, + { + "leftElement": "🇺🇿", + "searchText": "Uzbekistan", + "label": "UZS - Uzbekistan Som", + "value": "UZ", + "id": "UZS" + }, + { + "leftElement": "🇻🇦", + "searchText": "Holy See (Vatican City State)", + "label": "EUR - Euro", + "value": "VA", + "id": "€" + }, + { + "leftElement": "🇻🇪", + "searchText": "Venezuela", + "label": "VEF - Venezuelan Bolívar", + "value": "VE", + "id": "Bs.F." + }, + { + "leftElement": "🇻🇬", + "searchText": "British Virgin Islands", + "label": "USD - US Dollar", + "value": "VG", + "id": "$" + }, + { + "leftElement": "🇻🇮", + "searchText": "US Virgin Islands", + "label": "USD - US Dollar", + "value": "VI", + "id": "$" + }, + { + "leftElement": "🇻🇳", + "searchText": "Vietnam", + "label": "VND - Vietnamese Dong", + "value": "VN", + "id": "₫" + }, + { + "leftElement": "🇻🇺", + "searchText": "Vanuatu", + "label": "VUV - Vanuatu Vatu", + "value": "VU", + "id": "VT" + }, + { + "leftElement": "🇽🇰", + "searchText": "Kosovo", + "label": "EUR - Euro", + "value": "XK", + "id": "€" + }, + { + "leftElement": "🇾🇪", + "searchText": "Yemen", + "label": "YER - Yemeni Rial", + "value": "YE", + "id": "ر.ي.‏" + }, + { + "leftElement": "🇾🇹", + "searchText": "Mayotte", + "label": "EUR - Euro", + "value": "YT", + "id": "€" + }, + { + "leftElement": "🇿🇦", + "searchText": "South Africa", + "label": "ZAR - South African Rand", + "value": "ZA", + "id": "R" + }, + { + "leftElement": "🇿🇲", + "searchText": "Zambia", + "label": "ZMK - Zambian Kwacha", + "value": "ZM", + "id": "ZK" + } + ], + "dependencies": ["inputType"], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "helpText": "No. of decimals in currency input", + "propertyName": "decimalsInCurrency", + "label": "Decimals", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + } + ], + "dependencies": ["inputType"], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "helpText": "Sets maximum allowed text length", + "propertyName": "maxChars", + "label": "Max Chars", + "controlType": "INPUT_TEXT", + "placeholderText": "255", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Sets the default text of the widget. The text is updated if the default text changes", + "propertyName": "defaultText", + "label": "Default Text", + "controlType": "INPUT_TEXT", + "placeholderText": "John Doe", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "string or number", + "example": "John | 123", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["inputType"] + }, + { + "helpText": "Adds a validation to the input which displays an error on failure", + "propertyName": "regex", + "label": "Regex", + "controlType": "INPUT_TEXT", + "placeholderText": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "REGEX" + } + }, + { + "helpText": "Sets the input validity based on a JS expression", + "propertyName": "validation", + "label": "Valid", + "controlType": "INPUT_TEXT", + "placeholderText": "{{ Input1.text.length > 0 }}", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "The error message to display if the regex or valid property check fails", + "propertyName": "errorMessage", + "label": "Error message", + "controlType": "INPUT_TEXT", + "placeholderText": "Not a valid email!", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets a placeholder text for the input", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Placeholder", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Show help text or details about current input", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Passwords must be atleast 6 chars", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Disables input to this widget", + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Clears the input value after submit", + "propertyName": "resetOnSubmit", + "label": "Reset on submit", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Focus input automatically on load", + "propertyName": "autoFocus", + "label": "Auto focus", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isSpellCheck", + "label": "Spellcheck", + "helpText": "Defines whether the text input may be checked for spelling errors", + "controlType": "SWITCH", + "isJSConvertible": false, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["inputType"] + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "label", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Name:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + }, + { + "label": "Auto", + "value": "Auto" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the text is changed", + "propertyName": "onTextChanged", + "label": "onTextChanged", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "on submit (when the enter key is pressed)", + "propertyName": "onSubmit", + "label": "onSubmit", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "Label styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Text color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + }, + { + "propertyName": "labelTextSize", + "label": "Text size", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Label Font Style", + "controlType": "BUTTON_GROUP", + "options": [ + { + "startIcon": "text-bold", + "value": "BOLD" + }, + { + "startIcon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Icon Options", + "dependencies": ["inputType"], + "children": [ + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used in input field", + "controlType": "ICON_SELECT", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Icon alignment", + "helpText": "Sets the icon alignment of input field", + "controlType": "ICON_TABS", + "defaultValue": "left", + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["iconName"] + } + ] + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of the widget", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "DROP_DOWN_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Allows users to select a single option. Values must be unique", + "propertyName": "options", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "" + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Selects the option with value by default", + "propertyName": "defaultOptionValue", + "label": "Default Option", + "controlType": "INPUT_TEXT", + "placeholderText": "GREEN", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "value or Array of values", + "example": "option1 | ['option1', 'option2']", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["selectionType"] + }, + { + "helpText": "Sets a Placeholder Text", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter placeholder text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isFilterable", + "label": "Filterable", + "helpText": "Makes the dropdown list filterable", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables server side filtering of the data", + "propertyName": "serverSideFiltering", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + }, + { + "label": "Auto", + "value": "Auto" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "labelTextColor", + "label": "Label text color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Label text size", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Label Font Style", + "controlType": "BUTTON_GROUP", + "options": [ + { + "startIcon": "text-bold", + "value": "BOLD" + }, + { + "startIcon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Actions", + "children": [ + { + "helpText": "when a user selects an option", + "propertyName": "onOptionChange", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "Trigger an action on change of filterText", + "dependencies": ["serverSideFiltering"], + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "DATE_PICKER_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "defaultDate", + "label": "Default Date", + "helpText": "Sets the default date of the widget. The date is updated if the default date changes", + "controlType": "DATE_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "ISO 8601 string", + "example": "2023-09-28T12:14:42.025Z", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["dateFormat"] + }, + { + "helpText": "Sets the format of the selected date", + "propertyName": "dateFormat", + "label": "Date format", + "controlType": "DROP_DOWN", + "isJSConvertible": true, + "options": [ + { + "label": "YYYY-MM-DD", + "value": "YYYY-MM-DD" + }, + { + "label": "YYYY-MM-DD HH:mm", + "value": "YYYY-MM-DD HH:mm" + }, + { + "label": "YYYY-MM-DDTHH:mm:ss.sssZ", + "value": "YYYY-MM-DDTHH:mm:ss.sssZ" + }, + { + "label": "DD/MM/YYYY", + "value": "DD/MM/YYYY" + }, + { + "label": "DD/MM/YYYY HH:mm", + "value": "DD/MM/YYYY HH:mm" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "minDate", + "label": "Min Date", + "helpText": "Defines the min date for this widget", + "controlType": "DATE_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "ISO 8601 string", + "example": "2023-09-28T12:14:42.025Z", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["dateFormat", "defaultDate"] + }, + { + "propertyName": "maxDate", + "label": "Max Date", + "helpText": "Defines the max date for this widget", + "controlType": "DATE_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "ISO 8601 string", + "example": "2023-09-28T12:14:42.025Z", + "autocompleteDataType": "STRING" + } + } + }, + "dependencies": ["dateFormat", "defaultDate"] + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "propertyName": "onDateSelected", + "label": "onDateSelected", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "ICON_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "FILE_PICKER_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "label", + "label": "Label", + "controlType": "INPUT_TEXT", + "helpText": "Sets the label of the button", + "placeholderText": "Enter label text", + "inputType": "TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "maxNumFiles", + "label": "Max No. files", + "helpText": "Sets the maximum number of files that can be uploaded at once", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter no. of files", + "inputType": "INTEGER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + } + }, + { + "propertyName": "maxFileSize", + "helpText": "Sets the maximum size of each file that can be uploaded", + "label": "Max file size(Mb)", + "controlType": "INPUT_TEXT", + "placeholderText": "File size in mb", + "inputType": "INTEGER", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": 1, + "max": 100, + "default": 5, + "passThroughOnZero": false + } + } + }, + { + "propertyName": "allowedFileTypes", + "helpText": "Restricts the type of files which can be uploaded", + "label": "Allowed file types", + "controlType": "DROP_DOWN", + "isMultiSelect": true, + "placeholderText": "Select file types", + "options": [ + { + "label": "Any File", + "value": "*" + }, + { + "label": "Images", + "value": "image/*" + }, + { + "label": "Videos", + "value": "video/*" + }, + { + "label": "Audio", + "value": "audio/*" + }, + { + "label": "Text", + "value": "text/*" + }, + { + "label": "MS Word", + "value": ".doc" + }, + { + "label": "JPEG", + "value": "image/jpeg" + }, + { + "label": "PNG", + "value": ".png" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY", + "params": { + "allowedValues": [ + "*", + "image/*", + "video/*", + "audio/*", + "text/*", + ".doc", + "image/jpeg", + ".png" + ] + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Set the format of the data read from the files", + "propertyName": "fileDataType", + "label": "Data format", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Base64", + "value": "Base64" + }, + { + "label": "Binary", + "value": "Binary" + }, + { + "label": "Text", + "value": "Text" + } + ], + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disable", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the user selects a file. Upload files to a CDN and stores their URLs in filepicker.files", + "propertyName": "onFilesSelected", + "label": "onFilesSelected", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "MULTI_SELECT_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Allows users to select multiple options. Values must be unique", + "propertyName": "options", + "label": "Options", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"label\": \"Option1\", \"value\": \"Option2\" }]", + "isBindProperty": true, + "isTriggerProperty": false, + "isJSConvertible": false, + "validation": { + "type": "ARRAY", + "params": { + "unique": ["value"], + "children": { + "type": "OBJECT", + "params": { + "required": true, + "allowedKeys": [ + { + "name": "label", + "type": "TEXT", + "params": { + "default": "", + "required": true + } + }, + { + "name": "value", + "type": "TEXT", + "params": { + "default": "" + } + } + ] + } + } + } + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + }, + { + "helpText": "Selects the option with value by default", + "propertyName": "defaultOptionValue", + "label": "Default value", + "controlType": "INPUT_TEXT", + "placeholderText": "[GREEN]", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "FUNCTION", + "params": { + "expected": { + "type": "Array of values", + "example": "['option1', 'option2']", + "autocompleteDataType": "ARRAY" + } + } + } + }, + { + "helpText": "Sets a Placeholder Text", + "propertyName": "placeholderText", + "label": "Placeholder", + "controlType": "INPUT_TEXT", + "placeholderText": "Search", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isRequired", + "label": "Required", + "helpText": "Makes input to the widget mandatory", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "helpText": "Disables input to this widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Enables server side filtering of the data", + "propertyName": "serverSideFiltering", + "label": "Server side filtering", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Controls the visibility of select all option in dropdown.", + "propertyName": "allowSelectAll", + "label": "Allow select all", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Label", + "children": [ + { + "helpText": "Sets the label text of the widget", + "propertyName": "labelText", + "label": "Text", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label position of the widget", + "propertyName": "labelPosition", + "label": "Position", + "controlType": "DROP_DOWN", + "options": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Top", + "value": "Top" + }, + { + "label": "Auto", + "value": "Auto" + } + ], + "defaultValue": "Top", + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Sets the label alignment of the widget", + "propertyName": "labelAlignment", + "label": "Alignment", + "controlType": "LABEL_ALIGNMENT_OPTIONS", + "fullWidth": false, + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "dependencies": ["labelPosition"] + }, + { + "helpText": "Sets the label width of the widget as the number of columns", + "propertyName": "labelWidth", + "label": "Width (in columns)", + "controlType": "NUMERIC_INPUT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "min": 0, + "validation": { + "type": "NUMBER", + "params": { + "natural": true + } + }, + "dependencies": ["labelPosition"] + } + ] + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "accentColor", + "label": "Accent color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + }, + "invisible": true + }, + { + "propertyName": "labelTextColor", + "label": "Label text color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelTextSize", + "label": "Label text size", + "controlType": "DROP_DOWN", + "defaultValue": "0.875rem", + "options": [ + { + "label": "S", + "value": "0.875rem", + "subText": "0.875rem" + }, + { + "label": "M", + "value": "1rem", + "subText": "1rem" + }, + { + "label": "L", + "value": "1.25rem", + "subText": "1.25rem" + }, + { + "label": "XL", + "value": "1.875rem", + "subText": "1.875rem" + }, + { + "label": "XXL", + "value": "3rem", + "subText": "3rem" + }, + { + "label": "3XL", + "value": "3.75rem", + "subText": "3.75rem" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "labelStyle", + "label": "Label Font Style", + "controlType": "BUTTON_GROUP", + "options": [ + { + "startIcon": "text-bold", + "value": "BOLD" + }, + { + "startIcon": "text-italic", + "value": "ITALIC" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Actions", + "children": [ + { + "helpText": "when a user selects an option", + "propertyName": "onOptionChange", + "label": "onOptionChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + }, + { + "helpText": "Trigger an action on change of filterText", + "dependencies": ["serverSideFiltering"], + "propertyName": "onFilterUpdate", + "label": "onFilterUpdate", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "backgroundColor", + "helpText": "Sets the background color of the widget", + "label": "Background color", + "controlType": "COLOR_PICKER", + "isBindProperty": false, + "isTriggerProperty": false + } + ] + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "FORM_BUTTON_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "text", + "label": "Label", + "helpText": "Sets the label of the button", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter label text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "Show helper text with button on hover", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter tooltip text", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "googleRecaptchaKey", + "label": "Google Recaptcha Key", + "helpText": "Sets Google Recaptcha v3 site key for button", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter google recaptcha key", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "recaptchaType", + "label": "Google reCAPTCHA version", + "controlType": "DROP_DOWN", + "helpText": "Select reCAPTCHA version", + "options": [ + { + "label": "reCAPTCHA v3", + "value": "V3" + }, + { + "label": "reCAPTCHA v2", + "value": "V2" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["V3", "V2"], + "default": "V3" + } + } + } + ] + }, + { + "sectionName": "Form options", + "children": [ + { + "helpText": "Disabled if the form is invalid, if this widget exists directly within a Form widget.", + "propertyName": "disabledWhenInvalid", + "label": "Disabled invalid forms", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Resets the fields of the form, on click, if this widget exists directly within a Form widget.", + "propertyName": "resetFormOnClick", + "label": "Reset form on success", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when the button is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "buttonColor", + "helpText": "Changes the color of the button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "buttonVariant", + "label": "Button variant", + "controlType": "DROP_DOWN", + "helpText": "Sets the variant of the icon button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"], + "default": "PRIMARY" + } + } + }, + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconName", + "label": "Icon", + "helpText": "Sets the icon to be used for the button", + "controlType": "ICON_SELECT", + "isBindProperty": false, + "isTriggerProperty": false, + "dependencies": ["iconAlign"], + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "placement", + "label": "Placement", + "controlType": "DROP_DOWN", + "helpText": "Sets the space between items", + "options": [ + { + "label": "Start", + "value": "START" + }, + { + "label": "Between", + "value": "BETWEEN" + }, + { + "label": "Center", + "value": "CENTER" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["START", "BETWEEN", "CENTER"], + "default": "CENTER" + } + } + }, + { + "propertyName": "iconAlign", + "label": "Icon Alignment", + "helpText": "Sets the icon alignment of the button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "options": [ + { + "startIcon": "align-left", + "value": "left" + }, + { + "startIcon": "align-right", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + } + } + ] + } + ], + "propertyPaneContentConfig": [ + { + "sectionName": "Basic", + "children": [ + { + "propertyName": "text", + "label": "Label", + "helpText": "Sets the label of the button", + "controlType": "INPUT_TEXT", + "placeholderText": "Submit", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "helpText": "when the button is clicked", + "propertyName": "onClick", + "label": "onClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Show helper text with button on hover", + "propertyName": "tooltip", + "label": "Tooltip", + "controlType": "INPUT_TEXT", + "placeholderText": "Submits Form", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isDisabled", + "label": "Disabled", + "controlType": "SWITCH", + "helpText": "Disables clicks to this widget", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Validation", + "children": [ + { + "propertyName": "googleRecaptchaKey", + "label": "Google reCAPTCHA key", + "helpText": "Sets Google reCAPTCHA site key for the button", + "controlType": "INPUT_TEXT", + "placeholderText": "reCAPTCHA Key", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "recaptchaType", + "label": "Google reCAPTCHA version", + "controlType": "DROP_DOWN", + "helpText": "Select reCAPTCHA version", + "options": [ + { + "label": "reCAPTCHA v3", + "value": "V3" + }, + { + "label": "reCAPTCHA v2", + "value": "V2" + } + ], + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["V3", "V2"], + "default": "V3" + } + } + } + ] + }, + { + "sectionName": "Form settings", + "children": [ + { + "helpText": "Disabled if the form is invalid, if this widget exists directly within a Form widget.", + "propertyName": "disabledWhenInvalid", + "label": "Disabled invalid forms", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Resets the fields of the form, on click, if this widget exists directly within a Form widget.", + "propertyName": "resetFormOnClick", + "label": "Reset form on success", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "buttonVariant", + "label": "Button variant", + "controlType": "ICON_TABS", + "defaultValue": "PRIMARY", + "fullWidth": true, + "helpText": "Sets the variant of the icon button", + "options": [ + { + "label": "Primary", + "value": "PRIMARY" + }, + { + "label": "Secondary", + "value": "SECONDARY" + }, + { + "label": "Tertiary", + "value": "TERTIARY" + } + ], + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["PRIMARY", "SECONDARY", "TERTIARY"], + "default": "PRIMARY" + } + } + } + ] + }, + { + "sectionName": "Icon", + "children": [ + { + "propertyName": "iconName", + "label": "Select icon", + "helpText": "Sets the icon to be used for the button", + "controlType": "ICON_SELECT", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "dependencies": ["iconAlign"], + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "iconAlign", + "label": "Position", + "helpText": "Sets the icon alignment of the button", + "controlType": "ICON_TABS", + "defaultValue": "left", + "fullWidth": false, + "options": [ + { + "startIcon": "skip-left-line", + "value": "left" + }, + { + "startIcon": "skip-right-line", + "value": "right" + } + ], + "isBindProperty": false, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["center", "left", "right"] + } + } + }, + { + "propertyName": "placement", + "label": "Placement", + "controlType": "ICON_TABS", + "fullWidth": true, + "helpText": "Sets the space between items", + "options": [ + { + "label": "Start", + "value": "START" + }, + { + "label": "Between", + "value": "BETWEEN" + }, + { + "label": "Center", + "value": "CENTER" + } + ], + "defaultValue": "CENTER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "allowedValues": ["START", "BETWEEN", "CENTER"], + "default": "CENTER" + } + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "buttonColor", + "helpText": "Changes the color of the button", + "label": "Button color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + }, + "PROGRESS_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Basic", + "children": [ + { + "helpText": "Determines if progress indicator will be determinate or not", + "propertyName": "isIndeterminate", + "label": "Infinite loading", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "helpText": "Determines the shape of the progress indicator", + "propertyName": "progressType", + "label": "Type", + "controlType": "ICON_TABS", + "fullWidth": true, + "options": [ + { + "label": "Circular", + "value": "circular" + }, + { + "label": "Linear", + "value": "linear" + } + ], + "defaultValue": "linear", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "helpText": "Sets the value of the progress indicator", + "propertyName": "progress", + "label": "Progress", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter progress value", + "isBindProperty": true, + "isTriggerProperty": false, + "defaultValue": 50, + "validation": { + "type": "NUMBER", + "params": { + "min": 0, + "max": 100, + "default": 50 + } + }, + "dependencies": ["isIndeterminate"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "helpText": "Sets the number of steps", + "propertyName": "steps", + "label": "Number of steps", + "controlType": "INPUT_TEXT", + "placeholderText": "Enter number of steps", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER", + "params": { + "min": 1, + "max": 100, + "default": 1, + "natural": true, + "passThroughOnZero": false + } + }, + "dependencies": ["isIndeterminate"] + }, + { + "helpText": "Controls the visibility of the widget", + "propertyName": "isVisible", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "counterClockwise", + "helpText": "Whether to rotate in counterclockwise direction", + "label": "Counterclockwise", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["isIndeterminate", "progressType"] + }, + { + "helpText": "Controls the visibility with the value of progress indicator", + "propertyName": "showResult", + "label": "Show result", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + }, + "dependencies": ["isIndeterminate"] + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "Color", + "children": [ + { + "helpText": "Sets the color of the progress indicator", + "propertyName": "fillColor", + "label": "Fill color", + "controlType": "COLOR_PICKER", + "defaultColor": "#03B365", + "isBindProperty": true, + "isJSConvertible": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {} + } + } + } + ] + } + ], + "features": null + }, + "CIRCULAR_PROGRESS_WIDGET": { + "propertyPaneConfig": [ + { + "sectionName": "General", + "children": [ + { + "propertyName": "progress", + "helpText": "Sets the progress value of the widget", + "label": "Progress", + "controlType": "INPUT_TEXT", + "placeholderText": "Value:", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "NUMBER" + } + }, + { + "propertyName": "counterClockwise", + "helpText": "Counter clock wise", + "label": "CounterClockWise", + "controlType": "SWITCH", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "showResult", + "helpText": "Controls the visibility of progress value", + "label": "Show result", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "isVisible", + "helpText": "Controls the visibility of the widget", + "label": "Visible", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Styles", + "children": [ + { + "propertyName": "fillColor", + "label": "Fill color", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "regex": {}, + "expected": { + "type": "string (HTML color name or HEX value)", + "example": "red | #9C0D38", + "autocompleteDataType": "STRING" + } + } + } + } + ] + } + ], + "propertyPaneContentConfig": [], + "propertyPaneStyleConfig": [], + "features": null + }, + "LIST_WIDGET": { + "propertyPaneConfig": [], + "propertyPaneContentConfig": [ + { + "sectionName": "Data", + "children": [ + { + "helpText": "Takes in an array of objects to display items in the list.", + "propertyName": "listData", + "label": "Items", + "controlType": "INPUT_TEXT", + "placeholderText": "[{ \"name\": \"John\" }]", + "inputType": "ARRAY", + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "ARRAY" + }, + "evaluationSubstitutionType": "SMART_SUBSTITUTE" + } + ] + }, + { + "sectionName": "Pagination", + "children": [ + { + "helpText": "Bind the List.pageNo property in your API and call it onPageChange", + "propertyName": "serverSidePaginationEnabled", + "label": "Server side pagination", + "controlType": "SWITCH", + "isBindProperty": false, + "isTriggerProperty": false + }, + { + "helpText": "when a list page is changed", + "propertyName": "onPageChange", + "label": "onPageChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["serverSidePaginationEnabled"] + }, + { + "helpText": "when a list page size is changed", + "propertyName": "onPageSizeChange", + "label": "onPageSizeChange", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["serverSidePaginationEnabled"] + } + ] + }, + { + "sectionName": "General", + "children": [ + { + "propertyName": "isVisible", + "label": "Visible", + "helpText": "Controls the visibility of the widget", + "controlType": "SWITCH", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + }, + { + "propertyName": "animateLoading", + "label": "Animate loading", + "controlType": "SWITCH", + "helpText": "Controls the loading of the widget", + "defaultValue": true, + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "BOOLEAN" + } + } + ] + }, + { + "sectionName": "Events", + "children": [ + { + "helpText": "when a grid list item is clicked", + "propertyName": "onListItemClick", + "label": "onListItemClick", + "controlType": "ACTION_SELECTOR", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": true, + "dependencies": ["listData"] + } + ] + } + ], + "propertyPaneStyleConfig": [ + { + "sectionName": "General", + "children": [ + { + "helpText": "Spacing between items in Pixels", + "placeholderText": "0", + "propertyName": "gridGap", + "label": "Item Spacing (px)", + "controlType": "INPUT_TEXT", + "isBindProperty": true, + "isTriggerProperty": false, + "inputType": "INTEGER", + "validation": { + "type": "NUMBER", + "params": { + "min": -8 + } + } + } + ] + }, + { + "sectionName": "Color", + "children": [ + { + "propertyName": "itemBackgroundColor", + "label": "Item Background color", + "helpText": "Background color of the list item", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "defaultValue": "#FFFFFF", + "validation": { + "type": "TEXT", + "params": { + "expected": { + "type": "Color name | hex code", + "example": "#FFFFFF", + "autocompleteDataType": "STRING" + } + } + } + }, + { + "propertyName": "backgroundColor", + "label": "Background color", + "helpText": "Background color of the list container", + "controlType": "COLOR_PICKER", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT", + "params": { + "expected": { + "type": "Color name | hex code", + "example": "#FFFFFF", + "autocompleteDataType": "STRING" + } + } + } + } + ] + }, + { + "sectionName": "Border and shadow", + "children": [ + { + "propertyName": "borderRadius", + "label": "Border radius", + "helpText": "Rounds the corners of the icon button's outer border edge", + "controlType": "BORDER_RADIUS_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + }, + { + "propertyName": "boxShadow", + "label": "Box shadow", + "helpText": "Enables you to cast a drop shadow from the frame of the widget", + "controlType": "BOX_SHADOW_OPTIONS", + "isJSConvertible": true, + "isBindProperty": true, + "isTriggerProperty": false, + "validation": { + "type": "TEXT" + } + } + ] + } + ], + "features": null + } +} diff --git a/app/client/packages/dsl/src/migrate/index.ts b/app/client/packages/dsl/src/migrate/index.ts new file mode 100644 index 0000000000..4565f19ac5 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/index.ts @@ -0,0 +1,599 @@ +import { flattenDSL } from "../transform"; +import { updateContainers } from "./migrations/001-update-containers"; +import { chartDataMigration } from "./migrations/002-chart-data-migration"; +import { mapDataMigration } from "./migrations/003-map-data-migration"; +import { singleChartDataMigration } from "./migrations/004-single-chart-data-migration"; +import { tabsWidgetTabsPropertyMigration } from "./migrations/005-tabs-widget-property-migration"; +import { dynamicPathListMigration } from "./migrations/006-dynamic-path-list-migration"; +import { canvasNameConflictMigration } from "./migrations/007-canvas-name-conflict-migration"; +import { renamedCanvasNameConflictMigration } from "./migrations/008-renamed-canvas-name-conflict-migration"; +import { tableWidgetPropertyPaneMigrations } from "./migrations/009-table-widget-property-pane-migration"; +import { addVersionNumberMigration } from "./migrations/010-add-version-number-migration"; +import { migrateTablePrimaryColumnsBindings } from "./migrations/011-migrate-table-primary-columns-binding"; +import { migrateIncorrectDynamicBindingPathLists } from "./migrations/012-migrate-incorrect-dynamic-binding-path-lists"; +import { migrateOldChartData } from "./migrations/013-migrate-old-chart-data"; +import { rteDefaultValueMigration } from "./migrations/014-rte-default-value-migration"; +import { migrateTextStyleFromTextWidget } from "./migrations/015-migrate-text-style-from-text-widget"; +import { migrateChartDataFromArrayToObject } from "./migrations/016-migrate-chart-data-from-array-to-object"; +import { migrateTabsData } from "./migrations/017-migrate-tabs-data"; +import { migrateInitialValues } from "./migrations/018-migrate-initial-values"; +import { + getCanvasSnapRows, + migrateToNewLayout, +} from "./migrations/019-migrate-to-new-layout"; +import { migrateNewlyAddedTabsWidgetsMissingData } from "./migrations/020-migrate-newly-added-tabs-widgets-missing-data"; +import { + migrateOverFlowingTabsWidgets, + migrateWidgetsWithoutLeftRightColumns, +} from "./migrations/021-migrate-overflowing-tabs-widgets"; +import { migrateTableWidgetParentRowSpaceProperty } from "./migrations/022-migrate-table-widget-parent-row-space-property"; +import { addLogBlackListToAllListWidgetChildren } from "./migrations/023-add-log-blacklist-to-all-widget-children"; +import { migrateTableWidgetHeaderVisibilityProperties } from "./migrations/024-migrate-table-widget-header-visibility-properties"; +import { migrateItemsToListDataInListWidget } from "./migrations/025-migrate-items-to-list-data-in-list-widget"; +import { migrateDatePickerMinMaxDate } from "./migrations/026-migrate-datepicker-min-max-date"; +import { migrateFilterValueForDropDownWidget } from "./migrations/027-migrate-filter-value-for-dropdown-widget"; +import { migrateTablePrimaryColumnsComputedValue } from "./migrations/028-migrate-table-primary-columns-computed-value"; +import { migrateToNewMultiSelect } from "./migrations/029-migrate-to-new-multiselect"; +import { migrateTableWidgetDelimiterProperties } from "./migrations/030-migrate-table-widget-delimiter-properties"; +import { migrateIsDisabledToButtonColumn } from "./migrations/031-migrate-is-disabled-to-button-column"; +import { migrateTableDefaultSelectedRow } from "./migrations/032-migrate-table-default-selected-row"; +import { migrateMenuButtonWidgetButtonProperties } from "./migrations/033-migrate-menu-button-widget-button-properties"; +import { migrateButtonWidgetValidation } from "./migrations/034-migrate-button-widget-validation"; +import { migrateInputValidation } from "./migrations/035-migrate-input-validation"; +import { revertTableDefaultSelectedRow } from "./migrations/036-revert-table-default-selected-row"; +import { migrateTableSanitizeColumnKeys } from "./migrations/037-migrate-table-sanitize-column-keys"; +import { migrateResizableModalWidgetProperties } from "./migrations/038-migrate-resizable-modal-widget-properties"; +import { migrateTableWidgetSelectedRowBindings } from "./migrations/039-migrate-table-widget-selected-row-bindings"; +import { revertButtonStyleToButtonColor } from "./migrations/040-revert-button-style-to-button-color"; +import { migrateButtonVariant } from "./migrations/041-migrate-button-variant"; +import { migrateMapWidgetIsClickedMarkerCentered } from "./migrations/042-migrate-map-widget-is-clicked-marker-centered"; +import { mapAllowHorizontalScrollMigration } from "./migrations/043-map-allow-horizontal-scroll-mirgation"; +import { isSortableMigration } from "./migrations/044-is-sortable-migration"; +import { migrateTableWidgetIconButtonVariant } from "./migrations/045-migrate-table-widget-icon-button-variant"; +import { migrateCheckboxGroupWidgetInlineProperty } from "./migrations/046-migrate-checkbox-group-widget-inline-property"; +import { migrateRecaptchaType } from "./migrations/048-migrate-recaptcha-type"; +import { addPrivateWidgetsToAllListWidgets } from "./migrations/049-add-private-widgets-to-all-list-widgets"; +import { migratePhoneInputWidgetAllowFormatting } from "./migrations/051-migrate-phone-input-widget-allow-formatting"; +import { migrateModalIconButtonWidget } from "./migrations/052-migrate-modal-icon-button-widget"; +import { migrateScrollTruncateProperties } from "./migrations/053-migrate-scroll-truncate-property"; +import { migratePhoneInputWidgetDefaultDialCode } from "./migrations/054-migrate-phone-input-widget-default-dial-code"; +import { migrateCurrencyInputWidgetDefaultCurrencyCode } from "./migrations/055-migrate-currency-input-widget-default-currency-code"; +import { migrateRadioGroupAlignmentProperty } from "./migrations/056-migrate-radio-group-alignment-property"; +import { migrateStylingPropertiesForTheming } from "./migrations/057-migrate-styling-properties-for-theming"; +import { migrateCheckboxSwitchProperty } from "./migrations/058-migrate-checkbox-switch-property"; +import { migrateChartWidgetReskinningData } from "./migrations/059-migrate-chart-widget-reskinning-data"; +import { migrateTableWidgetV2Validation } from "./migrations/060-migrate-table-widget-v2-validation"; +import { MigrateSelectTypeWidgetDefaultValue } from "./migrations/062-migrate-select-type-widget-default-value"; +import { migrateMapChartWidgetReskinningData } from "./migrations/063-migrate-map-chart-widget-reskinning-data"; +import { migrateRateWidgetDisabledState } from "./migrations/064-migrate-rate-widget-disabed-state"; +import { migrateCodeScannerLayout } from "./migrations/065-migrate-code-scanner-layout"; +import { migrateTableWidgetV2ValidationBinding } from "./migrations/066-migrate-table-widget-v2-validation-binding"; +import { migrateLabelPosition } from "./migrations/067-migrate-label-position"; +import { migratePropertiesForDynamicHeight } from "./migrations/068-migrate-properties-for-dynamic-height"; +import { migrateMenuButtonDynamicItems } from "./migrations/069-migrate-menu-button-dynamic-items"; +import { migrateChildStylesheetFromDynamicBindingPathList } from "./migrations/070-migrate-child-stylesheet-from-dynamic-binding-path-list"; +import { migrateTableWidgetV2SelectOption } from "./migrations/071-migrate-table-widget-v2-select-option"; +import { migrateListWidgetChildrenForAutoHeight } from "./migrations/072-migrate-list-widget-children-for-auto-height"; +import { migrateInputWidgetShowStepArrows } from "./migrations/073-mirgate-input-widget-show-step-arrows"; +import { migrateMenuButtonDynamicItemsInsideTableWidget } from "./migrations/074-migrate-mwnu-button-dynamic-items-inside-table-widget"; +import { migrateInputWidgetsMultiLineInputType } from "./migrations/075-migrate-input-widgets-multiline-input-type"; +import { migrateColumnFreezeAttributes } from "./migrations/076-migrate-column-freeze-attributes"; +import { migrateTableSelectOptionAttributesForNewRow } from "./migrations/077-migrate-table-select-option-attributes-for-new-row"; +import { migrateBindingPrefixSuffixForInlineEditValidationControl } from "./migrations/078-migrate-binding-prefix-suffix-for-inline-edit-validation-control"; +import { migrateTableWidgetTableDataJsMode } from "./migrations/079-migrate-table-widget-table-data-js-mode"; +import { migrateSelectWidgetOptionToSourceData } from "./migrations/080-migrate-select-widget-option-to-source-data"; +import { migrateSelectWidgetSourceDataBindingPathList } from "./migrations/081-migrate-select-widget-source-data-binding-path-list"; +import { migrateChartWidgetLabelOrientationStaggerOption } from "./migrations/082-migrate-chart-widget-label-orientation-stagger-option"; +import { migrateAddShowHideDataPointLabels } from "./migrations/083-migrate-add-show-hide-data-point-labels"; +import { migrateSelectWidgetAddSourceDataPropertyPathList } from "./migrations/084-migrate-select-widget-add-source-data-property-path-list"; +import { migrateDefaultValuesForCustomEChart } from "./migrations/085-migrate-default-values-for-custom-echart"; +import { migrateTableServerSideFiltering } from "./migrations/086-migrate-table-server-side-filtering"; +import type { DSLWidget } from "./types"; + +export const LATEST_DSL_VERSION = 87; + +export const calculateDynamicHeight = () => { + const DEFAULT_GRID_ROW_HEIGHT = 10; + const screenHeight = typeof window !== "undefined" ? window.innerHeight : 600; + const gridRowHeight = DEFAULT_GRID_ROW_HEIGHT; + // DGRH - DEFAULT_GRID_ROW_HEIGHT + // View Mode: Header height + Page Selection Tab = 8 * DGRH (approx) + // Edit Mode: Header height + Canvas control = 8 * DGRH (approx) + // buffer: ~8 grid row height + const buffer = + gridRowHeight + + 2 * 48 /*pixelToNumber(theme.smallHeaderHeight) */ + + 37; /*pixelToNumber(theme.bottomBarHeight);*/ + const calculatedMinHeight = + Math.floor((screenHeight - buffer) / gridRowHeight) * gridRowHeight; + return calculatedMinHeight; +}; + +const migrateUnversionedDSL = (currentDSL: DSLWidget) => { + const DEFAULT_GRID_ROW_HEIGHT = 10; + if (currentDSL.version === undefined) { + // Since this top level widget is a CANVAS_WIDGET, + // DropTargetComponent needs to know the minimum height the canvas can take + // See DropTargetUtils.ts + currentDSL.minHeight = calculateDynamicHeight(); + currentDSL.bottomRow = currentDSL.minHeight - DEFAULT_GRID_ROW_HEIGHT; + // For the first time the DSL is created, remove one row from the total possible rows + // to adjust for padding and margins. + currentDSL.snapRows = + Math.floor(currentDSL.bottomRow / DEFAULT_GRID_ROW_HEIGHT) - 1; + + // Force the width of the canvas to 1224 px + currentDSL.rightColumn = 1224; + // The canvas is a CANVAS_WIDGET which doesn't have a background or borders by default + currentDSL.backgroundColor = "none"; + currentDSL.containerStyle = "none"; + currentDSL.type = "CANVAS_WIDGET"; + currentDSL.detachFromLayout = true; + currentDSL.canExtend = true; + + // Update version to make sure this doesn't run every time. + currentDSL.version = 1; + } + return currentDSL; +}; + +// A rudimentary transform function which updates the DSL based on its version. +// A more modular approach needs to be designed. +// This needs the widget config to be already built to migrate correctly +const migrateVersionedDSL = (currentDSL: DSLWidget, newPage = false) => { + if (currentDSL.version === 1) { + if (currentDSL.children && currentDSL.children.length > 0) + currentDSL.children = currentDSL.children.map(updateContainers); + currentDSL.version = 2; + } + if (currentDSL.version === 2) { + currentDSL = chartDataMigration(currentDSL); + currentDSL.version = 3; + } + if (currentDSL.version === 3) { + currentDSL = mapDataMigration(currentDSL); + currentDSL.version = 4; + } + if (currentDSL.version === 4) { + currentDSL = singleChartDataMigration(currentDSL); + currentDSL.version = 5; + } + if (currentDSL.version === 5) { + currentDSL = tabsWidgetTabsPropertyMigration(currentDSL); + currentDSL.version = 6; + } + if (currentDSL.version === 6) { + currentDSL = dynamicPathListMigration(currentDSL); + currentDSL.version = 7; + } + + if (currentDSL.version === 7) { + currentDSL = canvasNameConflictMigration(currentDSL); + currentDSL.version = 8; + } + + if (currentDSL.version === 8) { + currentDSL = renamedCanvasNameConflictMigration(currentDSL); + currentDSL.version = 9; + } + + if (currentDSL.version === 9) { + currentDSL = tableWidgetPropertyPaneMigrations(currentDSL); + currentDSL.version = 10; + } + + if (currentDSL.version === 10) { + currentDSL = addVersionNumberMigration(currentDSL); + currentDSL.version = 11; + } + + if (currentDSL.version === 11) { + currentDSL = migrateTablePrimaryColumnsBindings(currentDSL); + currentDSL.version = 12; + } + + if (currentDSL.version === 12) { + currentDSL = migrateIncorrectDynamicBindingPathLists(currentDSL); + currentDSL.version = 13; + } + + if (currentDSL.version === 13) { + currentDSL = migrateOldChartData(currentDSL); + currentDSL.version = 14; + } + + if (currentDSL.version === 14) { + currentDSL = rteDefaultValueMigration(currentDSL); + currentDSL.version = 15; + } + + if (currentDSL.version === 15) { + currentDSL = migrateTextStyleFromTextWidget(currentDSL); + currentDSL.version = 16; + } + + if (currentDSL.version === 16) { + currentDSL = migrateChartDataFromArrayToObject(currentDSL); + currentDSL.version = 17; + } + + if (currentDSL.version === 17) { + currentDSL = migrateTabsData(currentDSL); + currentDSL.version = 18; + } + + if (currentDSL.version === 18) { + currentDSL = migrateInitialValues(currentDSL); + currentDSL.version = 19; + } + + if (currentDSL.version === 19) { + currentDSL.snapColumns = 64; // GridDefaults.DEFAULT_GRID_COLUMNS; + currentDSL.snapRows = getCanvasSnapRows(currentDSL.bottomRow); + if (!newPage) { + currentDSL = migrateToNewLayout(currentDSL); + } + currentDSL.version = 20; + } + + if (currentDSL.version === 20) { + currentDSL = migrateNewlyAddedTabsWidgetsMissingData(currentDSL); + currentDSL.version = 21; + } + + if (currentDSL.version === 21) { + const canvasWidgets = flattenDSL(currentDSL); + currentDSL = migrateWidgetsWithoutLeftRightColumns( + currentDSL, + canvasWidgets, + ); + currentDSL = migrateOverFlowingTabsWidgets(currentDSL, canvasWidgets); + currentDSL.version = 22; + } + + if (currentDSL.version === 22) { + currentDSL = migrateTableWidgetParentRowSpaceProperty(currentDSL); + currentDSL.version = 23; + } + + if (currentDSL.version === 23) { + currentDSL = addLogBlackListToAllListWidgetChildren(currentDSL); + currentDSL.version = 24; + } + + if (currentDSL.version === 24) { + currentDSL = migrateTableWidgetHeaderVisibilityProperties(currentDSL); + currentDSL.version = 25; + } + + if (currentDSL.version === 25) { + currentDSL = migrateItemsToListDataInListWidget(currentDSL); + currentDSL.version = 26; + } + + if (currentDSL.version === 26) { + currentDSL = migrateDatePickerMinMaxDate(currentDSL); + currentDSL.version = 27; + } + if (currentDSL.version === 27) { + currentDSL = migrateFilterValueForDropDownWidget(currentDSL); + currentDSL.version = 28; + } + + if (currentDSL.version === 28) { + currentDSL = migrateTablePrimaryColumnsComputedValue(currentDSL); + currentDSL.version = 29; + } + + if (currentDSL.version === 29) { + currentDSL = migrateToNewMultiSelect(currentDSL); + currentDSL.version = 30; + } + if (currentDSL.version === 30) { + currentDSL = migrateTableWidgetDelimiterProperties(currentDSL); + currentDSL.version = 31; + } + + if (currentDSL.version === 31) { + currentDSL = migrateIsDisabledToButtonColumn(currentDSL); + currentDSL.version = 32; + } + + if (currentDSL.version === 32) { + currentDSL = migrateTableDefaultSelectedRow(currentDSL); + currentDSL.version = 33; + } + + if (currentDSL.version === 33) { + currentDSL = migrateMenuButtonWidgetButtonProperties(currentDSL); + currentDSL.version = 34; + } + + if (currentDSL.version === 34) { + currentDSL = migrateButtonWidgetValidation(currentDSL); + currentDSL.version = 35; + } + + if (currentDSL.version === 35) { + currentDSL = migrateInputValidation(currentDSL); + currentDSL.version = 36; + } + + if (currentDSL.version === 36) { + currentDSL = revertTableDefaultSelectedRow(currentDSL); + currentDSL.version = 37; + } + + if (currentDSL.version === 37) { + currentDSL = migrateTableSanitizeColumnKeys(currentDSL); + currentDSL.version = 38; + } + + if (currentDSL.version === 38) { + currentDSL = migrateResizableModalWidgetProperties(currentDSL); + currentDSL.version = 39; + } + + if (currentDSL.version === 39) { + currentDSL = migrateTableWidgetSelectedRowBindings(currentDSL); + currentDSL.version = 40; + } + + if (currentDSL.version === 40) { + currentDSL = revertButtonStyleToButtonColor(currentDSL); + currentDSL.version = 41; + } + + if (currentDSL.version === 41) { + currentDSL = migrateButtonVariant(currentDSL); + currentDSL.version = 42; + } + + if (currentDSL.version === 42) { + currentDSL = migrateMapWidgetIsClickedMarkerCentered(currentDSL); + currentDSL.version = 43; + } + + if (currentDSL.version === 43) { + currentDSL = mapAllowHorizontalScrollMigration(currentDSL); + currentDSL.version = 44; + } + if (currentDSL.version === 44) { + currentDSL = isSortableMigration(currentDSL); + currentDSL.version = 45; + } + + if (currentDSL.version === 45) { + currentDSL = migrateTableWidgetIconButtonVariant(currentDSL); + currentDSL.version = 46; + } + + if (currentDSL.version === 46) { + currentDSL = migrateCheckboxGroupWidgetInlineProperty(currentDSL); + currentDSL.version = 47; + } + + if (currentDSL.version === 47) { + // We're skipping this to fix a bad table migration. + // skipped migration is added as version 51 + currentDSL.version = 48; + } + + if (currentDSL.version === 48) { + currentDSL = migrateRecaptchaType(currentDSL); + currentDSL.version = 49; + } + + if (currentDSL.version === 49) { + currentDSL = addPrivateWidgetsToAllListWidgets(currentDSL); + currentDSL.version = 50; + } + + if (currentDSL.version === 50) { + /* + * We're skipping this to fix a bad table migration - migrateTableWidgetNumericColumnName + * it overwrites the computedValue of the table columns + */ + + currentDSL.version = 51; + } + + if (currentDSL.version === 51) { + currentDSL = migratePhoneInputWidgetAllowFormatting(currentDSL); + currentDSL.version = 52; + } + + if (currentDSL.version === 52) { + currentDSL = migrateModalIconButtonWidget(currentDSL); + currentDSL.version = 53; + } + + if (currentDSL.version === 53) { + currentDSL = migrateScrollTruncateProperties(currentDSL); + currentDSL.version = 54; + } + + if (currentDSL.version === 54) { + currentDSL = migratePhoneInputWidgetDefaultDialCode(currentDSL); + currentDSL.version = 55; + } + + if (currentDSL.version === 55) { + currentDSL = migrateCurrencyInputWidgetDefaultCurrencyCode(currentDSL); + currentDSL.version = 56; + } + + if (currentDSL.version === 56) { + currentDSL = migrateRadioGroupAlignmentProperty(currentDSL); + currentDSL.version = 57; + } + + if (currentDSL.version === 57) { + currentDSL = migrateStylingPropertiesForTheming(currentDSL); + currentDSL.version = 58; + } + + if (currentDSL.version === 58) { + currentDSL = migrateCheckboxSwitchProperty(currentDSL); + currentDSL.version = 59; + } + + if (currentDSL.version === 59) { + /** + * migrateChartWidgetReskinningData function will be executed again in version 61, + * since for older apps the accentColor and fontFamily didn't get migrated. + */ + currentDSL = migrateChartWidgetReskinningData(currentDSL); + currentDSL.version = 60; + } + + if (currentDSL.version === 60) { + currentDSL = migrateTableWidgetV2Validation(currentDSL); + currentDSL.version = 61; + } + + if (currentDSL.version === 61) { + currentDSL = migrateChartWidgetReskinningData(currentDSL); + currentDSL.version = 62; + } + + if (currentDSL.version === 62) { + currentDSL = MigrateSelectTypeWidgetDefaultValue(currentDSL); + currentDSL.version = 63; + } + + if (currentDSL.version === 63) { + currentDSL = migrateMapChartWidgetReskinningData(currentDSL); + currentDSL.version = 64; + } + + if (currentDSL.version === 64) { + currentDSL = migrateRateWidgetDisabledState(currentDSL); + currentDSL.version = 65; + } + + if (currentDSL.version === 65) { + currentDSL = migrateCodeScannerLayout(currentDSL); + currentDSL.version = 66; + } + + if (currentDSL.version === 66) { + currentDSL = migrateTableWidgetV2ValidationBinding(currentDSL); + currentDSL.version = 67; + } + + if (currentDSL.version === 67) { + currentDSL = migrateLabelPosition(currentDSL); + currentDSL.version = 68; + } + + if (currentDSL.version === 68) { + currentDSL = migratePropertiesForDynamicHeight(currentDSL); + currentDSL.version = 69; + } + + if (currentDSL.version === 69) { + currentDSL = migrateMenuButtonDynamicItems(currentDSL); + currentDSL.version = 70; + } + + if (currentDSL.version === 70) { + currentDSL = migrateChildStylesheetFromDynamicBindingPathList(currentDSL); + currentDSL.version = 71; + } + + if (currentDSL.version === 71) { + currentDSL = migrateTableWidgetV2SelectOption(currentDSL); + currentDSL.version = 72; + } + + if (currentDSL.version === 72) { + currentDSL = migrateListWidgetChildrenForAutoHeight(currentDSL); + currentDSL.version = 73; + } + + if (currentDSL.version === 73) { + currentDSL = migrateInputWidgetShowStepArrows(currentDSL); + currentDSL.version = 74; + } + + if (currentDSL.version === 74) { + currentDSL = migrateMenuButtonDynamicItemsInsideTableWidget(currentDSL); + currentDSL.version = 75; + } + + if (currentDSL.version === 75) { + currentDSL = migrateInputWidgetsMultiLineInputType(currentDSL); + currentDSL.version = 76; + } + + if (currentDSL.version === 76) { + currentDSL = migrateColumnFreezeAttributes(currentDSL); + currentDSL.version = 77; + } + + if (currentDSL.version === 77) { + currentDSL = migrateTableSelectOptionAttributesForNewRow(currentDSL); + currentDSL.version = 78; + } + + if (currentDSL.version == 78) { + currentDSL = + migrateBindingPrefixSuffixForInlineEditValidationControl(currentDSL); + currentDSL.version = 79; + } + + if (currentDSL.version == 79) { + currentDSL = migrateTableWidgetTableDataJsMode(currentDSL); + currentDSL.version = 80; + } + + if (currentDSL.version === 80) { + currentDSL = migrateSelectWidgetOptionToSourceData(currentDSL); + currentDSL.version = 81; + } + + if (currentDSL.version === 81) { + currentDSL = migrateSelectWidgetSourceDataBindingPathList(currentDSL); + currentDSL.version = 82; + } + + if (currentDSL.version == 82) { + currentDSL = migrateChartWidgetLabelOrientationStaggerOption(currentDSL); + currentDSL.version = 83; + } + + if (currentDSL.version == 83) { + currentDSL = migrateAddShowHideDataPointLabels(currentDSL); + currentDSL.version = 84; + } + + if (currentDSL.version === 84) { + currentDSL = migrateSelectWidgetAddSourceDataPropertyPathList(currentDSL); + currentDSL.version = 85; + } + + if (currentDSL.version === 85) { + currentDSL = migrateDefaultValuesForCustomEChart(currentDSL); + currentDSL.version = 86; + } + + if (currentDSL.version === 86) { + currentDSL = migrateTableServerSideFiltering(currentDSL); + currentDSL.version = LATEST_DSL_VERSION; + } + + return currentDSL; +}; + +export const migrateDSL = ( + currentDSL: DSLWidget, + newPage = false, +): DSLWidget => { + if (currentDSL.version === undefined) { + const initialDSL = migrateUnversionedDSL(currentDSL); + return migrateVersionedDSL(initialDSL, newPage) as DSLWidget; + } else { + return migrateVersionedDSL(currentDSL, newPage) as DSLWidget; + } +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/001-update-containers.ts b/app/client/packages/dsl/src/migrate/migrations/001-update-containers.ts new file mode 100644 index 0000000000..198d840121 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/001-update-containers.ts @@ -0,0 +1,40 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { DSLWidget } from "../types"; +import { generateReactKey } from "../utils"; + +export const updateContainers = (dsl: DSLWidget) => { + if (dsl.type === "CONTAINER_WIDGET" || dsl.type === "FORM_WIDGET") { + if ( + !( + dsl.children && + dsl.children.length > 0 && + (dsl.children[0].type === "CANVAS_WIDGET" || + dsl.children[0].type === "FORM_WIDGET") + ) + ) { + const canvas: any = { + ...dsl, + backgroundColor: "transparent", + type: "CANVAS_WIDGET", + detachFromLayout: true, + topRow: 0, + leftColumn: 0, + rightColumn: dsl.parentColumnSpace * (dsl.rightColumn - dsl.leftColumn), + bottomRow: dsl.parentRowSpace * (dsl.bottomRow - dsl.topRow), + widgetName: generateReactKey(), + widgetId: generateReactKey(), + parentRowSpace: 1, + parentColumnSpace: 1, + containerStyle: "none", + canExtend: false, + isVisible: true, + }; + delete canvas.dynamicBindings; + delete canvas.dynamicProperties; + if (canvas.children && canvas.children.length > 0) + canvas.children = canvas.children.map(updateContainers); + dsl.children = [{ ...canvas }]; + } + } + return dsl; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/002-chart-data-migration.ts b/app/client/packages/dsl/src/migrate/migrations/002-chart-data-migration.ts new file mode 100644 index 0000000000..d804328ccc --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/002-chart-data-migration.ts @@ -0,0 +1,23 @@ +import type { DSLWidget } from "../types"; + +export const chartDataMigration = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { + if ( + children.type === "CHART_WIDGET" && + children.chartData && + children.chartData.length && + !Array.isArray(children.chartData[0]) + ) { + children.chartData = [{ data: children.chartData }]; + } else if ( + children.type === "CONTAINER_WIDGET" || + children.type === "FORM_WIDGET" || + children.type === "CANVAS_WIDGET" || + children.type === "TABS_WIDGET" + ) { + children = chartDataMigration(children); + } + return children; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/003-map-data-migration.ts b/app/client/packages/dsl/src/migrate/migrations/003-map-data-migration.ts new file mode 100644 index 0000000000..78ddf24c6a --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/003-map-data-migration.ts @@ -0,0 +1,62 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { DSLWidget } from "../types"; + +export const mapDataMigration = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { + if (children.type === "MAP_WIDGET") { + if (children.markers) { + children.markers = children.markers.map( + (marker: { lat: any; lng: any; long: any; title: any }) => { + return { + lat: marker.lat, + long: marker.lng || marker.long, + title: marker.title, + }; + }, + ); + } + if (children.defaultMarkers) { + const defaultMarkers = JSON.parse(children.defaultMarkers); + children.defaultMarkers = defaultMarkers.map( + (marker: { + lat: number; + lng: number; + long: number; + title: string; + }) => { + return { + lat: marker.lat, + long: marker.lng || marker.long, + title: marker.title, + }; + }, + ); + } + if (children.selectedMarker) { + children.selectedMarker = { + lat: children.selectedMarker.lat, + long: children.selectedMarker.lng || children.selectedMarker.long, + title: children.selectedMarker.title, + }; + } + if (children.mapCenter) { + children.mapCenter = { + lat: children.mapCenter.lat, + long: children.mapCenter.lng || children.mapCenter.long, + title: children.mapCenter.title, + }; + } + if (children.center) { + children.center = { + lat: children.center.lat, + long: children.center.lng || children.center.long, + title: children.center.title, + }; + } + } else if (children.children && children.children.length > 0) { + children = mapDataMigration(children); + } + return children; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/004-single-chart-data-migration.ts b/app/client/packages/dsl/src/migrate/migrations/004-single-chart-data-migration.ts new file mode 100644 index 0000000000..853fc83bd5 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/004-single-chart-data-migration.ts @@ -0,0 +1,30 @@ +import type { DSLWidget } from "../types"; + +export const singleChartDataMigration = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "CHART_WIDGET") { + // Check if chart widget has the deprecated singleChartData property + if (child.hasOwnProperty("singleChartData")) { + // This is to make sure that the format of the chartData is accurate + if ( + Array.isArray(child.singleChartData) && + !child.singleChartData[0].hasOwnProperty("seriesName") + ) { + child.singleChartData = { + seriesName: "Series 1", + data: child.singleChartData || [], + }; + } + //TODO: other possibilities? + child.chartData = JSON.stringify([...child.singleChartData]); + delete child.singleChartData; + } + } + if (child.children && child.children.length > 0) { + child = singleChartDataMigration(child); + } + return child; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/005-tabs-widget-property-migration.ts b/app/client/packages/dsl/src/migrate/migrations/005-tabs-widget-property-migration.ts new file mode 100644 index 0000000000..d73be12d96 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/005-tabs-widget-property-migration.ts @@ -0,0 +1,35 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import isString from "lodash/isString"; +import log from "loglevel"; +import type { DSLWidget } from "../types"; + +export const tabsWidgetTabsPropertyMigration = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children + ?.filter(Boolean) + .map((child: DSLWidget) => { + if (child.type === "TABS_WIDGET") { + try { + const tabs = isString(child.tabs) + ? JSON.parse(child.tabs) + : child.tabs; + const newTabs = tabs.map((tab: any) => { + const childForTab = child.children + ?.filter(Boolean) + .find((tabChild: DSLWidget) => tabChild.tabId === tab.id); + if (childForTab) { + tab.widgetId = childForTab.widgetId; + } + return tab; + }); + child.tabs = JSON.stringify(newTabs); + } catch (migrationError) { + log.debug({ migrationError }); + } + } + if (child.children && child.children.length) { + child = tabsWidgetTabsPropertyMigration(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/006-dynamic-path-list-migration.ts b/app/client/packages/dsl/src/migrate/migrations/006-dynamic-path-list-migration.ts new file mode 100644 index 0000000000..c6dc0a3031 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/006-dynamic-path-list-migration.ts @@ -0,0 +1,26 @@ +import type { DSLWidget } from "../types"; + +export const dynamicPathListMigration = (currentDSL: DSLWidget) => { + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map(dynamicPathListMigration); + } + if (currentDSL.dynamicBindings) { + currentDSL.dynamicBindingPathList = Object.keys( + currentDSL.dynamicBindings, + ).map((path) => ({ key: path })); + delete currentDSL.dynamicBindings; + } + if (currentDSL.dynamicTriggers) { + currentDSL.dynamicTriggerPathList = Object.keys( + currentDSL.dynamicTriggers, + ).map((path) => ({ key: path })); + delete currentDSL.dynamicTriggers; + } + if (currentDSL.dynamicProperties) { + currentDSL.dynamicPropertyPathList = Object.keys( + currentDSL.dynamicProperties, + ).map((path) => ({ key: path })); + delete currentDSL.dynamicProperties; + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/007-canvas-name-conflict-migration.ts b/app/client/packages/dsl/src/migrate/migrations/007-canvas-name-conflict-migration.ts new file mode 100644 index 0000000000..6e2386ecda --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/007-canvas-name-conflict-migration.ts @@ -0,0 +1,23 @@ +import type { DSLWidget } from "../types"; + +export const canvasNameConflictMigration = ( + currentDSL: DSLWidget, + props = { counter: 1 }, +): DSLWidget => { + if ( + currentDSL.type === "CANVAS_WIDGET" && + currentDSL.widgetName.startsWith("Canvas") + ) { + currentDSL.widgetName = `Canvas${props.counter}`; + // Canvases inside tabs have `name` property as well + if (currentDSL.name) { + currentDSL.name = currentDSL.widgetName; + } + props.counter++; + } + currentDSL.children?.forEach((c: DSLWidget) => + canvasNameConflictMigration(c, props), + ); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/008-renamed-canvas-name-conflict-migration.ts b/app/client/packages/dsl/src/migrate/migrations/008-renamed-canvas-name-conflict-migration.ts new file mode 100644 index 0000000000..cba6604659 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/008-renamed-canvas-name-conflict-migration.ts @@ -0,0 +1,25 @@ +import { canvasNameConflictMigration } from "./007-canvas-name-conflict-migration"; +import type { DSLWidget } from "../types"; + +export const renamedCanvasNameConflictMigration = ( + currentDSL: DSLWidget, + props = { counter: 1 }, +): DSLWidget => { + // Rename all canvas widgets except for MainContainer + if ( + currentDSL.type === "CANVAS_WIDGET" && + currentDSL.widgetName !== "MainContainer" + ) { + currentDSL.widgetName = `Canvas${props.counter}`; + // Canvases inside tabs have `name` property as well + if (currentDSL.name) { + currentDSL.name = currentDSL.widgetName; + } + props.counter++; + } + currentDSL.children?.forEach((c: DSLWidget) => + canvasNameConflictMigration(c, props), + ); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/009-table-widget-property-pane-migration.ts b/app/client/packages/dsl/src/migrate/migrations/009-table-widget-property-pane-migration.ts new file mode 100644 index 0000000000..0e9e54704d --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/009-table-widget-property-pane-migration.ts @@ -0,0 +1,175 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import cloneDeep from "lodash/cloneDeep"; +import isString from "lodash/isString"; +import type { DSLWidget } from "../types"; +import { removeSpecialChars } from "../utils"; + +export const getAllTableColumnKeys = ( + tableData?: Array>, +) => { + const columnKeys: string[] = []; + if (tableData) { + for (let i = 0, tableRowCount = tableData.length; i < tableRowCount; i++) { + const row = tableData[i]; + for (const key in row) { + // Replace all special characters to _, limit key length to 200 characters. + const sanitizedKey = removeSpecialChars(key, 200); + if (!columnKeys.includes(sanitizedKey)) { + columnKeys.push(sanitizedKey); + } + } + } + } + return columnKeys; +}; + +export const tableWidgetPropertyPaneMigrations = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((_child: DSLWidget) => { + let child = cloneDeep(_child); + // If the current child is a TABLE_WIDGET + if (child.type === "TABLE_WIDGET") { + const hiddenColumns = child.hiddenColumns || []; + const columnNameMap = child.columnNameMap; + const columnSizeMap = child.columnSizeMap; + const columnTypeMap = child.columnTypeMap; + let tableColumns: string[] = []; + const dynamicBindingPathList = child.dynamicBindingPathList; + if (child.tableData.length) { + let tableData = []; + // Try parsing the table data, if it parses great + // If it does not parse, assign tableData the value as is. + try { + tableData = JSON.parse(child.tableData); + } catch (e) { + tableData = child.tableData; + } + if ( + !isString(tableData) && + dynamicBindingPathList?.findIndex( + (item: { key: string }) => item.key !== "tableData", + ) + ) { + // Get the list of column ids + tableColumns = getAllTableColumnKeys(tableData); + } else { + child.migrated = false; + } + } + // Get primaryColumns to be the list of column keys + // Use the old order if it exists, else use the new order + const primaryColumns = child.columnOrder?.length + ? child.columnOrder + : tableColumns; + child.primaryColumns = {}; + + // const hasActions = child.columnActions && child.columnActions.length > 0; + // Generate new primarycolumns + primaryColumns.forEach((accessor: string, index: number) => { + // Get the column type from the columnTypeMap + let columnType = + columnTypeMap && columnTypeMap[accessor] + ? columnTypeMap[accessor].type + : "text"; + // If the columnType is currency make it a text type + // We're deprecating currency types + if (columnType === "currency") { + columnType = "text"; + } + // Get a full set of column properties + const column: any = { + index, // Use to maintain order of columns + // The widget of the column + width: + columnSizeMap && columnSizeMap[accessor] + ? columnSizeMap[accessor] + : 150, + // id of the column + id: accessor, + // default horizontal alignment + horizontalAlignment: "LEFT", + // default vertical alignment + verticalAlignment: "CENTER", + // columnType + columnType, + // default text color + textColor: "#231F20", + // default text size + textSize: "PARAGRAPH", + // default font size + fontStyle: "REGULAR", + enableFilter: true, + enableSort: true, + // hide the column if it was hidden earlier using hiddenColumns + isVisible: hiddenColumns.includes(accessor) ? false : true, + // We did not have a concept of derived columns so far + isDerived: false, + // Use renamed names from the map + // or use the newly generated name + label: + columnNameMap && columnNameMap[accessor] + ? columnNameMap[accessor] + : accessor, + // Generate computed value + computedValue: `{{${child.widgetName}.sanitizedTableData.map((currentRow) => ( currentRow.${accessor})}}`, + }; + // copy inputForma nd outputFormat for date column types + if (columnTypeMap && columnTypeMap[accessor]) { + column.outputFormat = columnTypeMap[accessor].format || ""; + column.inputFormat = columnTypeMap[accessor].inputFormat || ""; + } + child.primaryColumns[column.id] = column; + }); + + // Get all column actions + const columnActions = child.columnActions || []; + // Get dynamicTriggerPathList + let dynamicTriggerPathList: Array<{ key: string }> = + child.dynamicTriggerPathList || []; + + const columnPrefix = "customColumn"; + const updatedDerivedColumns: Record = {}; + // Add derived column for each column action + columnActions.forEach((action: any, index: number) => { + const column = { + index: child.primaryColumns.length + index, // Add to the end of the columns list + width: 150, // Default width + id: `${columnPrefix}${index + 1}`, // A random string which was generated previously + label: action.label, // Revert back to "Actions" + columnType: "button", // All actions are buttons + isVisible: true, + isDisabled: false, + isDerived: true, + buttonLabel: action.label, + buttonStyle: "rgb(3, 179, 101)", + buttonLabelColor: "#FFFFFF", + onClick: action.dynamicTrigger, + computedValue: "", + }; + dynamicTriggerPathList.push({ + key: `primaryColumns.${columnPrefix}${index + 1}.onClick`, + }); + updatedDerivedColumns[column.id] = column; + child.primaryColumns[column.id] = column; + }); + + if (Object.keys(updatedDerivedColumns).length) { + dynamicTriggerPathList = dynamicTriggerPathList.filter( + (triggerPath: Record) => { + triggerPath.key !== "columnActions"; + }, + ); + } + child.dynamicTriggerPathList = dynamicTriggerPathList; + child.textSize = "PARAGRAPH"; + child.horizontalAlignment = "LEFT"; + child.verticalAlignment = "CENTER"; + child.fontStyle = "REGULAR"; + + child.derivedColumns = updatedDerivedColumns; + } else if (child.children && child.children.length > 0) { + child = tableWidgetPropertyPaneMigrations(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/010-add-version-number-migration.ts b/app/client/packages/dsl/src/migrate/migrations/010-add-version-number-migration.ts new file mode 100644 index 0000000000..fd4ccae3e2 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/010-add-version-number-migration.ts @@ -0,0 +1,11 @@ +import type { DSLWidget } from "../types"; + +export const addVersionNumberMigration = (currentDSL: DSLWidget) => { + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map(addVersionNumberMigration); + } + if (currentDSL.version === undefined) { + currentDSL.version = 1; + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/011-migrate-table-primary-columns-binding.ts b/app/client/packages/dsl/src/migrate/migrations/011-migrate-table-primary-columns-binding.ts new file mode 100644 index 0000000000..06413d9866 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/011-migrate-table-primary-columns-binding.ts @@ -0,0 +1,42 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { DSLWidget } from "../types"; +import { removeSpecialChars } from "../utils"; + +export const migrateTablePrimaryColumnsBindings = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET") { + if ( + child.primaryColumns && + Object.keys(child.primaryColumns).length > 0 + ) { + const newPrimaryColumns: Record = {}; + for (const [key, value] of Object.entries( + child.primaryColumns as Record, + )) { + const sanitizedKey = removeSpecialChars(key, 200); + const newComputedValue = value.computedValue + ? value.computedValue.replace( + `${child.widgetName}.tableData.map`, + `${child.widgetName}.sanitizedTableData.map`, + ) + : ""; + newPrimaryColumns[sanitizedKey] = { + ...value, + computedValue: newComputedValue, + }; + } + child.primaryColumns = newPrimaryColumns; + child.dynamicBindingPathList = child.dynamicBindingPathList?.map( + (path: { key: string }) => { + path.key = path.key.split(" ").join("_"); + return path; + }, + ); + } + } else if (child.children && child.children.length > 0) { + child = migrateTablePrimaryColumnsBindings(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/012-migrate-incorrect-dynamic-binding-path-lists.ts b/app/client/packages/dsl/src/migrate/migrations/012-migrate-incorrect-dynamic-binding-path-lists.ts new file mode 100644 index 0000000000..6c2097079d --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/012-migrate-incorrect-dynamic-binding-path-lists.ts @@ -0,0 +1,934 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import flow from "lodash/flow"; +import type { DSLWidget } from "../types"; +import log from "loglevel"; +import get from "lodash/get"; +import isString from "lodash/isString"; +import memoize from "micro-memoize"; +import { isObject, isUndefined } from "lodash"; +import { generateReactKey, isDynamicValue } from "../utils"; +import widgetConfigs from "../helpers/widget-configs.json"; + +export const WidgetHeightLimits = { + MAX_HEIGHT_IN_ROWS: 9000, + MIN_HEIGHT_IN_ROWS: 4, + MIN_CANVAS_HEIGHT_IN_ROWS: 10, +}; + +function updateMinMaxDynamicHeight( + props: any, + propertyName: string, + propertyValue: unknown, +) { + const updates = [ + { + propertyPath: propertyName, + propertyValue: propertyValue, + }, + ]; + + if (propertyValue === "AUTO_HEIGHT_WITH_LIMITS") { + const minDynamicHeight = parseInt(props.minDynamicHeight, 10); + + if ( + isNaN(minDynamicHeight) || + minDynamicHeight < WidgetHeightLimits.MIN_HEIGHT_IN_ROWS + ) { + updates.push({ + propertyPath: "minDynamicHeight", + propertyValue: WidgetHeightLimits.MIN_HEIGHT_IN_ROWS, + }); + } + const maxDynamicHeight = parseInt(props.maxDynamicHeight, 10); + if ( + isNaN(maxDynamicHeight) || + maxDynamicHeight === WidgetHeightLimits.MAX_HEIGHT_IN_ROWS || + maxDynamicHeight <= WidgetHeightLimits.MIN_HEIGHT_IN_ROWS + ) { + updates.push({ + propertyPath: "maxDynamicHeight", + propertyValue: props.bottomRow - props.topRow + 2, + }); + } + + // Case where maxDynamicHeight is zero + if (isNaN(maxDynamicHeight) || maxDynamicHeight === 0) { + updates.push({ + propertyPath: "maxDynamicHeight", + propertyValue: props.bottomRow - props.topRow, + }); + } + } else if (propertyValue === "AUTO_HEIGHT") { + const minHeightInRows = props.isCanvas + ? WidgetHeightLimits.MIN_CANVAS_HEIGHT_IN_ROWS + : WidgetHeightLimits.MIN_HEIGHT_IN_ROWS; + updates.push( + { + propertyPath: "minDynamicHeight", + propertyValue: minHeightInRows, + }, + { + propertyPath: "maxDynamicHeight", + propertyValue: WidgetHeightLimits.MAX_HEIGHT_IN_ROWS, + }, + ); + } + + if (propertyValue === "FIXED") { + updates.push({ + propertyPath: "originalBottomRow", + propertyValue: undefined, + }); + updates.push({ + propertyPath: "originalTopRow", + propertyValue: undefined, + }); + } + + // The following are updates which apply to specific widgets. + if ( + propertyValue === "AUTO_HEIGHT" || + propertyValue === "AUTO_HEIGHT_WITH_LIMITS" + ) { + if (props.dynamicHeight === "FIXED") { + updates.push({ + propertyPath: "originalBottomRow", + propertyValue: props.bottomRow, + }); + updates.push({ + propertyPath: "originalTopRow", + propertyValue: props.topRow, + }); + } + if (!props.shouldScrollContents) { + updates.push({ + propertyPath: "shouldScrollContents", + propertyValue: true, + }); + } + if (props.overflow !== undefined) { + updates.push({ + propertyPath: "overflow", + propertyValue: "NONE", + }); + } + if (props.scrollContents === true) { + updates.push({ + propertyPath: "scrollContents", + propertyValue: false, + }); + } + if (props.fixedFooter === true) { + updates.push({ + propertyPath: "fixedFooter", + propertyValue: false, + }); + } + } + + return updates; +} + +export const PropertyPaneConfigTemplates: Record = { + dynamicHeight: [ + { + helpText: + "Auto Height: Configure the way the widget height reacts to content changes.", + propertyName: "dynamicHeight", + label: "Height", + controlType: "DROP_DOWN", + isBindProperty: false, + isTriggerProperty: false, + dependencies: [ + "shouldScrollContents", + "maxDynamicHeight", + "minDynamicHeight", + "bottomRow", + "topRow", + "overflow", + "dynamicHeight", + "isCanvas", + ], + updateHook: updateMinMaxDynamicHeight, + helperText: (props: any) => { + return props.isCanvas && props.dynamicHeight === "AUTO_HEIGHT" + ? "This widget shows an internal scroll when you add widgets in edit mode. It'll resize after you've added widgets. The scroll won't exist in view mode." + : ""; + }, + options: [ + { + label: "Auto Height", + value: "AUTO_HEIGHT", + }, + { + label: "Auto Height with limits", + value: "AUTO_HEIGHT_WITH_LIMITS", + }, + { + label: "Fixed", + value: "FIXED", + }, + ], + postUpdateAction: "CHECK_CONTAINERS_FOR_AUTO_HEIGHT", + }, + ], +}; + +function findAndUpdatePropertyPaneControlConfig( + config: any[], + propertyPaneUpdates: Record>, +): any[] { + return config.map((sectionConfig: any) => { + if ( + Array.isArray(sectionConfig.children) && + sectionConfig.children.length > 0 + ) { + Object.keys(propertyPaneUpdates).forEach((propertyName: string) => { + const controlConfigIndex: number | undefined = + sectionConfig.children?.findIndex( + (controlConfig: any) => controlConfig.propertyName === propertyName, + ); + + if ( + controlConfigIndex !== undefined && + controlConfigIndex > -1 && + sectionConfig.children + ) { + sectionConfig.children[controlConfigIndex] = { + ...sectionConfig.children[controlConfigIndex], + ...propertyPaneUpdates[propertyName], + }; + } + }); + } + return sectionConfig; + }); +} + +const WidgetFeaturePropertyPaneEnhancements: Record< + string, + (config: any[], widgetType?: string) => any[] +> = { + dynamicHeight: (config: any[], widgetType?: string) => { + function hideWhenDynamicHeightIsEnabled(props: any) { + return ( + props.dynamicHeight === "AUTO_HEIGHT_WITH_LIMITS" || + props.dynamicHeight === "AUTO_HEIGHT" + ); + } + let update = findAndUpdatePropertyPaneControlConfig(config, { + shouldScrollContents: { + hidden: hideWhenDynamicHeightIsEnabled, + dependencies: ["dynamicHeight"], + }, + scrollContents: { + hidden: hideWhenDynamicHeightIsEnabled, + dependencies: ["dynamicHeight"], + }, + fixedFooter: { + hidden: hideWhenDynamicHeightIsEnabled, + dependencies: ["dynamicHeight"], + }, + overflow: { + hidden: hideWhenDynamicHeightIsEnabled, + dependencies: ["dynamicHeight"], + }, + }); + if (widgetType === "MODAL_WIDGET") { + update = findAndUpdatePropertyPaneControlConfig(update, { + dynamicHeight: { + options: [ + { + label: "Auto Height", + value: "AUTO_HEIGHT", + }, + { + label: "Fixed", + value: "FIXED", + }, + ], + }, + }); + } + return update; + }, +}; + +function enhancePropertyPaneConfig( + config: any[], + features?: any, + configType?: string, + widgetType?: string, +) { + // Enhance property pane with widget features + // TODO(abhinav): The following "configType" check should come + // from the features themselves. + + if (features && (configType === undefined || configType === "CONTENT")) { + Object.keys(features).forEach((registeredFeature: string) => { + const { sectionIndex } = features[registeredFeature]; + const sectionName = config[sectionIndex]?.sectionName; + // This has been designed to check if the sectionIndex provided in the + // features configuration of the widget to point to the section named "General" + // If not, it logs an error + // This is a sanity check, and doesn't effect the functionality of the feature + // For consistency, we expect that all "Auto Height" property pane controls + // be present in the "General" section of the property pane + if (!sectionName || sectionName !== "General") { + log.error( + `Invalid section index for feature: ${registeredFeature} in widget: ${widgetType}`, + ); + } + if ( + Array.isArray(config[sectionIndex].children) && + PropertyPaneConfigTemplates[registeredFeature] + ) { + config[sectionIndex].children?.push( + ...PropertyPaneConfigTemplates[registeredFeature], + ); + config = WidgetFeaturePropertyPaneEnhancements[registeredFeature]( + config, + widgetType, + ); + } + }); + } + + return config; +} + +export function convertFunctionsToString(config: any[]) { + return config.map((sectionOrControlConfig: any) => { + const controlConfig = sectionOrControlConfig; + if ( + controlConfig.validation && + controlConfig.validation?.type === "FUNCTION" && + controlConfig.validation?.params && + controlConfig.validation?.params.fn + ) { + controlConfig.validation.params.fnString = + controlConfig.validation.params.fn.toString(); + delete controlConfig.validation.params.fn; + return sectionOrControlConfig; + } + + if (sectionOrControlConfig.children) { + sectionOrControlConfig.children = convertFunctionsToString( + sectionOrControlConfig.children, + ); + } + + const config = sectionOrControlConfig; + + if ( + config.panelConfig && + config.panelConfig.children && + Array.isArray(config.panelConfig.children) + ) { + config.panelConfig.children = convertFunctionsToString( + config.panelConfig.children, + ); + + sectionOrControlConfig = config; + } + + if ( + config.panelConfig && + config.panelConfig.contentChildren && + Array.isArray(config.panelConfig.contentChildren) + ) { + config.panelConfig.contentChildren = convertFunctionsToString( + config.panelConfig.contentChildren, + ); + + sectionOrControlConfig = config; + } + + if ( + config.panelConfig && + config.panelConfig.styleChildren && + Array.isArray(config.panelConfig.styleChildren) + ) { + config.panelConfig.styleChildren = convertFunctionsToString( + config.panelConfig.styleChildren, + ); + + sectionOrControlConfig = config; + } + + return sectionOrControlConfig; + }); +} + +export const addPropertyConfigIds = (config: any[]) => { + return config.map((sectionOrControlConfig: any) => { + sectionOrControlConfig.id = generateReactKey(); + if (sectionOrControlConfig.children) { + sectionOrControlConfig.children = addPropertyConfigIds( + sectionOrControlConfig.children, + ); + } + const config = sectionOrControlConfig; + if (config.panelConfig) { + if ( + config.panelConfig.children && + Array.isArray(config.panelConfig.children) + ) { + config.panelConfig.children = addPropertyConfigIds( + config.panelConfig.children, + ); + } + + if ( + config.panelConfig.contentChildren && + Array.isArray(config.panelConfig.contentChildren) + ) { + config.panelConfig.contentChildren = addPropertyConfigIds( + config.panelConfig.contentChildren, + ); + } + + if ( + config.panelConfig.styleChildren && + Array.isArray(config.panelConfig.styleChildren) + ) { + config.panelConfig.styleChildren = addPropertyConfigIds( + config.panelConfig.styleChildren, + ); + } + + sectionOrControlConfig = config; + } + return sectionOrControlConfig; + }); +}; + +function addSearchSpecificPropertiesToConfig( + config: readonly any[], + tag: string, +): any[] { + return config.map((configItem) => { + if (configItem.sectionName) { + const sectionConfig = { + ...configItem, + collapsible: false, + tag, + }; + if (configItem.children) { + sectionConfig.children = addSearchSpecificPropertiesToConfig( + configItem.children, + tag, + ); + } + return sectionConfig; + } else if (configItem.controlType) { + const controlConfig = configItem; + if (controlConfig.panelConfig) { + return { + ...controlConfig, + panelConfig: { + ...controlConfig.panelConfig, + searchConfig: generatePropertyPaneSearchConfig( + controlConfig.panelConfig?.contentChildren ?? [], + controlConfig.panelConfig?.styleChildren ?? [], + ), + }, + }; + } + return controlConfig; + } + return configItem; + }); +} + +export function generatePropertyPaneSearchConfig( + contentConfig: readonly any[], + styleConfig: readonly any[], +) { + return [ + ...addSearchSpecificPropertiesToConfig(contentConfig, "CONTENT"), + ...addSearchSpecificPropertiesToConfig(styleConfig, "STYLE"), + ]; +} + +export function addSearchConfigToPanelConfig(config: readonly any[]) { + return config.map((configItem) => { + if (configItem.sectionName) { + const sectionConfig = { + ...configItem, + }; + if (configItem.children) { + sectionConfig.children = addSearchConfigToPanelConfig( + configItem.children, + ); + } + return sectionConfig; + } else if (configItem.controlType) { + const controlConfig = configItem; + if (controlConfig.panelConfig) { + return { + ...controlConfig, + panelConfig: { + ...controlConfig.panelConfig, + searchConfig: generatePropertyPaneSearchConfig( + controlConfig.panelConfig?.contentChildren ?? [], + controlConfig.panelConfig?.styleChildren ?? [], + ), + }, + }; + } + return controlConfig; + } + return configItem; + }); +} + +const getWidgetPropertyPaneContentConfig = (type: string): readonly any[] => { + const propertyPaneContentConfig = (widgetConfigs as any)[type] + .propertyPaneContentConfig; + + const features = (widgetConfigs as any)[type].features; + + if (propertyPaneContentConfig) { + const enhance = flow([ + enhancePropertyPaneConfig, + convertFunctionsToString, + addPropertyConfigIds, + addSearchConfigToPanelConfig, + Object.freeze, + ]); + + const enhancedPropertyPaneContentConfig = enhance( + propertyPaneContentConfig, + features, + "CONTENT", + type, + ); + + return enhancedPropertyPaneContentConfig; + } else { + return []; + } +}; + +const getWidgetPropertyPaneStyleConfig = (type: string): readonly any[] => { + const propertyPaneStyleConfig = (widgetConfigs as any)[type] + .propertyPaneStyleConfig; + + const features = (widgetConfigs as any)[type].features; + + if (propertyPaneStyleConfig) { + const enhance = flow([ + enhancePropertyPaneConfig, + convertFunctionsToString, + addPropertyConfigIds, + addSearchConfigToPanelConfig, + Object.freeze, + ]); + + const enhancedPropertyPaneConfig = enhance( + propertyPaneStyleConfig, + features, + "STYLE", + ); + + return enhancedPropertyPaneConfig; + } else { + return []; + } +}; + +const getWidgetPropertyPaneCombinedConfig = (type: string): readonly any[] => { + const contentConfig = getWidgetPropertyPaneContentConfig(type); + const styleConfig = getWidgetPropertyPaneStyleConfig(type); + return [...contentConfig, ...styleConfig]; +}; + +const getWidgetPropertyPaneConfig = (type: string): readonly any[] => { + const propertyPaneConfig = (widgetConfigs as any)[type].propertyPaneConfig; + + const features = (widgetConfigs as any)[type].features; + + if (Array.isArray(propertyPaneConfig) && propertyPaneConfig.length > 0) { + const enhance = flow([ + enhancePropertyPaneConfig, + convertFunctionsToString, + addPropertyConfigIds, + Object.freeze, + ]); + const enhancedPropertyPaneConfig = enhance(propertyPaneConfig, features); + + return enhancedPropertyPaneConfig; + } else { + const config = getWidgetPropertyPaneCombinedConfig(type); + + if (config === undefined) { + log.error("Widget property pane config not defined", type); + return []; + } else { + return config; + } + } +}; + +const checkPathsInConfig = ( + config: any, + path: string, +): { + configBindingPaths: any; + configReactivePaths: any; + configTriggerPaths: Record; + configValidationPaths: Record; +} => { + const configBindingPaths: any = {}; + const configTriggerPaths: Record = {}; + const configValidationPaths: Record = {}; + // Purely a Binding Path + if (config.isBindProperty && !config.isTriggerProperty) { + configBindingPaths[path] = config.evaluationSubstitutionType || "TEMPLATE"; + if (config.validation) { + configValidationPaths[path] = config.validation; + } + } else if (config.isBindProperty && config.isTriggerProperty) { + configTriggerPaths[path] = true; + } + return { + configBindingPaths, + configReactivePaths: configBindingPaths, // All bindingPaths are reactivePaths. + configTriggerPaths, + configValidationPaths, + }; +}; + +const childHasPanelConfig = ( + config: any, + widget: any, + basePath: string, + originalWidget: any, +) => { + const panelPropertyPath = config.propertyName; + const widgetPanelPropertyValues = get(widget, panelPropertyPath); + + let bindingPaths: any = {}; + let reactivePaths: any = {}; + let triggerPaths: Record = {}; + let validationPaths: Record = {}; + if (widgetPanelPropertyValues) { + Object.values(widgetPanelPropertyValues).forEach( + (widgetPanelPropertyValue: any) => { + const { panelIdPropertyName } = config.panelConfig; + const propertyPath = `${basePath}.${widgetPanelPropertyValue[panelIdPropertyName]}`; + + let panelConfigChildren = [ + ...(config.panelConfig.contentChildren || []), + ...(config.panelConfig.styleChildren || []), + ]; + + if (panelConfigChildren.length === 0) + panelConfigChildren = config.panelConfig.children; + + panelConfigChildren.forEach((panelColumnConfig: any) => { + let isSectionHidden = false; + if ("hidden" in panelColumnConfig) { + isSectionHidden = panelColumnConfig.hidden( + originalWidget, + propertyPath, + ); + } + if (!isSectionHidden) { + panelColumnConfig.children.forEach( + (panelColumnControlOrSectionConfig: any) => { + if ( + panelColumnControlOrSectionConfig.sectionName !== undefined + ) { + panelColumnControlOrSectionConfig.children.forEach( + (panelColumnControlConfig: any) => { + const panelPropertyConfigPath = `${propertyPath}.${panelColumnControlConfig.propertyName}`; + let isControlHidden = false; + if ("hidden" in panelColumnControlConfig) { + isControlHidden = panelColumnControlConfig.hidden( + originalWidget, + panelPropertyConfigPath, + ); + } + if (!isControlHidden) { + const { + configBindingPaths, + configReactivePaths, + configTriggerPaths, + configValidationPaths, + } = checkPathsInConfig( + panelColumnControlConfig, + panelPropertyConfigPath, + ); + bindingPaths = { + ...configBindingPaths, + ...bindingPaths, + }; + reactivePaths = { + ...configReactivePaths, + ...reactivePaths, + }; + triggerPaths = { + ...configTriggerPaths, + ...triggerPaths, + }; + validationPaths = { + ...configValidationPaths, + ...validationPaths, + }; + // Has child Panel Config + if (panelColumnControlConfig.panelConfig) { + const { + bindingPaths: panelBindingPaths, + reactivePaths: panelReactivePaths, + triggerPaths: panelTriggerPaths, + validationPaths: panelValidationPaths, + } = childHasPanelConfig( + panelColumnControlConfig, + widgetPanelPropertyValue, + panelPropertyConfigPath, + originalWidget, + ); + bindingPaths = { + ...panelBindingPaths, + ...bindingPaths, + }; + reactivePaths = { + ...panelReactivePaths, + ...reactivePaths, + }; + triggerPaths = { + ...panelTriggerPaths, + ...triggerPaths, + }; + validationPaths = { + ...panelValidationPaths, + ...validationPaths, + }; + } + } + }, + ); + } else { + const panelPropertyConfigPath = `${propertyPath}.${panelColumnControlOrSectionConfig.propertyName}`; + let isControlHidden = false; + if ("hidden" in panelColumnControlOrSectionConfig) { + isControlHidden = panelColumnControlOrSectionConfig.hidden( + originalWidget, + panelPropertyConfigPath, + ); + } + if (!isControlHidden) { + const { + configBindingPaths, + configReactivePaths, + configTriggerPaths, + configValidationPaths, + } = checkPathsInConfig( + panelColumnControlOrSectionConfig, + panelPropertyConfigPath, + ); + bindingPaths = { + ...configBindingPaths, + ...bindingPaths, + }; + reactivePaths = { + ...configReactivePaths, + ...reactivePaths, + }; + triggerPaths = { ...configTriggerPaths, ...triggerPaths }; + validationPaths = { + ...configValidationPaths, + ...validationPaths, + }; + // Has child Panel Config + if (panelColumnControlOrSectionConfig.panelConfig) { + const { + bindingPaths: panelBindingPaths, + reactivePaths: panelReactivePaths, + triggerPaths: panelTriggerPaths, + validationPaths: panelValidationPaths, + } = childHasPanelConfig( + panelColumnControlOrSectionConfig, + widgetPanelPropertyValue, + panelPropertyConfigPath, + originalWidget, + ); + bindingPaths = { + ...panelBindingPaths, + ...bindingPaths, + }; + reactivePaths = { + ...panelReactivePaths, + ...reactivePaths, + }; + triggerPaths = { ...panelTriggerPaths, ...triggerPaths }; + validationPaths = { + ...panelValidationPaths, + ...validationPaths, + }; + } + } + } + }, + ); + } + }); + }, + ); + } + + return { reactivePaths, triggerPaths, validationPaths, bindingPaths }; +}; + +const getAllPathsFromPropertyConfigWithoutMemo = ( + widget: any, + widgetConfig: readonly any[], + defaultProperties: Record, +): { + bindingPaths: any; + reactivePaths: any; + triggerPaths: Record; + validationPaths: Record; +} => { + let bindingPaths: any = {}; + let reactivePaths: any = {}; + Object.keys(defaultProperties).forEach((property) => { + reactivePaths[property] = "TEMPLATE"; + }); + let triggerPaths: Record = {}; + let validationPaths: Record = {}; + + widgetConfig.forEach((config) => { + if (config.children) { + config.children.forEach((controlConfig: any) => { + const basePath = controlConfig.propertyName; + let isHidden = false; + if ("hidden" in controlConfig) { + isHidden = controlConfig.hidden(widget, basePath); + } + if (!isHidden) { + const path = controlConfig.propertyName; + const { + configBindingPaths, + configReactivePaths, + configTriggerPaths, + configValidationPaths, + } = checkPathsInConfig(controlConfig, path); + bindingPaths = { + ...bindingPaths, + ...configBindingPaths, + }; + // Update default path configs with the ones in the property config + reactivePaths = { + ...reactivePaths, + ...configReactivePaths, + }; + triggerPaths = { ...triggerPaths, ...configTriggerPaths }; + validationPaths = { ...validationPaths, ...configValidationPaths }; + } + // Has child Panel Config + if (controlConfig.panelConfig) { + const resultingPaths = childHasPanelConfig( + controlConfig, + widget, + basePath, + widget, + ); + bindingPaths = { + ...bindingPaths, + ...resultingPaths.bindingPaths, + }; + reactivePaths = { + ...reactivePaths, + ...resultingPaths.reactivePaths, + }; + triggerPaths = { ...triggerPaths, ...resultingPaths.triggerPaths }; + validationPaths = { + ...validationPaths, + ...resultingPaths.validationPaths, + }; + } + if (controlConfig.children) { + const basePropertyPath = controlConfig.propertyName; + const widgetPropertyValue = get(widget, basePropertyPath, []); + // Property in object structure + if ( + !isUndefined(widgetPropertyValue) && + isObject(widgetPropertyValue) + ) { + Object.keys(widgetPropertyValue).forEach((key: string) => { + const objectIndexPropertyPath = `${basePropertyPath}.${key}`; + controlConfig.children.forEach((childPropertyConfig: any) => { + const childArrayPropertyPath = `${objectIndexPropertyPath}.${childPropertyConfig.propertyName}`; + const { + configBindingPaths, + configReactivePaths, + configTriggerPaths, + configValidationPaths, + } = checkPathsInConfig( + childPropertyConfig, + childArrayPropertyPath, + ); + bindingPaths = { + ...bindingPaths, + ...configBindingPaths, + }; + reactivePaths = { + ...reactivePaths, + ...configReactivePaths, + }; + triggerPaths = { ...triggerPaths, ...configTriggerPaths }; + validationPaths = { + ...validationPaths, + ...configValidationPaths, + }; + }); + }); + } + } + }); + } + }); + + return { reactivePaths, triggerPaths, validationPaths, bindingPaths }; +}; + +const getAllPathsFromPropertyConfig = memoize( + getAllPathsFromPropertyConfigWithoutMemo, + { maxSize: 1000 }, +); + +export const migrateIncorrectDynamicBindingPathLists = ( + currentDSL: Readonly, +): DSLWidget => { + const migratedDsl = { + ...currentDSL, + }; + const dynamicBindingPathList: any[] = []; + const propertyPaneConfig = getWidgetPropertyPaneConfig(currentDSL.type); + const { bindingPaths } = getAllPathsFromPropertyConfig( + currentDSL, + propertyPaneConfig, + {}, + ); + + Object.keys(bindingPaths).forEach((bindingPath) => { + const pathValue = get(migratedDsl, bindingPath); + if (pathValue && isString(pathValue)) { + if (isDynamicValue(pathValue)) { + dynamicBindingPathList.push({ key: bindingPath }); + } + } + }); + + migratedDsl.dynamicBindingPathList = dynamicBindingPathList; + + if (currentDSL.children) { + migratedDsl.children = currentDSL.children.map( + migrateIncorrectDynamicBindingPathLists, + ); + } + return migratedDsl; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/013-migrate-old-chart-data.ts b/app/client/packages/dsl/src/migrate/migrations/013-migrate-old-chart-data.ts new file mode 100644 index 0000000000..604a3645ba --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/013-migrate-old-chart-data.ts @@ -0,0 +1,22 @@ +import isString from "lodash/isString"; +import type { DSLWidget } from "../types"; + +export const migrateOldChartData = (currentDSL: DSLWidget) => { + if (currentDSL.type === "CHART_WIDGET") { + if (isString(currentDSL.chartData)) { + try { + currentDSL.chartData = JSON.parse(currentDSL.chartData); + } catch (error) { + // Sentry.captureException({ + // message: "Chart Migration F`ailed", + // oldData: currentDSL.chartData, + // }); + currentDSL.chartData = []; + } + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map(migrateOldChartData); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/014-rte-default-value-migration.ts b/app/client/packages/dsl/src/migrate/migrations/014-rte-default-value-migration.ts new file mode 100644 index 0000000000..c563959649 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/014-rte-default-value-migration.ts @@ -0,0 +1,12 @@ +import type { DSLWidget } from "../types"; + +export const rteDefaultValueMigration = (currentDSL: DSLWidget): DSLWidget => { + if (currentDSL.type === "RICH_TEXT_EDITOR_WIDGET") { + currentDSL.inputType = "html"; + } + currentDSL.children?.forEach((children: DSLWidget) => + rteDefaultValueMigration(children), + ); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/015-migrate-text-style-from-text-widget.ts b/app/client/packages/dsl/src/migrate/migrations/015-migrate-text-style-from-text-widget.ts new file mode 100644 index 0000000000..37bacf4dd0 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/015-migrate-text-style-from-text-widget.ts @@ -0,0 +1,33 @@ +import type { DSLWidget } from "../types"; + +export const migrateTextStyleFromTextWidget = ( + currentDSL: DSLWidget, +): DSLWidget => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TEXT_WIDGET") { + const textStyle = child.textStyle; + switch (textStyle) { + case "HEADING": + child.fontSize = "HEADING1"; + child.fontStyle = "BOLD"; + break; + case "BODY": + child.fontSize = "PARAGRAPH"; + child.fontStyle = ""; + break; + case "LABEL": + child.fontSize = "PARAGRAPH"; + child.fontStyle = "BOLD"; + break; + default: + break; + } + child.textColor = "#231F20"; + delete child.textStyle; + } else if (child.children && child.children.length > 0) { + child = migrateTextStyleFromTextWidget(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/016-migrate-chart-data-from-array-to-object.ts b/app/client/packages/dsl/src/migrate/migrations/016-migrate-chart-data-from-array-to-object.ts new file mode 100644 index 0000000000..115aaa0eaa --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/016-migrate-chart-data-from-array-to-object.ts @@ -0,0 +1,60 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { set } from "lodash"; +import type { DSLWidget } from "../types"; +import { generateReactKey } from "../utils"; + +/** + * changes chartData which we were using as array. now it will be a object + * + * + * @param currentDSL + * @returns + */ +export const migrateChartDataFromArrayToObject = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { + if (children.type === "CHART_WIDGET") { + if (Array.isArray(children.chartData)) { + const newChartData = {}; + const dynamicBindingPathList = children?.dynamicBindingPathList + ? children?.dynamicBindingPathList.slice() + : []; + + children.chartData.map((datum: any, index: number) => { + const generatedKey = generateReactKey(); + set(newChartData, `${generatedKey}`, datum); + + if ( + Array.isArray(children.dynamicBindingPathList) && + children.dynamicBindingPathList?.findIndex( + (path: { key: string }) => + (path.key = `chartData[${index}].data`), + ) > -1 + ) { + const foundIndex = children.dynamicBindingPathList.findIndex( + (path: { key: string }) => + (path.key = `chartData[${index}].data`), + ); + + dynamicBindingPathList[foundIndex] = { + key: `chartData.${generatedKey}.data`, + }; + } + }); + + children.dynamicBindingPathList = dynamicBindingPathList; + children.chartData = newChartData; + } + } else if ( + children.type === "CONTAINER_WIDGET" || + children.type === "FORM_WIDGET" || + children.type === "CANVAS_WIDGET" || + children.type === "TABS_WIDGET" + ) { + children = migrateChartDataFromArrayToObject(children); + } + + return children; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/017-migrate-tabs-data.ts b/app/client/packages/dsl/src/migrate/migrations/017-migrate-tabs-data.ts new file mode 100644 index 0000000000..bbc6483bd0 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/017-migrate-tabs-data.ts @@ -0,0 +1,103 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { isString } from "lodash"; +import type { DSLWidget } from "../types"; +import { DATA_BIND_REGEX_GLOBAL } from "../utils"; + +function migrateTabsDataUsingMigrator(currentDSL: DSLWidget) { + if (currentDSL.type === "TABS_WIDGET" && currentDSL.version === 1) { + try { + currentDSL.type = "TABS_MIGRATOR_WIDGET"; + currentDSL.version = 1; + } catch (error) { + // Sentry.captureException({ + // message: "Tabs Migration Failed", + // oldData: currentDSL.tabs, + // }); + currentDSL.tabsObj = {}; + delete currentDSL.tabs; + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map(migrateTabsDataUsingMigrator); + } + return currentDSL; +} + +export const migrateTabsData = (currentDSL: DSLWidget) => { + if ( + ["TABS_WIDGET", "TABS_MIGRATOR_WIDGET"].includes(currentDSL.type) && + currentDSL.version === 1 + ) { + try { + currentDSL.type = "TABS_WIDGET"; + const isTabsDataBinded = isString(currentDSL.tabs); + currentDSL.dynamicPropertyPathList = + currentDSL.dynamicPropertyPathList || []; + currentDSL.dynamicBindingPathList = + currentDSL.dynamicBindingPathList || []; + + if (isTabsDataBinded) { + const tabsString = currentDSL.tabs.replace( + DATA_BIND_REGEX_GLOBAL, + (word: any) => `"${word}"`, + ); + try { + currentDSL.tabs = JSON.parse(tabsString); + } catch (error) { + return migrateTabsDataUsingMigrator(currentDSL); + } + const dynamicPropsList = currentDSL.tabs + .filter((each: any) => DATA_BIND_REGEX_GLOBAL.test(each.isVisible)) + .map((each: any) => { + return { key: `tabsObj.${each.id}.isVisible` }; + }); + const dynamicBindablePropsList = currentDSL.tabs.map((each: any) => { + return { key: `tabsObj.${each.id}.isVisible` }; + }); + currentDSL.dynamicPropertyPathList = [ + ...currentDSL.dynamicPropertyPathList, + ...dynamicPropsList, + ]; + currentDSL.dynamicBindingPathList = [ + ...currentDSL.dynamicBindingPathList, + ...dynamicBindablePropsList, + ]; + } + currentDSL.dynamicPropertyPathList = + currentDSL.dynamicPropertyPathList.filter((each: { key: string }) => { + return each.key !== "tabs"; + }); + currentDSL.dynamicBindingPathList = + currentDSL.dynamicBindingPathList.filter((each: { key: string }) => { + return each.key !== "tabs"; + }); + currentDSL.tabsObj = currentDSL.tabs.reduce( + (obj: any, tab: any, index: number) => { + obj = { + ...obj, + [tab.id]: { + ...tab, + isVisible: tab.isVisible === undefined ? true : tab.isVisible, + index, + }, + }; + return obj; + }, + {}, + ); + currentDSL.version = 2; + delete currentDSL.tabs; + } catch (error) { + // Sentry.captureException({ + // message: "Tabs Migration Failed", + // oldData: currentDSL.tabs, + // }); + currentDSL.tabsObj = {}; + delete currentDSL.tabs; + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map(migrateTabsData); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/018-migrate-initial-values.ts b/app/client/packages/dsl/src/migrate/migrations/018-migrate-initial-values.ts new file mode 100644 index 0000000000..a97810de41 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/018-migrate-initial-values.ts @@ -0,0 +1,66 @@ +import type { DSLWidget } from "../types"; + +export const migrateInitialValues = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "INPUT_WIDGET") { + child = { + isRequired: false, + isDisabled: false, + resetOnSubmit: false, + ...child, + }; + } else if (child.type === "DROP_DOWN_WIDGET") { + child = { + isRequired: false, + isDisabled: false, + ...child, + }; + } else if (child.type === "DATE_PICKER_WIDGET2") { + child = { + minDate: "2001-01-01 00:00", + maxDate: "2041-12-31 23:59", + isRequired: false, + ...child, + }; + } else if (child.type === "SWITCH_WIDGET") { + child = { + isDisabled: false, + ...child, + }; + } else if (child.type === "ICON_WIDGET") { + child = { + isRequired: false, + ...child, + }; + } else if (child.type === "VIDEO_WIDGET") { + child = { + isRequired: false, + isDisabled: false, + ...child, + }; + } else if (child.type === "CHECKBOX_WIDGET") { + child = { + isDisabled: false, + isRequired: false, + ...child, + }; + } else if (child.type === "RADIO_GROUP_WIDGET") { + child = { + isDisabled: false, + isRequired: false, + ...child, + }; + } else if (child.type === "FILE_PICKER_WIDGET") { + child = { + isDisabled: false, + isRequired: false, + allowedFileTypes: [], + ...child, + }; + } else if (child.children && child.children.length > 0) { + child = migrateInitialValues(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/019-migrate-to-new-layout.ts b/app/client/packages/dsl/src/migrate/migrations/019-migrate-to-new-layout.ts new file mode 100644 index 0000000000..007bfc106f --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/019-migrate-to-new-layout.ts @@ -0,0 +1,35 @@ +import type { DSLWidget } from "../types"; + +const DEFAULT_GRID_ROW_HEIGHT = 10; +const GRID_DENSITY_MIGRATION_V1 = 4; + +export const getCanvasSnapRows = ( + bottomRow: number, + mobileBottomRow?: number, + isMobile?: boolean, + isAutoLayoutActive?: boolean, +): number => { + const bottom = + isMobile && mobileBottomRow !== undefined && isAutoLayoutActive + ? mobileBottomRow + : bottomRow; + const totalRows = Math.floor(bottom / DEFAULT_GRID_ROW_HEIGHT); + + return isAutoLayoutActive ? totalRows : totalRows - 1; +}; + +export const migrateToNewLayout = (dsl: DSLWidget) => { + const scaleWidget = (widgetProps: DSLWidget) => { + widgetProps.bottomRow *= GRID_DENSITY_MIGRATION_V1; + widgetProps.topRow *= GRID_DENSITY_MIGRATION_V1; + widgetProps.leftColumn *= GRID_DENSITY_MIGRATION_V1; + widgetProps.rightColumn *= GRID_DENSITY_MIGRATION_V1; + if (widgetProps.children && widgetProps.children.length) { + widgetProps.children.forEach((eachWidgetProp: DSLWidget) => { + scaleWidget(eachWidgetProp); + }); + } + }; + scaleWidget(dsl); + return dsl; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/020-migrate-newly-added-tabs-widgets-missing-data.ts b/app/client/packages/dsl/src/migrate/migrations/020-migrate-newly-added-tabs-widgets-missing-data.ts new file mode 100644 index 0000000000..8801acaeed --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/020-migrate-newly-added-tabs-widgets-missing-data.ts @@ -0,0 +1,41 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import has from "lodash/has"; +import type { DSLWidget } from "../types"; + +export const migrateNewlyAddedTabsWidgetsMissingData = ( + currentDSL: DSLWidget, +) => { + if (currentDSL.type === "TABS_WIDGET" && currentDSL.version === 2) { + try { + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((each: any) => { + if (has(currentDSL, ["leftColumn", "rightColumn", "bottomRow"])) { + return each; + } + return { + ...each, + leftColumn: 0, + rightColumn: + (currentDSL.rightColumn - currentDSL.leftColumn) * + currentDSL.parentColumnSpace, + bottomRow: + (currentDSL.bottomRow - currentDSL.topRow) * + currentDSL.parentRowSpace, + }; + }); + } + currentDSL.version = 3; + } catch (error) { + // Sentry.captureException({ + // message: "Tabs Migration to add missing fields Failed", + // oldData: currentDSL.children, + // }); + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map( + migrateNewlyAddedTabsWidgetsMissingData, + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/021-migrate-overflowing-tabs-widgets.ts b/app/client/packages/dsl/src/migrate/migrations/021-migrate-overflowing-tabs-widgets.ts new file mode 100644 index 0000000000..9f0991a23d --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/021-migrate-overflowing-tabs-widgets.ts @@ -0,0 +1,114 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { omit, omitBy } from "lodash"; +import type { DSLWidget } from "../types"; + +const MAIN_CONTAINER_WIDGET_ID = "0"; + +/** + * this function gets the next available row for pasting widgets + * NOTE: this function excludes modal widget when calculating next available row + * + * @param parentContainerId + * @param canvasWidgets + * @returns + */ +const nextAvailableRowInContainer = ( + parentContainerId: string, + canvasWidgets: any, +) => { + const filteredCanvasWidgets = omitBy(canvasWidgets, (widget) => { + return widget.type === "MODAL_WIDGET"; + }); + + return ( + Object.values(filteredCanvasWidgets).reduce( + (prev: number, next: any) => + next?.parentId === parentContainerId && next.bottomRow > prev + ? next.bottomRow + : prev, + 0, + ) + 1 + ); +}; + +export const migrateWidgetsWithoutLeftRightColumns = ( + currentDSL: DSLWidget, + canvasWidgets: any, +) => { + if ( + currentDSL.widgetId !== MAIN_CONTAINER_WIDGET_ID && + !( + currentDSL.hasOwnProperty("leftColumn") && + currentDSL.hasOwnProperty("rightColumn") + ) + ) { + try { + const nextRow = nextAvailableRowInContainer( + currentDSL.parentId || MAIN_CONTAINER_WIDGET_ID, + omit(canvasWidgets, [currentDSL.widgetId]), + ); + canvasWidgets[currentDSL.widgetId].repositioned = true; + const leftColumn = 0; + // TODO(abhinav): Figure out a way to get the correct values from the widgets + const rightColumn = 4; + const bottomRow = nextRow + (currentDSL.bottomRow - currentDSL.topRow); + const topRow = nextRow; + currentDSL = { + ...currentDSL, + topRow, + bottomRow, + rightColumn, + leftColumn, + }; + } catch (error) { + // Sentry.captureException({ + // message: "Migrating position of widget on data loss failed", + // oldData: currentDSL, + // }); + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((dsl: DSLWidget) => + migrateWidgetsWithoutLeftRightColumns(dsl, canvasWidgets), + ); + } + return currentDSL; +}; + +export const migrateOverFlowingTabsWidgets = ( + currentDSL: DSLWidget, + canvasWidgets: any, +) => { + if ( + currentDSL.type === "TABS_WIDGET" && + currentDSL.version === 3 && + currentDSL.children && + currentDSL.children.length + ) { + const tabsWidgetHeight = + (currentDSL.bottomRow - currentDSL.topRow) * currentDSL.parentRowSpace; + const widgetHasOverflowingChildren = currentDSL.children.some( + (eachTab: DSLWidget) => { + if (eachTab.children && eachTab.children.length) { + return eachTab.children.some((child: DSLWidget) => { + if (canvasWidgets[child.widgetId].repositioned) { + const tabHeight = child.bottomRow * child.parentRowSpace; + return tabsWidgetHeight < tabHeight; + } + return false; + }); + } + return false; + }, + ); + if (widgetHasOverflowingChildren) { + currentDSL.shouldScrollContents = true; + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((eachChild: DSLWidget) => + migrateOverFlowingTabsWidgets(eachChild, canvasWidgets), + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/022-migrate-table-widget-parent-row-space-property.ts b/app/client/packages/dsl/src/migrate/migrations/022-migrate-table-widget-parent-row-space-property.ts new file mode 100644 index 0000000000..9a4dafcb49 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/022-migrate-table-widget-parent-row-space-property.ts @@ -0,0 +1,17 @@ +import type { DSLWidget } from "../types"; + +export const migrateTableWidgetParentRowSpaceProperty = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET") { + if (child.parentRowSpace === 40) { + child.parentRowSpace = 10; //GridDefaults.DEFAULT_GRID_ROW_HEIGHT; + } + } else if (child.children && child.children.length > 0) { + child = migrateTableWidgetParentRowSpaceProperty(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/023-add-log-blacklist-to-all-widget-children.ts b/app/client/packages/dsl/src/migrate/migrations/023-add-log-blacklist-to-all-widget-children.ts new file mode 100644 index 0000000000..a1ab715743 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/023-add-log-blacklist-to-all-widget-children.ts @@ -0,0 +1,35 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { get, set } from "lodash"; +import type { DSLWidget } from "../types"; + +export const addLogBlackListToAllListWidgetChildren = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { + if (children.type === "LIST_WIDGET") { + const widgets = get( + children, + "children.0.children.0.children.0.children", + ); + + widgets.map((widget: any, index: number) => { + const logBlackList: { [key: string]: boolean } = {}; + + Object.keys(widget).map((key) => { + logBlackList[key] = true; + }); + if (!widget.logBlackList) { + set( + children, + `children.0.children.0.children.0.children.${index}.logBlackList`, + logBlackList, + ); + } + }); + } + + return children; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/024-migrate-table-widget-header-visibility-properties.ts b/app/client/packages/dsl/src/migrate/migrations/024-migrate-table-widget-header-visibility-properties.ts new file mode 100644 index 0000000000..27070dd985 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/024-migrate-table-widget-header-visibility-properties.ts @@ -0,0 +1,20 @@ +import type { DSLWidget } from "../types"; + +export const migrateTableWidgetHeaderVisibilityProperties = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET") { + if (!("isVisibleSearch" in child)) { + child.isVisibleSearch = true; + child.isVisibleFilters = true; + child.isVisibleDownload = true; + child.isVisiblePagination = true; + } + } else if (child.children && child.children.length > 0) { + child = migrateTableWidgetHeaderVisibilityProperties(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/025-migrate-items-to-list-data-in-list-widget.ts b/app/client/packages/dsl/src/migrate/migrations/025-migrate-items-to-list-data-in-list-widget.ts new file mode 100644 index 0000000000..2d7729c05b --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/025-migrate-items-to-list-data-in-list-widget.ts @@ -0,0 +1,69 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { DSLWidget } from "../types"; +import get from "lodash/get"; +import isString from "lodash/isString"; +import set from "lodash/set"; + +const renameKeyInObject = (object: any, key: string, newKey: string) => { + if (object[key]) { + set(object, newKey, object[key]); + } + + return object; +}; + +/** + * changes items -> listData + * + * @param currentDSL + * @returns + */ +export const migrateItemsToListDataInListWidget = (currentDSL: DSLWidget) => { + if (currentDSL.type === "LIST_WIDGET") { + currentDSL = renameKeyInObject(currentDSL, "items", "listData"); + + currentDSL.dynamicBindingPathList = currentDSL.dynamicBindingPathList?.map( + (path: { key: string }) => { + if (path.key === "items") { + return { key: "listData" }; + } + + return path; + }, + ); + + currentDSL.dynamicBindingPathList?.map((path: { key: string }) => { + if ( + get(currentDSL, path.key) && + path.key !== "items" && + path.key !== "listData" && + isString(get(currentDSL, path.key)) + ) { + set( + currentDSL, + path.key, + get(currentDSL, path.key, "").replace("items", "listData"), + ); + } + }); + + Object.keys(currentDSL.template).map((widgetName) => { + const currentWidget = currentDSL.template[widgetName]; + + currentWidget.dynamicBindingPathList?.map((path: { key: string }) => { + set( + currentWidget, + path.key, + get(currentWidget, path.key).replace("items", "listData"), + ); + }); + }); + } + + if (currentDSL.children && currentDSL.children.length > 0) { + currentDSL.children = currentDSL.children.map( + migrateItemsToListDataInListWidget, + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/026-migrate-datepicker-min-max-date.ts b/app/client/packages/dsl/src/migrate/migrations/026-migrate-datepicker-min-max-date.ts new file mode 100644 index 0000000000..283fd64a33 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/026-migrate-datepicker-min-max-date.ts @@ -0,0 +1,18 @@ +import type { DSLWidget } from "../types"; + +export const migrateDatePickerMinMaxDate = (currentDSL: DSLWidget) => { + if (currentDSL.type === "DATE_PICKER_WIDGET2" && currentDSL.version === 2) { + if (currentDSL.minDate === "2001-01-01 00:00") { + currentDSL.minDate = "1920-12-31T18:30:00.000Z"; + } + if (currentDSL.maxDate === "2041-12-31 23:59") { + currentDSL.maxDate = "2121-12-31T18:29:00.000Z"; + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children.map((eachWidgetDSL: DSLWidget) => { + migrateDatePickerMinMaxDate(eachWidgetDSL); + }); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/027-migrate-filter-value-for-dropdown-widget.ts b/app/client/packages/dsl/src/migrate/migrations/027-migrate-filter-value-for-dropdown-widget.ts new file mode 100644 index 0000000000..1b5e86228a --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/027-migrate-filter-value-for-dropdown-widget.ts @@ -0,0 +1,20 @@ +import type { DSLWidget } from "../types"; + +const addFilterDefaultValue = (currentDSL: DSLWidget) => { + if (currentDSL.type === "DROP_DOWN_WIDGET") { + if (!currentDSL.hasOwnProperty("isFilterable")) { + currentDSL.isFilterable = true; + } + } + return currentDSL; +}; + +export const migrateFilterValueForDropDownWidget = (currentDSL: DSLWidget) => { + const newDSL = addFilterDefaultValue(currentDSL); + + newDSL.children = newDSL.children?.map((children: DSLWidget) => { + return migrateFilterValueForDropDownWidget(children); + }); + + return newDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/028-migrate-table-primary-columns-computed-value.ts b/app/client/packages/dsl/src/migrate/migrations/028-migrate-table-primary-columns-computed-value.ts new file mode 100644 index 0000000000..8b6e6fc6b8 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/028-migrate-table-primary-columns-computed-value.ts @@ -0,0 +1,45 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { DSLWidget } from "../types"; +import { removeSpecialChars } from "../utils"; + +export const migrateTablePrimaryColumnsComputedValue = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET") { + if ( + child.primaryColumns && + Object.keys(child.primaryColumns).length > 0 + ) { + const newPrimaryColumns: Record = {}; + for (const [key, value] of Object.entries( + child.primaryColumns as Record, + )) { + const sanitizedKey = removeSpecialChars(key, 200); + let newComputedValue = ""; + if (value.computedValue) { + newComputedValue = value.computedValue.replace( + `${child.widgetName}.sanitizedTableData.map((currentRow) => { return`, + `${child.widgetName}.sanitizedTableData.map((currentRow) => (`, + ); + // change matching "}" bracket with ")" + const lastParanthesesInd = newComputedValue.length - 4; + newComputedValue = + newComputedValue.substring(0, lastParanthesesInd) + + ")" + + newComputedValue.substring(lastParanthesesInd + 1); + } + newPrimaryColumns[sanitizedKey] = { + ...value, + computedValue: newComputedValue, + }; + } + child.primaryColumns = newPrimaryColumns; + } + } else if (child.children && child.children.length > 0) { + child = migrateTablePrimaryColumnsComputedValue(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/029-migrate-to-new-multiselect.ts b/app/client/packages/dsl/src/migrate/migrations/029-migrate-to-new-multiselect.ts new file mode 100644 index 0000000000..ff4c4ab560 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/029-migrate-to-new-multiselect.ts @@ -0,0 +1,17 @@ +import type { DSLWidget } from "../types"; + +export const migrateToNewMultiSelect = (currentDSL: DSLWidget) => { + if (currentDSL.type === "DROP_DOWN_WIDGET") { + if (currentDSL.selectionType === "MULTI_SELECT") { + currentDSL.type = "MULTI_SELECT_WIDGET"; + delete currentDSL.isFilterable; + } + delete currentDSL.selectionType; + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((child: DSLWidget) => + migrateToNewMultiSelect(child), + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/030-migrate-table-widget-delimiter-properties.ts b/app/client/packages/dsl/src/migrate/migrations/030-migrate-table-widget-delimiter-properties.ts new file mode 100644 index 0000000000..8620e6513c --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/030-migrate-table-widget-delimiter-properties.ts @@ -0,0 +1,17 @@ +import type { DSLWidget } from "../types"; + +export const migrateTableWidgetDelimiterProperties = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET") { + if (!child.delimiter) { + child.delimiter = ","; + } + } else if (child.children && child.children.length > 0) { + child = migrateTableWidgetDelimiterProperties(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/031-migrate-is-disabled-to-button-column.ts b/app/client/packages/dsl/src/migrate/migrations/031-migrate-is-disabled-to-button-column.ts new file mode 100644 index 0000000000..c4b11bfe8b --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/031-migrate-is-disabled-to-button-column.ts @@ -0,0 +1,31 @@ +import type { ColumnProperties, DSLWidget } from "../types"; +import isEmpty from "lodash/isEmpty"; + +const addIsDisabledToButtonColumn = (currentDSL: DSLWidget) => { + if (currentDSL.type === "TABLE_WIDGET") { + if (!isEmpty(currentDSL.primaryColumns)) { + for (const key of Object.keys( + currentDSL.primaryColumns as Record, + )) { + if (currentDSL.primaryColumns[key].columnType === "button") { + if (!currentDSL.primaryColumns[key].hasOwnProperty("isDisabled")) { + currentDSL.primaryColumns[key]["isDisabled"] = false; + } + } + if (!currentDSL.primaryColumns[key].hasOwnProperty("isCellVisible")) { + currentDSL.primaryColumns[key]["isCellVisible"] = true; + } + } + } + } + return currentDSL; +}; + +export const migrateIsDisabledToButtonColumn = (currentDSL: DSLWidget) => { + const newDSL = addIsDisabledToButtonColumn(currentDSL); + + newDSL.children = newDSL.children?.map((children: DSLWidget) => { + return migrateIsDisabledToButtonColumn(children); + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/032-migrate-table-default-selected-row.ts b/app/client/packages/dsl/src/migrate/migrations/032-migrate-table-default-selected-row.ts new file mode 100644 index 0000000000..dbde998b21 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/032-migrate-table-default-selected-row.ts @@ -0,0 +1,13 @@ +import type { DSLWidget } from "../types"; + +export const migrateTableDefaultSelectedRow = (currentDSL: DSLWidget) => { + if (currentDSL.type === "TABLE_WIDGET") { + if (!currentDSL.defaultSelectedRow) currentDSL.defaultSelectedRow = "0"; + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((child: DSLWidget) => + migrateTableDefaultSelectedRow(child), + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/033-migrate-menu-button-widget-button-properties.ts b/app/client/packages/dsl/src/migrate/migrations/033-migrate-menu-button-widget-button-properties.ts new file mode 100644 index 0000000000..981413c332 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/033-migrate-menu-button-widget-button-properties.ts @@ -0,0 +1,19 @@ +import type { DSLWidget } from "../types"; + +export const migrateMenuButtonWidgetButtonProperties = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "MENU_BUTTON_WIDGET") { + if (!("menuStyle" in child)) { + child.menuStyle = "PRIMARY"; + child.menuVariant = "SOLID"; + child.isVisible = true; + } + } else if (child.children && child.children.length > 0) { + child = migrateMenuButtonWidgetButtonProperties(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/034-migrate-button-widget-validation.ts b/app/client/packages/dsl/src/migrate/migrations/034-migrate-button-widget-validation.ts new file mode 100644 index 0000000000..d6db449053 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/034-migrate-button-widget-validation.ts @@ -0,0 +1,16 @@ +import has from "lodash/has"; +import type { DSLWidget } from "../types"; + +export const migrateButtonWidgetValidation = (currentDSL: DSLWidget) => { + if (currentDSL.type === "INPUT_WIDGET") { + if (!has(currentDSL, "validation")) { + currentDSL.validation = true; + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children.map((eachWidgetDSL: DSLWidget) => { + migrateButtonWidgetValidation(eachWidgetDSL); + }); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/035-migrate-input-validation.ts b/app/client/packages/dsl/src/migrate/migrations/035-migrate-input-validation.ts new file mode 100644 index 0000000000..912bf8754c --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/035-migrate-input-validation.ts @@ -0,0 +1,22 @@ +import type { DSLWidget } from "../types"; +import has from "lodash/has"; + +export const migrateInputValidation = (currentDSL: DSLWidget) => { + if (currentDSL.type === "INPUT_WIDGET") { + if (has(currentDSL, "validation")) { + // convert boolean to string expression + if (typeof currentDSL.validation === "boolean") { + currentDSL.validation = String(currentDSL.validation); + } else if (typeof currentDSL.validation !== "string") { + // for any other type of value set to default undefined + currentDSL.validation = undefined; + } + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((child: DSLWidget) => + migrateInputValidation(child), + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/036-revert-table-default-selected-row.ts b/app/client/packages/dsl/src/migrate/migrations/036-revert-table-default-selected-row.ts new file mode 100644 index 0000000000..3997367ff0 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/036-revert-table-default-selected-row.ts @@ -0,0 +1,16 @@ +import type { DSLWidget } from "../types"; + +export const revertTableDefaultSelectedRow = (currentDSL: DSLWidget) => { + if (currentDSL.type === "TABLE_WIDGET") { + if (currentDSL.version === 1 && currentDSL.defaultSelectedRow === "0") + currentDSL.defaultSelectedRow = undefined; + // update version to 3 for all table dsl + currentDSL.version = 3; + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((child: DSLWidget) => + revertTableDefaultSelectedRow(child), + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/037-migrate-table-sanitize-column-keys.ts b/app/client/packages/dsl/src/migrate/migrations/037-migrate-table-sanitize-column-keys.ts new file mode 100644 index 0000000000..24154bc50e --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/037-migrate-table-sanitize-column-keys.ts @@ -0,0 +1,113 @@ +import type { ColumnProperties, DSLWidget } from "../types"; +import { removeSpecialChars } from "../utils"; + +const getSubstringBetweenTwoWords = ( + str: string, + startWord: string, + endWord: string, +) => { + const endIndexOfStartWord = str.indexOf(startWord) + startWord.length; + const startIndexOfEndWord = str.lastIndexOf(endWord); + + if (startIndexOfEndWord < endIndexOfStartWord) return ""; + + return str.substring(startIndexOfEndWord, endIndexOfStartWord); +}; + +/** + * This migration sanitizes the following properties - + * primaryColumns object key, for the value of each key - id, computedValue are sanitized + * columnOrder + * dynamicBindingPathList + * + * This migration solves the following issue - + * https://github.com/appsmithorg/appsmith/issues/6897 + */ +export const migrateTableSanitizeColumnKeys = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET") { + const primaryColumnEntries: [string, ColumnProperties][] = Object.entries( + child.primaryColumns || {}, + ); + + const newPrimaryColumns: Record = {}; + if (primaryColumnEntries.length) { + for (const [, primaryColumnEntry] of primaryColumnEntries.entries()) { + // Value is reassigned when its invalid(Faulty DSL https://github.com/appsmithorg/appsmith/issues/8979) + const [key] = primaryColumnEntry; + let [, value] = primaryColumnEntry; + const sanitizedKey = removeSpecialChars(key, 200); + let id = ""; + if (value.id) { + id = removeSpecialChars(value.id, 200); + } + // When id is undefined it's likely value isn't correct and needs fixing + else if (Object.keys(value)) { + const onlyKey = Object.keys(value)[0] as keyof ColumnProperties; + const obj: ColumnProperties = value[onlyKey]; + if (!obj.id && !obj.columnType) { + continue; + } + value = obj; + id = removeSpecialChars(value.id, 200); + } + + // Sanitizes "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.$$$random_header))}}" + // to "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._random_header))}}" + const computedValue = (value?.computedValue || "").replace( + key, + sanitizedKey, + ); + + newPrimaryColumns[sanitizedKey] = { + ...value, + computedValue, + id, + }; + } + + child.primaryColumns = newPrimaryColumns; + } + + // Sanitizes [ "id", "name", $$$random_header ] + // to [ "id", "name", _random_header ] + child.columnOrder = (child.columnOrder || []).map((co: string) => + removeSpecialChars(co, 200), + ); + + // Sanitizes [ {key: primaryColumns.$random.header.computedValue }] + // to [ {key: primaryColumns._random_header.computedValue }] + child.dynamicBindingPathList = (child.dynamicBindingPathList || []).map( + (path: { key: string }) => { + const pathChunks = path.key.split("."); // primaryColumns.$random.header.computedValue -> [ "primaryColumns", "$random", "header", "computedValue"] + + // tableData is a valid dynamicBindingPath and pathChunks would have just one entry + if (pathChunks.length < 2) { + return path; + } + + const firstPart = pathChunks[0] + "."; // "primaryColumns." + const lastPart = "." + pathChunks[pathChunks.length - 1]; // ".computedValue" + + const key = getSubstringBetweenTwoWords( + path.key, + firstPart, + lastPart, + ); // primaryColumns.$random.header.computedValue -> $random.header + + const sanitizedPrimaryColumnKey = removeSpecialChars(key, 200); + + return { + key: firstPart + sanitizedPrimaryColumnKey + lastPart, + }; + }, + ); + } else if (child.children && child.children.length > 0) { + child = migrateTableSanitizeColumnKeys(child); + } + + return child; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/038-migrate-resizable-modal-widget-properties.ts b/app/client/packages/dsl/src/migrate/migrations/038-migrate-resizable-modal-widget-properties.ts new file mode 100644 index 0000000000..a69853f0b2 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/038-migrate-resizable-modal-widget-properties.ts @@ -0,0 +1,33 @@ +import type { DSLWidget } from "../types"; + +const DEFAULT_GRID_ROW_HEIGHT = 10; + +export const migrateResizableModalWidgetProperties = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "MODAL_WIDGET" && child.version === 1) { + const size = child.size; + switch (size) { + case "MODAL_SMALL": + child.width = 456; + child.height = DEFAULT_GRID_ROW_HEIGHT * 24; + break; + case "MODAL_LARGE": + child.width = 532; + child.height = DEFAULT_GRID_ROW_HEIGHT * 60; + break; + default: + child.width = 456; + child.height = DEFAULT_GRID_ROW_HEIGHT * 24; + break; + } + child.version = 2; + delete child.size; + } else if (child.children && child.children.length > 0) { + child = migrateResizableModalWidgetProperties(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/039-migrate-table-widget-selected-row-bindings.ts b/app/client/packages/dsl/src/migrate/migrations/039-migrate-table-widget-selected-row-bindings.ts new file mode 100644 index 0000000000..270cf57af8 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/039-migrate-table-widget-selected-row-bindings.ts @@ -0,0 +1,50 @@ +import type { ColumnProperties, DSLWidget } from "../types"; +import { removeSpecialChars } from "../utils"; + +const getUpdatedColumns = ( + widgetName: string, + columns: Record, +) => { + const updatedColumns: Record = {}; + if (columns && Object.keys(columns).length > 0) { + for (const [columnId, columnProps] of Object.entries(columns)) { + const sanitizedColumnId = removeSpecialChars(columnId, 200); + const selectedRowBindingValue = `${widgetName}.selectedRow`; + let newOnClickBindingValue = undefined; + if ( + columnProps.onClick && + columnProps.onClick.includes(selectedRowBindingValue) + ) { + newOnClickBindingValue = columnProps.onClick.replace( + selectedRowBindingValue, + "currentRow", + ); + } + updatedColumns[sanitizedColumnId] = columnProps; + if (newOnClickBindingValue) + updatedColumns[sanitizedColumnId].onClick = newOnClickBindingValue; + } + } + return updatedColumns; +}; + +export const migrateTableWidgetSelectedRowBindings = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET") { + child.derivedColumns = getUpdatedColumns( + child.widgetName, + child.derivedColumns as Record, + ); + child.primaryColumns = getUpdatedColumns( + child.widgetName, + child.primaryColumns as Record, + ); + } else if (child.children && child.children.length > 0) { + child = migrateTableWidgetSelectedRowBindings(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/040-revert-button-style-to-button-color.ts b/app/client/packages/dsl/src/migrate/migrations/040-revert-button-style-to-button-color.ts new file mode 100644 index 0000000000..b1b245eb1f --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/040-revert-button-style-to-button-color.ts @@ -0,0 +1,103 @@ +import type { DSLWidget } from "../types"; + +export enum ButtonStyleTypes { + PRIMARY = "PRIMARY", + WARNING = "WARNING", + DANGER = "DANGER", + INFO = "INFO", + SECONDARY = "SECONDARY", + CUSTOM = "CUSTOM", +} + +const Colors = { + DANGER_SOLID: "#F22B2B", + GREEN: "#03B365", + WARNING_SOLID: "#FEB811", + INFO_SOLID: "#6698FF", + GRAY: "#858282", +}; + +export const revertButtonStyleToButtonColor = (currentDSL: DSLWidget) => { + if ( + currentDSL.type === "BUTTON_WIDGET" || + currentDSL.type === "FORM_BUTTON_WIDGET" || + currentDSL.type === "ICON_BUTTON_WIDGET" + ) { + if (currentDSL.hasOwnProperty("buttonStyle")) { + switch (currentDSL.buttonStyle) { + case ButtonStyleTypes.DANGER: + currentDSL.buttonColor = Colors.DANGER_SOLID; + break; + case ButtonStyleTypes.PRIMARY: + currentDSL.buttonColor = Colors.GREEN; + break; + case ButtonStyleTypes.WARNING: + currentDSL.buttonColor = Colors.WARNING_SOLID; + break; + case ButtonStyleTypes.INFO: + currentDSL.buttonColor = Colors.INFO_SOLID; + break; + case ButtonStyleTypes.SECONDARY: + currentDSL.buttonColor = Colors.GRAY; + break; + case "PRIMARY_BUTTON": + currentDSL.buttonColor = Colors.GREEN; + break; + case "SECONDARY_BUTTON": + currentDSL.buttonColor = Colors.GREEN; + currentDSL.buttonVariant = "SECONDARY"; + break; + case "DANGER_BUTTON": + currentDSL.buttonColor = Colors.DANGER_SOLID; + break; + default: + if (!currentDSL.buttonColor) currentDSL.buttonColor = Colors.GREEN; + break; + } + delete currentDSL.buttonStyle; + } + } + if (currentDSL.type === "MENU_BUTTON_WIDGET") { + if (currentDSL.hasOwnProperty("menuStyle")) { + switch (currentDSL.menuStyle) { + case ButtonStyleTypes.DANGER: + currentDSL.menuColor = Colors.DANGER_SOLID; + break; + case ButtonStyleTypes.PRIMARY: + currentDSL.menuColor = Colors.GREEN; + break; + case ButtonStyleTypes.WARNING: + currentDSL.menuColor = Colors.WARNING_SOLID; + break; + case ButtonStyleTypes.INFO: + currentDSL.menuColor = Colors.INFO_SOLID; + break; + case ButtonStyleTypes.SECONDARY: + currentDSL.menuColor = Colors.GRAY; + break; + default: + if (!currentDSL.menuColor) currentDSL.menuColor = Colors.GREEN; + break; + } + delete currentDSL.menuStyle; + delete currentDSL.prevMenuStyle; + } + } + if (currentDSL.type === "TABLE_WIDGET") { + if (currentDSL.hasOwnProperty("primaryColumns")) { + Object.keys(currentDSL.primaryColumns).forEach((column) => { + if (currentDSL.primaryColumns[column].columnType === "button") { + currentDSL.primaryColumns[column].buttonColor = + currentDSL.primaryColumns[column].buttonStyle; + delete currentDSL.primaryColumns[column].buttonStyle; + } + }); + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((child: DSLWidget) => + revertButtonStyleToButtonColor(child), + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/041-migrate-button-variant.ts b/app/client/packages/dsl/src/migrate/migrations/041-migrate-button-variant.ts new file mode 100644 index 0000000000..cceda637c4 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/041-migrate-button-variant.ts @@ -0,0 +1,62 @@ +import type { DSLWidget } from "../types"; + +enum ButtonVariantTypes { + PRIMARY = "PRIMARY", + SECONDARY = "SECONDARY", + TERTIARY = "TERTIARY", +} + +export const migrateButtonVariant = (currentDSL: DSLWidget) => { + if ( + currentDSL.type === "BUTTON_WIDGET" || + currentDSL.type === "FORM_BUTTON_WIDGET" || + currentDSL.type === "ICON_BUTTON_WIDGET" + ) { + switch (currentDSL.buttonVariant) { + case "OUTLINE": + currentDSL.buttonVariant = ButtonVariantTypes.SECONDARY; + break; + case "GHOST": + currentDSL.buttonVariant = ButtonVariantTypes.TERTIARY; + break; + default: + currentDSL.buttonVariant = ButtonVariantTypes.PRIMARY; + } + } + if (currentDSL.type === "MENU_BUTTON_WIDGET") { + switch (currentDSL.menuVariant) { + case "OUTLINE": + currentDSL.menuVariant = ButtonVariantTypes.SECONDARY; + break; + case "GHOST": + currentDSL.menuVariant = ButtonVariantTypes.TERTIARY; + break; + default: + currentDSL.menuVariant = ButtonVariantTypes.PRIMARY; + } + } + if (currentDSL.type === "TABLE_WIDGET") { + if (currentDSL.hasOwnProperty("primaryColumns")) { + Object.keys(currentDSL.primaryColumns).forEach((column) => { + if (currentDSL.primaryColumns[column].columnType === "iconButton") { + let newVariant = ButtonVariantTypes.PRIMARY; + switch (currentDSL.primaryColumns[column].buttonVariant) { + case "OUTLINE": + newVariant = ButtonVariantTypes.SECONDARY; + break; + case "GHOST": + newVariant = ButtonVariantTypes.TERTIARY; + break; + } + currentDSL.primaryColumns[column].buttonVariant = newVariant; + } + }); + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map((child: DSLWidget) => + migrateButtonVariant(child), + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/042-migrate-map-widget-is-clicked-marker-centered.ts b/app/client/packages/dsl/src/migrate/migrations/042-migrate-map-widget-is-clicked-marker-centered.ts new file mode 100644 index 0000000000..fee701efd1 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/042-migrate-map-widget-is-clicked-marker-centered.ts @@ -0,0 +1,17 @@ +import type { DSLWidget } from "../types"; + +export const migrateMapWidgetIsClickedMarkerCentered = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "MAP_WIDGET") { + if (!("isClickedMarkerCentered" in child)) { + child.isClickedMarkerCentered = true; + } + } else if (child.children && child.children.length > 0) { + child = migrateMapWidgetIsClickedMarkerCentered(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/043-map-allow-horizontal-scroll-mirgation.ts b/app/client/packages/dsl/src/migrate/migrations/043-map-allow-horizontal-scroll-mirgation.ts new file mode 100644 index 0000000000..05d6d290be --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/043-map-allow-horizontal-scroll-mirgation.ts @@ -0,0 +1,17 @@ +import type { DSLWidget } from "../types"; + +export const mapAllowHorizontalScrollMigration = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "CHART_WIDGET") { + child.allowScroll = child.allowHorizontalScroll; + delete child.allowHorizontalScroll; + } + + if (Array.isArray(child.children) && child.children.length > 0) + child = mapAllowHorizontalScrollMigration(child); + + return child; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/044-is-sortable-migration.ts b/app/client/packages/dsl/src/migrate/migrations/044-is-sortable-migration.ts new file mode 100644 index 0000000000..a87a24d5ad --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/044-is-sortable-migration.ts @@ -0,0 +1,13 @@ +import type { DSLWidget } from "../types"; + +export const isSortableMigration = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET" && !child.hasOwnProperty("isSortable")) { + child["isSortable"] = true; + } else if (child.children && child.children.length > 0) { + child = isSortableMigration(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/045-migrate-table-widget-icon-button-variant.ts b/app/client/packages/dsl/src/migrate/migrations/045-migrate-table-widget-icon-button-variant.ts new file mode 100644 index 0000000000..2e1fdbec1d --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/045-migrate-table-widget-icon-button-variant.ts @@ -0,0 +1,25 @@ +import type { ColumnProperties, DSLWidget } from "../types"; + +export const migrateTableWidgetIconButtonVariant = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET") { + const primaryColumns = child.primaryColumns as Record< + string, + ColumnProperties + >; + Object.keys(primaryColumns).forEach((accessor: string) => { + const primaryColumn = primaryColumns[accessor]; + + if (primaryColumn.columnType === "iconButton") { + if (!("buttonVariant" in primaryColumn)) { + primaryColumn.buttonVariant = "TERTIARY"; + } + } + }); + } else if (child.children && child.children.length > 0) { + child = migrateTableWidgetIconButtonVariant(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/046-migrate-checkbox-group-widget-inline-property.ts b/app/client/packages/dsl/src/migrate/migrations/046-migrate-checkbox-group-widget-inline-property.ts new file mode 100644 index 0000000000..6dbc610fbc --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/046-migrate-checkbox-group-widget-inline-property.ts @@ -0,0 +1,18 @@ +import type { DSLWidget } from "../types"; + +export const migrateCheckboxGroupWidgetInlineProperty = ( + currentDSL: DSLWidget, +) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "CHECKBOX_GROUP_WIDGET") { + if (child.version === 1) { + child.isInline = true; + child.version = 2; + } + } else if (child.children && child.children.length > 0) { + child = migrateCheckboxGroupWidgetInlineProperty(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/047-SKIP.ts b/app/client/packages/dsl/src/migrate/migrations/047-SKIP.ts new file mode 100644 index 0000000000..695c7acc8a --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/047-SKIP.ts @@ -0,0 +1,3 @@ +// We're skipping this to fix a bad table migration. +// skipped migration is added as version 51 +export {}; diff --git a/app/client/packages/dsl/src/migrate/migrations/048-migrate-recaptcha-type.ts b/app/client/packages/dsl/src/migrate/migrations/048-migrate-recaptcha-type.ts new file mode 100644 index 0000000000..954594709d --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/048-migrate-recaptcha-type.ts @@ -0,0 +1,19 @@ +import type { DSLWidget } from "../types"; + +export const migrateRecaptchaType = (currentDSL: DSLWidget): DSLWidget => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "BUTTON_WIDGET" || child.type === "FORM_BUTTON_WIDGET") { + const recaptchaV2 = child.recaptchaV2; + if (recaptchaV2) { + child.recaptchaType = "V2"; + } else { + child.recaptchaType = "V3"; + } + delete child.recaptchaV2; + } else if (child.children && child.children.length > 0) { + child = migrateRecaptchaType(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/049-add-private-widgets-to-all-list-widgets.ts b/app/client/packages/dsl/src/migrate/migrations/049-add-private-widgets-to-all-list-widgets.ts new file mode 100644 index 0000000000..071f7409b1 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/049-add-private-widgets-to-all-list-widgets.ts @@ -0,0 +1,27 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import set from "lodash/set"; +import type { DSLWidget } from "../types"; + +/** + * adds 'privateWidgets' key for all list widgets + * + * @param currentDSL + * @returns + */ +export const addPrivateWidgetsToAllListWidgets = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "LIST_WIDGET") { + const privateWidgets: any = {}; + Object.keys(child.template).forEach((entityName) => { + privateWidgets[entityName] = true; + }); + + if (!child.privateWidgets) { + set(child, `privateWidgets`, privateWidgets); + } + } + return child; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/050-SKIP.ts b/app/client/packages/dsl/src/migrate/migrations/050-SKIP.ts new file mode 100644 index 0000000000..fb9b9bb087 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/050-SKIP.ts @@ -0,0 +1,5 @@ +/* + * We're skipping this to fix a bad table migration - migrateTableWidgetNumericColumnName + * it overwrites the computedValue of the table columns + */ +export {}; diff --git a/app/client/packages/dsl/src/migrate/migrations/051-migrate-phone-input-widget-allow-formatting.ts b/app/client/packages/dsl/src/migrate/migrations/051-migrate-phone-input-widget-allow-formatting.ts new file mode 100644 index 0000000000..0709fcbbe1 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/051-migrate-phone-input-widget-allow-formatting.ts @@ -0,0 +1,15 @@ +import type { DSLWidget } from "../types"; + +export const migratePhoneInputWidgetAllowFormatting = ( + currentDSL: DSLWidget, +): DSLWidget => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "PHONE_INPUT_WIDGET") { + child.allowFormatting = true; + } else if (child.children && child.children.length > 0) { + child = migratePhoneInputWidgetAllowFormatting(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/052-migrate-modal-icon-button-widget.ts b/app/client/packages/dsl/src/migrate/migrations/052-migrate-modal-icon-button-widget.ts new file mode 100644 index 0000000000..1565f45b54 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/052-migrate-modal-icon-button-widget.ts @@ -0,0 +1,17 @@ +import type { DSLWidget } from "../types"; + +export const migrateModalIconButtonWidget = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "ICON_WIDGET") { + child.type = "ICON_BUTTON_WIDGET"; + child.buttonColor = "#2E3D49"; // Colors.OXFORD_BLUE; + child.buttonVariant = "TERTIARY"; + child.borderRadius = "SHARP"; + child.color = undefined; + } else if (child.children && child.children.length > 0) { + child = migrateModalIconButtonWidget(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/053-migrate-scroll-truncate-property.ts b/app/client/packages/dsl/src/migrate/migrations/053-migrate-scroll-truncate-property.ts new file mode 100644 index 0000000000..010234a0bf --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/053-migrate-scroll-truncate-property.ts @@ -0,0 +1,29 @@ +import type { DSLWidget } from "../types"; + +export enum OverflowTypes { + SCROLL = "SCROLL", + TRUNCATE = "TRUNCATE", + NONE = "NONE", +} + +export const migrateScrollTruncateProperties = ( + currentDSL: DSLWidget, +): DSLWidget => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TEXT_WIDGET") { + if (child.shouldTruncate) { + child.overflow = OverflowTypes.TRUNCATE; + } else if (child.shouldScroll) { + child.overflow = OverflowTypes.SCROLL; + } else { + child.overflow = OverflowTypes.NONE; + } + delete child.shouldScroll; + delete child.shouldTruncate; + } else if (child.children && child.children.length > 0) { + child = migrateScrollTruncateProperties(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/054-migrate-phone-input-widget-default-dial-code.ts b/app/client/packages/dsl/src/migrate/migrations/054-migrate-phone-input-widget-default-dial-code.ts new file mode 100644 index 0000000000..2ece50bfe4 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/054-migrate-phone-input-widget-default-dial-code.ts @@ -0,0 +1,32 @@ +import type { DSLWidget } from "../types"; + +export const migratePhoneInputWidgetDefaultDialCode = ( + currentDSL: DSLWidget, +): DSLWidget => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "PHONE_INPUT_WIDGET") { + child.defaultDialCode = child.dialCode; + delete child.dialCode; + + if (child.dynamicPropertyPathList) { + child.dynamicPropertyPathList.forEach((property: { key: string }) => { + if (property.key === "dialCode") { + property.key = "defaultDialCode"; + } + }); + } + + if (child.dynamicBindingPathList) { + child.dynamicBindingPathList.forEach((property: { key: string }) => { + if (property.key === "dialCode") { + property.key = "defaultDialCode"; + } + }); + } + } else if (child.children && child.children.length > 0) { + child = migratePhoneInputWidgetDefaultDialCode(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/055-migrate-currency-input-widget-default-currency-code.ts b/app/client/packages/dsl/src/migrate/migrations/055-migrate-currency-input-widget-default-currency-code.ts new file mode 100644 index 0000000000..81135a716d --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/055-migrate-currency-input-widget-default-currency-code.ts @@ -0,0 +1,32 @@ +import type { DSLWidget } from "../types"; + +export const migrateCurrencyInputWidgetDefaultCurrencyCode = ( + currentDSL: DSLWidget, +): DSLWidget => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "CURRENCY_INPUT_WIDGET") { + child.defaultCurrencyCode = child.currencyCode; + delete child.currencyCode; + + if (child.dynamicPropertyPathList) { + child.dynamicPropertyPathList.forEach((property: { key: string }) => { + if (property.key === "currencyCode") { + property.key = "defaultCurrencyCode"; + } + }); + } + + if (child.dynamicBindingPathList) { + child.dynamicBindingPathList.forEach((property: { key: string }) => { + if (property.key === "currencyCode") { + property.key = "defaultCurrencyCode"; + } + }); + } + } else if (child.children && child.children.length > 0) { + child = migrateCurrencyInputWidgetDefaultCurrencyCode(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/056-migrate-radio-group-alignment-property.ts b/app/client/packages/dsl/src/migrate/migrations/056-migrate-radio-group-alignment-property.ts new file mode 100644 index 0000000000..171b8c145a --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/056-migrate-radio-group-alignment-property.ts @@ -0,0 +1,15 @@ +import type { DSLWidget } from "../types"; + +export const migrateRadioGroupAlignmentProperty = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "RADIO_GROUP_WIDGET") { + if (!child.hasOwnProperty("alignment")) { + child.alignment = "left"; + } + } else if (child.children && child.children.length > 0) { + child = migrateRadioGroupAlignmentProperty(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/057-migrate-styling-properties-for-theming.ts b/app/client/packages/dsl/src/migrate/migrations/057-migrate-styling-properties-for-theming.ts new file mode 100644 index 0000000000..e21198ab07 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/057-migrate-styling-properties-for-theming.ts @@ -0,0 +1,773 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { clone, get, has, isEmpty, set } from "lodash"; +import type { DSLWidget } from "../types"; +import { isDynamicValue } from "../utils"; + +enum ButtonBorderRadiusTypes { + SHARP = "SHARP", + ROUNDED = "ROUNDED", + CIRCLE = "CIRCLE", +} + +enum BoxShadowTypes { + NONE = "NONE", + VARIANT1 = "VARIANT1", + VARIANT2 = "VARIANT2", + VARIANT3 = "VARIANT3", + VARIANT4 = "VARIANT4", + VARIANT5 = "VARIANT5", +} + +export enum TextSizes { + HEADING1 = "HEADING1", + HEADING2 = "HEADING2", + HEADING3 = "HEADING3", + PARAGRAPH = "PARAGRAPH", + PARAGRAPH2 = "PARAGRAPH2", +} + +const THEMING_BORDER_RADIUS = { + none: "0px", + rounded: "0.375rem", + circle: "9999px", +}; + +const THEMEING_TEXT_SIZES = { + xs: "0.75rem", + sm: "0.875rem", + base: "1rem", + md: "1.125rem", + lg: "1.5rem", + xl: "1.875rem", + "2xl": "3rem", + "3xl": "3.75rem", +}; + +const rgbaMigrationConstantV56 = "rgba(0, 0, 0, 0.25)"; + +const DEFAULT_BOXSHADOW = "none"; + +const ROOT_SCHEMA_KEY = "__root_schema__"; + +const Colors = { + GREEN: "#03B365", +}; + +export const BUTTON_GROUP_CHILD_STYLESHEET = { + button: { + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + }, +}; + +export const TABLE_WIDGET_CHILD_STYLESHEET = { + button: { + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + menuButton: { + menuColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + iconButton: { + menuColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, +}; + +export const JSON_FORM_WIDGET_CHILD_STYLESHEET = { + ARRAY: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + cellBorderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + cellBoxShadow: "none", + }, + OBJECT: { + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + cellBorderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + cellBoxShadow: "none", + }, + CHECKBOX: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + CURRENCY_INPUT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + DATEPICKER: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + EMAIL_INPUT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + MULTISELECT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + MULTILINE_TEXT_INPUT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + NUMBER_INPUT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + PASSWORD_INPUT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + PHONE_NUMBER_INPUT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + RADIO_GROUP: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + boxShadow: "none", + }, + SELECT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + SWITCH: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + boxShadow: "none", + }, + TEXT_INPUT: { + accentColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, +}; + +/** + * Recursive function to traverse through all the children of the JSON form in theming migration. + * @param schemaItem + * @param propertyPath + * @param callback + */ +export const parseSchemaItem = ( + schemaItem: any, + propertyPath: string, + callback: (schemaItem: any, propertyPath: string) => void, +) => { + // Update the theme stuff for this schema + callback(schemaItem, propertyPath); + if (schemaItem && !isEmpty(schemaItem.children)) { + Object.values(schemaItem.children).forEach((schemaItem: any) => { + const childPropertyPath = `${propertyPath}.children.${schemaItem.identifier}`; + parseSchemaItem(schemaItem, childPropertyPath, callback); + }); + } +}; + +/** + * This function will add the given propertyName into the dynamicPropertyPathList. + * @param propertyName + * @param child + */ +export const addPropertyToDynamicPropertyPathList = ( + propertyName: string, + child: DSLWidget, +) => { + const isPropertyPathPresent = (child.dynamicPropertyPathList || []).find( + (property: { key: string }) => property.key === propertyName, + ); + if (!isPropertyPathPresent) { + child.dynamicPropertyPathList = [ + ...(child.dynamicPropertyPathList || []), + { key: propertyName }, + ]; + } +}; + +export const migrateStylingPropertiesForTheming = (currentDSL: DSLWidget) => { + const widgetsWithPrimaryColorProp = [ + "DATE_PICKER_WIDGET2", + "INPUT_WIDGET", + "INPUT_WIDGET_V2", + "LIST_WIDGET", + "MULTI_SELECT_TREE_WIDGET", + "DROP_DOWN_WIDGET", + "TABS_WIDGET", + "SINGLE_SELECT_TREE_WIDGET", + "TABLE_WIDGET", + "BUTTON_GROUP_WIDGET", + "PHONE_INPUT_WIDGET", + "CURRENCY_INPUT_WIDGET", + "SELECT_WIDGET", + "MULTI_SELECT_WIDGET_V2", + "MULTI_SELECT_WIDGET", + ]; + + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + switch (child.borderRadius) { + case ButtonBorderRadiusTypes.SHARP: + child.borderRadius = THEMING_BORDER_RADIUS.none; + break; + case ButtonBorderRadiusTypes.ROUNDED: + child.borderRadius = THEMING_BORDER_RADIUS.rounded; + break; + case ButtonBorderRadiusTypes.CIRCLE: + child.borderRadius = THEMING_BORDER_RADIUS.circle; + addPropertyToDynamicPropertyPathList("borderRadius", child); + break; + default: + if ( + (child.type === "CONTAINER_WIDGET" || + child.type === "FORM_WIDGET" || + child.type === "JSON_FORM_WIDGET") && + child.borderRadius + ) { + child.borderRadius = `${child.borderRadius}px`; + addPropertyToDynamicPropertyPathList("borderRadius", child); + } else { + child.borderRadius = THEMING_BORDER_RADIUS.none; + } + } + + switch (child.boxShadow) { + case BoxShadowTypes.VARIANT1: + child.boxShadow = `0px 0px 4px 3px ${ + child.boxShadowColor || "rgba(0, 0, 0, 0.25)" + }`; + addPropertyToDynamicPropertyPathList("boxShadow", child); + break; + case BoxShadowTypes.VARIANT2: + child.boxShadow = `3px 3px 4px ${ + child.boxShadowColor || "rgba(0, 0, 0, 0.25)" + }`; + addPropertyToDynamicPropertyPathList("boxShadow", child); + break; + case BoxShadowTypes.VARIANT3: + child.boxShadow = `0px 1px 3px ${ + child.boxShadowColor || "rgba(0, 0, 0, 0.25)" + }`; + addPropertyToDynamicPropertyPathList("boxShadow", child); + break; + case BoxShadowTypes.VARIANT4: + child.boxShadow = `2px 2px 0px ${ + child.boxShadowColor || "rgba(0, 0, 0, 0.25)" + }`; + addPropertyToDynamicPropertyPathList("boxShadow", child); + break; + case BoxShadowTypes.VARIANT5: + child.boxShadow = `-2px -2px 0px ${ + child.boxShadowColor || "rgba(0, 0, 0, 0.25)" + }`; + addPropertyToDynamicPropertyPathList("boxShadow", child); + break; + default: + child.boxShadow = DEFAULT_BOXSHADOW; + } + + /** + * Migrates the textSize property present at the table level. + */ + if (child.type === "TABLE_WIDGET") { + switch (child.textSize) { + case TextSizes.PARAGRAPH2: + child.textSize = THEMEING_TEXT_SIZES.xs; + addPropertyToDynamicPropertyPathList("textSize", child); + break; + case TextSizes.PARAGRAPH: + child.textSize = THEMEING_TEXT_SIZES.sm; + break; + case TextSizes.HEADING3: + child.textSize = THEMEING_TEXT_SIZES.base; + break; + case TextSizes.HEADING2: + child.textSize = THEMEING_TEXT_SIZES.md; + addPropertyToDynamicPropertyPathList("textSize", child); + break; + case TextSizes.HEADING1: + child.textSize = THEMEING_TEXT_SIZES.lg; + addPropertyToDynamicPropertyPathList("textSize", child); + break; + default: + child.textSize = THEMEING_TEXT_SIZES.sm; + } + if (child.hasOwnProperty("primaryColumns")) { + Object.keys(child.primaryColumns).forEach((key: string) => { + /** + * Migrates the textSize property present at the primaryColumn and derivedColumn level. + */ + const column = child.primaryColumns[key]; + const isDerivedColumn = + child.hasOwnProperty("derivedColumns") && + key in child.derivedColumns; + const derivedColumn = child.derivedColumns[key]; + switch (column.textSize) { + case TextSizes.PARAGRAPH2: + column.textSize = THEMEING_TEXT_SIZES.xs; + if (isDerivedColumn) { + derivedColumn.textSize = THEMEING_TEXT_SIZES.xs; + } + addPropertyToDynamicPropertyPathList( + `primaryColumns.${key}.textSize`, + child, + ); + break; + case TextSizes.PARAGRAPH: + column.textSize = THEMEING_TEXT_SIZES.sm; + if (isDerivedColumn) { + derivedColumn.textSize = THEMEING_TEXT_SIZES.sm; + } + break; + case TextSizes.HEADING3: + column.textSize = THEMEING_TEXT_SIZES.base; + if (isDerivedColumn) { + derivedColumn.textSize = THEMEING_TEXT_SIZES.base; + } + break; + case TextSizes.HEADING2: + column.textSize = THEMEING_TEXT_SIZES.md; + if (isDerivedColumn) { + derivedColumn.textSize = THEMEING_TEXT_SIZES.md; + } + addPropertyToDynamicPropertyPathList( + `primaryColumns.${key}.textSize`, + child, + ); + break; + case TextSizes.HEADING1: + column.textSize = THEMEING_TEXT_SIZES.lg; + if (isDerivedColumn) { + derivedColumn.textSize = THEMEING_TEXT_SIZES.lg; + } + addPropertyToDynamicPropertyPathList( + `primaryColumns.${key}.textSize`, + child, + ); + break; + } + + /** + * Migrate the borderRadius if exists for the primary columns and derived columns + */ + if (!column.borderRadius) { + column.borderRadius = THEMING_BORDER_RADIUS.none; + if (isDerivedColumn) { + derivedColumn.borderRadius = THEMING_BORDER_RADIUS.none; + } + } + switch (column.borderRadius) { + case ButtonBorderRadiusTypes.SHARP: + column.borderRadius = THEMING_BORDER_RADIUS.none; + if (isDerivedColumn) { + derivedColumn.borderRadius = THEMING_BORDER_RADIUS.none; + } + break; + case ButtonBorderRadiusTypes.ROUNDED: + column.borderRadius = THEMING_BORDER_RADIUS.rounded; + if (isDerivedColumn) { + derivedColumn.borderRadius = THEMING_BORDER_RADIUS.rounded; + } + break; + case ButtonBorderRadiusTypes.CIRCLE: + column.borderRadius = THEMING_BORDER_RADIUS.circle; + if (isDerivedColumn) { + derivedColumn.borderRadius = THEMING_BORDER_RADIUS.circle; + } + break; + } + + /** + * Migrate the boxShadow if exists for the primary columns and derived columns: + */ + const isBoxShadowColorDynamic = isDynamicValue(column.boxShadowColor); + const newBoxShadowColor = + column.boxShadowColor || rgbaMigrationConstantV56; + + if (column.boxShadow) { + addPropertyToDynamicPropertyPathList( + `primaryColumns.${key}.boxShadow`, + child, + ); + } else { + column.boxShadow = "none"; + if (isDerivedColumn) { + derivedColumn.boxShadow = "none"; + } + } + + switch (column.boxShadow) { + case BoxShadowTypes.VARIANT1: + if (!isBoxShadowColorDynamic) { + // Checks is boxShadowColor is not dynamic + column.boxShadow = `0px 0px 4px 3px ${newBoxShadowColor}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `0px 0px 4px 3px ${newBoxShadowColor}`; + } + delete column.boxShadowColor; + } else { + // Dynamic + column.boxShadow = `0px 0px 4px 3px ${rgbaMigrationConstantV56}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `0px 0px 4px 3px ${rgbaMigrationConstantV56}`; + } + } + break; + case BoxShadowTypes.VARIANT2: + if (!isBoxShadowColorDynamic) { + // Checks is boxShadowColor is not dynamic + column.boxShadow = `3px 3px 4px ${newBoxShadowColor}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `3px 3px 4px ${newBoxShadowColor}`; + } + delete column.boxShadowColor; + } else { + // Dynamic + column.boxShadow = `3px 3px 4px ${rgbaMigrationConstantV56}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `3px 3px 4px ${rgbaMigrationConstantV56}`; + } + } + break; + case BoxShadowTypes.VARIANT3: + if (!isBoxShadowColorDynamic) { + // Checks is boxShadowColor is not dynamic + column.boxShadow = `0px 1px 3px ${newBoxShadowColor}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `0px 1px 3px ${newBoxShadowColor}`; + } + delete column.boxShadowColor; + } else { + // Dynamic + column.boxShadow = `0px 1px 3px ${rgbaMigrationConstantV56}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `0px 1px 3px ${rgbaMigrationConstantV56}`; + } + } + break; + case BoxShadowTypes.VARIANT4: + if (!isBoxShadowColorDynamic) { + // Checks is boxShadowColor is not dynamic + column.boxShadow = `2px 2px 0px ${newBoxShadowColor}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `2px 2px 0px ${newBoxShadowColor}`; + } + delete column.boxShadowColor; + } else { + column.boxShadow = `2px 2px 0px ${rgbaMigrationConstantV56}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `2px 2px 0px ${rgbaMigrationConstantV56}`; + } + } + break; + case BoxShadowTypes.VARIANT5: + if (!isBoxShadowColorDynamic) { + // Checks is boxShadowColor is not dynamic + column.boxShadow = `-2px -2px 0px ${newBoxShadowColor}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `-2px -2px 0px ${newBoxShadowColor}`; + } + delete column.boxShadowColor; + } else { + // Dynamic + column.boxShadow = `-2px -2px 0px ${rgbaMigrationConstantV56}`; + if (isDerivedColumn) { + derivedColumn.boxShadow = `-2px -2px 0px ${rgbaMigrationConstantV56}`; + } + } + break; + } + }); + } + } + + /** + * Migrate the parent level properties for JSON Form + */ + if (child.type === "JSON_FORM_WIDGET") { + const parentLevelProperties = ["submitButtonStyles", "resetButtonStyles"]; + parentLevelProperties.forEach((propertyName: string) => { + const propertyPathBorderRadius = `${propertyName}.borderRadius`; + const propertyPathBoxShadow = `${propertyName}.boxShadow`; + const propertyPathBoxShadowColor = `${propertyName}.boxShadowColor`; + + if (has(child, propertyPathBorderRadius)) { + const jsonFormBorderRadius = get(child, propertyPathBorderRadius); + switch (jsonFormBorderRadius) { + case ButtonBorderRadiusTypes.SHARP: + set(child, propertyPathBorderRadius, THEMING_BORDER_RADIUS.none); + break; + case ButtonBorderRadiusTypes.ROUNDED: + set( + child, + propertyPathBorderRadius, + THEMING_BORDER_RADIUS.rounded, + ); + break; + case ButtonBorderRadiusTypes.CIRCLE: + set( + child, + propertyPathBorderRadius, + THEMING_BORDER_RADIUS.circle, + ); + addPropertyToDynamicPropertyPathList( + propertyPathBorderRadius, + child, + ); + break; + default: + set(child, propertyPathBorderRadius, THEMING_BORDER_RADIUS.none); + } + } else { + set(child, propertyPathBorderRadius, THEMING_BORDER_RADIUS.none); + } + + if (has(child, propertyPathBoxShadow)) { + const jsonFormBoxShadow = get(child, propertyPathBoxShadow); + const boxShadowColor = + (has(child, propertyPathBoxShadowColor) && + get(child, propertyPathBoxShadowColor)) || + "rgba(0, 0, 0, 0.25)"; + switch (jsonFormBoxShadow) { + case BoxShadowTypes.VARIANT1: + set( + child, + propertyPathBoxShadow, + `0px 0px 4px 3px ${boxShadowColor}`, + ); + addPropertyToDynamicPropertyPathList( + propertyPathBoxShadow, + child, + ); + break; + case BoxShadowTypes.VARIANT2: + set( + child, + propertyPathBoxShadow, + `3px 3px 4px ${boxShadowColor}`, + ); + addPropertyToDynamicPropertyPathList( + propertyPathBoxShadow, + child, + ); + break; + case BoxShadowTypes.VARIANT3: + set( + child, + propertyPathBoxShadow, + `0px 1px 3px ${boxShadowColor}`, + ); + addPropertyToDynamicPropertyPathList( + propertyPathBoxShadow, + child, + ); + break; + case BoxShadowTypes.VARIANT4: + set( + child, + propertyPathBoxShadow, + `2px 2px 0px ${boxShadowColor}`, + ); + addPropertyToDynamicPropertyPathList( + propertyPathBoxShadow, + child, + ); + break; + case BoxShadowTypes.VARIANT5: + set( + child, + propertyPathBoxShadow, + `-2px -2px 0px ${boxShadowColor}`, + ); + addPropertyToDynamicPropertyPathList( + propertyPathBoxShadow, + child, + ); + break; + default: + set(child, propertyPathBoxShadow, DEFAULT_BOXSHADOW); + } + } else { + set(child, propertyPathBoxShadow, DEFAULT_BOXSHADOW); + } + }); + + /** + * Migrate the children level properties for JSON form + */ + if (has(child, "schema")) { + const clonedSchema = clone(child.schema); + parseSchemaItem( + clonedSchema[ROOT_SCHEMA_KEY], + `schema.${ROOT_SCHEMA_KEY}`, + (schemaItem, propertyPath) => { + if (schemaItem) { + switch (schemaItem.labelTextSize) { + case TextSizes.PARAGRAPH2: + schemaItem.labelTextSize = THEMEING_TEXT_SIZES.xs; + addPropertyToDynamicPropertyPathList( + `${propertyPath}.labelTextSize`, + child, + ); + break; + case TextSizes.PARAGRAPH: + schemaItem.labelTextSize = THEMEING_TEXT_SIZES.sm; + break; + case TextSizes.HEADING3: + schemaItem.labelTextSize = THEMEING_TEXT_SIZES.base; + break; + case TextSizes.HEADING2: + schemaItem.labelTextSize = THEMEING_TEXT_SIZES.md; + addPropertyToDynamicPropertyPathList( + `${propertyPath}.labelTextSize`, + child, + ); + break; + case TextSizes.HEADING1: + schemaItem.labelTextSize = THEMEING_TEXT_SIZES.lg; + addPropertyToDynamicPropertyPathList( + `${propertyPath}.labelTextSize`, + child, + ); + break; + default: + schemaItem.labelTextSize = THEMEING_TEXT_SIZES.sm; + } + + // Set the default borderRadius + !has(schemaItem, "borderRadius") && + set(schemaItem, "borderRadius", THEMING_BORDER_RADIUS.none); + // Set the default borderRadius for the Item styles in an array type: + !has(schemaItem, "cellBorderRadius") && + set(schemaItem, "cellBorderRadius", THEMING_BORDER_RADIUS.none); + + // Sets the default value for the boxShadow + !has(schemaItem, "boxShadow") && + set(schemaItem, "boxShadow", DEFAULT_BOXSHADOW); + + // Sets the default value for the boxShadow property of Item styles inside an array: + !has(schemaItem, "cellBoxShadow") && + set(schemaItem, "cellBoxShadow", DEFAULT_BOXSHADOW); + + // Sets default value as green for the accentColor(Most of the widgets require the below property): + !has(schemaItem, "accentColor") && + set(schemaItem, "accentColor", Colors.GREEN); + } + }, + ); + + child.schema = clonedSchema; + } + } + + switch (child.fontSize) { + case TextSizes.PARAGRAPH2: + child.fontSize = THEMEING_TEXT_SIZES.xs; + addPropertyToDynamicPropertyPathList("fontSize", child); + break; + case TextSizes.PARAGRAPH: + child.fontSize = THEMEING_TEXT_SIZES.sm; + break; + case TextSizes.HEADING3: + child.fontSize = THEMEING_TEXT_SIZES.base; + break; + case TextSizes.HEADING2: + child.fontSize = THEMEING_TEXT_SIZES.md; + addPropertyToDynamicPropertyPathList("fontSize", child); + break; + case TextSizes.HEADING1: + child.fontSize = THEMEING_TEXT_SIZES.lg; + addPropertyToDynamicPropertyPathList("fontSize", child); + break; + } + + switch (child.labelTextSize) { + case TextSizes.PARAGRAPH2: + child.labelTextSize = THEMEING_TEXT_SIZES.xs; + addPropertyToDynamicPropertyPathList("labelTextSize", child); + break; + case TextSizes.PARAGRAPH: + child.labelTextSize = THEMEING_TEXT_SIZES.sm; + break; + case TextSizes.HEADING3: + child.labelTextSize = THEMEING_TEXT_SIZES.base; + break; + case TextSizes.HEADING2: + child.labelTextSize = THEMEING_TEXT_SIZES.md; + addPropertyToDynamicPropertyPathList("labelTextSize", child); + break; + case TextSizes.HEADING1: + child.labelTextSize = THEMEING_TEXT_SIZES.lg; + addPropertyToDynamicPropertyPathList("labelTextSize", child); + break; + default: + child.labelTextSize = THEMEING_TEXT_SIZES.sm; + } + + /** + * Add primaryColor color to missing widgets + */ + if (widgetsWithPrimaryColorProp.includes(child.type)) { + child.accentColor = "{{appsmith.theme.colors.primaryColor}}"; + + child.dynamicBindingPathList = [ + ...(child.dynamicBindingPathList || []), + { + key: "accentColor", + }, + ]; + } + + // specific fixes + if (child.type === "AUDIO_RECORDER_WIDGET") { + child.borderRadius = THEMING_BORDER_RADIUS.circle; + child.accentColor = child.backgroundColor; + } + + if (child.type === "FILE_PICKER_WIDGET_V2") { + child.buttonColor = Colors.GREEN; + } + + if ( + child.type === "CHECKBOX_WIDGET" || + child.type === "CHECKBOX_GROUP_WIDGET" || + child.type === "SWITCH_WIDGET" || + child.type === "SWITCH_GROUP_WIDGET" + ) { + child.accentColor = Colors.GREEN; + } + + if (child.type === "TEXT_WIDGET") { + child.fontFamily = "System Default"; + } + // Adds childStyleSheets + switch (child.type) { + case "BUTTON_GROUP_WIDGET": + child.childStylesheet = BUTTON_GROUP_CHILD_STYLESHEET; + break; + case "JSON_FORM_WIDGET": + child.childStylesheet = JSON_FORM_WIDGET_CHILD_STYLESHEET; + break; + case "TABLE_WIDGET": + child.childStylesheet = TABLE_WIDGET_CHILD_STYLESHEET; + break; + } + + if (child.children && child.children.length > 0) { + child = migrateStylingPropertiesForTheming(child); + } + return child; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/058-migrate-checkbox-switch-property.ts b/app/client/packages/dsl/src/migrate/migrations/058-migrate-checkbox-switch-property.ts new file mode 100644 index 0000000000..8b9c2e4b8f --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/058-migrate-checkbox-switch-property.ts @@ -0,0 +1,29 @@ +import type { DSLWidget } from "../types"; + +export enum AlignWidgetTypes { + LEFT = "LEFT", + RIGHT = "RIGHT", +} + +export enum LabelPosition { + Left = "Left", + Right = "Right", +} + +export const migrateCheckboxSwitchProperty = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "SWITCH_WIDGET" || child.type === "CHECKBOX_WIDGET") { + if (child.alignWidget === "RIGHT") { + child.alignWidget = AlignWidgetTypes.RIGHT; + child.labelPosition = LabelPosition.Left; + } else { + child.alignWidget = AlignWidgetTypes.LEFT; + child.labelPosition = LabelPosition.Right; + } + } else if (child.children && child.children.length > 0) { + child = migrateCheckboxSwitchProperty(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/059-migrate-chart-widget-reskinning-data.ts b/app/client/packages/dsl/src/migrate/migrations/059-migrate-chart-widget-reskinning-data.ts new file mode 100644 index 0000000000..14b66ab4e6 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/059-migrate-chart-widget-reskinning-data.ts @@ -0,0 +1,31 @@ +import type { DSLWidget } from "../types"; + +export const migrateChartWidgetReskinningData = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "CHART_WIDGET") { + if ( + !( + child.hasOwnProperty("accentColor") && + child.hasOwnProperty("fontFamily") + ) + ) { + child.accentColor = "{{appsmith.theme.colors.primaryColor}}"; + child.fontFamily = "{{appsmith.theme.fontFamily.appFont}}"; + + child.dynamicBindingPathList = [ + ...(child.dynamicBindingPathList || []), + { + key: "accentColor", + }, + { + key: "fontFamily", + }, + ]; + } + } else if (child.children && child.children.length > 0) { + child = migrateChartWidgetReskinningData(child); + } + return child; + }); + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/060-migrate-table-widget-v2-validation.ts b/app/client/packages/dsl/src/migrate/migrations/060-migrate-table-widget-v2-validation.ts new file mode 100644 index 0000000000..c39f487ec5 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/060-migrate-table-widget-v2-validation.ts @@ -0,0 +1,23 @@ +import type { DSLWidget } from "../types"; + +/* + * Adds validation object to each column in the primaryColumns + */ +export const migrateTableWidgetV2Validation = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "TABLE_WIDGET_V2") { + const primaryColumns = child.primaryColumns; + + for (const key in primaryColumns) { + if (primaryColumns.hasOwnProperty(key)) { + primaryColumns[key].validation = {}; + } + } + } else if (child.children && child.children.length > 0) { + child = migrateTableWidgetV2Validation(child); + } + return child; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/061-migrate-chart-widget-reskinning-data.ts b/app/client/packages/dsl/src/migrate/migrations/061-migrate-chart-widget-reskinning-data.ts new file mode 100644 index 0000000000..5005036a28 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/061-migrate-chart-widget-reskinning-data.ts @@ -0,0 +1,3 @@ +// this is a repeat of the migration 059-migrate-chart-widget-reskinning-data + +export {}; diff --git a/app/client/packages/dsl/src/migrate/migrations/062-migrate-select-type-widget-default-value.ts b/app/client/packages/dsl/src/migrate/migrations/062-migrate-select-type-widget-default-value.ts new file mode 100644 index 0000000000..1509a14362 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/062-migrate-select-type-widget-default-value.ts @@ -0,0 +1,38 @@ +import type { DSLWidget } from "../types"; +import { isDynamicValue, stringToJS } from "../utils"; + +const getBindingTemplate = (widgetName: string) => { + const prefixTemplate = `{{ ((options, serverSideFiltering) => ( `; + const suffixTemplate = `))(${widgetName}.options, ${widgetName}.serverSideFiltering) }}`; + + return { prefixTemplate, suffixTemplate }; +}; + +const SelectTypeWidgets = ["SELECT_WIDGET", "MULTI_SELECT_WIDGET_V2"]; + +export function MigrateSelectTypeWidgetDefaultValue(currentDSL: DSLWidget) { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (SelectTypeWidgets.includes(child.type)) { + const defaultOptionValue = child.defaultOptionValue; + const { prefixTemplate, suffixTemplate } = getBindingTemplate( + child.widgetName, + ); + + if ( + typeof defaultOptionValue === "string" && + isDynamicValue(defaultOptionValue) && + !defaultOptionValue.endsWith(suffixTemplate) && + !defaultOptionValue.startsWith(prefixTemplate) + ) { + child.defaultOptionValue = `${prefixTemplate}${stringToJS( + defaultOptionValue, + )}${suffixTemplate}`; + } + } else if (child.children && child.children.length > 0) { + child = MigrateSelectTypeWidgetDefaultValue(child); + } + return child; + }); + + return currentDSL; +} diff --git a/app/client/packages/dsl/src/migrate/migrations/063-migrate-map-chart-widget-reskinning-data.ts b/app/client/packages/dsl/src/migrate/migrations/063-migrate-map-chart-widget-reskinning-data.ts new file mode 100644 index 0000000000..4a69493169 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/063-migrate-map-chart-widget-reskinning-data.ts @@ -0,0 +1,24 @@ +import type { DSLWidget } from "../types"; + +export const migrateMapChartWidgetReskinningData = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "MAP_CHART_WIDGET") { + if (!child.hasOwnProperty("fontFamily")) { + child.fontFamily = "{{appsmith.theme.fontFamily.appFont}}"; + + child.dynamicBindingPathList = [ + ...(child.dynamicBindingPathList || []), + { + key: "fontFamily", + }, + ]; + } + } else if (child.children && child.children.length > 0) { + child = migrateMapChartWidgetReskinningData(child); + } + + return child; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/064-migrate-rate-widget-disabed-state.ts b/app/client/packages/dsl/src/migrate/migrations/064-migrate-rate-widget-disabed-state.ts new file mode 100644 index 0000000000..f8bf099ca3 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/064-migrate-rate-widget-disabed-state.ts @@ -0,0 +1,51 @@ +import type { DSLWidget } from "../types"; +import { isDynamicValue } from "../utils"; + +// migrate all rate widgets with isDisabled = true to isReadOnly = true +export function migrateRateWidgetDisabledState(currentDSL: DSLWidget) { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "RATE_WIDGET") { + // if isDisabled is true, set isReadOnly to true + if (child.isDisabled === true) { + child.isDisabled = false; + child.isReadOnly = true; + } else if ( + // if isDisabled is a dynamic value, set isReadOnly to the same dynamic value + typeof child.isDisabled === "string" && + isDynamicValue(child.isDisabled) + ) { + child.isReadOnly = child.isDisabled; + child.isDisabled = false; + + // add readonly to dynamic binding + child.dynamicBindingPathList = [ + ...(child.dynamicBindingPathList || []), + { + key: "isReadOnly", + }, + ]; + + child.dynamicPropertyPathList = [ + ...(child.dynamicPropertyPathList || []), + { + key: "isReadOnly", + }, + ]; + + // remove readonly from dynamic binding + child.dynamicBindingPathList = child.dynamicBindingPathList.filter( + (item: { key: string }) => item.key !== "isDisabled", + ); + + child.dynamicPropertyPathList = child.dynamicPropertyPathList.filter( + (item: { key: string }) => item.key !== "isDisabled", + ); + } + } else if (child.children && child.children.length > 0) { + child = migrateRateWidgetDisabledState(child); + } + return child; + }); + + return currentDSL; +} diff --git a/app/client/packages/dsl/src/migrate/migrations/065-migrate-code-scanner-layout.ts b/app/client/packages/dsl/src/migrate/migrations/065-migrate-code-scanner-layout.ts new file mode 100644 index 0000000000..d7fecbbd8f --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/065-migrate-code-scanner-layout.ts @@ -0,0 +1,17 @@ +import type { DSLWidget } from "../types"; + +export const migrateCodeScannerLayout = (currentDSL: DSLWidget) => { + currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { + if (child.type === "CODE_SCANNER_WIDGET") { + if (!child.scannerLayout) { + child.scannerLayout = "CLICK_TO_SCAN"; + } + } else if (child.children && child.children.length > 0) { + child = migrateCodeScannerLayout(child); + } + + return child; + }); + + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/066-migrate-table-widget-v2-validation-binding.ts b/app/client/packages/dsl/src/migrate/migrations/066-migrate-table-widget-v2-validation-binding.ts new file mode 100644 index 0000000000..f46b0e47a3 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/066-migrate-table-widget-v2-validation-binding.ts @@ -0,0 +1,79 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { isDynamicValue, traverseDSLAndMigrate } from "../utils"; + +const oldBindingPrefix = `{{ + ( + (editedValue, currentRow, currentIndex) => ( +`; + +const newBindingPrefix = `{{ + ( + (editedValue, currentRow, currentIndex, isNewRow) => ( +`; + +const oldBindingSuffix = (tableId: string, columnName: string) => ` + )) + ( + ${tableId}.columnEditableCellValue.${columnName} || "", + ${tableId}.processedTableData[${tableId}.editableCell.index] || + Object.keys(${tableId}.processedTableData[0]) + .filter(key => ["__originalIndex__", "__primaryKey__"].indexOf(key) === -1) + .reduce((prev, curr) => { + prev[curr] = ""; + return prev; + }, {}), + ${tableId}.editableCell.index) +}} +`; + +const newBindingSuffix = (tableId: string, columnName: string) => { + return ` + )) + ( + (${tableId}.isAddRowInProgress ? ${tableId}.newRow.${columnName} : ${tableId}.columnEditableCellValue.${columnName}) || "", + ${tableId}.isAddRowInProgress ? ${tableId}.newRow : (${tableId}.processedTableData[${tableId}.editableCell.index] || + Object.keys(${tableId}.processedTableData[0]) + .filter(key => ["__originalIndex__", "__primaryKey__"].indexOf(key) === -1) + .reduce((prev, curr) => { + prev[curr] = ""; + return prev; + }, {})), + ${tableId}.isAddRowInProgress ? -1 : ${tableId}.editableCell.index, + ${tableId}.isAddRowInProgress + ) + }} + `; +}; + +export const migrateTableWidgetV2ValidationBinding = ( + currentDSL: DSLWidget, +) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "TABLE_WIDGET_V2") { + const primaryColumns = widget.primaryColumns; + + for (const column in primaryColumns) { + if ( + primaryColumns.hasOwnProperty(column) && + primaryColumns[column].validation && + primaryColumns[column].validation.isColumnEditableCellValid && + isDynamicValue( + primaryColumns[column].validation.isColumnEditableCellValid, + ) + ) { + const propertyValue = + primaryColumns[column].validation.isColumnEditableCellValid; + + const binding = propertyValue + .replace(oldBindingPrefix, "") + .replace(oldBindingSuffix(widget.widgetName, column), ""); + + primaryColumns[column].validation.isColumnEditableCellValid = + newBindingPrefix + + binding + + newBindingSuffix(widget.widgetName, column); + } + } + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/067-migrate-label-position.ts b/app/client/packages/dsl/src/migrate/migrations/067-migrate-label-position.ts new file mode 100644 index 0000000000..c6c5841643 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/067-migrate-label-position.ts @@ -0,0 +1,14 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export function migrateLabelPosition(currentDSL: DSLWidget) { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if ( + (widget.type === "PHONE_INPUT_WIDGET" || + widget.type === "CURRENCY_INPUT_WIDGET") && + widget.labelPosition === undefined + ) { + widget.labelPosition = "Left"; + } + }); +} diff --git a/app/client/packages/dsl/src/migrate/migrations/068-migrate-properties-for-dynamic-height.ts b/app/client/packages/dsl/src/migrate/migrations/068-migrate-properties-for-dynamic-height.ts new file mode 100644 index 0000000000..efe642b734 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/068-migrate-properties-for-dynamic-height.ts @@ -0,0 +1,62 @@ +import type { DSLWidget } from "../types"; + +export const WidgetHeightLimits = { + MAX_HEIGHT_IN_ROWS: 9000, + MIN_HEIGHT_IN_ROWS: 4, + MIN_CANVAS_HEIGHT_IN_ROWS: 10, +}; + +export const WidgetFeatureProps: Record> = { + dynamicHeight: { + minDynamicHeight: WidgetHeightLimits.MIN_HEIGHT_IN_ROWS, + maxDynamicHeight: WidgetHeightLimits.MAX_HEIGHT_IN_ROWS, + dynamicHeight: "FIXED", + }, +}; + +export const migratePropertiesForDynamicHeight = (currentDSL: DSLWidget) => { + /* const widgetsWithDynamicHeight = compact( + ALL_WIDGETS_AND_CONFIG.map(([, config]) => { + if (config.features?.dynamicHeight) return config.type; + }), + ); */ + // Ideally the above should be the code, however, + // there seems to be some cyclic imports which + // cause the test to fail in CI. + const widgetsWithDynamicHeight = [ + "CONTAINER_WIDGET", + "TEXT_WIDGET", + "CHECKBOX_WIDGET", + "RADIO_GROUP_WIDGET", + "TABS_WIDGET", + "MODAL_WIDGET", + "RICH_TEXT_EDITOR_WIDGET", + "DATE_PICKER_WIDGET2", + "SWITCH_WIDGET", + "FORM_WIDGET", + "RATE_WIDGET", + "CHECKBOX_GROUP_WIDGET", + "STATBOX_WIDGET", + "MULTI_SELECT_TREE_WIDGET", + "SINGLE_SELECT_TREE_WIDGET", + "SWITCH_GROUP_WIDGET", + "SELECT_WIDGET", + "MULTI_SELECT_WIDGET_V2", + "INPUT_WIDGET_V2", + "PHONE_INPUT_WIDGET", + "CURRENCY_INPUT_WIDGET", + "JSON_FORM_WIDGET", + ]; + if (widgetsWithDynamicHeight.includes(currentDSL.type)) { + currentDSL = { + ...currentDSL, + ...WidgetFeatureProps["dynamicHeight"], + }; + } + if (Array.isArray(currentDSL.children)) { + currentDSL.children = currentDSL.children.map( + migratePropertiesForDynamicHeight, + ); + } + return currentDSL; +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/069-migrate-menu-button-dynamic-items.ts b/app/client/packages/dsl/src/migrate/migrations/069-migrate-menu-button-dynamic-items.ts new file mode 100644 index 0000000000..880f402835 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/069-migrate-menu-button-dynamic-items.ts @@ -0,0 +1,10 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateMenuButtonDynamicItems = (currentDSL: DSLWidget) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "MENU_BUTTON_WIDGET" && !widget.menuItemsSource) { + widget.menuItemsSource = "STATIC"; + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/070-migrate-child-stylesheet-from-dynamic-binding-path-list.ts b/app/client/packages/dsl/src/migrate/migrations/070-migrate-child-stylesheet-from-dynamic-binding-path-list.ts new file mode 100644 index 0000000000..db15ef25b1 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/070-migrate-child-stylesheet-from-dynamic-binding-path-list.ts @@ -0,0 +1,23 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateChildStylesheetFromDynamicBindingPathList = ( + currentDSL: DSLWidget, +) => { + const widgetsWithChildStylesheet = [ + "TABLE_WIDGET_V2", + "BUTTON_GROUP_WIDGET", + "JSON_FORM_WIDGET", + ]; + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if ( + widgetsWithChildStylesheet.includes(widget.type) && + widget.childStylesheet + ) { + const newPaths = widget.dynamicBindingPathList?.filter( + ({ key }: { key: string }) => !key.startsWith("childStylesheet."), + ); + widget.dynamicBindingPathList = newPaths; + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/071-migrate-table-widget-v2-select-option.ts b/app/client/packages/dsl/src/migrate/migrations/071-migrate-table-widget-v2-select-option.ts new file mode 100644 index 0000000000..a40baebcca --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/071-migrate-table-widget-v2-select-option.ts @@ -0,0 +1,27 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { isDynamicValue, stringToJS, traverseDSLAndMigrate } from "../utils"; + +export const migrateTableWidgetV2SelectOption = (currentDSL: DSLWidget) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "TABLE_WIDGET_V2") { + Object.values( + widget.primaryColumns as Record< + string, + { columnType: string; selectOptions: string } + >, + ) + .filter((column) => column.columnType === "select") + .forEach((column) => { + const selectOptions = column.selectOptions; + + if (selectOptions && isDynamicValue(selectOptions)) { + column.selectOptions = `{{${ + widget.widgetName + }.processedTableData.map((currentRow, currentIndex) => ( ${stringToJS( + selectOptions, + )}))}}`; + } + }); + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/072-migrate-list-widget-children-for-auto-height.ts b/app/client/packages/dsl/src/migrate/migrations/072-migrate-list-widget-children-for-auto-height.ts new file mode 100644 index 0000000000..9844e8e5d8 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/072-migrate-list-widget-children-for-auto-height.ts @@ -0,0 +1,38 @@ +import type { DSLWidget } from "../types"; + +export function migrateListWidgetChildrenForAutoHeight( + currentDSL: DSLWidget, + isChildOfListWidget = false, +): DSLWidget { + if (!currentDSL) return currentDSL; + + let isCurrentListWidget = false; + if (currentDSL.type === "LIST_WIDGET") isCurrentListWidget = true; + + //Iterate and recursively call each children + const children = currentDSL.children?.map((childDSL: DSLWidget) => + migrateListWidgetChildrenForAutoHeight( + childDSL, + isCurrentListWidget || isChildOfListWidget, + ), + ); + + let newDSL; + // Add dynamicHeight to FIXED for each of it's children + if (isChildOfListWidget && !currentDSL.detachFromLayout) { + newDSL = { + ...currentDSL, + dynamicHeight: "FIXED", + }; + } else { + newDSL = { + ...currentDSL, + }; + } + + if (children) { + newDSL.children = children; + } + + return newDSL; +} diff --git a/app/client/packages/dsl/src/migrate/migrations/073-mirgate-input-widget-show-step-arrows.ts b/app/client/packages/dsl/src/migrate/migrations/073-mirgate-input-widget-show-step-arrows.ts new file mode 100644 index 0000000000..42fa8995a1 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/073-mirgate-input-widget-show-step-arrows.ts @@ -0,0 +1,16 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateInputWidgetShowStepArrows = ( + currentDSL: DSLWidget, +): DSLWidget => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if ( + (widget.type === "CURRENCY_INPUT_WIDGET" || + (widget.type === "INPUT_WIDGET_V2" && widget.inputType === "NUMBER")) && + widget.showStepArrows === undefined + ) { + widget.showStepArrows = true; + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/074-migrate-mwnu-button-dynamic-items-inside-table-widget.ts b/app/client/packages/dsl/src/migrate/migrations/074-migrate-mwnu-button-dynamic-items-inside-table-widget.ts new file mode 100644 index 0000000000..c4ded2dc98 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/074-migrate-mwnu-button-dynamic-items-inside-table-widget.ts @@ -0,0 +1,24 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateMenuButtonDynamicItemsInsideTableWidget = ( + currentDSL: DSLWidget, +) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "TABLE_WIDGET_V2") { + const primaryColumns = widget.primaryColumns; + + if (primaryColumns) { + for (const column in primaryColumns) { + if ( + primaryColumns.hasOwnProperty(column) && + primaryColumns[column].columnType === "menuButton" && + !primaryColumns[column].menuItemsSource + ) { + primaryColumns[column].menuItemsSource = "STATIC"; + } + } + } + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/075-migrate-input-widgets-multiline-input-type.ts b/app/client/packages/dsl/src/migrate/migrations/075-migrate-input-widgets-multiline-input-type.ts new file mode 100644 index 0000000000..fbfb59085c --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/075-migrate-input-widgets-multiline-input-type.ts @@ -0,0 +1,28 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +const GRID_DENSITY_MIGRATION_V1 = 4; + +export function migrateInputWidgetsMultiLineInputType( + currentDSL: DSLWidget, +): DSLWidget { + if (!currentDSL) return currentDSL; + + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "INPUT_WIDGET_V2") { + const minInputSingleLineHeight = + widget.label || widget.tooltip + ? // adjust height for label | tooltip extra div + GRID_DENSITY_MIGRATION_V1 + 4 + : // GRID_DENSITY_MIGRATION_V1 used to adjust code as per new scaled canvas. + GRID_DENSITY_MIGRATION_V1; + const isMultiLine = + (widget.bottomRow - widget.topRow) / minInputSingleLineHeight > 1 && + widget.inputType === "TEXT"; + + if (isMultiLine) { + widget.inputType = "MULTI_LINE_TEXT"; + } + } + }); +} diff --git a/app/client/packages/dsl/src/migrate/migrations/076-migrate-column-freeze-attributes.ts b/app/client/packages/dsl/src/migrate/migrations/076-migrate-column-freeze-attributes.ts new file mode 100644 index 0000000000..29154a01b0 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/076-migrate-column-freeze-attributes.ts @@ -0,0 +1,22 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateColumnFreezeAttributes = (currentDSL: DSLWidget) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "TABLE_WIDGET_V2") { + const primaryColumns = widget?.primaryColumns; + + // Assign default sticky value to each column + if (primaryColumns) { + for (const column in primaryColumns) { + if (!primaryColumns[column].hasOwnProperty("sticky")) { + primaryColumns[column].sticky = ""; + } + } + } + + widget.canFreezeColumn = false; + widget.columnUpdatedAt = Date.now(); + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/077-migrate-table-select-option-attributes-for-new-row.ts b/app/client/packages/dsl/src/migrate/migrations/077-migrate-table-select-option-attributes-for-new-row.ts new file mode 100644 index 0000000000..888645d82e --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/077-migrate-table-select-option-attributes-for-new-row.ts @@ -0,0 +1,25 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { ColumnPropertiesV2, DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateTableSelectOptionAttributesForNewRow = ( + currentDSL: DSLWidget, +) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "TABLE_WIDGET_V2") { + const primaryColumns = widget?.primaryColumns as ColumnPropertiesV2; + + // Set default value for allowSameOptionsInNewRow + if (primaryColumns) { + Object.values(primaryColumns).forEach((column: any) => { + if ( + column.hasOwnProperty("columnType") && + column.columnType === "select" + ) { + column.allowSameOptionsInNewRow = true; + } + }); + } + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/078-migrate-binding-prefix-suffix-for-inline-edit-validation-control.ts b/app/client/packages/dsl/src/migrate/migrations/078-migrate-binding-prefix-suffix-for-inline-edit-validation-control.ts new file mode 100644 index 0000000000..a03ac4cfd9 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/078-migrate-binding-prefix-suffix-for-inline-edit-validation-control.ts @@ -0,0 +1,70 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { ColumnPropertiesV2, DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateBindingPrefixSuffixForInlineEditValidationControl = ( + currentDSL: DSLWidget, +) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "TABLE_WIDGET_V2") { + const tableId = widget.widgetName; + + const oldBindingPrefix = `{{((isNewRow)=>(`; + const newBindingPrefix = `{{ + ( + (isNewRow, currentIndex, currentRow) => ( + `; + + const oldBindingSuffix = `))(${tableId}.isAddRowInProgress)}}`; + const newBindingSuffix = ` + )) + ( + ${tableId}.isAddRowInProgress, + ${tableId}.isAddRowInProgress ? -1 : ${tableId}.editableCell.index, + ${tableId}.isAddRowInProgress ? ${tableId}.newRow : (${tableId}.processedTableData[${tableId}.editableCell.index] || + Object.keys(${tableId}.processedTableData[0]) + .filter(key => ["__originalIndex__", "__primaryKey__"].indexOf(key) === -1) + .reduce((prev, curr) => { + prev[curr] = ""; + return prev; + }, {})) + ) + }} + `; + const applicableValidationNames = [ + "min", + "max", + "regex", + "errorMessage", + "isColumnEditableCellRequired", + ]; + const primaryColumns = widget?.primaryColumns as ColumnPropertiesV2; + + Object.values(primaryColumns).forEach((column: any) => { + if (column.hasOwnProperty("validation")) { + const validations = column.validation; + for (const validationName in validations) { + if (applicableValidationNames.indexOf(validationName) == -1) { + continue; + } + const validationValue = validations[validationName]; + if (typeof validationValue !== "string") { + continue; + } + + let compressedValidationValue = validationValue.replace(/\s/g, ""); + compressedValidationValue = compressedValidationValue.replace( + oldBindingPrefix, + newBindingPrefix, + ); + compressedValidationValue = compressedValidationValue.replace( + oldBindingSuffix, + newBindingSuffix, + ); + validations[validationName] = compressedValidationValue; + } + } + }); + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/079-migrate-table-widget-table-data-js-mode.ts b/app/client/packages/dsl/src/migrate/migrations/079-migrate-table-widget-table-data-js-mode.ts new file mode 100644 index 0000000000..7ddc158ac2 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/079-migrate-table-widget-table-data-js-mode.ts @@ -0,0 +1,18 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateTableWidgetTableDataJsMode = (currentDSL: DSLWidget) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "TABLE_WIDGET_V2") { + const dynamicPropertyPathList = ( + widget.dynamicPropertyPathList || [] + ).concat([ + { + key: "tableData", + }, + ]); + + widget.dynamicPropertyPathList = dynamicPropertyPathList; + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/080-migrate-select-widget-option-to-source-data.ts b/app/client/packages/dsl/src/migrate/migrations/080-migrate-select-widget-option-to-source-data.ts new file mode 100644 index 0000000000..0a7dbbc6f6 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/080-migrate-select-widget-option-to-source-data.ts @@ -0,0 +1,17 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export function migrateSelectWidgetOptionToSourceData(currentDSL: DSLWidget) { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if ( + ["SELECT_WIDGET", "MULTI_SELECT_WIDGET_V2"].includes(widget.type) && + widget.options + ) { + widget.sourceData = widget.options; + widget.optionLabel = "label"; + widget.optionValue = "value"; + + delete widget.options; + } + }); +} diff --git a/app/client/packages/dsl/src/migrate/migrations/081-migrate-select-widget-source-data-binding-path-list.ts b/app/client/packages/dsl/src/migrate/migrations/081-migrate-select-widget-source-data-binding-path-list.ts new file mode 100644 index 0000000000..07dea09051 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/081-migrate-select-widget-source-data-binding-path-list.ts @@ -0,0 +1,26 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +/* + * Migration to remove the options from dynamicBindingPathList and replace it with + * sourceData + */ +export function migrateSelectWidgetSourceDataBindingPathList( + currentDSL: DSLWidget, +) { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (["SELECT_WIDGET", "MULTI_SELECT_WIDGET_V2"].includes(widget.type)) { + const dynamicBindingPathList = widget.dynamicBindingPathList; + + const optionsIndex = dynamicBindingPathList + ?.map((d: { key: string }) => d.key) + .indexOf("options"); + + if (optionsIndex && optionsIndex > -1) { + dynamicBindingPathList?.splice(optionsIndex, 1, { + key: "sourceData", + }); + } + } + }); +} diff --git a/app/client/packages/dsl/src/migrate/migrations/082-migrate-chart-widget-label-orientation-stagger-option.ts b/app/client/packages/dsl/src/migrate/migrations/082-migrate-chart-widget-label-orientation-stagger-option.ts new file mode 100644 index 0000000000..f6ee81a9f0 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/082-migrate-chart-widget-label-orientation-stagger-option.ts @@ -0,0 +1,15 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateChartWidgetLabelOrientationStaggerOption = ( + currentDSL: DSLWidget, +) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type == "CHART_WIDGET") { + const chartWidgetProps = widget; + if (chartWidgetProps.labelOrientation == "stagger") { + chartWidgetProps.labelOrientation = "auto"; + } + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/083-migrate-add-show-hide-data-point-labels.ts b/app/client/packages/dsl/src/migrate/migrations/083-migrate-add-show-hide-data-point-labels.ts new file mode 100644 index 0000000000..08bcf1d029 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/083-migrate-add-show-hide-data-point-labels.ts @@ -0,0 +1,11 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateAddShowHideDataPointLabels = (currentDSL: DSLWidget) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type == "CHART_WIDGET") { + const chartWidgetProps = widget; + chartWidgetProps.showDataPointLabel = chartWidgetProps.allowScroll; + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/084-migrate-select-widget-add-source-data-property-path-list.ts b/app/client/packages/dsl/src/migrate/migrations/084-migrate-select-widget-add-source-data-property-path-list.ts new file mode 100644 index 0000000000..96842a4c24 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/084-migrate-select-widget-add-source-data-property-path-list.ts @@ -0,0 +1,31 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +/* + * Migration to add sourceData to the dynamicPropertyPathList + */ +export function migrateSelectWidgetAddSourceDataPropertyPathList( + currentDSL: DSLWidget, +) { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (["SELECT_WIDGET", "MULTI_SELECT_WIDGET_V2"].includes(widget.type)) { + const dynamicPropertyPathList = widget.dynamicPropertyPathList; + + const sourceDataIndex = dynamicPropertyPathList + ?.map((d: { key: string }) => d.key) + .indexOf("sourceData"); + + if (sourceDataIndex && sourceDataIndex === -1) { + dynamicPropertyPathList?.push({ + key: "sourceData", + }); + } else if (!Array.isArray(dynamicPropertyPathList)) { + widget.dynamicPropertyPathList = [ + { + key: "sourceData", + }, + ]; + } + } + }); +} diff --git a/app/client/packages/dsl/src/migrate/migrations/085-migrate-default-values-for-custom-echart.ts b/app/client/packages/dsl/src/migrate/migrations/085-migrate-default-values-for-custom-echart.ts new file mode 100644 index 0000000000..f277ca4f86 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/085-migrate-default-values-for-custom-echart.ts @@ -0,0 +1,75 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +const DefaultEChartConfig = { + dataset: { + source: [ + ["Day", "Baidu", "Google", "Bing"], + ["Mon", 620, 120, 60], + ["Tue", 732, 132, 72], + ["Wed", 701, 101, 71], + ["Thu", 734, 134, 74], + ["Fri", 1090, 290, 190], + ["Sat", 1130, 230, 130], + ["Sun", 1120, 220, 110], + ], + }, + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + }, + title: { + text: "Search Engine Usage", + left: "center", + textStyle: { + width: 200, + overflow: "truncate", + }, + }, + legend: { + top: 40, + type: "scroll", + }, + grid: { + left: 15, + right: 15, + bottom: 30, + top: 100, + containLabel: true, + }, + xAxis: [ + { + type: "category", + }, + ], + yAxis: [ + { + type: "value", + }, + ], + series: [ + { + type: "bar", + stack: "Search Engine", + }, + { + type: "bar", + stack: "Search Engine", + }, + { + type: "bar", + stack: "Search Engine", + }, + ], +}; + +export const migrateDefaultValuesForCustomEChart = (currentDSL: DSLWidget) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type == "CHART_WIDGET") { + const chartWidgetProps = widget; + chartWidgetProps.customEChartConfig = DefaultEChartConfig; + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/migrations/086-migrate-table-server-side-filtering.ts b/app/client/packages/dsl/src/migrate/migrations/086-migrate-table-server-side-filtering.ts new file mode 100644 index 0000000000..2bd92f979e --- /dev/null +++ b/app/client/packages/dsl/src/migrate/migrations/086-migrate-table-server-side-filtering.ts @@ -0,0 +1,10 @@ +import type { DSLWidget, WidgetProps } from "../types"; +import { traverseDSLAndMigrate } from "../utils"; + +export const migrateTableServerSideFiltering = (currentDSL: DSLWidget) => { + return traverseDSLAndMigrate(currentDSL, (widget: WidgetProps) => { + if (widget.type === "TABLE_WIDGET_V2") { + widget.enableServerSideFiltering = false; + } + }); +}; diff --git a/app/client/packages/dsl/src/migrate/tests/ChartDataFromArrayFromArrayToObject.test.ts b/app/client/packages/dsl/src/migrate/tests/ChartDataFromArrayFromArrayToObject.test.ts new file mode 100644 index 0000000000..fbf7175938 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/tests/ChartDataFromArrayFromArrayToObject.test.ts @@ -0,0 +1,87 @@ +import { migrateChartDataFromArrayToObject } from "../migrations/016-migrate-chart-data-from-array-to-object"; +import * as utils from "../utils"; + +it("it checks if array to object migration functions for chart widget ", () => { + const input = { + type: "CANVAS_WIDGET", + widgetId: "0", + widgetName: "canvas", + parentColumnSpace: 1, + parentRowSpace: 1, + leftColumn: 0, + rightColumn: 0, + topRow: 0, + bottomRow: 0, + version: 17, + isLoading: false, + renderMode: "CANVAS", + children: [ + { + widgetId: "some-random-id", + widgetName: "chart1", + parentColumnSpace: 1, + parentRowSpace: 1, + leftColumn: 0, + rightColumn: 0, + topRow: 0, + bottomRow: 0, + version: 17, + isLoading: false, + renderMode: "CANVAS", + type: "CHART_WIDGET", + chartData: [ + { + seriesName: "seris1", + data: [{ x: 1, y: 2 }], + }, + ], + }, + ], + }; + + // mocking implementation of our generateReactKey function + const generatorReactKeyMock = jest.spyOn(utils, "generateReactKey"); + generatorReactKeyMock.mockImplementation(() => "some-random-key"); + + const result = migrateChartDataFromArrayToObject(input); + + const output = { + type: "CANVAS_WIDGET", + widgetId: "0", + widgetName: "canvas", + parentColumnSpace: 1, + parentRowSpace: 1, + leftColumn: 0, + rightColumn: 0, + topRow: 0, + bottomRow: 0, + version: 17, + isLoading: false, + renderMode: "CANVAS", + children: [ + { + widgetId: "some-random-id", + widgetName: "chart1", + parentColumnSpace: 1, + parentRowSpace: 1, + leftColumn: 0, + rightColumn: 0, + topRow: 0, + bottomRow: 0, + version: 17, + isLoading: false, + renderMode: "CANVAS", + type: "CHART_WIDGET", + dynamicBindingPathList: [], + chartData: { + "some-random-key": { + seriesName: "seris1", + data: [{ x: 1, y: 2 }], + }, + }, + }, + ], + }; + + expect(result).toStrictEqual(output); +}); diff --git a/app/client/src/utils/migrations/ChartWidget.test.ts b/app/client/packages/dsl/src/migrate/tests/ChartWidget.test.ts similarity index 85% rename from app/client/src/utils/migrations/ChartWidget.test.ts rename to app/client/packages/dsl/src/migrate/tests/ChartWidget.test.ts index 1d95c75222..8f8df7be47 100644 --- a/app/client/src/utils/migrations/ChartWidget.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/ChartWidget.test.ts @@ -1,11 +1,10 @@ -import { - migrateChartWidgetLabelOrientationStaggerOption, - migrateAddShowHideDataPointLabels, - migrateDefaultValuesForCustomEChart, -} from "./ChartWidget"; -import type { DSLWidget } from "WidgetProvider/constants"; -import type { ChartWidgetProps } from "widgets/ChartWidget/widget"; -import { LabelOrientation } from "widgets/ChartWidget/constants"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { migrateDefaultValuesForCustomEChart } from "../migrations/085-migrate-default-values-for-custom-echart"; +import { migrateAddShowHideDataPointLabels } from "../migrations/083-migrate-add-show-hide-data-point-labels"; +import { migrateChartWidgetLabelOrientationStaggerOption } from "../migrations/082-migrate-chart-widget-label-orientation-stagger-option"; +import type { DSLWidget } from "../types"; + +type ChartWidgetProps = any; const inputDSL: DSLWidget = { widgetId: "", @@ -34,7 +33,7 @@ const inputDSL: DSLWidget = { bottomRow: 0, leftColumn: 0, rightColumn: 0, - labelOrientation: LabelOrientation.STAGGER, + labelOrientation: "stagger", allowScroll: true, children: [], }, diff --git a/app/client/src/utils/migrations/ChartWidgetReskinningMigrations.test.ts b/app/client/packages/dsl/src/migrate/tests/ChartWidgetReskinningMigrations.test.ts similarity index 96% rename from app/client/src/utils/migrations/ChartWidgetReskinningMigrations.test.ts rename to app/client/packages/dsl/src/migrate/tests/ChartWidgetReskinningMigrations.test.ts index 5c9ad3db06..61c38ab407 100644 --- a/app/client/src/utils/migrations/ChartWidgetReskinningMigrations.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/ChartWidgetReskinningMigrations.test.ts @@ -1,5 +1,5 @@ -import type { DSLWidget } from "WidgetProvider/constants"; -import { migrateChartWidgetReskinningData } from "./ChartWidgetReskinningMigrations"; +import { migrateChartWidgetReskinningData } from "../migrations/059-migrate-chart-widget-reskinning-data"; +import type { DSLWidget } from "../types"; const currentDslWithoutCustomConfig = { widgetName: "MainContainer", diff --git a/app/client/src/utils/migrations/CurrencyInputWidgetMigrations.test.ts b/app/client/packages/dsl/src/migrate/tests/CurrencyInputWidgetMigrations.test.ts similarity index 99% rename from app/client/src/utils/migrations/CurrencyInputWidgetMigrations.test.ts rename to app/client/packages/dsl/src/migrate/tests/CurrencyInputWidgetMigrations.test.ts index 92978c497f..edcbb344bd 100644 --- a/app/client/src/utils/migrations/CurrencyInputWidgetMigrations.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/CurrencyInputWidgetMigrations.test.ts @@ -1,8 +1,6 @@ -import type { DSLWidget } from "WidgetProvider/constants"; -import { - migrateCurrencyInputWidgetDefaultCurrencyCode, - migrateInputWidgetShowStepArrows, -} from "./CurrencyInputWidgetMigrations"; +import { migrateCurrencyInputWidgetDefaultCurrencyCode } from "../migrations/055-migrate-currency-input-widget-default-currency-code"; +import { migrateInputWidgetShowStepArrows } from "../migrations/073-mirgate-input-widget-show-step-arrows"; +import type { DSLWidget } from "../types"; const oldDSLWithCurrencyCode = { widgetName: "MainContainer", diff --git a/app/client/src/utils/DSLMigration.test.ts b/app/client/packages/dsl/src/migrate/tests/DSLMigration.test.ts similarity index 62% rename from app/client/src/utils/DSLMigration.test.ts rename to app/client/packages/dsl/src/migrate/tests/DSLMigration.test.ts index ace4c63922..f5318ce5bf 100644 --- a/app/client/src/utils/DSLMigration.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/DSLMigration.test.ts @@ -1,29 +1,92 @@ -import type { WidgetProps } from "widgets/BaseWidget"; -import type { ContainerWidgetProps } from "widgets/ContainerWidget/widget"; -import * as DSLMigrations from "./DSLMigrations"; -import * as chartWidgetReskinningMigrations from "./migrations/ChartWidgetReskinningMigrations"; -import * as tableMigrations from "./migrations/TableWidget"; -import * as IncorrectDynamicBindingPathLists from "./migrations/IncorrectDynamicBindingPathLists"; -import * as TextStyleFromTextWidget from "./migrations/TextWidget"; -import * as menuButtonWidgetMigrations from "./migrations/MenuButtonWidget"; -import * as modalMigration from "./migrations/ModalWidget"; -import * as mapWidgetMigration from "./migrations/MapWidget"; -import * as checkboxMigration from "./migrations/CheckboxGroupWidget"; -import * as buttonWidgetMigrations from "./migrations/ButtonWidgetMigrations"; -import * as phoneInputMigration from "./migrations/PhoneInputWidgetMigrations"; -import * as inputCurrencyMigration from "./migrations/CurrencyInputWidgetMigrations"; -import * as radioGroupMigration from "./migrations/RadioGroupWidget"; -import * as propertyPaneMigrations from "./migrations/PropertyPaneMigrations"; -import * as themingMigration from "./migrations/ThemingMigrations"; -import * as selectWidgetMigration from "./migrations/SelectWidget"; -import * as mapChartReskinningMigrations from "./migrations/MapChartReskinningMigrations"; -import { LATEST_PAGE_VERSION } from "constants/WidgetConstants"; +/* eslint-disable @typescript-eslint/strict-boolean-expressions */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import * as DSLMigrations from ".."; +import type { DSLWidget } from "../types"; import { originalDSLForDSLMigrations } from "./testDSLs"; -import * as rateWidgetMigrations from "./migrations/RateWidgetMigrations"; -import * as codeScannerWidgetMigrations from "./migrations/CodeScannerWidgetMigrations"; -import * as migrateLabelPosition from "./migrations/MigrateLabelPosition"; -import * as migrateAutoHeight from "./migrations/autoHeightMigrations"; -import * as chartMigrations from "./migrations/ChartWidget"; + +import * as m1 from "../migrations/001-update-containers"; +import * as m2 from "../migrations/002-chart-data-migration"; +import * as m3 from "../migrations/003-map-data-migration"; +import * as m4 from "../migrations/004-single-chart-data-migration"; +import * as m5 from "../migrations/005-tabs-widget-property-migration"; +import * as m6 from "../migrations/006-dynamic-path-list-migration"; +import * as m7 from "../migrations/007-canvas-name-conflict-migration"; +import * as m8 from "../migrations/008-renamed-canvas-name-conflict-migration"; +import * as m9 from "../migrations/009-table-widget-property-pane-migration"; +import * as m10 from "../migrations/010-add-version-number-migration"; +import * as m11 from "../migrations/011-migrate-table-primary-columns-binding"; +import * as m12 from "../migrations/012-migrate-incorrect-dynamic-binding-path-lists"; +import * as m13 from "../migrations/013-migrate-old-chart-data"; +import * as m14 from "../migrations/014-rte-default-value-migration"; +import * as m15 from "../migrations/015-migrate-text-style-from-text-widget"; +import * as m16 from "../migrations/016-migrate-chart-data-from-array-to-object"; +import * as m17 from "../migrations/017-migrate-tabs-data"; +import * as m18 from "../migrations/018-migrate-initial-values"; +import * as m19 from "../migrations/019-migrate-to-new-layout"; +import * as m20 from "../migrations/020-migrate-newly-added-tabs-widgets-missing-data"; +import * as m21 from "../migrations/021-migrate-overflowing-tabs-widgets"; +import * as m22 from "../migrations/022-migrate-table-widget-parent-row-space-property"; +import * as m23 from "../migrations/023-add-log-blacklist-to-all-widget-children"; +import * as m24 from "../migrations/024-migrate-table-widget-header-visibility-properties"; +import * as m25 from "../migrations/025-migrate-items-to-list-data-in-list-widget"; +import * as m26 from "../migrations/026-migrate-datepicker-min-max-date"; +import * as m27 from "../migrations/027-migrate-filter-value-for-dropdown-widget"; +import * as m28 from "../migrations/028-migrate-table-primary-columns-computed-value"; +import * as m29 from "../migrations/029-migrate-to-new-multiselect"; +import * as m30 from "../migrations/030-migrate-table-widget-delimiter-properties"; +import * as m31 from "../migrations/031-migrate-is-disabled-to-button-column"; +import * as m32 from "../migrations/032-migrate-table-default-selected-row"; +import * as m33 from "../migrations/033-migrate-menu-button-widget-button-properties"; +import * as m34 from "../migrations/034-migrate-button-widget-validation"; +import * as m35 from "../migrations/035-migrate-input-validation"; +import * as m36 from "../migrations/036-revert-table-default-selected-row"; +import * as m37 from "../migrations/037-migrate-table-sanitize-column-keys"; +import * as m38 from "../migrations/038-migrate-resizable-modal-widget-properties"; +import * as m39 from "../migrations/039-migrate-table-widget-selected-row-bindings"; +import * as m40 from "../migrations/040-revert-button-style-to-button-color"; +import * as m41 from "../migrations/041-migrate-button-variant"; +import * as m42 from "../migrations/042-migrate-map-widget-is-clicked-marker-centered"; +import * as m43 from "../migrations/043-map-allow-horizontal-scroll-mirgation"; +import * as m44 from "../migrations/044-is-sortable-migration"; +import * as m45 from "../migrations/045-migrate-table-widget-icon-button-variant"; +import * as m46 from "../migrations/046-migrate-checkbox-group-widget-inline-property"; +import * as m48 from "../migrations/048-migrate-recaptcha-type"; +import * as m49 from "../migrations/049-add-private-widgets-to-all-list-widgets"; +import * as m51 from "../migrations/051-migrate-phone-input-widget-allow-formatting"; +import * as m52 from "../migrations/052-migrate-modal-icon-button-widget"; +import * as m53 from "../migrations/053-migrate-scroll-truncate-property"; +import * as m54 from "../migrations/054-migrate-phone-input-widget-default-dial-code"; +import * as m55 from "../migrations/055-migrate-currency-input-widget-default-currency-code"; +import * as m56 from "../migrations/056-migrate-radio-group-alignment-property"; +import * as m57 from "../migrations/057-migrate-styling-properties-for-theming"; +import * as m58 from "../migrations/058-migrate-checkbox-switch-property"; +import * as m59 from "../migrations/059-migrate-chart-widget-reskinning-data"; +import * as m60 from "../migrations/060-migrate-table-widget-v2-validation"; +import * as m62 from "../migrations/062-migrate-select-type-widget-default-value"; +import * as m63 from "../migrations/063-migrate-map-chart-widget-reskinning-data"; +import * as m64 from "../migrations/064-migrate-rate-widget-disabed-state"; +import * as m65 from "../migrations/065-migrate-code-scanner-layout"; +import * as m66 from "../migrations/066-migrate-table-widget-v2-validation-binding"; +import * as m67 from "../migrations/067-migrate-label-position"; +import * as m68 from "../migrations/068-migrate-properties-for-dynamic-height"; +import * as m69 from "../migrations/069-migrate-menu-button-dynamic-items"; +import * as m70 from "../migrations/070-migrate-child-stylesheet-from-dynamic-binding-path-list"; +import * as m71 from "../migrations/071-migrate-table-widget-v2-select-option"; +import * as m72 from "../migrations/072-migrate-list-widget-children-for-auto-height"; +import * as m73 from "../migrations/073-mirgate-input-widget-show-step-arrows"; +import * as m74 from "../migrations/074-migrate-mwnu-button-dynamic-items-inside-table-widget"; +import * as m75 from "../migrations/075-migrate-input-widgets-multiline-input-type"; +import * as m76 from "../migrations/076-migrate-column-freeze-attributes"; +import * as m77 from "../migrations/077-migrate-table-select-option-attributes-for-new-row"; +import * as m78 from "../migrations/078-migrate-binding-prefix-suffix-for-inline-edit-validation-control"; +import * as m79 from "../migrations/079-migrate-table-widget-table-data-js-mode"; +import * as m80 from "../migrations/080-migrate-select-widget-option-to-source-data"; +import * as m81 from "../migrations/081-migrate-select-widget-source-data-binding-path-list"; +import * as m82 from "../migrations/082-migrate-chart-widget-label-orientation-stagger-option"; +import * as m83 from "../migrations/083-migrate-add-show-hide-data-point-labels"; +import * as m84 from "../migrations/084-migrate-select-widget-add-source-data-property-path-list"; +import * as m85 from "../migrations/085-migrate-default-values-for-custom-echart"; +import * as m86 from "../migrations/086-migrate-table-server-side-filtering"; interface Migration { functionLookup: { @@ -42,7 +105,7 @@ interface Migration { * Migrations will be used to construct mockFnObj object where mockFnObj's key is the version and value is an array of jest mock functions. * * NOTE: - * - In Migrations the sequence of object should exactly match the sequence that is present in the transformDSL function. + * - In Migrations the sequence of object should exactly match the sequence that is present in the migrateDSL function. * * - For cases were migration is skipped, we include them in Migrations. * Simply add the object with functionLookup and version of the skipped migration. @@ -61,7 +124,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m1, functionName: "updateContainers", }, ], @@ -70,7 +133,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m2, functionName: "chartDataMigration", }, ], @@ -79,7 +142,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m3, functionName: "mapDataMigration", }, ], @@ -88,7 +151,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m4, functionName: "singleChartDataMigration", }, ], @@ -97,7 +160,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m5, functionName: "tabsWidgetTabsPropertyMigration", }, ], @@ -106,7 +169,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m6, functionName: "dynamicPathListMigration", }, ], @@ -115,7 +178,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m7, functionName: "canvasNameConflictMigration", }, ], @@ -124,7 +187,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m8, functionName: "renamedCanvasNameConflictMigration", }, ], @@ -133,7 +196,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m9, functionName: "tableWidgetPropertyPaneMigrations", }, ], @@ -142,7 +205,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m10, functionName: "addVersionNumberMigration", }, ], @@ -151,7 +214,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m11, functionName: "migrateTablePrimaryColumnsBindings", }, ], @@ -160,7 +223,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: IncorrectDynamicBindingPathLists, + moduleObj: m12, functionName: "migrateIncorrectDynamicBindingPathLists", }, ], @@ -169,7 +232,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m13, functionName: "migrateOldChartData", }, ], @@ -178,7 +241,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m14, functionName: "rteDefaultValueMigration", }, ], @@ -187,7 +250,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: TextStyleFromTextWidget, + moduleObj: m15, functionName: "migrateTextStyleFromTextWidget", }, ], @@ -196,7 +259,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m16, functionName: "migrateChartDataFromArrayToObject", }, ], @@ -205,7 +268,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m17, functionName: "migrateTabsData", }, ], @@ -214,7 +277,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m18, functionName: "migrateInitialValues", }, ], @@ -223,7 +286,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m19, functionName: "migrateToNewLayout", }, ], @@ -232,7 +295,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m20, functionName: "migrateNewlyAddedTabsWidgetsMissingData", }, ], @@ -241,11 +304,11 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m21, functionName: "migrateWidgetsWithoutLeftRightColumns", }, { - moduleObj: DSLMigrations, + moduleObj: m21, functionName: "migrateOverFlowingTabsWidgets", }, ], @@ -254,7 +317,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m22, functionName: "migrateTableWidgetParentRowSpaceProperty", }, ], @@ -263,7 +326,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m23, functionName: "addLogBlackListToAllListWidgetChildren", }, ], @@ -272,7 +335,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m24, functionName: "migrateTableWidgetHeaderVisibilityProperties", }, ], @@ -281,7 +344,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m25, functionName: "migrateItemsToListDataInListWidget", }, ], @@ -290,7 +353,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m26, functionName: "migrateDatePickerMinMaxDate", }, ], @@ -299,7 +362,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m27, functionName: "migrateFilterValueForDropDownWidget", }, ], @@ -308,7 +371,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m28, functionName: "migrateTablePrimaryColumnsComputedValue", }, ], @@ -317,7 +380,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m29, functionName: "migrateToNewMultiSelect", }, ], @@ -326,7 +389,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m30, functionName: "migrateTableWidgetDelimiterProperties", }, ], @@ -335,7 +398,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m31, functionName: "migrateIsDisabledToButtonColumn", }, ], @@ -344,7 +407,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m32, functionName: "migrateTableDefaultSelectedRow", }, ], @@ -353,7 +416,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: menuButtonWidgetMigrations, + moduleObj: m33, functionName: "migrateMenuButtonWidgetButtonProperties", }, ], @@ -362,7 +425,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m34, functionName: "migrateButtonWidgetValidation", }, ], @@ -371,7 +434,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m35, functionName: "migrateInputValidation", }, ], @@ -380,7 +443,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m36, functionName: "revertTableDefaultSelectedRow", }, ], @@ -389,7 +452,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m37, functionName: "migrateTableSanitizeColumnKeys", }, ], @@ -398,7 +461,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: modalMigration, + moduleObj: m38, functionName: "migrateResizableModalWidgetProperties", }, ], @@ -407,7 +470,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m39, functionName: "migrateTableWidgetSelectedRowBindings", }, ], @@ -416,7 +479,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m40, functionName: "revertButtonStyleToButtonColor", }, ], @@ -425,7 +488,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m41, functionName: "migrateButtonVariant", }, ], @@ -434,7 +497,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: mapWidgetMigration, + moduleObj: m42, functionName: "migrateMapWidgetIsClickedMarkerCentered", }, ], @@ -443,7 +506,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m43, functionName: "mapAllowHorizontalScrollMigration", }, ], @@ -452,7 +515,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m44, functionName: "isSortableMigration", }, ], @@ -461,7 +524,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m45, functionName: "migrateTableWidgetIconButtonVariant", }, ], @@ -470,7 +533,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: checkboxMigration, + moduleObj: m46, functionName: "migrateCheckboxGroupWidgetInlineProperty", }, ], @@ -488,7 +551,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: buttonWidgetMigrations, + moduleObj: m48, functionName: "migrateRecaptchaType", }, ], @@ -497,7 +560,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: DSLMigrations, + moduleObj: m49, functionName: "addPrivateWidgetsToAllListWidgets", }, ], @@ -515,7 +578,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: phoneInputMigration, + moduleObj: m51, functionName: "migratePhoneInputWidgetAllowFormatting", }, ], @@ -524,7 +587,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: modalMigration, + moduleObj: m52, functionName: "migrateModalIconButtonWidget", }, ], @@ -533,7 +596,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: TextStyleFromTextWidget, + moduleObj: m53, functionName: "migrateScrollTruncateProperties", }, ], @@ -542,7 +605,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: phoneInputMigration, + moduleObj: m54, functionName: "migratePhoneInputWidgetDefaultDialCode", }, ], @@ -551,7 +614,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: inputCurrencyMigration, + moduleObj: m55, functionName: "migrateCurrencyInputWidgetDefaultCurrencyCode", }, ], @@ -560,7 +623,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: radioGroupMigration, + moduleObj: m56, functionName: "migrateRadioGroupAlignmentProperty", }, ], @@ -569,7 +632,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: themingMigration, + moduleObj: m57, functionName: "migrateStylingPropertiesForTheming", }, ], @@ -578,7 +641,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: propertyPaneMigrations, + moduleObj: m58, functionName: "migrateCheckboxSwitchProperty", }, ], @@ -587,7 +650,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: chartWidgetReskinningMigrations, + moduleObj: m59, functionName: "migrateChartWidgetReskinningData", }, ], @@ -596,7 +659,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m60, functionName: "migrateTableWidgetV2Validation", }, ], @@ -605,7 +668,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: chartWidgetReskinningMigrations, + moduleObj: m59, functionName: "migrateChartWidgetReskinningData", }, ], @@ -614,7 +677,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: selectWidgetMigration, + moduleObj: m62, functionName: "MigrateSelectTypeWidgetDefaultValue", }, ], @@ -623,7 +686,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: mapChartReskinningMigrations, + moduleObj: m63, functionName: "migrateMapChartWidgetReskinningData", }, ], @@ -632,7 +695,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: rateWidgetMigrations, + moduleObj: m64, functionName: "migrateRateWidgetDisabledState", }, ], @@ -641,7 +704,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: codeScannerWidgetMigrations, + moduleObj: m65, functionName: "migrateCodeScannerLayout", }, ], @@ -650,7 +713,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m66, functionName: "migrateTableWidgetV2ValidationBinding", }, ], @@ -659,7 +722,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: migrateLabelPosition, + moduleObj: m67, functionName: "migrateLabelPosition", }, ], @@ -668,7 +731,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: migrateAutoHeight, + moduleObj: m68, functionName: "migratePropertiesForDynamicHeight", }, ], @@ -677,7 +740,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: menuButtonWidgetMigrations, + moduleObj: m69, functionName: "migrateMenuButtonDynamicItems", }, ], @@ -686,7 +749,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: themingMigration, + moduleObj: m70, functionName: "migrateChildStylesheetFromDynamicBindingPathList", }, ], @@ -695,7 +758,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m71, functionName: "migrateTableWidgetV2SelectOption", }, ], @@ -704,7 +767,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: migrateAutoHeight, + moduleObj: m72, functionName: "migrateListWidgetChildrenForAutoHeight", }, ], @@ -713,7 +776,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: inputCurrencyMigration, + moduleObj: m73, functionName: "migrateInputWidgetShowStepArrows", }, ], @@ -722,7 +785,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m74, functionName: "migrateMenuButtonDynamicItemsInsideTableWidget", }, ], @@ -731,7 +794,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: migrateAutoHeight, + moduleObj: m75, functionName: "migrateInputWidgetsMultiLineInputType", }, ], @@ -740,7 +803,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m76, functionName: "migrateColumnFreezeAttributes", }, ], @@ -749,7 +812,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m77, functionName: "migrateTableSelectOptionAttributesForNewRow", }, ], @@ -758,7 +821,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m78, functionName: "migrateBindingPrefixSuffixForInlineEditValidationControl", }, @@ -768,7 +831,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m79, functionName: "migrateTableWidgetTableDataJsMode", }, ], @@ -777,7 +840,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: selectWidgetMigration, + moduleObj: m80, functionName: "migrateSelectWidgetOptionToSourceData", }, ], @@ -786,7 +849,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: selectWidgetMigration, + moduleObj: m81, functionName: "migrateSelectWidgetSourceDataBindingPathList", }, ], @@ -795,7 +858,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: chartMigrations, + moduleObj: m82, functionName: "migrateChartWidgetLabelOrientationStaggerOption", }, ], @@ -804,7 +867,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: chartMigrations, + moduleObj: m83, functionName: "migrateAddShowHideDataPointLabels", }, ], @@ -813,7 +876,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: selectWidgetMigration, + moduleObj: m84, functionName: "migrateSelectWidgetAddSourceDataPropertyPathList", }, ], @@ -822,7 +885,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: chartMigrations, + moduleObj: m85, functionName: "migrateDefaultValuesForCustomEChart", }, ], @@ -831,7 +894,7 @@ const migrations: Migration[] = [ { functionLookup: [ { - moduleObj: tableMigrations, + moduleObj: m86, functionName: "migrateTableServerSideFiltering", }, ], @@ -876,9 +939,7 @@ describe("Test all the migrations are running", () => { }); // Runs all the migrations - DSLMigrations.transformDSL( - originalDSLForDSLMigrations as unknown as ContainerWidgetProps, - ); + DSLMigrations.migrateDSL(originalDSLForDSLMigrations as unknown as DSLWidget); migrations.forEach((item: any, testIdx: number) => { const { functionLookup, version } = item; @@ -923,6 +984,6 @@ describe("Test all the migrations are running", () => { }); test("Check the migration count matches the lates page version", () => { - expect(migrations.length).toEqual(LATEST_PAGE_VERSION); + expect(migrations.length).toEqual(DSLMigrations.LATEST_DSL_VERSION); }); }); diff --git a/app/client/src/utils/DSLMigrationsUtils.test.ts b/app/client/packages/dsl/src/migrate/tests/DSLMigrationsUtils.test.ts similarity index 98% rename from app/client/src/utils/DSLMigrationsUtils.test.ts rename to app/client/packages/dsl/src/migrate/tests/DSLMigrationsUtils.test.ts index 6dd76ce4dc..c5eea5b230 100644 --- a/app/client/src/utils/DSLMigrationsUtils.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/DSLMigrationsUtils.test.ts @@ -1,17 +1,15 @@ -import { transformDSL } from "./DSLMigrations"; -import { LATEST_PAGE_VERSION, RenderModes } from "constants/WidgetConstants"; -import type { ContainerWidgetProps } from "widgets/ContainerWidget/widget"; -import type { WidgetProps } from "widgets/BaseWidget"; -import { OverflowTypes } from "widgets/TextWidget/constants"; -import { migrateRadioGroupAlignmentProperty } from "./migrations/RadioGroupWidget"; -import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants"; +import { LATEST_DSL_VERSION, migrateDSL } from ".."; +import { migrateRadioGroupAlignmentProperty } from "../migrations/056-migrate-radio-group-alignment-property"; +import type { DSLWidget } from "../types"; + +const ASSETS_CDN_URL = "https://assets.appsmith.com"; describe("correctly migrate dsl", () => { - it("transformDSL for private widget", () => { + it("migrateDSL for private widget", () => { const currentVersion = 49; // before adding privateWidgets to all List widgets - const nextVersion = LATEST_PAGE_VERSION; // It runs Two Migrations, Always Update as migration increases + const nextVersion = LATEST_DSL_VERSION; // It runs Two Migrations, Always Update as migration increases - const currentDSL: ContainerWidgetProps = { + const currentDSL: DSLWidget = { backgroundColor: "none", bottomRow: 740, canExtend: true, @@ -592,7 +590,7 @@ describe("correctly migrate dsl", () => { isLoading: false, }; - const expectedNextDSL: ContainerWidgetProps = { + const expectedNextDSL: DSLWidget = { backgroundColor: "none", bottomRow: 740, canExtend: true, @@ -1069,7 +1067,7 @@ describe("correctly migrate dsl", () => { isVisible: true, fontStyle: "BOLD", textColor: "#231F20", - overflow: OverflowTypes.NONE, + overflow: "NONE", version: 1, parentId: "vqn2okwc6a", renderMode: "CANVAS", @@ -1143,7 +1141,7 @@ describe("correctly migrate dsl", () => { isVisible: true, fontStyle: "BOLD", textColor: "#231F20", - overflow: OverflowTypes.NONE, + overflow: "NONE", version: 1, parentId: "vqn2okwc6a", renderMode: "CANVAS", @@ -1227,19 +1225,19 @@ describe("correctly migrate dsl", () => { type: "CANVAS_WIDGET", widgetId: "0", widgetName: "MainContainer", - renderMode: RenderModes.CANVAS, + renderMode: "CANVAS", isLoading: false, }; - const actualNextDsl = transformDSL(currentDSL); + const actualNextDsl = migrateDSL(currentDSL); expect(actualNextDsl).toEqual(expectedNextDSL); }); - it("transformDSL for theming v1", () => { + it("migrateDSL for theming v1", () => { const currentVersion = 53; - const nextVersion = LATEST_PAGE_VERSION; - const currentDSL: ContainerWidgetProps = { + const nextVersion = LATEST_DSL_VERSION; + const currentDSL: DSLWidget = { backgroundColor: "none", bottomRow: 740, canExtend: true, @@ -1820,7 +1818,7 @@ describe("correctly migrate dsl", () => { isLoading: false, }; - const expectedNextDSL: ContainerWidgetProps = { + const expectedNextDSL: DSLWidget = { backgroundColor: "none", bottomRow: 740, canExtend: true, @@ -2450,20 +2448,20 @@ describe("correctly migrate dsl", () => { type: "CANVAS_WIDGET", widgetId: "0", widgetName: "MainContainer", - renderMode: RenderModes.CANVAS, + renderMode: "CANVAS", isLoading: false, }; - const actualNextDsl = transformDSL(currentDSL); + const actualNextDsl = migrateDSL(currentDSL); expect(actualNextDsl).toEqual(expectedNextDSL); }); it("RadioGroupWidget: Add alignment property, set to LEFT", () => { const currentVersion = 51; - const currentDSL: ContainerWidgetProps = { + const currentDSL: DSLWidget = { widgetName: "MainContainer", - renderMode: RenderModes.CANVAS, + renderMode: "CANVAS", isLoading: false, backgroundColor: "none", rightColumn: 909, @@ -2775,9 +2773,9 @@ describe("correctly migrate dsl", () => { }, ], }; - const expectedNextDSL: ContainerWidgetProps = { + const expectedNextDSL: DSLWidget = { widgetName: "MainContainer", - renderMode: RenderModes.CANVAS, + renderMode: "CANVAS", isLoading: false, backgroundColor: "none", rightColumn: 909, @@ -3099,7 +3097,7 @@ describe("correctly migrate dsl", () => { it("correctly migrates currentIndex/currentRow properties for validations in table view", () => { const currentVersion = 78; - const currentDSL: ContainerWidgetProps = { + const currentDSL: DSLWidget = { bottomRow: 740, containerStyle: "none", detachFromLayout: true, @@ -3172,8 +3170,9 @@ describe("correctly migrate dsl", () => { }, ], }; - const nextDSL = transformDSL(currentDSL); + const nextDSL = migrateDSL(currentDSL); + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing const validations = (nextDSL.children || [])[0].primaryColumns.column1 .validation; diff --git a/app/client/packages/dsl/src/migrate/tests/MigrateInitialValues.test.ts b/app/client/packages/dsl/src/migrate/tests/MigrateInitialValues.test.ts new file mode 100644 index 0000000000..d6cea90b27 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/tests/MigrateInitialValues.test.ts @@ -0,0 +1,540 @@ +import { migrateInitialValues } from "../migrations/018-migrate-initial-values"; +import { migrateToNewMultiSelect } from "../migrations/029-migrate-to-new-multiselect"; + +describe("Initial value migration test", () => { + const containerWidget = { + widgetName: "MainContainer", + backgroundColor: "none", + rightColumn: 1118, + snapColumns: 16, + detachFromLayout: true, + widgetId: "0", + topRow: 0, + bottomRow: 560, + snapRows: 33, + isLoading: false, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + renderMode: "CANVAS", + canExtend: true, + version: 18, + minHeight: 600, + parentColumnSpace: 1, + dynamicTriggerPathList: [], + dynamicBindingPathList: [], + leftColumn: 0, + }; + + it("Input widget", () => { + const input = { + ...containerWidget, + children: [ + { + widgetName: "Input1", + rightColumn: 8, + widgetId: "ra3vyy3nt2", + topRow: 1, + bottomRow: 2, + parentRowSpace: 40, + isVisible: true, + label: "", + type: "INPUT_WIDGET", + version: 1, + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 3, + inputType: "TEXT", + renderMode: "CANVAS", + resetOnSubmit: false, + }, + ], + }; + const output = { + ...containerWidget, + children: [ + { + widgetName: "Input1", + rightColumn: 8, + widgetId: "ra3vyy3nt2", + topRow: 1, + bottomRow: 2, + parentRowSpace: 40, + isVisible: true, + label: "", + type: "INPUT_WIDGET", + version: 1, + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + renderMode: "CANVAS", + leftColumn: 3, + inputType: "TEXT", + // will not override existing property + resetOnSubmit: false, + // following properties get added + isRequired: false, + isDisabled: false, + }, + ], + }; + + expect(migrateInitialValues(input)).toEqual(output); + }); + + it("MULTI_SELECT_WIDGET", () => { + const input = { + ...containerWidget, + children: [ + { + widgetName: "Select2", + rightColumn: 59, + isFilterable: true, + widgetId: "zvgz9h4fh4", + topRow: 10, + bottomRow: 14, + parentRowSpace: 10, + isVisible: true, + label: "", + type: "DROP_DOWN_WIDGET", + version: 1, + parentId: "0y8sg136kg", + isLoading: false, + defaultOptionValue: "GREEN", + selectionType: "MULTI_SELECT", + parentColumnSpace: 8.35546875, + dynamicTriggerPathList: [], + leftColumn: 39, + dynamicBindingPathList: [], + renderMode: "CANVAS", + options: [ + { + label: "Blue", + value: "BLUE", + }, + { + label: "Green", + value: "GREEN", + }, + { + label: "Red", + value: "RED", + }, + ], + }, + ], + }; + + const output = { + ...containerWidget, + children: [ + { + renderMode: "CANVAS", + type: "MULTI_SELECT_WIDGET", + widgetName: "Select2", + rightColumn: 59, + widgetId: "zvgz9h4fh4", + topRow: 10, + bottomRow: 14, + parentRowSpace: 10, + isVisible: true, + label: "", + version: 1, + parentId: "0y8sg136kg", + isLoading: false, + defaultOptionValue: "GREEN", + parentColumnSpace: 8.35546875, + dynamicTriggerPathList: [], + leftColumn: 39, + dynamicBindingPathList: [], + options: [ + { + label: "Blue", + value: "BLUE", + }, + { + label: "Green", + value: "GREEN", + }, + { + label: "Red", + value: "RED", + }, + ], + }, + ], + }; + + expect(migrateToNewMultiSelect(input)).toEqual(output); + }); + + it("DATE_PICKER_WIDGET2", () => { + const input = { + ...containerWidget, + children: [ + { + widgetName: "DatePicker1", + defaultDate: "2021-05-12T06:50:51.743Z", + rightColumn: 7, + dateFormat: "YYYY-MM-DD HH:mm", + widgetId: "5jbfazqnca", + topRow: 2, + bottomRow: 3, + parentRowSpace: 40, + isVisible: true, + datePickerType: "DATE_PICKER", + label: "", + type: "DATE_PICKER_WIDGET2", + renderMode: "CANVAS", + version: 2, + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 2, + isDisabled: false, + }, + ], + }; + + const output = { + ...containerWidget, + children: [ + { + widgetName: "DatePicker1", + defaultDate: "2021-05-12T06:50:51.743Z", + rightColumn: 7, + dateFormat: "YYYY-MM-DD HH:mm", + widgetId: "5jbfazqnca", + topRow: 2, + bottomRow: 3, + parentRowSpace: 40, + isVisible: true, + datePickerType: "DATE_PICKER", + label: "", + type: "DATE_PICKER_WIDGET2", + renderMode: "CANVAS", + version: 2, + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 2, + isDisabled: false, + // following properties get added + isRequired: false, + minDate: "2001-01-01 00:00", + maxDate: "2041-12-31 23:59", + }, + ], + }; + + expect(migrateInitialValues(input)).toEqual(output); + }); + + it("SWITCH_WIDGET", () => { + const input = { + ...containerWidget, + children: [ + { + widgetName: "Switch1", + rightColumn: 5, + widgetId: "4ksqurxmwn", + topRow: 2, + bottomRow: 3, + parentRowSpace: 40, + isVisible: true, + label: "Label", + type: "SWITCH_WIDGET", + renderMode: "CANVAS", + defaultSwitchState: true, + version: 1, + alignWidget: "LEFT", + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 3, + }, + ], + }; + + const output = { + ...containerWidget, + children: [ + { + widgetName: "Switch1", + rightColumn: 5, + widgetId: "4ksqurxmwn", + topRow: 2, + bottomRow: 3, + parentRowSpace: 40, + isVisible: true, + label: "Label", + type: "SWITCH_WIDGET", + renderMode: "CANVAS", + defaultSwitchState: true, + version: 1, + alignWidget: "LEFT", + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 3, + // following properties get added + isDisabled: false, + }, + ], + }; + + expect(migrateInitialValues(input)).toEqual(output); + }); + + it("Video widget", () => { + const input = { + ...containerWidget, + children: [ + { + widgetName: "Video1", + rightColumn: 9, + dynamicPropertyPathList: [], + widgetId: "ti5b5f5hvq", + topRow: 3, + bottomRow: 10, + parentRowSpace: 40, + isVisible: true, + type: "VIDEO_WIDGET", + renderMode: "CANVAS", + version: 1, + onPlay: "", + url: `https://assets.appsmith.com/widgets/bird.mp4`, + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 2, + autoPlay: false, + }, + ], + }; + const output = { + ...containerWidget, + children: [ + { + widgetName: "Video1", + rightColumn: 9, + dynamicPropertyPathList: [], + widgetId: "ti5b5f5hvq", + topRow: 3, + bottomRow: 10, + parentRowSpace: 40, + isVisible: true, + type: "VIDEO_WIDGET", + renderMode: "CANVAS", + version: 1, + onPlay: "", + url: `https://assets.appsmith.com/widgets/bird.mp4`, + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 2, + autoPlay: false, + // following properties get added + isRequired: false, + isDisabled: false, + }, + ], + }; + + expect(migrateInitialValues(input)).toEqual(output); + }); + + it("CHECKBOX_WIDGET", () => { + const input = { + ...containerWidget, + children: [ + { + widgetName: "Checkbox1", + rightColumn: 8, + widgetId: "djxhhl1p7t", + topRow: 4, + bottomRow: 5, + parentRowSpace: 40, + isVisible: true, + label: "Label", + type: "CHECKBOX_WIDGET", + renderMode: "CANVAS", + version: 1, + alignWidget: "LEFT", + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 5, + defaultCheckedState: true, + }, + ], + }; + const output = { + ...containerWidget, + children: [ + { + widgetName: "Checkbox1", + rightColumn: 8, + widgetId: "djxhhl1p7t", + topRow: 4, + bottomRow: 5, + parentRowSpace: 40, + isVisible: true, + label: "Label", + type: "CHECKBOX_WIDGET", + renderMode: "CANVAS", + version: 1, + alignWidget: "LEFT", + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 5, + defaultCheckedState: true, + // following properties get added + isDisabled: false, + isRequired: false, + }, + ], + }; + + expect(migrateInitialValues(input)).toEqual(output); + }); + + it("RADIO_GROUP_WIDGET", () => { + const input = { + ...containerWidget, + children: [ + { + widgetName: "RadioGroup1", + rightColumn: 5, + widgetId: "4ixyqnw2no", + topRow: 3, + bottomRow: 5, + parentRowSpace: 40, + isVisible: true, + label: "", + type: "RADIO_GROUP_WIDGET", + renderMode: "CANVAS", + version: 1, + parentId: "0", + isLoading: false, + defaultOptionValue: "Y", + parentColumnSpace: 67.375, + leftColumn: 2, + options: [ + { + label: "Yes", + value: "Y", + }, + { + label: "No", + value: "N", + }, + ], + }, + ], + }; + const output = { + ...containerWidget, + children: [ + { + widgetName: "RadioGroup1", + rightColumn: 5, + widgetId: "4ixyqnw2no", + topRow: 3, + bottomRow: 5, + parentRowSpace: 40, + isVisible: true, + label: "", + type: "RADIO_GROUP_WIDGET", + renderMode: "CANVAS", + version: 1, + parentId: "0", + isLoading: false, + defaultOptionValue: "Y", + parentColumnSpace: 67.375, + leftColumn: 2, + options: [ + { + label: "Yes", + value: "Y", + }, + { + label: "No", + value: "N", + }, + ], + // following properties get added + isDisabled: false, + isRequired: false, + }, + ], + }; + + expect(migrateInitialValues(input)).toEqual(output); + }); + + it("FILE_PICKER_WIDGET", () => { + const input = { + ...containerWidget, + children: [ + { + widgetName: "FilePicker1", + rightColumn: 5, + isDefaultClickDisabled: true, + widgetId: "fzajyy8qft", + topRow: 4, + bottomRow: 5, + parentRowSpace: 40, + isVisible: true, + label: "Select Files", + maxFileSize: 5, + type: "FILE_PICKER_WIDGET", + renderMode: "CANVAS", + version: 1, + fileDataType: "Base64", + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 1, + files: [], + maxNumFiles: 1, + }, + ], + }; + + const output = { + ...containerWidget, + children: [ + { + widgetName: "FilePicker1", + rightColumn: 5, + isDefaultClickDisabled: true, + widgetId: "fzajyy8qft", + topRow: 4, + bottomRow: 5, + parentRowSpace: 40, + isVisible: true, + label: "Select Files", + maxFileSize: 5, + type: "FILE_PICKER_WIDGET", + renderMode: "CANVAS", + version: 1, + fileDataType: "Base64", + parentId: "0", + isLoading: false, + parentColumnSpace: 67.375, + leftColumn: 1, + files: [], + maxNumFiles: 1, + // following properties get added + isDisabled: false, + isRequired: false, + allowedFileTypes: [], + }, + ], + }; + + expect(migrateInitialValues(input)).toEqual(output); + }); +}); diff --git a/app/client/src/utils/migrations/ModalWidget.test.ts b/app/client/packages/dsl/src/migrate/tests/ModalWidget.test.ts similarity index 92% rename from app/client/src/utils/migrations/ModalWidget.test.ts rename to app/client/packages/dsl/src/migrate/tests/ModalWidget.test.ts index 9eff660686..1a76af1348 100644 --- a/app/client/src/utils/migrations/ModalWidget.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/ModalWidget.test.ts @@ -1,6 +1,5 @@ -import { GridDefaults } from "constants/WidgetConstants"; -import type { DSLWidget } from "WidgetProvider/constants"; -import { migrateResizableModalWidgetProperties } from "./ModalWidget"; +import { migrateResizableModalWidgetProperties } from "../migrations/038-migrate-resizable-modal-widget-properties"; +import type { DSLWidget } from "../types"; const inputDsl1: DSLWidget = { widgetName: "MainContainer", @@ -48,7 +47,7 @@ const outputDsl1: DSLWidget = { widgetName: "modal", version: 2, type: "MODAL_WIDGET", - height: GridDefaults.DEFAULT_GRID_ROW_HEIGHT * 24, + height: 10 * 24, width: 456, parentId: "0", widgetId: "yf8bhokz7d", @@ -117,7 +116,7 @@ const outputDsl2: DSLWidget = { widgetName: "modal", version: 2, type: "MODAL_WIDGET", - height: GridDefaults.DEFAULT_GRID_ROW_HEIGHT * 60, + height: 10 * 60, width: 532, parentId: "0", widgetId: "yf8bhokz7d", diff --git a/app/client/src/utils/migrations/PhoneInputWidgetMigrations.test.ts b/app/client/packages/dsl/src/migrate/tests/PhoneInputWidgetMigrations.test.ts similarity index 99% rename from app/client/src/utils/migrations/PhoneInputWidgetMigrations.test.ts rename to app/client/packages/dsl/src/migrate/tests/PhoneInputWidgetMigrations.test.ts index 96bba0c020..e9ab8ab933 100644 --- a/app/client/src/utils/migrations/PhoneInputWidgetMigrations.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/PhoneInputWidgetMigrations.test.ts @@ -1,8 +1,6 @@ -import type { DSLWidget } from "WidgetProvider/constants"; -import { - migratePhoneInputWidgetAllowFormatting, - migratePhoneInputWidgetDefaultDialCode, -} from "./PhoneInputWidgetMigrations"; +import { migratePhoneInputWidgetAllowFormatting } from "../migrations/051-migrate-phone-input-widget-allow-formatting"; +import { migratePhoneInputWidgetDefaultDialCode } from "../migrations/054-migrate-phone-input-widget-default-dial-code"; +import type { DSLWidget } from "../types"; const oldDSL = { widgetName: "MainContainer", diff --git a/app/client/src/utils/migrations/SelectWidget.test.ts b/app/client/packages/dsl/src/migrate/tests/SelectWidget.test.ts similarity index 99% rename from app/client/src/utils/migrations/SelectWidget.test.ts rename to app/client/packages/dsl/src/migrate/tests/SelectWidget.test.ts index 4e58e7719c..890f0db056 100644 --- a/app/client/src/utils/migrations/SelectWidget.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/SelectWidget.test.ts @@ -1,9 +1,8 @@ -import type { DSLWidget } from "WidgetProvider/constants"; -import { - MigrateSelectTypeWidgetDefaultValue, - migrateSelectWidgetAddSourceDataPropertyPathList, - migrateSelectWidgetSourceDataBindingPathList, -} from "./SelectWidget"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { MigrateSelectTypeWidgetDefaultValue } from "../migrations/062-migrate-select-type-widget-default-value"; +import { migrateSelectWidgetSourceDataBindingPathList } from "../migrations/081-migrate-select-widget-source-data-binding-path-list"; +import { migrateSelectWidgetAddSourceDataPropertyPathList } from "../migrations/084-migrate-select-widget-add-source-data-property-path-list"; +import type { DSLWidget } from "../types"; describe("MigrateSelectTypeWidgetDefaultValue", () => { describe("Select widget", () => { diff --git a/app/client/src/utils/migrations/TableWidget.test.ts b/app/client/packages/dsl/src/migrate/tests/TableWidget.test.ts similarity index 76% rename from app/client/src/utils/migrations/TableWidget.test.ts rename to app/client/packages/dsl/src/migrate/tests/TableWidget.test.ts index d7ef574ba0..6a906bd441 100644 --- a/app/client/src/utils/migrations/TableWidget.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/TableWidget.test.ts @@ -1,16 +1,13 @@ -import { cloneDeep } from "lodash"; -import type { DSLWidget } from "WidgetProvider/constants"; -import { - tableWidgetPropertyPaneMigrations, - migrateTableWidgetParentRowSpaceProperty, - migrateTableWidgetHeaderVisibilityProperties, - migrateTableWidgetSelectedRowBindings, - migrateTableSanitizeColumnKeys, - migrateTableWidgetNumericColumnName, - migrateTableWidgetV2ValidationBinding, - migrateTableWidgetV2SelectOption, - migrateTableWidgetTableDataJsMode, -} from "./TableWidget"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { DSLWidget } from "../types"; +import { tableWidgetPropertyPaneMigrations } from "../migrations/009-table-widget-property-pane-migration"; +import { migrateTableWidgetParentRowSpaceProperty } from "../migrations/022-migrate-table-widget-parent-row-space-property"; +import { migrateTableWidgetHeaderVisibilityProperties } from "../migrations/024-migrate-table-widget-header-visibility-properties"; +import { migrateTableSanitizeColumnKeys } from "../migrations/037-migrate-table-sanitize-column-keys"; +import { migrateTableWidgetSelectedRowBindings } from "../migrations/039-migrate-table-widget-selected-row-bindings"; +import { migrateTableWidgetV2SelectOption } from "../migrations/071-migrate-table-widget-v2-select-option"; +import { migrateTableWidgetV2ValidationBinding } from "../migrations/066-migrate-table-widget-v2-validation-binding"; +import { migrateTableWidgetTableDataJsMode } from "../migrations/079-migrate-table-widget-table-data-js-mode"; const input1: DSLWidget = { widgetName: "MainContainer", @@ -2016,583 +2013,583 @@ describe("Table Widget selectedRow bindings update", () => { }); }); -describe("Table Widget numeric column name to string update", () => { - it("to test numeric column name converted to string and rest column configuration remains same", () => { - const inputDsl: DSLWidget = { - widgetName: "MainContainer", - backgroundColor: "none", - rightColumn: 816, - snapColumns: 64, - detachFromLayout: true, - widgetId: "0", - topRow: 0, - bottomRow: 5016, - containerStyle: "none", - snapRows: 125, - parentRowSpace: 1, - type: "CANVAS_WIDGET", - canExtend: true, - version: 50, - minHeight: 1292, - parentColumnSpace: 1, - dynamicBindingPathList: [], - leftColumn: 0, - parentId: "", - renderMode: "CANVAS", - isLoading: false, - children: [ - { - widgetName: "Table1", - parentColumnSpace: 74, - defaultPageSize: 0, - columnOrder: [ - "1", - "2", - "_user_", - "_client_", - "rowIndex", - "customColumn1", - "customColumn2", - ], - isVisibleDownload: true, - dynamicPropertyPathList: [], - displayName: "Table", - iconSVG: "/static/media/icon.db8a9cbd.svg", - topRow: 1, - bottomRow: 29, - isSortable: true, - parentRowSpace: 10, - type: "TABLE_WIDGET", - defaultSelectedRow: "0", - hideCard: false, - animateLoading: true, - isLoading: false, - dynamicTriggerPathList: [], - dynamicBindingPathList: [ - { - key: "tableData", - }, - { - key: "primaryColumns.1.computedValue", - }, - { - key: "primaryColumns.2.computedValue", - }, - { - key: "primaryColumns._user_.computedValue", - }, - { - key: "primaryColumns._client_.computedValue", - }, - { - key: "primaryColumns.rowIndex.computedValue", - }, - { - key: "derivedColumns.customColumn1.computedValue", - }, - { - key: "primaryColumns.customColumn1.computedValue", - }, - { - key: "derivedColumns.customColumn2.computedValue", - }, - { - key: "primaryColumns.customColumn2.computedValue", - }, - ], - leftColumn: 0, - primaryColumns: { - "1": { - index: 0, - width: 150, - id: "1", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "ONE", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.1))}}", - }, - "2": { - index: 1, - width: 150, - id: "2", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "TWO", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.2))}}", - }, - _user_: { - index: 2, - width: 150, - id: "_user_", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "USER", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._user_))}}", - }, - _client_: { - index: 3, - width: 150, - id: "_client_", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "CLIENT", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._client_))}}", - }, - rowIndex: { - index: 4, - width: 150, - id: "rowIndex", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "rowIndex", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex))}}", - }, - customColumn1: { - index: 5, - width: 150, - id: "customColumn1", - columnType: "text", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: true, - label: "Custom Column 1", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.customColumn1))}}", - buttonStyle: "rgb(3, 179, 101)", - buttonLabelColor: "#FFFFFF", - buttonColor: "#03B365", - menuColor: "#03B365", - labelColor: "#FFFFFF", - }, - customColumn2: { - index: 6, - width: 150, - id: "customColumn2", - columnType: "text", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: true, - label: "Custom Label", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.customColumn2))}}", - buttonStyle: "rgb(3, 179, 101)", - buttonLabelColor: "#FFFFFF", - buttonColor: "#03B365", - menuColor: "#03B365", - labelColor: "#FFFFFF", - }, - }, - delimiter: ",", - key: "d0akgsw2t4", - derivedColumns: { - customColumn1: { - index: 5, - width: 150, - id: "customColumn1", - columnType: "text", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: true, - label: "Custom Column 1", - computedValue: - '{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex + " CC1"))}}', - buttonStyle: "rgb(3, 179, 101)", - buttonLabelColor: "#FFFFFF", - buttonColor: "#03B365", - menuColor: "#03B365", - labelColor: "#FFFFFF", - }, - customColumn2: { - index: 6, - width: 150, - id: "customColumn2", - columnType: "text", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: true, - label: "Custom Label", - computedValue: - '{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex + " CC1"))}}', - buttonStyle: "rgb(3, 179, 101)", - buttonLabelColor: "#FFFFFF", - buttonColor: "#03B365", - menuColor: "#03B365", - labelColor: "#FFFFFF", - }, - }, - rightColumn: 34, - textSize: "PARAGRAPH", - widgetId: "v3kdn1uyjb", - isVisibleFilters: true, - tableData: "{{Api2.data}}", - isVisible: true, - label: "Data", - searchKey: "", - enableClientSideSearch: true, - version: 3, - totalRecordsCount: 0, - parentId: "0", - renderMode: "CANVAS", - horizontalAlignment: "LEFT", - isVisibleSearch: true, - isVisiblePagination: true, - verticalAlignment: "CENTER", - columnSizeMap: { - task: 245, - step: 62, - status: 75, - }, - }, - ], - }; - // using cloneDeep, create new reference of inputDsl - // otherwise migration function will modify inputDsl too - const newDsl = migrateTableWidgetNumericColumnName(cloneDeep(inputDsl)); - const outputDsl: DSLWidget = { - widgetName: "MainContainer", - backgroundColor: "none", - rightColumn: 816, - snapColumns: 64, - detachFromLayout: true, - widgetId: "0", - topRow: 0, - bottomRow: 5016, - containerStyle: "none", - snapRows: 125, - parentRowSpace: 1, - type: "CANVAS_WIDGET", - canExtend: true, - version: 50, - minHeight: 1292, - parentColumnSpace: 1, - dynamicBindingPathList: [], - leftColumn: 0, - parentId: "", - renderMode: "CANVAS", - isLoading: false, - children: [ - { - widgetName: "Table1", - parentColumnSpace: 74, - defaultPageSize: 0, - columnOrder: [ - "_1", - "_2", - "_user_", - "_client_", - "rowIndex", - "customColumn1", - "customColumn2", - ], - isVisibleDownload: true, - dynamicPropertyPathList: [], - displayName: "Table", - iconSVG: "/static/media/icon.db8a9cbd.svg", - topRow: 1, - bottomRow: 29, - isSortable: true, - parentRowSpace: 10, - type: "TABLE_WIDGET", - defaultSelectedRow: "0", - hideCard: false, - animateLoading: true, - isLoading: false, - dynamicTriggerPathList: [], - dynamicBindingPathList: [ - { - key: "tableData", - }, - { - key: "primaryColumns._1.computedValue", - }, - { - key: "primaryColumns._2.computedValue", - }, - { - key: "primaryColumns._user_.computedValue", - }, - { - key: "primaryColumns._client_.computedValue", - }, - { - key: "primaryColumns.rowIndex.computedValue", - }, - { - key: "derivedColumns.customColumn1.computedValue", - }, - { - key: "primaryColumns.customColumn1.computedValue", - }, - { - key: "derivedColumns.customColumn2.computedValue", - }, - { - key: "primaryColumns.customColumn2.computedValue", - }, - ], - leftColumn: 0, - primaryColumns: { - _1: { - index: 0, - width: 150, - id: "_1", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "ONE", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._1))}}", - }, - _2: { - index: 1, - width: 150, - id: "_2", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "TWO", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._2))}}", - }, - _user_: { - index: 2, - width: 150, - id: "_user_", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "USER", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._user_))}}", - }, - _client_: { - index: 3, - width: 150, - id: "_client_", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "CLIENT", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._client_))}}", - }, - rowIndex: { - index: 4, - width: 150, - id: "rowIndex", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textSize: "PARAGRAPH", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: false, - label: "rowIndex", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex))}}", - }, - customColumn1: { - index: 5, - width: 150, - id: "customColumn1", - columnType: "text", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: true, - label: "Custom Column 1", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.customColumn1))}}", - buttonStyle: "rgb(3, 179, 101)", - buttonLabelColor: "#FFFFFF", - buttonColor: "#03B365", - menuColor: "#03B365", - labelColor: "#FFFFFF", - }, - customColumn2: { - index: 6, - width: 150, - id: "customColumn2", - columnType: "text", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: true, - label: "Custom Label", - computedValue: - "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.customColumn2))}}", - buttonStyle: "rgb(3, 179, 101)", - buttonLabelColor: "#FFFFFF", - buttonColor: "#03B365", - menuColor: "#03B365", - labelColor: "#FFFFFF", - }, - }, - delimiter: ",", - key: "d0akgsw2t4", - derivedColumns: { - customColumn1: { - index: 5, - width: 150, - id: "customColumn1", - columnType: "text", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: true, - label: "Custom Column 1", - computedValue: - '{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex + " CC1"))}}', - buttonStyle: "rgb(3, 179, 101)", - buttonLabelColor: "#FFFFFF", - buttonColor: "#03B365", - menuColor: "#03B365", - labelColor: "#FFFFFF", - }, - customColumn2: { - index: 6, - width: 150, - id: "customColumn2", - columnType: "text", - enableFilter: true, - enableSort: true, - isVisible: true, - isDisabled: false, - isCellVisible: true, - isDerived: true, - label: "Custom Label", - computedValue: - '{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex + " CC1"))}}', - buttonStyle: "rgb(3, 179, 101)", - buttonLabelColor: "#FFFFFF", - buttonColor: "#03B365", - menuColor: "#03B365", - labelColor: "#FFFFFF", - }, - }, - rightColumn: 34, - textSize: "PARAGRAPH", - widgetId: "v3kdn1uyjb", - isVisibleFilters: true, - tableData: "{{Api2.data}}", - isVisible: true, - label: "Data", - searchKey: "", - enableClientSideSearch: true, - version: 3, - totalRecordsCount: 0, - parentId: "0", - renderMode: "CANVAS", - horizontalAlignment: "LEFT", - isVisibleSearch: true, - isVisiblePagination: true, - verticalAlignment: "CENTER", - columnSizeMap: { - task: 245, - step: 62, - status: 75, - }, - }, - ], - }; +// describe("Table Widget numeric column name to string update", () => { +// it("to test numeric column name converted to string and rest column configuration remains same", () => { +// const inputDsl: DSLWidget = { +// widgetName: "MainContainer", +// backgroundColor: "none", +// rightColumn: 816, +// snapColumns: 64, +// detachFromLayout: true, +// widgetId: "0", +// topRow: 0, +// bottomRow: 5016, +// containerStyle: "none", +// snapRows: 125, +// parentRowSpace: 1, +// type: "CANVAS_WIDGET", +// canExtend: true, +// version: 50, +// minHeight: 1292, +// parentColumnSpace: 1, +// dynamicBindingPathList: [], +// leftColumn: 0, +// parentId: "", +// renderMode: "CANVAS", +// isLoading: false, +// children: [ +// { +// widgetName: "Table1", +// parentColumnSpace: 74, +// defaultPageSize: 0, +// columnOrder: [ +// "1", +// "2", +// "_user_", +// "_client_", +// "rowIndex", +// "customColumn1", +// "customColumn2", +// ], +// isVisibleDownload: true, +// dynamicPropertyPathList: [], +// displayName: "Table", +// iconSVG: "/static/media/icon.db8a9cbd.svg", +// topRow: 1, +// bottomRow: 29, +// isSortable: true, +// parentRowSpace: 10, +// type: "TABLE_WIDGET", +// defaultSelectedRow: "0", +// hideCard: false, +// animateLoading: true, +// isLoading: false, +// dynamicTriggerPathList: [], +// dynamicBindingPathList: [ +// { +// key: "tableData", +// }, +// { +// key: "primaryColumns.1.computedValue", +// }, +// { +// key: "primaryColumns.2.computedValue", +// }, +// { +// key: "primaryColumns._user_.computedValue", +// }, +// { +// key: "primaryColumns._client_.computedValue", +// }, +// { +// key: "primaryColumns.rowIndex.computedValue", +// }, +// { +// key: "derivedColumns.customColumn1.computedValue", +// }, +// { +// key: "primaryColumns.customColumn1.computedValue", +// }, +// { +// key: "derivedColumns.customColumn2.computedValue", +// }, +// { +// key: "primaryColumns.customColumn2.computedValue", +// }, +// ], +// leftColumn: 0, +// primaryColumns: { +// "1": { +// index: 0, +// width: 150, +// id: "1", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "ONE", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.1))}}", +// }, +// "2": { +// index: 1, +// width: 150, +// id: "2", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "TWO", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.2))}}", +// }, +// _user_: { +// index: 2, +// width: 150, +// id: "_user_", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "USER", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._user_))}}", +// }, +// _client_: { +// index: 3, +// width: 150, +// id: "_client_", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "CLIENT", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._client_))}}", +// }, +// rowIndex: { +// index: 4, +// width: 150, +// id: "rowIndex", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "rowIndex", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex))}}", +// }, +// customColumn1: { +// index: 5, +// width: 150, +// id: "customColumn1", +// columnType: "text", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: true, +// label: "Custom Column 1", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.customColumn1))}}", +// buttonStyle: "rgb(3, 179, 101)", +// buttonLabelColor: "#FFFFFF", +// buttonColor: "#03B365", +// menuColor: "#03B365", +// labelColor: "#FFFFFF", +// }, +// customColumn2: { +// index: 6, +// width: 150, +// id: "customColumn2", +// columnType: "text", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: true, +// label: "Custom Label", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.customColumn2))}}", +// buttonStyle: "rgb(3, 179, 101)", +// buttonLabelColor: "#FFFFFF", +// buttonColor: "#03B365", +// menuColor: "#03B365", +// labelColor: "#FFFFFF", +// }, +// }, +// delimiter: ",", +// key: "d0akgsw2t4", +// derivedColumns: { +// customColumn1: { +// index: 5, +// width: 150, +// id: "customColumn1", +// columnType: "text", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: true, +// label: "Custom Column 1", +// computedValue: +// '{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex + " CC1"))}}', +// buttonStyle: "rgb(3, 179, 101)", +// buttonLabelColor: "#FFFFFF", +// buttonColor: "#03B365", +// menuColor: "#03B365", +// labelColor: "#FFFFFF", +// }, +// customColumn2: { +// index: 6, +// width: 150, +// id: "customColumn2", +// columnType: "text", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: true, +// label: "Custom Label", +// computedValue: +// '{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex + " CC1"))}}', +// buttonStyle: "rgb(3, 179, 101)", +// buttonLabelColor: "#FFFFFF", +// buttonColor: "#03B365", +// menuColor: "#03B365", +// labelColor: "#FFFFFF", +// }, +// }, +// rightColumn: 34, +// textSize: "PARAGRAPH", +// widgetId: "v3kdn1uyjb", +// isVisibleFilters: true, +// tableData: "{{Api2.data}}", +// isVisible: true, +// label: "Data", +// searchKey: "", +// enableClientSideSearch: true, +// version: 3, +// totalRecordsCount: 0, +// parentId: "0", +// renderMode: "CANVAS", +// horizontalAlignment: "LEFT", +// isVisibleSearch: true, +// isVisiblePagination: true, +// verticalAlignment: "CENTER", +// columnSizeMap: { +// task: 245, +// step: 62, +// status: 75, +// }, +// }, +// ], +// }; +// // using cloneDeep, create new reference of inputDsl +// // otherwise migration function will modify inputDsl too +// const newDsl = migrateTableWidgetNumericColumnName(cloneDeep(inputDsl)); +// const outputDsl: DSLWidget = { +// widgetName: "MainContainer", +// backgroundColor: "none", +// rightColumn: 816, +// snapColumns: 64, +// detachFromLayout: true, +// widgetId: "0", +// topRow: 0, +// bottomRow: 5016, +// containerStyle: "none", +// snapRows: 125, +// parentRowSpace: 1, +// type: "CANVAS_WIDGET", +// canExtend: true, +// version: 50, +// minHeight: 1292, +// parentColumnSpace: 1, +// dynamicBindingPathList: [], +// leftColumn: 0, +// parentId: "", +// renderMode: "CANVAS", +// isLoading: false, +// children: [ +// { +// widgetName: "Table1", +// parentColumnSpace: 74, +// defaultPageSize: 0, +// columnOrder: [ +// "_1", +// "_2", +// "_user_", +// "_client_", +// "rowIndex", +// "customColumn1", +// "customColumn2", +// ], +// isVisibleDownload: true, +// dynamicPropertyPathList: [], +// displayName: "Table", +// iconSVG: "/static/media/icon.db8a9cbd.svg", +// topRow: 1, +// bottomRow: 29, +// isSortable: true, +// parentRowSpace: 10, +// type: "TABLE_WIDGET", +// defaultSelectedRow: "0", +// hideCard: false, +// animateLoading: true, +// isLoading: false, +// dynamicTriggerPathList: [], +// dynamicBindingPathList: [ +// { +// key: "tableData", +// }, +// { +// key: "primaryColumns._1.computedValue", +// }, +// { +// key: "primaryColumns._2.computedValue", +// }, +// { +// key: "primaryColumns._user_.computedValue", +// }, +// { +// key: "primaryColumns._client_.computedValue", +// }, +// { +// key: "primaryColumns.rowIndex.computedValue", +// }, +// { +// key: "derivedColumns.customColumn1.computedValue", +// }, +// { +// key: "primaryColumns.customColumn1.computedValue", +// }, +// { +// key: "derivedColumns.customColumn2.computedValue", +// }, +// { +// key: "primaryColumns.customColumn2.computedValue", +// }, +// ], +// leftColumn: 0, +// primaryColumns: { +// _1: { +// index: 0, +// width: 150, +// id: "_1", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "ONE", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._1))}}", +// }, +// _2: { +// index: 1, +// width: 150, +// id: "_2", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "TWO", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._2))}}", +// }, +// _user_: { +// index: 2, +// width: 150, +// id: "_user_", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "USER", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._user_))}}", +// }, +// _client_: { +// index: 3, +// width: 150, +// id: "_client_", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "CLIENT", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._client_))}}", +// }, +// rowIndex: { +// index: 4, +// width: 150, +// id: "rowIndex", +// horizontalAlignment: "LEFT", +// verticalAlignment: "CENTER", +// columnType: "text", +// textSize: "PARAGRAPH", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: false, +// label: "rowIndex", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex))}}", +// }, +// customColumn1: { +// index: 5, +// width: 150, +// id: "customColumn1", +// columnType: "text", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: true, +// label: "Custom Column 1", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.customColumn1))}}", +// buttonStyle: "rgb(3, 179, 101)", +// buttonLabelColor: "#FFFFFF", +// buttonColor: "#03B365", +// menuColor: "#03B365", +// labelColor: "#FFFFFF", +// }, +// customColumn2: { +// index: 6, +// width: 150, +// id: "customColumn2", +// columnType: "text", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: true, +// label: "Custom Label", +// computedValue: +// "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.customColumn2))}}", +// buttonStyle: "rgb(3, 179, 101)", +// buttonLabelColor: "#FFFFFF", +// buttonColor: "#03B365", +// menuColor: "#03B365", +// labelColor: "#FFFFFF", +// }, +// }, +// delimiter: ",", +// key: "d0akgsw2t4", +// derivedColumns: { +// customColumn1: { +// index: 5, +// width: 150, +// id: "customColumn1", +// columnType: "text", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: true, +// label: "Custom Column 1", +// computedValue: +// '{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex + " CC1"))}}', +// buttonStyle: "rgb(3, 179, 101)", +// buttonLabelColor: "#FFFFFF", +// buttonColor: "#03B365", +// menuColor: "#03B365", +// labelColor: "#FFFFFF", +// }, +// customColumn2: { +// index: 6, +// width: 150, +// id: "customColumn2", +// columnType: "text", +// enableFilter: true, +// enableSort: true, +// isVisible: true, +// isDisabled: false, +// isCellVisible: true, +// isDerived: true, +// label: "Custom Label", +// computedValue: +// '{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.rowIndex + " CC1"))}}', +// buttonStyle: "rgb(3, 179, 101)", +// buttonLabelColor: "#FFFFFF", +// buttonColor: "#03B365", +// menuColor: "#03B365", +// labelColor: "#FFFFFF", +// }, +// }, +// rightColumn: 34, +// textSize: "PARAGRAPH", +// widgetId: "v3kdn1uyjb", +// isVisibleFilters: true, +// tableData: "{{Api2.data}}", +// isVisible: true, +// label: "Data", +// searchKey: "", +// enableClientSideSearch: true, +// version: 3, +// totalRecordsCount: 0, +// parentId: "0", +// renderMode: "CANVAS", +// horizontalAlignment: "LEFT", +// isVisibleSearch: true, +// isVisiblePagination: true, +// verticalAlignment: "CENTER", +// columnSizeMap: { +// task: 245, +// step: 62, +// status: 75, +// }, +// }, +// ], +// }; - expect(newDsl).toStrictEqual(outputDsl); - }); -}); +// expect(newDsl).toStrictEqual(outputDsl); +// }); +// }); const oldBindingPrefix = `{{ ( diff --git a/app/client/src/utils/migrations/TextWidget.test.ts b/app/client/packages/dsl/src/migrate/tests/TextWidget.test.ts similarity index 92% rename from app/client/src/utils/migrations/TextWidget.test.ts rename to app/client/packages/dsl/src/migrate/tests/TextWidget.test.ts index 304dbaeb84..0480c8b3c1 100644 --- a/app/client/src/utils/migrations/TextWidget.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/TextWidget.test.ts @@ -1,10 +1,6 @@ -import { - migrateTextStyleFromTextWidget, - migrateScrollTruncateProperties, -} from "utils/migrations/TextWidget"; -import { FontStyleTypes, TextSizes } from "constants/WidgetConstants"; -import type { DSLWidget } from "WidgetProvider/constants"; -import { OverflowTypes } from "widgets/TextWidget/constants"; +import { migrateTextStyleFromTextWidget } from "../migrations/015-migrate-text-style-from-text-widget"; +import { migrateScrollTruncateProperties } from "../migrations/053-migrate-scroll-truncate-property"; +import type { DSLWidget } from "../types"; const inputDsl1: DSLWidget = { widgetName: "MainContainer", @@ -188,8 +184,8 @@ const outputDsl1: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.PARAGRAPH, - fontStyle: FontStyleTypes.BOLD, + fontSize: "PARAGRAPH", + fontStyle: "BOLD", renderMode: "CANVAS", }, ], @@ -236,8 +232,8 @@ const outputDsl2: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.HEADING1, - fontStyle: FontStyleTypes.BOLD, + fontSize: "HEADING1", + fontStyle: "BOLD", renderMode: "CANVAS", }, ], @@ -284,7 +280,7 @@ const outputDsl3: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.PARAGRAPH, + fontSize: "PARAGRAPH", renderMode: "CANVAS", }, ], @@ -346,8 +342,8 @@ const inputDsl4: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.PARAGRAPH, - fontStyle: FontStyleTypes.BOLD, + fontSize: "PARAGRAPH", + fontStyle: "BOLD", renderMode: "CANVAS", shouldScroll: true, shouldTruncate: false, @@ -396,10 +392,10 @@ const outputDsl4: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.PARAGRAPH, - fontStyle: FontStyleTypes.BOLD, + fontSize: "PARAGRAPH", + fontStyle: "BOLD", renderMode: "CANVAS", - overflow: OverflowTypes.SCROLL, + overflow: "SCROLL", }, ], }; @@ -445,8 +441,8 @@ const inputDsl5: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.PARAGRAPH, - fontStyle: FontStyleTypes.BOLD, + fontSize: "PARAGRAPH", + fontStyle: "BOLD", renderMode: "CANVAS", shouldScroll: true, shouldTruncate: true, @@ -495,10 +491,10 @@ const outputDsl5: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.PARAGRAPH, - fontStyle: FontStyleTypes.BOLD, + fontSize: "PARAGRAPH", + fontStyle: "BOLD", renderMode: "CANVAS", - overflow: OverflowTypes.TRUNCATE, + overflow: "TRUNCATE", }, ], }; @@ -544,8 +540,8 @@ const inputDsl6: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.PARAGRAPH, - fontStyle: FontStyleTypes.BOLD, + fontSize: "PARAGRAPH", + fontStyle: "BOLD", renderMode: "CANVAS", shouldScroll: false, shouldTruncate: false, @@ -594,10 +590,10 @@ const outputDsl6: DSLWidget = { parentId: "0", widgetId: "yf8bhokz7d", dynamicBindingPathList: [], - fontSize: TextSizes.PARAGRAPH, - fontStyle: FontStyleTypes.BOLD, + fontSize: "PARAGRAPH", + fontStyle: "BOLD", renderMode: "CANVAS", - overflow: OverflowTypes.NONE, + overflow: "NONE", }, ], }; diff --git a/app/client/src/utils/migrations/ThemingMigration.test.ts b/app/client/packages/dsl/src/migrate/tests/ThemingMigration.test.ts similarity index 99% rename from app/client/src/utils/migrations/ThemingMigration.test.ts rename to app/client/packages/dsl/src/migrate/tests/ThemingMigration.test.ts index 088b0fc948..6de482c581 100644 --- a/app/client/src/utils/migrations/ThemingMigration.test.ts +++ b/app/client/packages/dsl/src/migrate/tests/ThemingMigration.test.ts @@ -1,7 +1,6 @@ import { klona } from "klona"; - -import type { DSLWidget } from "WidgetProvider/constants"; -import { migrateChildStylesheetFromDynamicBindingPathList } from "./ThemingMigrations"; +import type { DSLWidget } from "../types"; +import { migrateChildStylesheetFromDynamicBindingPathList } from "../migrations/070-migrate-child-stylesheet-from-dynamic-binding-path-list"; const inputDSL1 = { widgetName: "MainContainer", diff --git a/app/client/packages/dsl/src/migrate/tests/testDSLs.ts b/app/client/packages/dsl/src/migrate/tests/testDSLs.ts new file mode 100644 index 0000000000..730538af70 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/tests/testDSLs.ts @@ -0,0 +1,3785 @@ +const ASSETS_CDN_URL = "https://assets.appsmith.com"; +const getAssetUrl = (src = "") => { + return src; +}; + +export const originalDSLForDSLMigrations = { + widgetName: "MainContainer", + backgroundColor: "none", + rightColumn: 450, + snapColumns: 64, + detachFromLayout: true, + widgetId: "0", + topRow: 0, + bottomRow: 840, + containerStyle: "none", + snapRows: 89, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: true, + version: undefined, + minHeight: 780, + parentColumnSpace: 1, + dynamicBindingPathList: [], + leftColumn: 0, + children: [ + { + boxShadow: "{{appsmith.theme.boxShadow.appBoxShadow}}", + widgetName: "Container1", + borderColor: "transparent", + isCanvas: true, + dynamicPropertyPathList: [ + { + key: "borderRadius", + }, + ], + displayName: "Container", + iconSVG: "/static/media/icon.1977dca3.svg", + topRow: 0, + bottomRow: 6, + parentRowSpace: 10, + type: "CONTAINER_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 6.84375, + dynamicTriggerPathList: [], + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "backgroundColor", + }, + { + key: "boxShadow", + }, + { + key: "borderRadius", + }, + ], + children: [ + { + boxShadow: "none", + widgetName: "Canvas1", + displayName: "Canvas", + topRow: 0, + bottomRow: 390, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + minHeight: 400, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "Text1", + dynamicPropertyPathList: [], + displayName: "Text", + iconSVG: "/static/media/icon.97c59b52.svg", + topRow: 0, + bottomRow: 4, + parentRowSpace: 10, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + parentColumnSpace: 6.53125, + dynamicTriggerPathList: [], + fontFamily: "Montserrat", + leftColumn: 7, + dynamicBindingPathList: [], + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "Employee Time Tracker", + key: "s3ajdid629", + labelTextSize: "0.875rem", + rightColumn: 55, + textAlign: "LEFT", + widgetId: "xw0918rbsp", + isVisible: true, + fontStyle: "BOLD", + textColor: "#fff", + version: 1, + parentId: "22al9skq4c", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "1.25rem", + }, + { + boxShadow: "none", + widgetName: "IconButton8", + buttonColor: "#fff", + displayName: "Icon button", + iconSVG: + "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg", + searchTags: ["click", "submit"], + topRow: 0, + bottomRow: 4, + parentRowSpace: 10, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 6.53125, + dynamicTriggerPathList: [], + leftColumn: 2, + dynamicBindingPathList: [ + { + key: "borderRadius", + }, + ], + isDisabled: false, + key: "2my0dvhc2p", + isDeprecated: false, + rightColumn: 7, + iconName: "time", + widgetId: "df7pyl6z5m", + isVisible: true, + version: 1, + parentId: "22al9skq4c", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "TERTIARY", + }, + ], + key: "53ftpwo2aq", + labelTextSize: "0.875rem", + rightColumn: 164.25, + detachFromLayout: true, + widgetId: "22al9skq4c", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "og1bsi36p4", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + ], + borderWidth: "0", + key: "a4gmk81297", + labelTextSize: "0.875rem", + backgroundColor: "{{appsmith.theme.colors.primaryColor}}", + rightColumn: 64, + widgetId: "og1bsi36p4", + containerStyle: "card", + isVisible: true, + version: 1, + parentId: "0", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + { + boxShadow: "{{appsmith.theme.boxShadow.appBoxShadow}}", + widgetName: "Container1Copy", + borderColor: "transparent", + isCanvas: true, + dynamicPropertyPathList: [], + displayName: "Container", + iconSVG: "/static/media/icon.1977dca3.svg", + topRow: 6, + bottomRow: 82, + parentRowSpace: 10, + type: "CONTAINER_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 6.84375, + dynamicTriggerPathList: [], + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "boxShadow", + }, + ], + children: [ + { + boxShadow: "none", + widgetName: "Canvas1Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 730, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + minHeight: 400, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "Tabs1", + isCanvas: true, + displayName: "Tabs", + iconSVG: "/static/media/icon.74a6d653.svg", + topRow: 5, + bottomRow: 71, + parentRowSpace: 10, + type: "TABS_WIDGET", + hideCard: false, + shouldScrollContents: false, + animateLoading: true, + parentColumnSpace: 6.53125, + dynamicTriggerPathList: [ + { + key: "onTabSelected", + }, + ], + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "defaultTab", + }, + ], + children: [ + { + tabId: "tab1", + boxShadow: "none", + widgetName: "Canvas2", + displayName: "Canvas", + topRow: 0, + bottomRow: 610, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: true, + hideCard: true, + shouldScrollContents: false, + minHeight: 400, + parentColumnSpace: 1, + dynamicTriggerPathList: [], + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "Text7", + dynamicPropertyPathList: [], + displayName: "Text", + iconSVG: "/static/media/icon.97c59b52.svg", + topRow: 1, + bottomRow: 6, + parentRowSpace: 10, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + parentColumnSpace: 6.21875, + dynamicTriggerPathList: [], + fontFamily: "System Default", + leftColumn: 9, + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "textColor", + }, + ], + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{lst_user.selectedItem.name}}", + key: "e6of5n4o7o", + labelTextSize: "0.875rem", + rightColumn: 45, + textAlign: "LEFT", + widgetId: "lzn17wpnmn", + isVisible: true, + fontStyle: "BOLD", + textColor: "{{appsmith.theme.colors.primaryColor}}", + version: 1, + parentId: "z05jlsrkmt", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "1.25rem", + }, + { + boxShadow: "none", + widgetName: "Image2", + displayName: "Image", + iconSVG: + "/static/media/icon.52d8fb963abcb95c79b10f1553389f22.svg", + topRow: 1, + bottomRow: 6, + parentRowSpace: 10, + type: "IMAGE_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 6.84375, + dynamicTriggerPathList: [], + imageShape: "RECTANGLE", + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "image", + }, + ], + defaultImage: getAssetUrl( + `${ASSETS_CDN_URL}/widgets/default.png`, + ), + key: "52v1r95ynr", + image: "{{lst_user.selectedItem.image}}", + isDeprecated: false, + rightColumn: 9, + objectFit: "contain", + widgetId: "e2whboroyt", + isVisible: true, + version: 1, + parentId: "z05jlsrkmt", + renderMode: "CANVAS", + isLoading: false, + maxZoomLevel: 1, + enableDownload: false, + borderRadius: "0px", + enableRotation: false, + }, + { + resetFormOnClick: false, + boxShadow: "none", + widgetName: "Button4", + onClick: "{{JSObject1.onClick()}}", + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + displayName: "Button", + iconSVG: + "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg", + searchTags: ["click", "submit"], + topRow: 1, + bottomRow: 6, + parentRowSpace: 10, + type: "BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 6.21875, + dynamicTriggerPathList: [ + { + key: "onClick", + }, + ], + leftColumn: 45, + dynamicBindingPathList: [ + { + key: "buttonColor", + }, + { + key: "borderRadius", + }, + ], + text: "Clock In", + isDisabled: false, + key: "y8fmp30elx", + isDeprecated: false, + rightColumn: 63, + isDefaultClickDisabled: true, + widgetId: "eljn3wfgac", + isVisible: true, + recaptchaType: "V3", + version: 1, + parentId: "z05jlsrkmt", + renderMode: "CANVAS", + isLoading: false, + disabledWhenInvalid: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "SECONDARY", + placement: "CENTER", + }, + { + template: { + IconButton2: { + boxShadow: "NONE", + widgetName: "IconButton2", + buttonColor: "#2E3D49", + displayName: "Icon button", + iconSVG: "/static/media/icon.1a0c634a.svg", + topRow: 5, + bottomRow: 9, + parentRowSpace: 10, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 5.5869140625, + dynamicTriggerPathList: [], + leftColumn: 55, + dynamicBindingPathList: [], + isDisabled: false, + key: "qu8lf50ktl", + rightColumn: 64, + iconName: "time", + widgetId: "adfuulfvjx", + logBlackList: { + isVisible: true, + iconName: true, + borderRadius: true, + boxShadow: true, + buttonColor: true, + buttonVariant: true, + isDisabled: true, + widgetName: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + version: 1, + parentId: "snzcjlyy9x", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "CIRCLE", + buttonVariant: "TERTIARY", + onClick: "{{JSObject1.clockout()}}", + }, + btn_clockout: { + groupButtons: { + groupButton1: { + onClick: "{{JSObject1.clockout()}}", + }, + }, + borderRadius: + "{{List1.listData.map((currentItem, currentIndex) => {\n return (function(){\n return 'ROUNDED';\n })();\n })}}", + boxShadow: + "{{List1.listData.map((currentItem, currentIndex) => {\n return (function(){\n return 'NONE';\n })();\n })}}", + buttonVariant: + "{{List1.listData.map((currentItem, currentIndex) => {\n return (function(){\n return 'SECONDARY';\n })();\n })}}", + }, + Text3CopyCopy: { + boxShadow: "none", + widgetName: "Text3CopyCopy", + dynamicPropertyPathList: [ + { + key: "fontSize", + }, + ], + displayName: "Text", + iconSVG: "/static/media/icon.97c59b52.svg", + topRow: 0, + bottomRow: 5, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: "System Default", + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "textColor", + }, + ], + leftColumn: 38, + shouldTruncate: false, + borderWidth: "", + truncateButtonColor: "#FFC13D", + text: "{{List1.listData.map((currentItem) => JSObject1.diffHrsMins(currentItem.time_start, currentItem.time_end))}}", + key: "s3ajdid629", + labelTextSize: "0.875rem", + rightColumn: 64, + backgroundColor: "transparent", + textAlign: "RIGHT", + widgetId: "j2qem8c0ac", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + textStyle: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + fontStyle: "BOLD", + textColor: "{{appsmith.theme.colors.primaryColor}}", + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "1.5rem", + textStyle: "BODY", + }, + Text3Copy1: { + boxShadow: "none", + widgetName: "Text3Copy1", + dynamicPropertyPathList: [ + { + key: "textColor", + }, + { + key: "fontSize", + }, + ], + displayName: "Text", + iconSVG: "/static/media/icon.97c59b52.svg", + topRow: 5, + bottomRow: 10, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: "System Default", + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "textColor", + }, + ], + leftColumn: 0, + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{List1.listData.map((currentItem) => JSObject1.timeDisplay(\ncurrentItem.time_start,\ncurrentItem.time_end))}}", + key: "s3ajdid629", + labelTextSize: "0.875rem", + rightColumn: 33, + textAlign: "LEFT", + widgetId: "xlxxn7mjer", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + textStyle: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + fontStyle: "", + textColor: + "{{List1.listData.map((currentItem) => currentItem.time_end ? 'black' : 'green')}}", + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "0.75rem", + textStyle: "BODY", + }, + IconButton3Copy: { + boxShadow: "none", + widgetName: "IconButton3Copy", + onClick: + "{{delTimeLog.run(() => getTimeLogs.run(), () => {})}}", + buttonColor: "#FF5858", + dynamicPropertyPathList: [ + { + key: "borderRadius", + }, + ], + displayName: "Icon button", + iconSVG: "/static/media/icon.1a0c634a.svg", + topRow: 5, + bottomRow: 10, + parentRowSpace: 10, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 5.5869140625, + dynamicTriggerPathList: [ + { + key: "onClick", + }, + ], + leftColumn: 56, + dynamicBindingPathList: [ + { + key: "borderRadius", + }, + ], + isDisabled: false, + key: "qu8lf50ktl", + labelTextSize: "0.875rem", + rightColumn: 64, + iconName: "trash", + widgetId: "hbveofpr91", + logBlackList: { + isVisible: true, + iconName: true, + borderRadius: true, + boxShadow: true, + buttonColor: true, + buttonVariant: true, + isDisabled: true, + widgetName: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "SECONDARY", + }, + Text2Copy: { + boxShadow: "none", + widgetName: "Text2Copy", + dynamicPropertyPathList: [ + { + key: "fontSize", + }, + ], + displayName: "Text", + iconSVG: "/static/media/icon.97c59b52.svg", + topRow: 0, + bottomRow: 5, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: "System Default", + dynamicBindingPathList: [ + { + key: "text", + }, + ], + leftColumn: 0, + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{List1.listData.map((currentItem) => 'Task: ' + currentItem.task)}}", + key: "s3ajdid629", + labelTextSize: "0.875rem", + rightColumn: 22, + textAlign: "LEFT", + widgetId: "1iy9e9hnnq", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + textStyle: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + fontStyle: "BOLD", + textColor: "#231F20", + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "1.125rem", + textStyle: "HEADING", + }, + Button3Copy: { + boxShadow: "none", + widgetName: "Button3Copy", + onClick: "{{JSObject1.clockout()}}", + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + dynamicPropertyPathList: [ + { + key: "isDisabled", + }, + { + key: "borderRadius", + }, + ], + displayName: "Button", + iconSVG: "/static/media/icon.cca02633.svg", + topRow: 5, + bottomRow: 10, + parentRowSpace: 10, + type: "BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 5.78125, + dynamicTriggerPathList: [ + { + key: "onClick", + }, + ], + leftColumn: 37, + dynamicBindingPathList: [ + { + key: "isDisabled", + }, + { + key: "buttonColor", + }, + { + key: "borderRadius", + }, + ], + text: "Clock Out", + isDisabled: + "{{List1.listData.map((currentItem) => currentItem.time_end !== null)}}", + key: "6mxrybslxf", + labelTextSize: "0.875rem", + rightColumn: 56, + isDefaultClickDisabled: true, + widgetId: "690l18wovc", + logBlackList: { + isVisible: true, + animateLoading: true, + text: true, + buttonColor: true, + buttonVariant: true, + placement: true, + widgetName: true, + isDisabled: true, + isDefaultClickDisabled: true, + recaptchaType: true, + version: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + recaptchaType: "V3", + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "PRIMARY", + iconAlign: "left", + placement: "CENTER", + }, + Canvas5Copy: { + boxShadow: "none", + widgetName: "Canvas5Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 390, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + dropDisabled: true, + openParentPropertyPane: true, + minHeight: 400, + noPad: true, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: ["szq2vx6r6m"], + key: "ir2wg4nsvm", + labelTextSize: "0.875rem", + rightColumn: 149.25, + detachFromLayout: true, + widgetId: "3vja4gvycq", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "zismwyzhny", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + Container2Copy: { + boxShadow: "none", + widgetName: "Container2Copy", + borderColor: "transparent", + disallowCopy: true, + isCanvas: true, + dynamicPropertyPathList: [ + { + key: "borderRadius", + }, + ], + displayName: "Container", + iconSVG: "/static/media/icon.1977dca3.svg", + topRow: 0, + bottomRow: 13, + dragDisabled: true, + type: "CONTAINER_WIDGET", + hideCard: false, + openParentPropertyPane: true, + isDeletable: false, + animateLoading: true, + leftColumn: 0, + dynamicBindingPathList: [], + children: ["y3jz5nm8of"], + borderWidth: "0", + key: "lpcgapoau4", + disablePropertyPane: true, + labelTextSize: "0.875rem", + backgroundColor: "white", + rightColumn: 64, + widgetId: "szq2vx6r6m", + containerStyle: "card", + isVisible: true, + version: 1, + parentId: "3vja4gvycq", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + Canvas6Copy: { + boxShadow: "none", + widgetName: "Canvas6Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 370, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + "1iy9e9hnnq", + "hbveofpr91", + "xlxxn7mjer", + "j2qem8c0ac", + "690l18wovc", + ], + key: "ir2wg4nsvm", + labelTextSize: "0.875rem", + detachFromLayout: true, + widgetId: "y3jz5nm8of", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "szq2vx6r6m", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + }, + boxShadow: "{{appsmith.theme.boxShadow.appBoxShadow}}", + widgetName: "List1", + listData: "{{getTimeLogs.data.reverse()}}", + isCanvas: true, + dynamicPropertyPathList: [ + { + key: "isVisible", + }, + ], + displayName: "List", + iconSVG: "/static/media/icon.9925ee17.svg", + topRow: 6, + bottomRow: 59, + parentRowSpace: 10, + onPageChange: + '{{getTimeLogs.run(() => resetWidget("List1",true), () => {})}}', + type: "LIST_WIDGET", + hideCard: false, + gridGap: 0, + animateLoading: true, + parentColumnSpace: 6.21875, + dynamicTriggerPathList: [ + { + key: "template.IconButton3Copy.onClick", + }, + { + key: "template.Button3Copy.onClick", + }, + { + key: "onPageChange", + }, + ], + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "listData", + }, + { + key: "isVisible", + }, + { + key: "boxShadow", + }, + { + key: "template.Button3Copy.buttonColor", + }, + { + key: "template.Button3Copy.borderRadius", + }, + { + key: "template.IconButton3Copy.borderRadius", + }, + { + key: "template.Text2Copy.text", + }, + { + key: "template.Text3Copy1.text", + }, + { + key: "template.Text3Copy1.textColor", + }, + { + key: "template.Text3CopyCopy.text", + }, + { + key: "template.Button3Copy.isDisabled", + }, + ], + gridType: "vertical", + enhancements: true, + children: [ + { + boxShadow: "none", + widgetName: "Canvas5Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 390, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + dropDisabled: true, + openParentPropertyPane: true, + minHeight: 400, + noPad: true, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "Container2Copy", + borderColor: "transparent", + disallowCopy: true, + isCanvas: true, + dynamicPropertyPathList: [ + { + key: "borderRadius", + }, + ], + displayName: "Container", + iconSVG: "/static/media/icon.1977dca3.svg", + topRow: 0, + bottomRow: 11, + dragDisabled: true, + type: "CONTAINER_WIDGET", + hideCard: false, + openParentPropertyPane: true, + isDeletable: false, + animateLoading: true, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "Canvas6Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 370, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "Text2Copy", + dynamicPropertyPathList: [ + { + key: "fontSize", + }, + ], + displayName: "Text", + iconSVG: + "/static/media/icon.97c59b52.svg", + topRow: 0, + bottomRow: 4, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: "System Default", + dynamicBindingPathList: [ + { + key: "text", + }, + ], + leftColumn: 0, + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "Task: {{currentItem.task}}", + key: "s3ajdid629", + labelTextSize: "0.875rem", + rightColumn: 22, + textAlign: "LEFT", + widgetId: "1iy9e9hnnq", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + textStyle: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + fontStyle: "BOLD", + textColor: "#231F20", + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "1.125rem", + textStyle: "HEADING", + }, + { + boxShadow: "none", + widgetName: "IconButton3Copy", + onClick: + "{{delTimeLog.run(() => getTimeLogs.run(), () => {})}}", + buttonColor: "#FF5858", + dynamicPropertyPathList: [ + { + key: "borderRadius", + }, + ], + displayName: "Icon button", + iconSVG: + "/static/media/icon.1a0c634a.svg", + topRow: 4, + bottomRow: 9, + parentRowSpace: 10, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 5.5869140625, + dynamicTriggerPathList: [ + { + key: "onClick", + }, + ], + leftColumn: 56, + dynamicBindingPathList: [ + { + key: "borderRadius", + }, + ], + isDisabled: false, + key: "qu8lf50ktl", + labelTextSize: "0.875rem", + rightColumn: 64, + iconName: "trash", + widgetId: "hbveofpr91", + logBlackList: { + isVisible: true, + iconName: true, + borderRadius: true, + boxShadow: true, + buttonColor: true, + buttonVariant: true, + isDisabled: true, + widgetName: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "SECONDARY", + }, + { + boxShadow: "none", + widgetName: "Text3Copy1", + dynamicPropertyPathList: [ + { + key: "textColor", + }, + { + key: "fontSize", + }, + ], + displayName: "Text", + iconSVG: + "/static/media/icon.97c59b52.svg", + topRow: 4, + bottomRow: 9, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: "System Default", + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "textColor", + }, + ], + leftColumn: 0, + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{JSObject1.timeDisplay(\ncurrentItem.time_start,\ncurrentItem.time_end)}}", + key: "s3ajdid629", + labelTextSize: "0.875rem", + rightColumn: 33, + textAlign: "LEFT", + widgetId: "xlxxn7mjer", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + textStyle: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + fontStyle: "", + textColor: + "{{currentItem.time_end ? 'black' : 'green'}}", + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "0.75rem", + textStyle: "BODY", + }, + { + boxShadow: "none", + widgetName: "Text3CopyCopy", + dynamicPropertyPathList: [ + { + key: "fontSize", + }, + ], + displayName: "Text", + iconSVG: + "/static/media/icon.97c59b52.svg", + topRow: 0, + bottomRow: 4, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: "System Default", + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "textColor", + }, + ], + leftColumn: 38, + shouldTruncate: false, + borderWidth: "", + truncateButtonColor: "#FFC13D", + text: "{{JSObject1.diffHrsMins(currentItem.time_start, currentItem.time_end)}}", + key: "s3ajdid629", + labelTextSize: "0.875rem", + rightColumn: 64, + backgroundColor: "transparent", + textAlign: "RIGHT", + widgetId: "j2qem8c0ac", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + textStyle: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + fontStyle: "BOLD", + textColor: + "{{appsmith.theme.colors.primaryColor}}", + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "1.5rem", + textStyle: "BODY", + }, + { + boxShadow: "none", + widgetName: "Button3Copy", + onClick: "{{JSObject1.clockout()}}", + buttonColor: + "{{appsmith.theme.colors.primaryColor}}", + dynamicPropertyPathList: [ + { + key: "isDisabled", + }, + { + key: "borderRadius", + }, + ], + displayName: "Button", + iconSVG: + "/static/media/icon.cca02633.svg", + topRow: 4, + bottomRow: 9, + parentRowSpace: 10, + type: "BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 5.78125, + dynamicTriggerPathList: [ + { + key: "onClick", + }, + ], + leftColumn: 37, + dynamicBindingPathList: [ + { + key: "isDisabled", + }, + { + key: "buttonColor", + }, + { + key: "borderRadius", + }, + ], + text: "Clock Out", + isDisabled: + "{{currentItem.time_end !== null}}", + key: "6mxrybslxf", + labelTextSize: "0.875rem", + rightColumn: 56, + isDefaultClickDisabled: true, + widgetId: "690l18wovc", + logBlackList: { + isVisible: true, + animateLoading: true, + text: true, + buttonColor: true, + buttonVariant: true, + placement: true, + widgetName: true, + isDisabled: true, + isDefaultClickDisabled: true, + recaptchaType: true, + version: true, + type: true, + hideCard: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + recaptchaType: "V3", + version: 1, + parentId: "y3jz5nm8of", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "PRIMARY", + iconAlign: "left", + placement: "CENTER", + }, + ], + key: "ir2wg4nsvm", + labelTextSize: "0.875rem", + detachFromLayout: true, + widgetId: "y3jz5nm8of", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "szq2vx6r6m", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + ], + borderWidth: "0", + key: "lpcgapoau4", + disablePropertyPane: true, + labelTextSize: "0.875rem", + backgroundColor: "white", + rightColumn: 64, + widgetId: "szq2vx6r6m", + containerStyle: "card", + isVisible: true, + version: 1, + parentId: "3vja4gvycq", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + ], + key: "ir2wg4nsvm", + labelTextSize: "0.875rem", + rightColumn: 149.25, + detachFromLayout: true, + widgetId: "3vja4gvycq", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "zismwyzhny", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + ], + privateWidgets: { + undefined: true, + }, + key: "mhpuav1a5z", + labelTextSize: "0.875rem", + backgroundColor: "transparent", + rightColumn: 64, + itemBackgroundColor: "#FFFFFF", + widgetId: "zismwyzhny", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + isVisible: "{{List1.items.length > 0}}", + parentId: "z05jlsrkmt", + serverSidePaginationEnabled: true, + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0.375rem", + }, + ], + isDisabled: false, + key: "53ftpwo2aq", + labelTextSize: "0.875rem", + tabName: "Time Log", + rightColumn: 156.75, + detachFromLayout: true, + widgetId: "z05jlsrkmt", + isVisible: true, + version: 1, + parentId: "5i1ijofu5u", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + { + tabId: "tab2", + boxShadow: "none", + widgetName: "Canvas3", + displayName: "Canvas", + topRow: 0, + bottomRow: 610, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: true, + hideCard: true, + shouldScrollContents: false, + minHeight: 400, + parentColumnSpace: 1, + dynamicTriggerPathList: [], + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + template: { + Image1Copy: { + boxShadow: "none", + widgetName: "Image1Copy", + displayName: "Image", + iconSVG: + "/static/media/icon.52d8fb963abcb95c79b10f1553389f22.svg", + topRow: 0, + bottomRow: 8, + type: "IMAGE_WIDGET", + hideCard: false, + animateLoading: true, + dynamicTriggerPathList: [], + imageShape: "RECTANGLE", + dynamicBindingPathList: [ + { + key: "image", + }, + { + key: "borderRadius", + }, + ], + leftColumn: 0, + defaultImage: getAssetUrl( + `${ASSETS_CDN_URL}/widgets/default.png`, + ), + key: "6zvrwxg59v", + image: + "{{lst_user.listData.map((currentItem) => currentItem.image)}}", + isDeprecated: false, + rightColumn: 16, + objectFit: "cover", + widgetId: "bnxe5gjbpt", + logBlackList: { + isVisible: true, + defaultImage: true, + imageShape: true, + maxZoomLevel: true, + enableRotation: true, + enableDownload: true, + objectFit: true, + image: true, + widgetName: true, + version: true, + animateLoading: true, + searchTags: true, + type: true, + hideCard: true, + isDeprecated: true, + replacement: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + boxShadow: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + borderRadius: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + version: 1, + parentId: "3smlbuidsm", + renderMode: "CANVAS", + isLoading: false, + maxZoomLevel: 1, + enableDownload: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + enableRotation: false, + }, + Text9Copy: { + boxShadow: "none", + widgetName: "Text9Copy", + dynamicPropertyPathList: [ + { + key: "textColor", + }, + ], + displayName: "Text", + iconSVG: + "/static/media/icon.97c59b523e6f70ba6f40a10fc2c7c5b5.svg", + searchTags: ["typography", "paragraph", "label"], + topRow: 0, + bottomRow: 4, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: "{{appsmith.theme.fontFamily.appFont}}", + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "textColor", + }, + { + key: "fontFamily", + }, + ], + leftColumn: 18, + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{lst_user.listData.map((currentItem) => currentItem.name)}}", + key: "u6pcautxph", + isDeprecated: false, + rightColumn: 51, + textAlign: "LEFT", + widgetId: "5k7hnpoca5", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + searchTags: true, + type: true, + hideCard: true, + isDeprecated: true, + replacement: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + textStyle: true, + boxShadow: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + fontFamily: true, + borderRadius: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + fontStyle: "BOLD", + textColor: "{{appsmith.theme.colors.primaryColor}}", + version: 1, + parentId: "3smlbuidsm", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + fontSize: "1rem", + textStyle: "HEADING", + }, + Text10Copy: { + widgetName: "Text10Copy", + displayName: "Text", + iconSVG: + "/static/media/icon.97c59b523e6f70ba6f40a10fc2c7c5b5.svg", + searchTags: ["typography", "paragraph", "label"], + topRow: 4, + bottomRow: 8, + parentRowSpace: 10, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + fontFamily: "{{appsmith.theme.fontFamily.appFont}}", + parentColumnSpace: 5.78125, + dynamicTriggerPathList: [], + leftColumn: 18, + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "fontFamily", + }, + ], + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{lst_user.listData.map((currentItem) => currentItem.email)}}", + key: "u6pcautxph", + isDeprecated: false, + rightColumn: 63, + disableLink: true, + textAlign: "LEFT", + widgetId: "oatmji4m6z", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + searchTags: true, + type: true, + hideCard: true, + isDeprecated: true, + replacement: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + fontFamily: true, + borderRadius: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + dynamicBindingPathList: true, + }, + isVisible: true, + fontStyle: "BOLD", + textColor: "#231F20", + version: 1, + parentId: "3smlbuidsm", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + fontSize: "1rem", + }, + IconButton9Copy: { + boxShadow: "none", + widgetName: "IconButton9Copy", + buttonColor: + "{{lst_user.listData.map((currentItem) => getAllTimeLogs.data.some(l=>l.time_end==undefined&& l.user_id==currentItem.id) ? 'limegreen' : 'grey')}}", + dynamicPropertyPathList: [ + { + key: "buttonColor", + }, + ], + displayName: "Icon button", + iconSVG: + "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg", + searchTags: ["click", "submit"], + topRow: 0, + bottomRow: 4, + tooltip: "Clock in/out", + parentRowSpace: 10, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 5.78125, + dynamicTriggerPathList: [], + leftColumn: 58, + dynamicBindingPathList: [ + { + key: "buttonColor", + }, + { + key: "borderRadius", + }, + ], + isDisabled: false, + key: "6sipw8yyt6", + isDeprecated: false, + rightColumn: 62, + iconName: "time", + widgetId: "j0zzppxt0f", + logBlackList: { + isVisible: true, + iconName: true, + buttonVariant: true, + isDisabled: true, + widgetName: true, + version: true, + animateLoading: true, + searchTags: true, + type: true, + hideCard: true, + isDeprecated: true, + replacement: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + buttonColor: true, + borderRadius: true, + boxShadow: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + dynamicBindingPathList: true, + }, + isVisible: true, + version: 1, + parentId: "3smlbuidsm", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "TERTIARY", + }, + Canvas10Copy: { + boxShadow: "none", + widgetName: "Canvas10Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 390, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + dropDisabled: true, + openParentPropertyPane: true, + minHeight: 400, + noPad: true, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: ["jtnfj3x31z"], + key: "yefglrbgux", + isDeprecated: false, + rightColumn: 149.25, + detachFromLayout: true, + widgetId: "a3pfuntay2", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "2vn64tqgfn", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + Container3Copy: { + boxShadow: + "{{appsmith.theme.boxShadow.appBoxShadow}}", + widgetName: "Container3Copy", + borderColor: "transparent", + disallowCopy: true, + isCanvas: true, + displayName: "Container", + iconSVG: + "/static/media/icon.1977dca3370505e2db3a8e44cfd54907.svg", + searchTags: ["div", "parent", "group"], + topRow: 0, + bottomRow: 10, + dragDisabled: true, + type: "CONTAINER_WIDGET", + hideCard: false, + openParentPropertyPane: true, + isDeletable: false, + animateLoading: true, + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "borderRadius", + }, + { + key: "boxShadow", + }, + ], + children: ["3smlbuidsm"], + borderWidth: "0", + key: "dnbh2d72dk", + disablePropertyPane: true, + backgroundColor: "white", + isDeprecated: false, + rightColumn: 64, + widgetId: "jtnfj3x31z", + containerStyle: "card", + isVisible: true, + version: 1, + parentId: "a3pfuntay2", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + Canvas11Copy: { + boxShadow: "none", + widgetName: "Canvas11Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 370, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + "bnxe5gjbpt", + "5k7hnpoca5", + "oatmji4m6z", + "j0zzppxt0f", + ], + key: "yefglrbgux", + isDeprecated: false, + detachFromLayout: true, + widgetId: "3smlbuidsm", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "jtnfj3x31z", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + }, + boxShadow: "{{appsmith.theme.boxShadow.appBoxShadow}}", + widgetName: "lst_user", + listData: "{{getUsers.data}}", + isCanvas: true, + dynamicPropertyPathList: [], + displayName: "List", + iconSVG: + "/static/media/icon.9925ee17dee37bf1ba7374412563a8a7.svg", + topRow: 0, + bottomRow: 59, + parentRowSpace: 10, + onPageChange: + '{{getUsers.run(() => resetWidget("lst_user",true), () => {})}}', + type: "LIST_WIDGET", + hideCard: false, + onPageSizeChange: "", + gridGap: 0, + animateLoading: true, + parentColumnSpace: 6.21875, + dynamicTriggerPathList: [ + { + key: "onListItemClick", + }, + { + key: "onPageSizeChange", + }, + { + key: "onPageChange", + }, + ], + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "listData", + }, + { + key: "borderRadius", + }, + { + key: "boxShadow", + }, + { + key: "template.Image1Copy.image", + }, + { + key: "template.Text9Copy.text", + }, + { + key: "template.Text10Copy.text", + }, + { + key: "template.IconButton9Copy.buttonColor", + }, + ], + gridType: "vertical", + enhancements: true, + children: [ + { + boxShadow: "none", + widgetName: "Canvas10Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 390, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + dropDisabled: true, + openParentPropertyPane: true, + minHeight: 400, + noPad: true, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: + "{{appsmith.theme.boxShadow.appBoxShadow}}", + widgetName: "Container3Copy", + borderColor: "transparent", + disallowCopy: true, + isCanvas: true, + displayName: "Container", + iconSVG: + "/static/media/icon.1977dca3370505e2db3a8e44cfd54907.svg", + searchTags: ["div", "parent", "group"], + topRow: 0, + bottomRow: 10, + dragDisabled: true, + type: "CONTAINER_WIDGET", + hideCard: false, + openParentPropertyPane: true, + isDeletable: false, + animateLoading: true, + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "borderRadius", + }, + { + key: "boxShadow", + }, + ], + children: [ + { + boxShadow: "none", + widgetName: "Canvas11Copy", + displayName: "Canvas", + topRow: 0, + bottomRow: 370, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "Image1Copy", + displayName: "Image", + iconSVG: + "/static/media/icon.52d8fb963abcb95c79b10f1553389f22.svg", + topRow: 0, + bottomRow: 8, + type: "IMAGE_WIDGET", + hideCard: false, + animateLoading: true, + dynamicTriggerPathList: [], + imageShape: "RECTANGLE", + dynamicBindingPathList: [ + { + key: "image", + }, + { + key: "borderRadius", + }, + ], + leftColumn: 0, + defaultImage: getAssetUrl( + `${ASSETS_CDN_URL}/widgets/default.png`, + ), + key: "6zvrwxg59v", + image: "{{currentItem.image}}", + isDeprecated: false, + rightColumn: 16, + objectFit: "cover", + widgetId: "bnxe5gjbpt", + logBlackList: { + isVisible: true, + defaultImage: true, + imageShape: true, + maxZoomLevel: true, + enableRotation: true, + enableDownload: true, + objectFit: true, + image: true, + widgetName: true, + version: true, + animateLoading: true, + searchTags: true, + type: true, + hideCard: true, + isDeprecated: true, + replacement: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + boxShadow: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + borderRadius: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + version: 1, + parentId: "3smlbuidsm", + renderMode: "CANVAS", + isLoading: false, + maxZoomLevel: 1, + enableDownload: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + enableRotation: false, + }, + { + boxShadow: "none", + widgetName: "Text9Copy", + dynamicPropertyPathList: [ + { + key: "textColor", + }, + ], + displayName: "Text", + iconSVG: + "/static/media/icon.97c59b523e6f70ba6f40a10fc2c7c5b5.svg", + searchTags: [ + "typography", + "paragraph", + "label", + ], + topRow: 0, + bottomRow: 4, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: + "{{appsmith.theme.fontFamily.appFont}}", + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "textColor", + }, + { + key: "fontFamily", + }, + ], + leftColumn: 18, + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{currentItem.name}}", + key: "u6pcautxph", + isDeprecated: false, + rightColumn: 51, + textAlign: "LEFT", + widgetId: "5k7hnpoca5", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + searchTags: true, + type: true, + hideCard: true, + isDeprecated: true, + replacement: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + textStyle: true, + boxShadow: true, + dynamicBindingPathList: true, + dynamicTriggerPathList: true, + minHeight: true, + widgetId: true, + renderMode: true, + fontFamily: true, + borderRadius: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + }, + isVisible: true, + fontStyle: "BOLD", + textColor: + "{{appsmith.theme.colors.primaryColor}}", + version: 1, + parentId: "3smlbuidsm", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + fontSize: "1rem", + textStyle: "HEADING", + }, + { + widgetName: "Text10Copy", + displayName: "Text", + iconSVG: + "/static/media/icon.97c59b523e6f70ba6f40a10fc2c7c5b5.svg", + searchTags: [ + "typography", + "paragraph", + "label", + ], + topRow: 4, + bottomRow: 8, + parentRowSpace: 10, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + fontFamily: + "{{appsmith.theme.fontFamily.appFont}}", + parentColumnSpace: 5.78125, + dynamicTriggerPathList: [], + leftColumn: 18, + dynamicBindingPathList: [ + { + key: "text", + }, + { + key: "fontFamily", + }, + ], + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{currentItem.email}}", + key: "u6pcautxph", + isDeprecated: false, + rightColumn: 63, + disableLink: true, + textAlign: "LEFT", + widgetId: "oatmji4m6z", + logBlackList: { + isVisible: true, + text: true, + fontSize: true, + fontStyle: true, + textAlign: true, + textColor: true, + truncateButtonColor: true, + widgetName: true, + shouldTruncate: true, + overflow: true, + version: true, + animateLoading: true, + searchTags: true, + type: true, + hideCard: true, + isDeprecated: true, + replacement: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + fontFamily: true, + borderRadius: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + dynamicBindingPathList: true, + }, + isVisible: true, + fontStyle: "BOLD", + textColor: "#231F20", + version: 1, + parentId: "3smlbuidsm", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + fontSize: "1rem", + }, + { + boxShadow: "none", + widgetName: "IconButton9Copy", + buttonColor: + "{{getAllTimeLogs.data.some(l=>l.time_end==undefined&& l.user_id==currentItem.id) ? 'limegreen' : 'grey'}}", + dynamicPropertyPathList: [ + { + key: "buttonColor", + }, + ], + displayName: "Icon button", + iconSVG: + "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg", + searchTags: ["click", "submit"], + topRow: 0, + bottomRow: 4, + tooltip: "Clock in/out", + parentRowSpace: 10, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 5.78125, + dynamicTriggerPathList: [], + leftColumn: 58, + dynamicBindingPathList: [ + { + key: "buttonColor", + }, + { + key: "borderRadius", + }, + ], + isDisabled: false, + key: "6sipw8yyt6", + isDeprecated: false, + rightColumn: 62, + iconName: "time", + widgetId: "j0zzppxt0f", + logBlackList: { + isVisible: true, + iconName: true, + buttonVariant: true, + isDisabled: true, + widgetName: true, + version: true, + animateLoading: true, + searchTags: true, + type: true, + hideCard: true, + isDeprecated: true, + replacement: true, + displayName: true, + key: true, + iconSVG: true, + isCanvas: true, + minHeight: true, + widgetId: true, + renderMode: true, + buttonColor: true, + borderRadius: true, + boxShadow: true, + isLoading: true, + parentColumnSpace: true, + parentRowSpace: true, + leftColumn: true, + rightColumn: true, + topRow: true, + bottomRow: true, + parentId: true, + dynamicBindingPathList: true, + }, + isVisible: true, + version: 1, + parentId: "3smlbuidsm", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "TERTIARY", + }, + ], + key: "yefglrbgux", + isDeprecated: false, + detachFromLayout: true, + widgetId: "3smlbuidsm", + accentColor: + "{{appsmith.theme.colors.primaryColor}}", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "jtnfj3x31z", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + ], + borderWidth: "0", + key: "dnbh2d72dk", + disablePropertyPane: true, + backgroundColor: "white", + isDeprecated: false, + rightColumn: 64, + widgetId: "jtnfj3x31z", + containerStyle: "card", + isVisible: true, + version: 1, + parentId: "a3pfuntay2", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + ], + key: "yefglrbgux", + isDeprecated: false, + rightColumn: 149.25, + detachFromLayout: true, + widgetId: "a3pfuntay2", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "2vn64tqgfn", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + ], + privateWidgets: { + undefined: true, + }, + key: "q9apcnizxn", + backgroundColor: "transparent", + isDeprecated: false, + rightColumn: 64, + onListItemClick: "{{JSObject1.selectEmployee()}}", + itemBackgroundColor: "#FFFFFF", + widgetId: "2vn64tqgfn", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + isVisible: true, + parentId: "5nj3rw1joi", + serverSidePaginationEnabled: false, + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + ], + isDisabled: false, + key: "53ftpwo2aq", + labelTextSize: "0.875rem", + tabName: "Employees", + rightColumn: 156.75, + detachFromLayout: true, + widgetId: "5nj3rw1joi", + isVisible: true, + version: 1, + parentId: "5i1ijofu5u", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + { + tabId: "tab0uectdsv5x", + boxShadow: "none", + widgetName: "Canvas9", + displayName: "Canvas", + topRow: 1, + bottomRow: 620, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: false, + hideCard: true, + minHeight: 600, + parentColumnSpace: 1, + dynamicTriggerPathList: [], + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "{{appsmith.theme.boxShadow.appBoxShadow}}", + setAdaptiveYMin: false, + widgetName: "Chart1", + allowScroll: false, + dynamicPropertyPathList: [ + { + key: "onDataPointClick", + }, + ], + displayName: "Chart", + iconSVG: + "/static/media/icon.6adbe31ed817fc4bfd66f9f0a6fc105c.svg", + searchTags: ["graph", "visuals", "visualisations"], + topRow: 0, + bottomRow: 25, + parentRowSpace: 10, + type: "CHART_WIDGET", + hideCard: false, + chartData: { + zwbffmrap1: { + seriesName: "Time", + data: "{{JSObject1.totalsChart()}}", + }, + }, + animateLoading: true, + parentColumnSpace: 6.21875, + dynamicTriggerPathList: [ + { + key: "onDataPointClick", + }, + ], + fontFamily: "{{appsmith.theme.fontFamily.appFont}}", + leftColumn: 0, + dynamicBindingPathList: [ + { + key: "chartData.zwbffmrap1.data", + }, + { + key: "borderRadius", + }, + { + key: "boxShadow", + }, + { + key: "accentColor", + }, + { + key: "fontFamily", + }, + ], + customFusionChartConfig: { + type: "column2d", + dataSource: { + data: [ + { + label: "Product1", + value: 20000, + }, + { + label: "Product2", + value: 22000, + }, + { + label: "Product3", + value: 32000, + }, + ], + chart: { + caption: "Sales Report", + xAxisName: "Product Line", + yAxisName: "Revenue($)", + theme: "fusion", + alignCaptionWithCanvas: 1, + captionFontSize: "24", + captionAlignment: "center", + captionPadding: "20", + captionFontColor: "#231F20", + legendIconSides: "4", + legendIconBgAlpha: "100", + legendIconAlpha: "100", + legendPosition: "top", + canvasPadding: "0", + chartLeftMargin: "20", + chartTopMargin: "10", + chartRightMargin: "40", + chartBottomMargin: "10", + xAxisNameFontSize: "14", + labelFontSize: "12", + labelFontColor: "#716E6E", + xAxisNameFontColor: "#716E6E", + yAxisNameFontSize: "14", + yAxisValueFontSize: "12", + yAxisValueFontColor: "#716E6E", + yAxisNameFontColor: "#716E6E", + }, + }, + }, + onDataPointClick: + "{{storeValue('task',Chart1.selectedDataPoint.x,false)}}", + key: "3p90n51o2w", + isDeprecated: false, + rightColumn: 64, + widgetId: "202hvtgzef", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + isVisible: true, + version: 1, + parentId: "demz6wbjrc", + labelOrientation: "auto", + renderMode: "CANVAS", + isLoading: false, + yAxisName: "Duration (Hours)", + chartName: "Time spent per Task", + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + xAxisName: "Task", + chartType: "BAR_CHART", + }, + { + boxShadow: "{{appsmith.theme.boxShadow.appBoxShadow}}", + isVisibleDownload: false, + iconSVG: + "/static/media/icon.db8a9cbd2acd22a31ea91cc37ea2a46c.svg", + topRow: 29, + isSortable: false, + type: "TABLE_WIDGET_V2", + inlineEditingSaveOption: "ROW_LEVEL", + animateLoading: true, + dynamicBindingPathList: [ + { + key: "tableData", + }, + { + key: "primaryColumns.customColumn3.computedValue", + }, + { + key: "primaryColumns.customColumn2.computedValue", + }, + { + key: "primaryColumns.customColumn1.computedValue", + }, + { + key: "primaryColumns.time_end.computedValue", + }, + { + key: "primaryColumns.date_end.computedValue", + }, + { + key: "primaryColumns.time_start.computedValue", + }, + { + key: "primaryColumns.date_start.computedValue", + }, + { + key: "primaryColumns.rate.computedValue", + }, + { + key: "primaryColumns.notes.computedValue", + }, + { + key: "primaryColumns.user_id.computedValue", + }, + { + key: "primaryColumns.id.computedValue", + }, + { + key: "primaryColumns.task.computedValue", + }, + { + key: "accentColor", + }, + { + key: "borderRadius", + }, + { + key: "boxShadow", + }, + ], + leftColumn: 0, + delimiter: ",", + defaultSelectedRowIndex: 0, + accentColor: "{{appsmith.theme.colors.primaryColor}}", + isVisibleFilters: false, + isVisible: true, + enableClientSideSearch: false, + version: 1, + totalRecordsCount: 0, + isLoading: false, + childStylesheet: { + button: { + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + menuButton: { + menuColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + iconButton: { + menuColor: "{{appsmith.theme.colors.primaryColor}}", + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + boxShadow: "none", + }, + editActions: { + saveButtonColor: + "{{appsmith.theme.colors.primaryColor}}", + saveBorderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + discardButtonColor: + "{{appsmith.theme.colors.primaryColor}}", + discardBorderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + }, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + primaryColumnId: "id", + defaultSelectedRowIndices: [0], + widgetName: "Table2", + defaultPageSize: 0, + columnOrder: [ + "customColumn3", + "customColumn1", + "customColumn2", + "id", + "user_id", + "task", + "notes", + "rate", + "date_start", + "time_start", + "date_end", + "time_end", + ], + dynamicPropertyPathList: [], + compactMode: "SHORT", + displayName: "Table", + bottomRow: 60, + columnWidthMap: { + task: 245, + step: 62, + status: 75, + time_start: 194, + customColumn1: 137, + customColumn2: 72, + customColumn3: 60, + }, + parentRowSpace: 10, + hideCard: false, + parentColumnSpace: 6.21875, + dynamicTriggerPathList: [], + primaryColumns: { + task: { + index: 1, + width: 150, + id: "task", + originalId: "task", + alias: "task", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: false, + isCellVisible: true, + isCellEditable: false, + isDerived: false, + label: "task", + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["task"]))}}', + labelColor: "#FFFFFF", + validation: {}, + }, + id: { + allowCellWrapping: false, + index: 0, + width: 150, + originalId: "id", + id: "id", + alias: "id", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: false, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: false, + label: "id", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["id"]))}}', + validation: {}, + }, + user_id: { + allowCellWrapping: false, + index: 1, + width: 150, + originalId: "user_id", + id: "user_id", + alias: "user_id", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: false, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: false, + label: "user_id", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["user_id"]))}}', + validation: {}, + }, + notes: { + allowCellWrapping: false, + index: 3, + width: 150, + originalId: "notes", + id: "notes", + alias: "notes", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: false, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: false, + label: "notes", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["notes"]))}}', + validation: {}, + }, + rate: { + allowCellWrapping: false, + index: 4, + width: 150, + originalId: "rate", + id: "rate", + alias: "rate", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: false, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: false, + label: "rate", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["rate"]))}}', + validation: {}, + }, + date_start: { + allowCellWrapping: false, + index: 5, + width: 150, + originalId: "date_start", + id: "date_start", + alias: "date_start", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: false, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: false, + label: "date_start", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["date_start"]))}}', + validation: {}, + }, + time_start: { + allowCellWrapping: false, + index: 6, + width: 150, + originalId: "time_start", + id: "time_start", + alias: "time_start", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: true, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: false, + label: "time_start", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["time_start"]))}}', + validation: {}, + }, + date_end: { + allowCellWrapping: false, + index: 7, + width: 150, + originalId: "date_end", + id: "date_end", + alias: "date_end", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: false, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: false, + label: "date_end", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["date_end"]))}}', + validation: {}, + }, + time_end: { + allowCellWrapping: false, + index: 8, + width: 150, + originalId: "time_end", + id: "time_end", + alias: "time_end", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: false, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: false, + label: "time_end", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + '{{Table2.processedTableData.map((currentRow, currentIndex) => ( currentRow["time_end"]))}}', + validation: {}, + }, + customColumn1: { + allowCellWrapping: false, + index: 9, + width: 150, + originalId: "customColumn1", + id: "customColumn1", + alias: "Employee", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: true, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: true, + label: "Employee", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + "{{Table2.processedTableData.map((currentRow, currentIndex) => ( getUsers.data.find(u=>u.id==currentRow.user_id).name))}}", + buttonStyle: "rgb(3, 179, 101)", + labelColor: "#FFFFFF", + validation: {}, + }, + customColumn2: { + allowCellWrapping: false, + index: 10, + width: 150, + originalId: "customColumn2", + id: "customColumn2", + alias: "duration", + horizontalAlignment: "RIGHT", + verticalAlignment: "CENTER", + columnType: "text", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: true, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: true, + label: "Duration", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + "{{Table2.processedTableData.map((currentRow, currentIndex) => ( JSObject1.diffHrsMins(currentRow.time_start,currentRow.time_end)))}}", + buttonStyle: "rgb(3, 179, 101)", + labelColor: "#FFFFFF", + validation: {}, + }, + customColumn3: { + allowCellWrapping: false, + index: 10, + width: 150, + originalId: "customColumn3", + id: "customColumn3", + alias: "image", + horizontalAlignment: "LEFT", + verticalAlignment: "CENTER", + columnType: "image", + textSize: "0.875rem", + enableFilter: true, + enableSort: true, + isVisible: true, + isDisabled: false, + isCellEditable: false, + isEditable: false, + isCellVisible: true, + isDerived: true, + label: "image", + isSaveVisible: true, + isDiscardVisible: true, + computedValue: + "{{Table2.processedTableData.map((currentRow, currentIndex) => ( getUsers.data.find(u=>u.id==currentRow.user_id).image))}}", + buttonStyle: "rgb(3, 179, 101)", + labelColor: "#FFFFFF", + validation: {}, + }, + }, + key: "gijedibkh6", + isDeprecated: false, + rightColumn: 64, + textSize: "0.875rem", + widgetId: "kug5m016a2", + tableData: + "{{getAllTimeLogs.data.filter(log=>log.task==appsmith.store.task || appsmith.store.task ==''|| appsmith.store.task ==undefined)}}", + label: "Data", + searchKey: "", + parentId: "demz6wbjrc", + serverSidePaginationEnabled: true, + renderMode: "CANVAS", + horizontalAlignment: "LEFT", + isVisibleSearch: false, + isVisiblePagination: false, + verticalAlignment: "CENTER", + }, + { + widgetName: "Text8", + dynamicPropertyPathList: [ + { + key: "textColor", + }, + ], + displayName: "Text", + iconSVG: + "/static/media/icon.97c59b523e6f70ba6f40a10fc2c7c5b5.svg", + searchTags: ["typography", "paragraph", "label"], + topRow: 25, + bottomRow: 29, + parentRowSpace: 10, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + fontFamily: "{{appsmith.theme.fontFamily.appFont}}", + parentColumnSpace: 6.21875, + dynamicTriggerPathList: [], + leftColumn: 1, + dynamicBindingPathList: [ + { + key: "fontFamily", + }, + { + key: "text", + }, + { + key: "textColor", + }, + ], + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "{{'task' in appsmith.store && appsmith.store.task?.length>0 ? `TASK ${appsmith.store.task}` : 'select a bar segment to view log entries for each Task'}}", + key: "oqp9xeolbr", + isDeprecated: false, + rightColumn: 57, + textAlign: "CENTER", + widgetId: "d7cjjtd9xc", + isVisible: true, + fontStyle: "ITALIC", + textColor: + "{{'task' in appsmith.store && appsmith.store.task?.length>0 ? 'grey' :'#ff5858'}}", + version: 1, + parentId: "demz6wbjrc", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + fontSize: "1rem", + }, + { + boxShadow: "none", + widgetName: "IconButton9", + onClick: "{{storeValue('task',undefined,false)}}", + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + dynamicPropertyPathList: [ + { + key: "onClick", + }, + ], + displayName: "Icon button", + iconSVG: + "/static/media/icon.1a0c634ac75f9fa6b6ae7a8df882a3ba.svg", + searchTags: ["click", "submit"], + topRow: 25, + bottomRow: 29, + parentRowSpace: 10, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 6.21875, + dynamicTriggerPathList: [ + { + key: "onClick", + }, + ], + leftColumn: 59, + dynamicBindingPathList: [ + { + key: "buttonColor", + }, + { + key: "borderRadius", + }, + ], + isDisabled: false, + key: "6493kijvjm", + isDeprecated: false, + rightColumn: 63, + iconName: "reset", + widgetId: "v5sz0wjggu", + isVisible: true, + version: 1, + parentId: "demz6wbjrc", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + buttonVariant: "PRIMARY", + }, + ], + key: "tgc855brd3", + isDeprecated: false, + tabName: "Report", + rightColumn: 418, + detachFromLayout: true, + widgetId: "demz6wbjrc", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "5i1ijofu5u", + renderMode: "CANVAS", + isLoading: false, + borderRadius: + "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + ], + key: "dmj9a5cird", + labelTextSize: "0.875rem", + rightColumn: 64, + widgetId: "5i1ijofu5u", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + defaultTab: "{{appsmith.store.default_tab }}", + onTabSelected: "{{storeValue('default_tab','')}}", + shouldShowTabs: true, + tabsObj: { + tab0uectdsv5x: { + id: "tab0uectdsv5x", + index: 0, + label: "Report", + widgetId: "demz6wbjrc", + isVisible: true, + isDuplicateLabel: false, + }, + tab2: { + label: "Employees", + id: "tab2", + widgetId: "5nj3rw1joi", + isVisible: true, + index: 1, + isDuplicateLabel: false, + }, + tab1: { + label: "Time Log", + id: "tab1", + widgetId: "z05jlsrkmt", + isVisible: true, + index: 2, + isDuplicateLabel: false, + }, + }, + isVisible: true, + version: 3, + parentId: "cmd4xuwm4c", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + { + boxShadow: "none", + widgetName: "Text5", + dynamicPropertyPathList: [ + { + key: "fontSize", + }, + ], + displayName: "Text", + iconSVG: "/static/media/icon.97c59b52.svg", + topRow: 0, + bottomRow: 5, + parentRowSpace: 10, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + parentColumnSpace: 6.53125, + dynamicTriggerPathList: [], + fontFamily: "System Default", + leftColumn: 3, + dynamicBindingPathList: [ + { + key: "text", + }, + ], + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "Last Updated: {{appsmith.store?.updated_at || moment().format('LLL')}}", + key: "sm2eopm278", + labelTextSize: "0.875rem", + rightColumn: 52, + textAlign: "LEFT", + widgetId: "u1jlz3uo52", + isVisible: true, + fontStyle: "", + textColor: "#716e6e", + version: 1, + parentId: "cmd4xuwm4c", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "0.75rem", + }, + { + boxShadow: "none", + widgetName: "IconButton7", + onClick: + "{{getUsers.run(() => getTimeLogs.run(), () => {}); \ngetAllTimeLogs.run();\nstoreValue('updated_at',moment().format('LLL'))}}", + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + dynamicPropertyPathList: [ + { + key: "onClick", + }, + { + key: "borderRadius", + }, + ], + displayName: "Icon button", + iconSVG: "/static/media/icon.1a0c634a.svg", + topRow: 0, + bottomRow: 5, + parentRowSpace: 10, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + parentColumnSpace: 6.53125, + dynamicTriggerPathList: [ + { + key: "onClick", + }, + ], + leftColumn: 54, + dynamicBindingPathList: [ + { + key: "buttonColor", + }, + ], + isDisabled: false, + key: "iifq91zxtp", + labelTextSize: "0.875rem", + rightColumn: 61, + iconName: "refresh", + widgetId: "smr6ubs5fn", + isVisible: true, + version: 1, + parentId: "cmd4xuwm4c", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0.575rem", + buttonVariant: "TERTIARY", + }, + ], + key: "53ftpwo2aq", + labelTextSize: "0.875rem", + rightColumn: 164.25, + detachFromLayout: true, + widgetId: "cmd4xuwm4c", + containerStyle: "none", + isVisible: true, + version: 1, + parentId: "gpxgpyyask", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + ], + borderWidth: "0", + key: "a4gmk81297", + labelTextSize: "0.875rem", + backgroundColor: "#FFFFFF", + rightColumn: 64, + widgetId: "gpxgpyyask", + containerStyle: "card", + isVisible: true, + version: 1, + parentId: "0", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", + }, + { + boxShadow: "none", + widgetName: "Modal1", + isCanvas: true, + dynamicPropertyPathList: [ + { + key: "borderRadius", + }, + ], + displayName: "Modal", + iconSVG: "/static/media/icon.4975978e.svg", + topRow: 0, + bottomRow: 0, + parentRowSpace: 1, + type: "MODAL_WIDGET", + hideCard: false, + shouldScrollContents: true, + animateLoading: true, + parentColumnSpace: 1, + dynamicTriggerPathList: [ + { + key: "onClose", + }, + ], + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "Canvas8", + displayName: "Canvas", + topRow: 0, + bottomRow: 310, + parentRowSpace: 1, + type: "CANVAS_WIDGET", + canExtend: true, + hideCard: true, + shouldScrollContents: false, + minHeight: 284, + parentColumnSpace: 1, + leftColumn: 0, + dynamicBindingPathList: [], + children: [ + { + boxShadow: "none", + widgetName: "IconButton6", + onClick: "{{closeModal('Modal1')}}", + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + displayName: "Icon button", + iconSVG: "/static/media/icon.1a0c634a.svg", + topRow: 1, + bottomRow: 6, + type: "ICON_BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + dynamicTriggerPathList: [], + leftColumn: 55, + dynamicBindingPathList: [ + { + key: "buttonColor", + }, + ], + iconSize: 24, + isDisabled: false, + key: "n2rpp1efil", + labelTextSize: "0.875rem", + rightColumn: 62, + iconName: "cross", + widgetId: "6ckbxk9taj", + isVisible: true, + version: 1, + parentId: "jforpydvyp", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0.375rem", + buttonVariant: "PRIMARY", + }, + { + boxShadow: "none", + widgetName: "Text6", + dynamicPropertyPathList: [ + { + key: "fontSize", + }, + ], + displayName: "Text", + iconSVG: "/static/media/icon.97c59b52.svg", + topRow: 1, + bottomRow: 6, + type: "TEXT_WIDGET", + hideCard: false, + animateLoading: true, + overflow: "NONE", + dynamicTriggerPathList: [], + fontFamily: "System Default", + leftColumn: 2, + dynamicBindingPathList: [ + { + key: "textColor", + }, + ], + shouldTruncate: false, + truncateButtonColor: "#FFC13D", + text: "Start New Task", + key: "xdyuhi8ryb", + labelTextSize: "0.875rem", + rightColumn: 51, + textAlign: "LEFT", + widgetId: "qv4c77718j", + isVisible: true, + fontStyle: "BOLD", + textColor: "{{appsmith.theme.colors.primaryColor}}", + version: 1, + parentId: "jforpydvyp", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + fontSize: "1.5rem", + }, + { + boxShadow: "none", + widgetName: "Button2", + onClick: "{{JSObject1.saveTimeLog()}}", + buttonColor: "{{appsmith.theme.colors.primaryColor}}", + dynamicPropertyPathList: [ + { + key: "borderRadius", + }, + { + key: "isDisabled", + }, + ], + displayName: "Button", + iconSVG: "/static/media/icon.cca02633.svg", + topRow: 18, + bottomRow: 23, + type: "BUTTON_WIDGET", + hideCard: false, + animateLoading: true, + dynamicTriggerPathList: [ + { + key: "onClick", + }, + ], + leftColumn: 37, + dynamicBindingPathList: [ + { + key: "buttonColor", + }, + { + key: "isDisabled", + }, + ], + text: "Clock In", + isDisabled: "{{!Select1.selectedOptionValue}}", + key: "4u2z3j5asa", + labelTextSize: "0.875rem", + rightColumn: 62, + isDefaultClickDisabled: true, + widgetId: "bxshlknohf", + buttonStyle: "PRIMARY_BUTTON", + isVisible: true, + recaptchaType: "V3", + version: 1, + parentId: "jforpydvyp", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0.700rem", + buttonVariant: "PRIMARY", + iconAlign: "left", + placement: "CENTER", + }, + { + boxShadow: "none", + widgetName: "Select1", + isFilterable: true, + displayName: "Select", + iconSVG: "/static/media/icon.bd99caba.svg", + labelText: "Task", + topRow: 13, + bottomRow: 17, + parentRowSpace: 10, + labelWidth: "14", + type: "SELECT_WIDGET", + serverSideFiltering: false, + hideCard: false, + defaultOptionValue: "", + animateLoading: true, + parentColumnSpace: 6.4921875, + dynamicTriggerPathList: [], + leftColumn: 2, + dynamicBindingPathList: [ + { + key: "accentColor", + }, + ], + labelPosition: "Left", + options: + '[\n {\n "label": "Task1",\n "value": "1"\n },\n {\n "label": "Task2",\n "value": "2"\n },\n {\n "label": "Task3",\n "value": "3"\n },\n {\n "label": "Task4",\n "value": "4"\n },\n {\n "label": "Task5",\n "value": "5"\n }\n]', + labelStyle: "BOLD", + placeholderText: "Select option", + isDisabled: false, + key: "1yzaq5vf81", + labelTextSize: "1rem", + isRequired: true, + rightColumn: 62, + widgetId: "3bcb22pmkm", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + isVisible: true, + version: 1, + parentId: "jforpydvyp", + renderMode: "CANVAS", + isLoading: false, + labelAlignment: "left", + borderRadius: "0.375rem", + }, + { + boxShadow: "none", + widgetName: "Input1", + displayName: "Input", + iconSVG: "/static/media/icon.9f505595.svg", + topRow: 8, + bottomRow: 12, + parentRowSpace: 10, + labelWidth: "14", + autoFocus: false, + type: "INPUT_WIDGET_V2", + hideCard: false, + animateLoading: true, + parentColumnSpace: 6.4921875, + dynamicTriggerPathList: [], + resetOnSubmit: true, + leftColumn: 2, + dynamicBindingPathList: [ + { + key: "defaultText", + }, + { + key: "accentColor", + }, + ], + labelPosition: "Left", + labelStyle: "BOLD", + labelTextColor: "#231f20", + inputType: "TEXT", + isDisabled: true, + key: "b2fum05x5g", + labelTextSize: "1rem", + isRequired: true, + rightColumn: 62, + widgetId: "2ryk9b0he3", + accentColor: "{{appsmith.theme.colors.primaryColor}}", + isVisible: true, + label: "Employee", + version: 2, + parentId: "jforpydvyp", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0.375rem", + iconAlign: "left", + defaultText: "{{lst_user.selectedItem.name}}", + }, + ], + isDisabled: false, + key: "6i5snc4omt", + labelTextSize: "0.875rem", + rightColumn: 0, + detachFromLayout: true, + widgetId: "jforpydvyp", + isVisible: true, + version: 1, + parentId: "ccfshnc4ef", + renderMode: "CANVAS", + isLoading: false, + borderRadius: "0px", + }, + ], + key: "tb04uy1los", + height: 284, + labelTextSize: "0.875rem", + rightColumn: 0, + detachFromLayout: true, + widgetId: "ccfshnc4ef", + canOutsideClickClose: true, + canEscapeKeyClose: true, + version: 2, + parentId: "0", + renderMode: "CANVAS", + isLoading: false, + onClose: '{{resetWidget("Modal1",true)}}', + borderRadius: "1.100rem", + width: 427.5, + }, + ], +}; diff --git a/app/client/packages/dsl/src/migrate/types.ts b/app/client/packages/dsl/src/migrate/types.ts new file mode 100644 index 0000000000..650c30a059 --- /dev/null +++ b/app/client/packages/dsl/src/migrate/types.ts @@ -0,0 +1,9 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +export type WidgetProps = Record; + +export type DSLWidget = WidgetProps & { children?: DSLWidget[] }; + +// mocking the below aliases as any, because dont want to maintaing redundant types +export type ColumnProperties = any; + +export type ColumnPropertiesV2 = any; diff --git a/app/client/packages/dsl/src/migrate/utils.ts b/app/client/packages/dsl/src/migrate/utils.ts new file mode 100644 index 0000000000..916edb08ac --- /dev/null +++ b/app/client/packages/dsl/src/migrate/utils.ts @@ -0,0 +1,148 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import generate from "nanoid/generate"; +import type { DSLWidget, WidgetProps } from "./types"; +import { isString } from "lodash"; + +export const DATA_BIND_REGEX_GLOBAL = /{{([\s\S]*?)}}/g; +export const DATA_BIND_REGEX = /{{([\s\S]*?)}}/; + +const ALPHANUMERIC = "1234567890abcdefghijklmnopqrstuvwxyz"; +export const generateReactKey = ({ + prefix = "", +}: { prefix?: string } = {}): string => { + return prefix + generate(ALPHANUMERIC, 10); +}; + +export const removeSpecialChars = (value: string, limit?: number) => { + const separatorRegex = /\W+/; + return value + .split(separatorRegex) + .join("_") + .slice(0, limit || 30); +}; + +export const isDynamicValue = (value: string): boolean => + DATA_BIND_REGEX.test(value); + +// ### JS Action ### + +type DataTreeEntity = any; +type JSActionEntity = any; + +function getDynamicStringSegments(dynamicString: string): string[] { + let stringSegments = []; + const indexOfDoubleParanStart = dynamicString.indexOf("{{"); + if (indexOfDoubleParanStart === -1) { + return [dynamicString]; + } + //{{}}{{}}} + const firstString = dynamicString.substring(0, indexOfDoubleParanStart); + firstString && stringSegments.push(firstString); + let rest = dynamicString.substring( + indexOfDoubleParanStart, + dynamicString.length, + ); + //{{}}{{}}} + let sum = 0; + for (let i = 0; i <= rest.length - 1; i++) { + const char = rest[i]; + const prevChar = rest[i - 1]; + + if (char === "{") { + sum++; + } else if (char === "}") { + sum--; + if (prevChar === "}" && sum === 0) { + stringSegments.push(rest.substring(0, i + 1)); + rest = rest.substring(i + 1, rest.length); + if (rest) { + stringSegments = stringSegments.concat( + getDynamicStringSegments(rest), + ); + break; + } + } + } + } + if (sum !== 0 && dynamicString !== "") { + return [dynamicString]; + } + return stringSegments; +} + +function isJSAction(entity: DataTreeEntity): entity is JSActionEntity { + return ( + typeof entity === "object" && + "ENTITY_TYPE" in entity && + entity.ENTITY_TYPE === "JSACTION" + ); +} + +//{{}}{{}}} +const getDynamicBindings = ( + dynamicString: string, + entity?: DataTreeEntity, +): { stringSegments: string[]; jsSnippets: string[] } => { + // Protect against bad string parse + if (!dynamicString || !isString(dynamicString)) { + return { stringSegments: [], jsSnippets: [] }; + } + const sanitisedString = dynamicString.trim(); + let stringSegments, paths: any; + if (entity && isJSAction(entity)) { + stringSegments = [sanitisedString]; + paths = [sanitisedString]; + } else { + // Get the {{binding}} bound values + stringSegments = getDynamicStringSegments(sanitisedString); + // Get the "binding" path values + paths = stringSegments.map((segment) => { + const length = segment.length; + const matches = isDynamicValue(segment); + if (matches) { + return segment.substring(2, length - 2); + } + return ""; + }); + } + return { stringSegments: stringSegments, jsSnippets: paths }; +}; + +export const stringToJS = (string: string): string => { + const { jsSnippets, stringSegments } = getDynamicBindings(string); + const js = stringSegments + .map((segment, index) => { + if (jsSnippets[index] && jsSnippets[index].length > 0) { + return jsSnippets[index]; + } else { + return `\`${segment}\``; + } + }) + .join(" + "); + return js; +}; + +// ### END JS Action ### + +// ### Migration helpers ### +/* + * Function to traverse the DSL tree and execute the given migration function for each widget present in + * the tree. + */ +export const traverseDSLAndMigrate = ( + DSL: DSLWidget, + migrateFn: (widget: WidgetProps) => void, +) => { + DSL.children = DSL.children?.map((widget: DSLWidget) => { + migrateFn(widget); + + if (widget.children && widget.children.length > 0) { + widget = traverseDSLAndMigrate(widget, migrateFn); + } + + return widget; + }); + + return DSL; +}; +// ### END Migration helpers ### diff --git a/app/client/packages/dsl/src/constants.ts b/app/client/packages/dsl/src/transform/constants.ts similarity index 100% rename from app/client/packages/dsl/src/constants.ts rename to app/client/packages/dsl/src/transform/constants.ts diff --git a/app/client/packages/dsl/src/index.test.ts b/app/client/packages/dsl/src/transform/index.test.ts similarity index 98% rename from app/client/packages/dsl/src/index.test.ts rename to app/client/packages/dsl/src/transform/index.test.ts index eaf5d9178b..4137da89ec 100644 --- a/app/client/packages/dsl/src/index.test.ts +++ b/app/client/packages/dsl/src/transform/index.test.ts @@ -1,4 +1,4 @@ -import { nestDSL, flattenDSL } from "./DSL"; +import { nestDSL, flattenDSL } from "./lib"; import { ROOT_CONTAINER_WIDGET_ID } from "./constants"; describe("Test #1 - Check export types & constant values", () => { diff --git a/app/client/packages/dsl/src/transform/index.ts b/app/client/packages/dsl/src/transform/index.ts new file mode 100644 index 0000000000..c071321feb --- /dev/null +++ b/app/client/packages/dsl/src/transform/index.ts @@ -0,0 +1,10 @@ +export { nestDSL, flattenDSL } from "./lib"; +export { ROOT_CONTAINER_WIDGET_ID } from "./constants"; + +export type { + NestedDSLWidget, + NestedDSL, + FlattenedDSLWidget, + FlattenedDSL, + FlattenedDSLEntities, +} from "./types"; diff --git a/app/client/packages/dsl/src/DSL.ts b/app/client/packages/dsl/src/transform/lib.ts similarity index 71% rename from app/client/packages/dsl/src/DSL.ts rename to app/client/packages/dsl/src/transform/lib.ts index e40579c8d9..a2fb6c2a26 100644 --- a/app/client/packages/dsl/src/DSL.ts +++ b/app/client/packages/dsl/src/transform/lib.ts @@ -1,18 +1,7 @@ import { ROOT_CONTAINER_WIDGET_ID } from "./constants"; import type { NormalizedSchema } from "normalizr"; import { schema, normalize, denormalize } from "normalizr"; - -export type NestedDSLWidget = W & { children?: NestedDSLWidget[] }; -export type NestedDSL = NestedDSLWidget; - -export type FlattenedDSLWidget = W & { children?: string[] }; -export interface FlattenedDSL { - [widgetId: string]: FlattenedDSLWidget; -} - -export interface FlattenedDSLEntities { - canvasWidgets: FlattenedDSL; -} +import type { FlattenedDSL, FlattenedDSLEntities, NestedDSL } from "./types"; // Schema by widgetId const SCHEMA_BY_ID = new schema.Entity( diff --git a/app/client/packages/dsl/src/transform/types.ts b/app/client/packages/dsl/src/transform/types.ts new file mode 100644 index 0000000000..2c76b6a3ea --- /dev/null +++ b/app/client/packages/dsl/src/transform/types.ts @@ -0,0 +1,11 @@ +export type NestedDSLWidget = W & { children?: NestedDSLWidget[] }; +export type NestedDSL = NestedDSLWidget; + +export type FlattenedDSLWidget = W & { children?: string[] }; +export interface FlattenedDSL { + [widgetId: string]: FlattenedDSLWidget; +} + +export interface FlattenedDSLEntities { + canvasWidgets: FlattenedDSL; +} diff --git a/app/client/packages/rts/src/controllers/Dsl/DslController.ts b/app/client/packages/rts/src/controllers/Dsl/DslController.ts new file mode 100644 index 0000000000..d108a2c0bd --- /dev/null +++ b/app/client/packages/rts/src/controllers/Dsl/DslController.ts @@ -0,0 +1,37 @@ +import type { Response, Request } from "express"; +import BaseController from "@controllers/BaseController"; +import { latestDSLVersion, migrateDSLToLatest } from "@services/DslService"; +import { StatusCodes } from "http-status-codes"; + +export default class DSLController extends BaseController { + constructor() { + super(); + } + + migrateDSL(req: Request, res: Response) { + try { + const latestDSL = migrateDSLToLatest(req.body); + super.sendResponse(res, latestDSL); + } catch (err) { + return super.sendError( + res, + super.serverErrorMessaage, + [err.message], + StatusCodes.INTERNAL_SERVER_ERROR, + ); + } + } + + getLatestDSLVersion(req: Request, res: Response) { + try { + super.sendResponse(res, { version: latestDSLVersion }); + } catch (err) { + return super.sendError( + res, + super.serverErrorMessaage, + [err.message], + StatusCodes.INTERNAL_SERVER_ERROR, + ); + } + } +} diff --git a/app/client/packages/rts/src/routes/dsl_routes.ts b/app/client/packages/rts/src/routes/dsl_routes.ts new file mode 100644 index 0000000000..ada447ac97 --- /dev/null +++ b/app/client/packages/rts/src/routes/dsl_routes.ts @@ -0,0 +1,17 @@ +import DSLController from "@controllers/Dsl/DslController"; +import { Validator } from "@middlewares/Validator"; +import express from "express"; + +const router = express.Router(); +const dslController = new DSLController(); +const validator = new Validator(); + +router.get( + "/version", + validator.validateRequest, + dslController.getLatestDSLVersion, +); + +router.post("/migrate", validator.validateRequest, dslController.migrateDSL); + +export default router; diff --git a/app/client/packages/rts/src/server.ts b/app/client/packages/rts/src/server.ts index 0674d9b81f..af16420746 100644 --- a/app/client/packages/rts/src/server.ts +++ b/app/client/packages/rts/src/server.ts @@ -8,6 +8,7 @@ import { initializeSockets } from "./sockets"; // routes import ast_routes from "./routes/ast_routes"; +import dsl_routes from "./routes/dsl_routes"; import health_check_routes from "./routes/health_check_routes"; const RTS_BASE_PATH = "/rts"; @@ -40,6 +41,7 @@ initializeSockets(io); app.use(express.json({ limit: "5mb" })); app.use(`${RTS_BASE_API_PATH}/ast`, ast_routes); +app.use(`${RTS_BASE_API_PATH}/dsl`, dsl_routes); app.use(`${RTS_BASE_API_PATH}`, health_check_routes); server.headersTimeout = 61000; diff --git a/app/client/packages/rts/src/services/DslService.ts b/app/client/packages/rts/src/services/DslService.ts new file mode 100644 index 0000000000..c58e6efc2b --- /dev/null +++ b/app/client/packages/rts/src/services/DslService.ts @@ -0,0 +1,8 @@ +import { LATEST_DSL_VERSION, migrateDSL } from "@shared/dsl"; + +export function migrateDSLToLatest(currentDsl) { + const latestDSL = migrateDSL(currentDsl); + return latestDSL; +} + +export const latestDSLVersion = LATEST_DSL_VERSION; diff --git a/app/client/packages/rts/tsconfig.json b/app/client/packages/rts/tsconfig.json index f40c087a77..3db9eb4c56 100644 --- a/app/client/packages/rts/tsconfig.json +++ b/app/client/packages/rts/tsconfig.json @@ -9,6 +9,7 @@ "allowJs": true, "baseUrl": ".", "skipLibCheck": true, + "resolveJsonModule": true, "paths": { "@constants/*": ["./src/constants/*"], "@services/*": ["./src/services/*"], diff --git a/app/client/src/api/PageApi.tsx b/app/client/src/api/PageApi.tsx index 6161b343cb..598434ccb6 100644 --- a/app/client/src/api/PageApi.tsx +++ b/app/client/src/api/PageApi.tsx @@ -17,6 +17,7 @@ export interface FetchPageRequest { id: string; isFirstLoad?: boolean; handleResponseLater?: boolean; + migrateDSL?: boolean; } export interface FetchPublishedPageRequest { @@ -201,7 +202,8 @@ class PageApi extends Api { static async fetchPage( pageRequest: FetchPageRequest, ): Promise> { - return Api.get(PageApi.url + "/" + pageRequest.id); + const params = { migrateDsl: pageRequest.migrateDSL }; + return Api.get(PageApi.url + "/" + pageRequest.id, undefined, { params }); } static savePage( diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index fc529f3716..58528e62e7 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -28,6 +28,8 @@ export const FEATURE_FLAG = { ab_show_templates_instead_of_blank_canvas_enabled: "ab_show_templates_instead_of_blank_canvas_enabled", release_app_sidebar_enabled: "release_app_sidebar_enabled", + release_server_dsl_migrations_enabled: + "release_server_dsl_migrations_enabled", license_git_branch_protection_enabled: "license_git_branch_protection_enabled", license_widget_rtl_support_enabled: "license_widget_rtl_support_enabled", @@ -72,6 +74,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { release_anvil_enabled: false, ab_show_templates_instead_of_blank_canvas_enabled: false, release_app_sidebar_enabled: false, + release_server_dsl_migrations_enabled: false, license_git_branch_protection_enabled: false, license_widget_rtl_support_enabled: false, release_custom_widgets_enabled: false, diff --git a/app/client/src/ce/sagas/JSActionSagas.ts b/app/client/src/ce/sagas/JSActionSagas.ts index a416494a80..ca2806387f 100644 --- a/app/client/src/ce/sagas/JSActionSagas.ts +++ b/app/client/src/ce/sagas/JSActionSagas.ts @@ -41,7 +41,11 @@ import { JS_ACTION_MOVE_SUCCESS, } from "@appsmith/constants/messages"; import { validateResponse } from "../../sagas/ErrorSagas"; -import type { FetchPageResponse, PageLayout } from "api/PageApi"; +import type { + FetchPageRequest, + FetchPageResponse, + PageLayout, +} from "api/PageApi"; import PageApi from "api/PageApi"; import { updateCanvasWithDSL } from "@appsmith/sagas/PageSagas"; import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; @@ -58,6 +62,7 @@ import { checkAndLogErrorsIfCyclicDependency } from "../../sagas/helper"; import { toast } from "design-system"; import { updateAndSaveLayout } from "actions/pageActions"; import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer"; +import { getIsServerDSLMigrationsEnabled } from "selectors/pageSelectors"; import { getWidgets } from "../../sagas/selectors"; export function* fetchJSCollectionsSaga( @@ -343,9 +348,12 @@ export function* refactorJSObjectName( oldName: string, newName: string, ) { - const pageResponse: FetchPageResponse = yield call(PageApi.fetchPage, { - id: pageId, - }); + const isServerDSLMigrationsEnabled = select(getIsServerDSLMigrationsEnabled); + const params: FetchPageRequest = { id: pageId }; + if (isServerDSLMigrationsEnabled) { + params.migrateDSL = true; + } + const pageResponse: FetchPageResponse = yield call(PageApi.fetchPage, params); // check if page request is successful const isPageRequestSuccessful: boolean = yield validateResponse(pageResponse); if (isPageRequestSuccessful) { diff --git a/app/client/src/ce/sagas/PageSagas.tsx b/app/client/src/ce/sagas/PageSagas.tsx index 468722ccd3..4011c9c5ff 100644 --- a/app/client/src/ce/sagas/PageSagas.tsx +++ b/app/client/src/ce/sagas/PageSagas.tsx @@ -63,7 +63,6 @@ import { all, call, delay, put, select } from "redux-saga/effects"; import history from "utils/history"; import { isNameValid } from "utils/helpers"; import { extractCurrentDSL } from "utils/WidgetPropsUtils"; -import { checkIfMigrationIsNeeded } from "utils/DSLMigrations"; import { getAllPageIds, getDefaultPageId, @@ -139,16 +138,25 @@ import { getCurrentWorkspaceId } from "@appsmith/selectors/workspaceSelectors"; import { getInstanceId } from "@appsmith/selectors/tenantSelectors"; import { MAIN_CONTAINER_WIDGET_ID } from "constants/WidgetConstants"; import type { WidgetProps } from "widgets/BaseWidget"; -import { nestDSL, flattenDSL } from "@shared/dsl"; +import { nestDSL, flattenDSL, LATEST_DSL_VERSION } from "@shared/dsl"; import { fetchSnapshotDetailsAction } from "actions/autoLayoutActions"; import { selectFeatureFlags } from "@appsmith/selectors/featureFlagsSelectors"; -import type { FeatureFlags } from "@appsmith/entities/FeatureFlag"; import { isGACEnabled } from "@appsmith/utils/planHelpers"; import { getHasManagePagePermission } from "@appsmith/utils/BusinessFeatures/permissionPageHelpers"; import { getLayoutSystemType } from "selectors/layoutSystemSelectors"; import { LayoutSystemTypes } from "layoutSystems/types"; import { getLayoutSystemDSLTransformer } from "layoutSystems/common/utils/LayoutSystemDSLTransformer"; import type { DSLWidget } from "WidgetProvider/constants"; +import type { FeatureFlags } from "@appsmith/entities/FeatureFlag"; +import { getIsServerDSLMigrationsEnabled } from "selectors/pageSelectors"; + +export const checkIfMigrationIsNeeded = ( + fetchPageResponse?: FetchPageResponse, +) => { + const currentDSL = fetchPageResponse?.data.layouts[0].dsl; + if (!currentDSL) return false; + return currentDSL.version !== LATEST_DSL_VERSION; +}; export const WidgetTypes = WidgetFactory.widgetTypes; @@ -261,10 +269,12 @@ export function* refreshTheApp() { export const getCanvasWidgetsPayload = ( pageResponse: FetchPageResponse, dslTransformer?: (dsl: DSLWidget) => DSLWidget, + migrateDSLLocally: boolean = true, ): UpdateCanvasPayload => { const extractedDSL = extractCurrentDSL({ dslTransformer, response: pageResponse, + migrateDSLLocally, }).dsl; const flattenedDSL = flattenDSL(extractedDSL); const pageWidgetId = MAIN_CONTAINER_WIDGET_ID; @@ -312,9 +322,13 @@ export function* handleFetchedPage({ // Wait for widget config to be loaded before we can generate the canvas payload yield call(waitForWidgetConfigBuild); // Get Canvas payload + const isServerDSLMigrationsEnabled: boolean = yield select( + getIsServerDSLMigrationsEnabled, + ); const canvasWidgetsPayload = getCanvasWidgetsPayload( fetchPageResponse, dslTransformer, + !isServerDSLMigrationsEnabled, ); // Update the canvas yield put(initCanvasLayout(canvasWidgetsPayload)); @@ -365,9 +379,18 @@ export function* fetchPageSaga( PerformanceTransactionName.FETCH_PAGE_API, { pageId: id }, ); - const fetchPageResponse: FetchPageResponse = yield call(PageApi.fetchPage, { - id, - }); + + const isServerDSLMigrationsEnabled = select( + getIsServerDSLMigrationsEnabled, + ); + const params: FetchPageRequest = { id }; + if (isServerDSLMigrationsEnabled) { + params.migrateDSL = true; + } + const fetchPageResponse: FetchPageResponse = yield call( + PageApi.fetchPage, + params, + ); yield handleFetchedPage({ fetchPageResponse, @@ -796,11 +819,18 @@ export function* createPageSaga( // Add this to the page DSLs for entity explorer // The dslTransformer may not be necessary for the entity explorer // However, we still transform for consistency. + const isServerDSLMigrationsEnabled: boolean = yield select( + getIsServerDSLMigrationsEnabled, + ); yield put({ type: ReduxActionTypes.FETCH_PAGE_DSL_SUCCESS, payload: { pageId: response.data.id, - dsl: extractCurrentDSL({ dslTransformer, response }).dsl, + dsl: extractCurrentDSL({ + dslTransformer, + response, + migrateDSLLocally: !isServerDSLMigrationsEnabled, + }).dsl, layoutId: response.data.layouts[0].id, }, }); @@ -913,7 +943,13 @@ export function* clonePageSaga( // We're not sending the `dslTransformer` to the `extractCurrentDSL` function // as this is a clone operation, and any layout system specific // updates to the DSL would have already been performed in the original page - const { dsl, layoutId } = extractCurrentDSL({ response }); + const isServerDSLMigrationsEnabled: boolean = yield select( + getIsServerDSLMigrationsEnabled, + ); + const { dsl, layoutId } = extractCurrentDSL({ + response, + migrateDSLLocally: !isServerDSLMigrationsEnabled, + }); yield put({ type: ReduxActionTypes.FETCH_PAGE_DSL_SUCCESS, payload: { @@ -1162,9 +1198,17 @@ export function* fetchPageDSLSaga(pageId: string) { layoutSystemType, mainCanvasProps.width, ); - const fetchPageResponse: FetchPageResponse = yield call(PageApi.fetchPage, { - id: pageId, - }); + const isServerDSLMigrationsEnabled = select( + getIsServerDSLMigrationsEnabled, + ); + const params: FetchPageRequest = { id: pageId }; + if (isServerDSLMigrationsEnabled) { + params.migrateDSL = true; + } + const fetchPageResponse: FetchPageResponse = yield call( + PageApi.fetchPage, + params, + ); const isValidResponse: boolean = yield validateResponse(fetchPageResponse); if (isValidResponse) { // Wait for the Widget config to be loaded before we can migrate the DSL @@ -1179,6 +1223,7 @@ export function* fetchPageDSLSaga(pageId: string) { const { dsl, layoutId } = extractCurrentDSL({ dslTransformer, response: fetchPageResponse, + migrateDSLLocally: !isServerDSLMigrationsEnabled, }); return { pageId, diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts index 7d7703942f..fe2c85bec6 100644 --- a/app/client/src/sagas/ActionSagas.ts +++ b/app/client/src/sagas/ActionSagas.ts @@ -21,7 +21,7 @@ import type { Datasource, DatasourceStructure } from "entities/Datasource"; import type { ActionCreateUpdateResponse } from "api/ActionAPI"; import ActionAPI from "api/ActionAPI"; import type { ApiResponse } from "api/ApiResponses"; -import type { FetchPageResponse } from "api/PageApi"; +import type { FetchPageRequest, FetchPageResponse } from "api/PageApi"; import PageApi from "api/PageApi"; import { updateCanvasWithDSL } from "@appsmith/sagas/PageSagas"; import type { @@ -129,6 +129,7 @@ import { getDefaultTemplateActionConfig } from "utils/editorContextUtils"; import { sendAnalyticsEventSaga } from "./AnalyticsSaga"; import { EditorModes } from "components/editorComponents/CodeEditor/EditorConfig"; import { updateActionAPICall } from "@appsmith/sagas/ApiCallerSagas"; +import { getIsServerDSLMigrationsEnabled } from "selectors/pageSelectors"; export function* createDefaultActionPayloadWithPluginDefaults( props: CreateActionDefaultsParams, @@ -715,9 +716,13 @@ export function* refactorActionName( PerformanceTransactionName.REFACTOR_ACTION_NAME, { actionId: id }, ); - const pageResponse: FetchPageResponse = yield call(PageApi.fetchPage, { - id: pageId, - }); + + const isServerDSLMigrationsEnabled = select(getIsServerDSLMigrationsEnabled); + const params: FetchPageRequest = { id: pageId }; + if (isServerDSLMigrationsEnabled) { + params.migrateDSL = true; + } + const pageResponse: FetchPageResponse = yield call(PageApi.fetchPage, params); // check if page request is successful const isPageRequestSuccessful: boolean = yield validateResponse(pageResponse); if (isPageRequestSuccessful) { diff --git a/app/client/src/sagas/JSPaneSagas.ts b/app/client/src/sagas/JSPaneSagas.ts index 3df3ce686e..33b4a45e35 100644 --- a/app/client/src/sagas/JSPaneSagas.ts +++ b/app/client/src/sagas/JSPaneSagas.ts @@ -70,7 +70,7 @@ import { validateResponse } from "./ErrorSagas"; import AppsmithConsole from "utils/AppsmithConsole"; import { ENTITY_TYPE, PLATFORM_ERROR } from "entities/AppsmithConsole"; import LOG_TYPE from "entities/AppsmithConsole/logtype"; -import type { FetchPageResponse } from "api/PageApi"; +import type { FetchPageRequest, FetchPageResponse } from "api/PageApi"; import PageApi from "api/PageApi"; import { updateCanvasWithDSL } from "@appsmith/sagas/PageSagas"; import { set } from "lodash"; @@ -90,6 +90,7 @@ import { toast } from "design-system"; import { setDebuggerSelectedTab, showDebugger } from "actions/debuggerActions"; import { DEBUGGER_TAB_KEYS } from "components/editorComponents/Debugger/helpers"; import { getDebuggerSelectedTab } from "selectors/debuggerSelectors"; +import { getIsServerDSLMigrationsEnabled } from "selectors/pageSelectors"; const CONSOLE_DOT_LOG_INVOCATION_REGEX = /console.log[.call | .apply]*\s*\(.*?\)/gm; @@ -549,9 +550,12 @@ function* handleRefactorJSActionNameSaga( actionCollection: JSCollection; }>, ) { - const pageResponse: FetchPageResponse = yield call(PageApi.fetchPage, { - id: data.payload.refactorAction.pageId, - }); + const isServerDSLMigrationsEnabled = select(getIsServerDSLMigrationsEnabled); + const params: FetchPageRequest = { id: data.payload.refactorAction.pageId }; + if (isServerDSLMigrationsEnabled) { + params.migrateDSL = true; + } + const pageResponse: FetchPageResponse = yield call(PageApi.fetchPage, params); const isPageRequestSuccessful: boolean = yield validateResponse(pageResponse); if (isPageRequestSuccessful) { // get the layoutId from the page response diff --git a/app/client/src/selectors/pageSelectors.tsx b/app/client/src/selectors/pageSelectors.tsx new file mode 100644 index 0000000000..59a1b3549e --- /dev/null +++ b/app/client/src/selectors/pageSelectors.tsx @@ -0,0 +1,7 @@ +import { selectFeatureFlags } from "@appsmith/selectors/featureFlagsSelectors"; +import { createSelector } from "reselect"; + +export const getIsServerDSLMigrationsEnabled = createSelector( + selectFeatureFlags, + (flags) => !!flags?.release_server_dsl_migrations_enabled, +); diff --git a/app/client/src/utils/DSLMigrations.ts b/app/client/src/utils/DSLMigrations.ts index 0d46bf6d3f..83b68944ce 100644 --- a/app/client/src/utils/DSLMigrations.ts +++ b/app/client/src/utils/DSLMigrations.ts @@ -1,1678 +1,1687 @@ -import { generateReactKey } from "./generators"; -import { - GridDefaults, - LATEST_PAGE_VERSION, - MAIN_CONTAINER_WIDGET_ID, -} from "constants/WidgetConstants"; -import { nextAvailableRowInContainer } from "entities/Widget/utils"; -import { get, has, isEmpty, isString, omit, set } from "lodash"; -import * as Sentry from "@sentry/react"; -import type { ChartDataPoint } from "widgets/ChartWidget/constants"; -import log from "loglevel"; -import { migrateIncorrectDynamicBindingPathLists } from "./migrations/IncorrectDynamicBindingPathLists"; -import { - migrateTablePrimaryColumnsBindings, - migrateTableWidgetHeaderVisibilityProperties, - migrateTableWidgetParentRowSpaceProperty, - tableWidgetPropertyPaneMigrations, - migrateTablePrimaryColumnsComputedValue, - migrateTableWidgetDelimiterProperties, - migrateTableWidgetSelectedRowBindings, - migrateTableSanitizeColumnKeys, - isSortableMigration, - migrateTableWidgetIconButtonVariant, - migrateTableWidgetV2Validation, - migrateTableWidgetV2ValidationBinding, - migrateMenuButtonDynamicItemsInsideTableWidget, - migrateTableWidgetV2SelectOption, - migrateColumnFreezeAttributes, - migrateTableSelectOptionAttributesForNewRow, - migrateBindingPrefixSuffixForInlineEditValidationControl, - migrateTableWidgetTableDataJsMode, - migrateTableServerSideFiltering, -} from "./migrations/TableWidget"; -import { - migrateTextStyleFromTextWidget, - migrateScrollTruncateProperties, -} from "./migrations/TextWidget"; -import { DATA_BIND_REGEX_GLOBAL } from "constants/BindingsConstants"; -import { theme } from "constants/DefaultTheme"; -import { getCanvasSnapRows } from "./WidgetPropsUtils"; -import type { FetchPageResponse } from "api/PageApi"; -import { GRID_DENSITY_MIGRATION_V1 } from "WidgetProvider/constants"; -// import defaultTemplate from "templates/default"; -import { renameKeyInObject } from "./helpers"; -import type { ColumnProperties } from "widgets/TableWidget/component/Constants"; -import { - migrateMenuButtonDynamicItems, - migrateMenuButtonWidgetButtonProperties, -} from "./migrations/MenuButtonWidget"; -import { ButtonStyleTypes, ButtonVariantTypes } from "components/constants"; -import { Colors } from "constants/Colors"; -import { - migrateModalIconButtonWidget, - migrateResizableModalWidgetProperties, -} from "./migrations/ModalWidget"; -import { migrateCheckboxGroupWidgetInlineProperty } from "./migrations/CheckboxGroupWidget"; -import { migrateMapWidgetIsClickedMarkerCentered } from "./migrations/MapWidget"; -import type { DSLWidget } from "WidgetProvider/constants"; -import { migrateRecaptchaType } from "./migrations/ButtonWidgetMigrations"; -import type { PrivateWidgets } from "@appsmith/entities/DataTree/types"; -import { - migrateChildStylesheetFromDynamicBindingPathList, - migrateStylingPropertiesForTheming, -} from "./migrations/ThemingMigrations"; - -import { - migratePhoneInputWidgetAllowFormatting, - migratePhoneInputWidgetDefaultDialCode, -} from "./migrations/PhoneInputWidgetMigrations"; -import { - migrateCurrencyInputWidgetDefaultCurrencyCode, - migrateInputWidgetShowStepArrows, -} from "./migrations/CurrencyInputWidgetMigrations"; -import { migrateRadioGroupAlignmentProperty } from "./migrations/RadioGroupWidget"; -import { migrateCheckboxSwitchProperty } from "./migrations/PropertyPaneMigrations"; -import { migrateChartWidgetReskinningData } from "./migrations/ChartWidgetReskinningMigrations"; -import { - MigrateSelectTypeWidgetDefaultValue, - migrateSelectWidgetAddSourceDataPropertyPathList, - migrateSelectWidgetOptionToSourceData, - migrateSelectWidgetSourceDataBindingPathList, -} from "./migrations/SelectWidget"; -import { migrateMapChartWidgetReskinningData } from "./migrations/MapChartReskinningMigrations"; - -import { migrateRateWidgetDisabledState } from "./migrations/RateWidgetMigrations"; -import { migrateCodeScannerLayout } from "./migrations/CodeScannerWidgetMigrations"; -import { migrateLabelPosition } from "./migrations/MigrateLabelPosition"; -import { - migrateInputWidgetsMultiLineInputType, - migrateListWidgetChildrenForAutoHeight, - migratePropertiesForDynamicHeight, -} from "./migrations/autoHeightMigrations"; - -import { - migrateChartWidgetLabelOrientationStaggerOption, - migrateAddShowHideDataPointLabels, - migrateDefaultValuesForCustomEChart, -} from "./migrations/ChartWidget"; -import { flattenDSL } from "@shared/dsl"; - /** - * adds logBlackList key for all list widget children - * - * @param currentDSL - * @returns + * ! DEPRECATION NOTICE + * This file is no longer used to manage migrations, please refer packages/dsl/migrate/migrations instead + * Do not remove these comments. As these are maintained for easier rollbacks. Will be removed later */ -export const addLogBlackListToAllListWidgetChildren = ( - currentDSL: DSLWidget, -) => { - currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { - if (children.type === "LIST_WIDGET") { - const widgets = get( - children, - "children.0.children.0.children.0.children", - ); - - widgets.map((widget: any, index: number) => { - const logBlackList: { [key: string]: boolean } = {}; - - Object.keys(widget).map((key) => { - logBlackList[key] = true; - }); - if (!widget.logBlackList) { - set( - children, - `children.0.children.0.children.0.children.${index}.logBlackList`, - logBlackList, - ); - } - }); - } - - return children; - }); - - return currentDSL; -}; - -/** - * adds 'privateWidgets' key for all list widgets - * - * @param currentDSL - * @returns - */ -export const addPrivateWidgetsToAllListWidgets = (currentDSL: DSLWidget) => { - currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { - if (child.type === "LIST_WIDGET") { - const privateWidgets: PrivateWidgets = {}; - Object.keys(child.template).forEach((entityName) => { - privateWidgets[entityName] = true; - }); - - if (!child.privateWidgets) { - set(child, `privateWidgets`, privateWidgets); - } - } - return child; - }); - - return currentDSL; -}; - -/** - * changes items -> listData - * - * @param currentDSL - * @returns - */ -export const migrateItemsToListDataInListWidget = (currentDSL: DSLWidget) => { - if (currentDSL.type === "LIST_WIDGET") { - currentDSL = renameKeyInObject(currentDSL, "items", "listData"); - - currentDSL.dynamicBindingPathList = currentDSL.dynamicBindingPathList?.map( - (path: { key: string }) => { - if (path.key === "items") { - return { key: "listData" }; - } - - return path; - }, - ); - - currentDSL.dynamicBindingPathList?.map((path: { key: string }) => { - if ( - get(currentDSL, path.key) && - path.key !== "items" && - path.key !== "listData" && - isString(get(currentDSL, path.key)) - ) { - set( - currentDSL, - path.key, - get(currentDSL, path.key, "").replace("items", "listData"), - ); - } - }); - - Object.keys(currentDSL.template).map((widgetName) => { - const currentWidget = currentDSL.template[widgetName]; - - currentWidget.dynamicBindingPathList?.map((path: { key: string }) => { - set( - currentWidget, - path.key, - get(currentWidget, path.key).replace("items", "listData"), - ); - }); - }); - } - - if (currentDSL.children && currentDSL.children.length > 0) { - currentDSL.children = currentDSL.children.map( - migrateItemsToListDataInListWidget, - ); - } - return currentDSL; -}; - -export const updateContainers = (dsl: DSLWidget) => { - if (dsl.type === "CONTAINER_WIDGET" || dsl.type === "FORM_WIDGET") { - if ( - !( - dsl.children && - dsl.children.length > 0 && - (dsl.children[0].type === "CANVAS_WIDGET" || - dsl.children[0].type === "FORM_WIDGET") - ) - ) { - const canvas = { - ...dsl, - backgroundColor: "transparent", - type: "CANVAS_WIDGET", - detachFromLayout: true, - topRow: 0, - leftColumn: 0, - rightColumn: dsl.parentColumnSpace * (dsl.rightColumn - dsl.leftColumn), - bottomRow: dsl.parentRowSpace * (dsl.bottomRow - dsl.topRow), - widgetName: generateReactKey(), - widgetId: generateReactKey(), - parentRowSpace: 1, - parentColumnSpace: 1, - containerStyle: "none", - canExtend: false, - isVisible: true, - }; - // @ts-expect-error: Types are not available - delete canvas.dynamicBindings; - // @ts-expect-error: Types are not available - delete canvas.dynamicProperties; - if (canvas.children && canvas.children.length > 0) - canvas.children = canvas.children.map(updateContainers); - dsl.children = [{ ...canvas }]; - } - } - return dsl; -}; - -//transform chart data, from old chart widget to new chart widget -//updated chart widget has support for multiple series -export const chartDataMigration = (currentDSL: DSLWidget) => { - currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { - if ( - children.type === "CHART_WIDGET" && - children.chartData && - children.chartData.length && - !Array.isArray(children.chartData[0]) - ) { - children.chartData = [{ data: children.chartData as ChartDataPoint[] }]; - } else if ( - children.type === "CONTAINER_WIDGET" || - children.type === "FORM_WIDGET" || - children.type === "CANVAS_WIDGET" || - children.type === "TABS_WIDGET" - ) { - children = chartDataMigration(children); - } - return children; - }); - return currentDSL; -}; - -export const singleChartDataMigration = (currentDSL: DSLWidget) => { - currentDSL.children = currentDSL.children?.map((child) => { - if (child.type === "CHART_WIDGET") { - // Check if chart widget has the deprecated singleChartData property - if (child.hasOwnProperty("singleChartData")) { - // This is to make sure that the format of the chartData is accurate - if ( - Array.isArray(child.singleChartData) && - !child.singleChartData[0].hasOwnProperty("seriesName") - ) { - child.singleChartData = { - seriesName: "Series 1", - data: child.singleChartData || [], - }; - } - //TODO: other possibilities? - child.chartData = JSON.stringify([...child.singleChartData]); - delete child.singleChartData; - } - } - if (child.children && child.children.length > 0) { - child = singleChartDataMigration(child); - } - return child; - }); - - return currentDSL; -}; - -export const mapDataMigration = (currentDSL: DSLWidget) => { - currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { - if (children.type === "MAP_WIDGET") { - if (children.markers) { - children.markers = children.markers.map( - (marker: { lat: any; lng: any; long: any; title: any }) => { - return { - lat: marker.lat, - long: marker.lng || marker.long, - title: marker.title, - }; - }, - ); - } - if (children.defaultMarkers) { - const defaultMarkers = JSON.parse(children.defaultMarkers); - children.defaultMarkers = defaultMarkers.map( - (marker: { - lat: number; - lng: number; - long: number; - title: string; - }) => { - return { - lat: marker.lat, - long: marker.lng || marker.long, - title: marker.title, - }; - }, - ); - } - if (children.selectedMarker) { - children.selectedMarker = { - lat: children.selectedMarker.lat, - long: children.selectedMarker.lng || children.selectedMarker.long, - title: children.selectedMarker.title, - }; - } - if (children.mapCenter) { - children.mapCenter = { - lat: children.mapCenter.lat, - long: children.mapCenter.lng || children.mapCenter.long, - title: children.mapCenter.title, - }; - } - if (children.center) { - children.center = { - lat: children.center.lat, - long: children.center.lng || children.center.long, - title: children.center.title, - }; - } - } else if (children.children && children.children.length > 0) { - children = mapDataMigration(children); - } - return children; - }); - return currentDSL; -}; - -export const mapAllowHorizontalScrollMigration = (currentDSL: DSLWidget) => { - currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { - if (child.type === "CHART_WIDGET") { - child.allowScroll = child.allowHorizontalScroll; - delete child.allowHorizontalScroll; - } - - if (Array.isArray(child.children) && child.children.length > 0) - child = mapAllowHorizontalScrollMigration(child); - - return child; - }); - - return currentDSL; -}; - -export const tabsWidgetTabsPropertyMigration = (currentDSL: DSLWidget) => { - currentDSL.children = currentDSL.children - ?.filter(Boolean) - .map((child: DSLWidget) => { - if (child.type === "TABS_WIDGET") { - try { - const tabs = isString(child.tabs) - ? JSON.parse(child.tabs) - : child.tabs; - const newTabs = tabs.map((tab: any) => { - const childForTab = child.children - ?.filter(Boolean) - .find((tabChild: DSLWidget) => tabChild.tabId === tab.id); - if (childForTab) { - tab.widgetId = childForTab.widgetId; - } - return tab; - }); - child.tabs = JSON.stringify(newTabs); - } catch (migrationError) { - log.debug({ migrationError }); - } - } - if (child.children && child.children.length) { - child = tabsWidgetTabsPropertyMigration(child); - } - return child; - }); - return currentDSL; -}; - -export const dynamicPathListMigration = (currentDSL: DSLWidget) => { - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map(dynamicPathListMigration); - } - if (currentDSL.dynamicBindings) { - currentDSL.dynamicBindingPathList = Object.keys( - currentDSL.dynamicBindings, - ).map((path) => ({ key: path })); - delete currentDSL.dynamicBindings; - } - if (currentDSL.dynamicTriggers) { - currentDSL.dynamicTriggerPathList = Object.keys( - currentDSL.dynamicTriggers, - ).map((path) => ({ key: path })); - delete currentDSL.dynamicTriggers; - } - if (currentDSL.dynamicProperties) { - currentDSL.dynamicPropertyPathList = Object.keys( - currentDSL.dynamicProperties, - ).map((path) => ({ key: path })); - delete currentDSL.dynamicProperties; - } - return currentDSL; -}; - -export const addVersionNumberMigration = (currentDSL: DSLWidget) => { - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map(addVersionNumberMigration); - } - if (currentDSL.version === undefined) { - currentDSL.version = 1; - } - return currentDSL; -}; - -export const canvasNameConflictMigration = ( - currentDSL: DSLWidget, - props = { counter: 1 }, -): DSLWidget => { - if ( - currentDSL.type === "CANVAS_WIDGET" && - currentDSL.widgetName.startsWith("Canvas") - ) { - currentDSL.widgetName = `Canvas${props.counter}`; - // Canvases inside tabs have `name` property as well - if (currentDSL.name) { - currentDSL.name = currentDSL.widgetName; - } - props.counter++; - } - currentDSL.children?.forEach((c) => canvasNameConflictMigration(c, props)); - - return currentDSL; -}; - -export const renamedCanvasNameConflictMigration = ( - currentDSL: DSLWidget, - props = { counter: 1 }, -): DSLWidget => { - // Rename all canvas widgets except for MainContainer - if ( - currentDSL.type === "CANVAS_WIDGET" && - currentDSL.widgetName !== "MainContainer" - ) { - currentDSL.widgetName = `Canvas${props.counter}`; - // Canvases inside tabs have `name` property as well - if (currentDSL.name) { - currentDSL.name = currentDSL.widgetName; - } - props.counter++; - } - currentDSL.children?.forEach((c) => canvasNameConflictMigration(c, props)); - - return currentDSL; -}; - -export const rteDefaultValueMigration = (currentDSL: DSLWidget): DSLWidget => { - if (currentDSL.type === "RICH_TEXT_EDITOR_WIDGET") { - currentDSL.inputType = "html"; - } - currentDSL.children?.forEach((children) => - rteDefaultValueMigration(children), - ); - - return currentDSL; -}; - -function migrateTabsDataUsingMigrator(currentDSL: DSLWidget) { - if (currentDSL.type === "TABS_WIDGET" && currentDSL.version === 1) { - try { - currentDSL.type = "TABS_MIGRATOR_WIDGET"; - currentDSL.version = 1; - } catch (error) { - Sentry.captureException({ - message: "Tabs Migration Failed", - oldData: currentDSL.tabs, - }); - currentDSL.tabsObj = {}; - delete currentDSL.tabs; - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map(migrateTabsDataUsingMigrator); - } - return currentDSL; -} - -export const migrateTabsData = (currentDSL: DSLWidget) => { - if ( - ["TABS_WIDGET", "TABS_MIGRATOR_WIDGET"].includes(currentDSL.type as any) && - currentDSL.version === 1 - ) { - try { - currentDSL.type = "TABS_WIDGET"; - const isTabsDataBinded = isString(currentDSL.tabs); - currentDSL.dynamicPropertyPathList = - currentDSL.dynamicPropertyPathList || []; - currentDSL.dynamicBindingPathList = - currentDSL.dynamicBindingPathList || []; - - if (isTabsDataBinded) { - const tabsString = currentDSL.tabs.replace( - DATA_BIND_REGEX_GLOBAL, - (word: any) => `"${word}"`, - ); - try { - currentDSL.tabs = JSON.parse(tabsString); - } catch (error) { - return migrateTabsDataUsingMigrator(currentDSL); - } - const dynamicPropsList = currentDSL.tabs - .filter((each: any) => DATA_BIND_REGEX_GLOBAL.test(each.isVisible)) - .map((each: any) => { - return { key: `tabsObj.${each.id}.isVisible` }; - }); - const dynamicBindablePropsList = currentDSL.tabs.map((each: any) => { - return { key: `tabsObj.${each.id}.isVisible` }; - }); - currentDSL.dynamicPropertyPathList = [ - ...currentDSL.dynamicPropertyPathList, - ...dynamicPropsList, - ]; - currentDSL.dynamicBindingPathList = [ - ...currentDSL.dynamicBindingPathList, - ...dynamicBindablePropsList, - ]; - } - currentDSL.dynamicPropertyPathList = - currentDSL.dynamicPropertyPathList.filter((each) => { - return each.key !== "tabs"; - }); - currentDSL.dynamicBindingPathList = - currentDSL.dynamicBindingPathList.filter((each) => { - return each.key !== "tabs"; - }); - currentDSL.tabsObj = currentDSL.tabs.reduce( - (obj: any, tab: any, index: number) => { - obj = { - ...obj, - [tab.id]: { - ...tab, - isVisible: tab.isVisible === undefined ? true : tab.isVisible, - index, - }, - }; - return obj; - }, - {}, - ); - currentDSL.version = 2; - delete currentDSL.tabs; - } catch (error) { - Sentry.captureException({ - message: "Tabs Migration Failed", - oldData: currentDSL.tabs, - }); - currentDSL.tabsObj = {}; - delete currentDSL.tabs; - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map(migrateTabsData); - } - return currentDSL; -}; - -// A rudimentary transform function which updates the DSL based on its version. -export const migrateOldChartData = (currentDSL: DSLWidget) => { - if (currentDSL.type === "CHART_WIDGET") { - if (isString(currentDSL.chartData)) { - try { - currentDSL.chartData = JSON.parse(currentDSL.chartData); - } catch (error) { - Sentry.captureException({ - message: "Chart Migration Failed", - oldData: currentDSL.chartData, - }); - currentDSL.chartData = []; - } - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map(migrateOldChartData); - } - return currentDSL; -}; - -/** - * changes chartData which we were using as array. now it will be a object - * - * - * @param currentDSL - * @returns - */ -export const migrateChartDataFromArrayToObject = (currentDSL: DSLWidget) => { - currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { - if (children.type === "CHART_WIDGET") { - if (Array.isArray(children.chartData)) { - const newChartData = {}; - const dynamicBindingPathList = children?.dynamicBindingPathList - ? children?.dynamicBindingPathList.slice() - : []; - - children.chartData.map((datum: any, index: number) => { - const generatedKey = generateReactKey(); - set(newChartData, `${generatedKey}`, datum); - - if ( - Array.isArray(children.dynamicBindingPathList) && - children.dynamicBindingPathList?.findIndex( - (path) => (path.key = `chartData[${index}].data`), - ) > -1 - ) { - const foundIndex = children.dynamicBindingPathList.findIndex( - (path) => (path.key = `chartData[${index}].data`), - ); - - dynamicBindingPathList[foundIndex] = { - key: `chartData.${generatedKey}.data`, - }; - } - }); - - children.dynamicBindingPathList = dynamicBindingPathList; - children.chartData = newChartData; - } - } else if ( - children.type === "CONTAINER_WIDGET" || - children.type === "FORM_WIDGET" || - children.type === "CANVAS_WIDGET" || - children.type === "TABS_WIDGET" - ) { - children = migrateChartDataFromArrayToObject(children); - } - - return children; - }); - - return currentDSL; -}; - -const pixelToNumber = (pixel: string) => { - if (pixel.includes("px")) { - return parseInt(pixel.split("px").join("")); - } - return 0; -}; - -export const calculateDynamicHeight = () => { - const screenHeight = window.innerHeight; - const gridRowHeight = GridDefaults.DEFAULT_GRID_ROW_HEIGHT; - // DGRH - DEFAULT_GRID_ROW_HEIGHT - // View Mode: Header height + Page Selection Tab = 8 * DGRH (approx) - // Edit Mode: Header height + Canvas control = 8 * DGRH (approx) - // buffer: ~8 grid row height - const buffer = - gridRowHeight + - 2 * pixelToNumber(theme.smallHeaderHeight) + - pixelToNumber(theme.bottomBarHeight); - const calculatedMinHeight = - Math.floor((screenHeight - buffer) / gridRowHeight) * gridRowHeight; - return calculatedMinHeight; -}; - -export const migrateInitialValues = (currentDSL: DSLWidget) => { - currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { - if (child.type === "INPUT_WIDGET") { - child = { - isRequired: false, - isDisabled: false, - resetOnSubmit: false, - ...child, - }; - } else if (child.type === "DROP_DOWN_WIDGET") { - child = { - isRequired: false, - isDisabled: false, - ...child, - }; - } else if (child.type === "DATE_PICKER_WIDGET2") { - child = { - minDate: "2001-01-01 00:00", - maxDate: "2041-12-31 23:59", - isRequired: false, - ...child, - }; - } else if (child.type === "SWITCH_WIDGET") { - child = { - isDisabled: false, - ...child, - }; - } else if (child.type === "ICON_WIDGET") { - child = { - isRequired: false, - ...child, - }; - } else if (child.type === "VIDEO_WIDGET") { - child = { - isRequired: false, - isDisabled: false, - ...child, - }; - } else if (child.type === "CHECKBOX_WIDGET") { - child = { - isDisabled: false, - isRequired: false, - ...child, - }; - } else if (child.type === "RADIO_GROUP_WIDGET") { - child = { - isDisabled: false, - isRequired: false, - ...child, - }; - } else if (child.type === "FILE_PICKER_WIDGET") { - child = { - isDisabled: false, - isRequired: false, - allowedFileTypes: [], - ...child, - }; - } else if (child.children && child.children.length > 0) { - child = migrateInitialValues(child); - } - return child; - }); - return currentDSL; -}; - -// A rudimentary transform function which updates the DSL based on its version. -// A more modular approach needs to be designed. -// This needs the widget config to be already built to migrate correctly -export const transformDSL = (currentDSL: DSLWidget, newPage = false) => { - if (currentDSL.version === undefined) { - // Since this top level widget is a CANVAS_WIDGET, - // DropTargetComponent needs to know the minimum height the canvas can take - // See DropTargetUtils.ts - currentDSL.minHeight = calculateDynamicHeight(); - currentDSL.bottomRow = - currentDSL.minHeight - GridDefaults.DEFAULT_GRID_ROW_HEIGHT; - // For the first time the DSL is created, remove one row from the total possible rows - // to adjust for padding and margins. - currentDSL.snapRows = - Math.floor(currentDSL.bottomRow / GridDefaults.DEFAULT_GRID_ROW_HEIGHT) - - 1; - - // Force the width of the canvas to 1224 px - currentDSL.rightColumn = 1224; - // The canvas is a CANVAS_WIDGET which doesn't have a background or borders by default - currentDSL.backgroundColor = "none"; - currentDSL.containerStyle = "none"; - currentDSL.type = "CANVAS_WIDGET"; - currentDSL.detachFromLayout = true; - currentDSL.canExtend = true; - - // Update version to make sure this doesn't run every time. - currentDSL.version = 1; - } - - if (currentDSL.version === 1) { - if (currentDSL.children && currentDSL.children.length > 0) - currentDSL.children = currentDSL.children.map(updateContainers); - currentDSL.version = 2; - } - if (currentDSL.version === 2) { - currentDSL = chartDataMigration(currentDSL); - currentDSL.version = 3; - } - if (currentDSL.version === 3) { - currentDSL = mapDataMigration(currentDSL); - currentDSL.version = 4; - } - if (currentDSL.version === 4) { - currentDSL = singleChartDataMigration(currentDSL); - currentDSL.version = 5; - } - if (currentDSL.version === 5) { - currentDSL = tabsWidgetTabsPropertyMigration(currentDSL); - currentDSL.version = 6; - } - if (currentDSL.version === 6) { - currentDSL = dynamicPathListMigration(currentDSL); - currentDSL.version = 7; - } - - if (currentDSL.version === 7) { - currentDSL = canvasNameConflictMigration(currentDSL); - currentDSL.version = 8; - } - - if (currentDSL.version === 8) { - currentDSL = renamedCanvasNameConflictMigration(currentDSL); - currentDSL.version = 9; - } - - if (currentDSL.version === 9) { - currentDSL = tableWidgetPropertyPaneMigrations(currentDSL); - currentDSL.version = 10; - } - - if (currentDSL.version === 10) { - currentDSL = addVersionNumberMigration(currentDSL); - currentDSL.version = 11; - } - - if (currentDSL.version === 11) { - currentDSL = migrateTablePrimaryColumnsBindings(currentDSL); - currentDSL.version = 12; - } - - if (currentDSL.version === 12) { - currentDSL = migrateIncorrectDynamicBindingPathLists(currentDSL); - currentDSL.version = 13; - } - - if (currentDSL.version === 13) { - currentDSL = migrateOldChartData(currentDSL); - currentDSL.version = 14; - } - - if (currentDSL.version === 14) { - currentDSL = rteDefaultValueMigration(currentDSL); - currentDSL.version = 15; - } - - if (currentDSL.version === 15) { - currentDSL = migrateTextStyleFromTextWidget(currentDSL); - currentDSL.version = 16; - } - - if (currentDSL.version === 16) { - currentDSL = migrateChartDataFromArrayToObject(currentDSL); - currentDSL.version = 17; - } - - if (currentDSL.version === 17) { - currentDSL = migrateTabsData(currentDSL); - currentDSL.version = 18; - } - - if (currentDSL.version === 18) { - currentDSL = migrateInitialValues(currentDSL); - currentDSL.version = 19; - } - - if (currentDSL.version === 19) { - currentDSL.snapColumns = GridDefaults.DEFAULT_GRID_COLUMNS; - currentDSL.snapRows = getCanvasSnapRows(currentDSL.bottomRow); - if (!newPage) { - currentDSL = migrateToNewLayout(currentDSL); - } - currentDSL.version = 20; - } - - if (currentDSL.version === 20) { - currentDSL = migrateNewlyAddedTabsWidgetsMissingData(currentDSL); - currentDSL.version = 21; - } - - if (currentDSL.version === 21) { - const canvasWidgets = flattenDSL(currentDSL); - currentDSL = migrateWidgetsWithoutLeftRightColumns( - currentDSL, - canvasWidgets, - ); - currentDSL = migrateOverFlowingTabsWidgets(currentDSL, canvasWidgets); - currentDSL.version = 22; - } - - if (currentDSL.version === 22) { - currentDSL = migrateTableWidgetParentRowSpaceProperty(currentDSL); - currentDSL.version = 23; - } - - if (currentDSL.version === 23) { - currentDSL = addLogBlackListToAllListWidgetChildren(currentDSL); - currentDSL.version = 24; - } - - if (currentDSL.version === 24) { - currentDSL = migrateTableWidgetHeaderVisibilityProperties(currentDSL); - currentDSL.version = 25; - } - - if (currentDSL.version === 25) { - currentDSL = migrateItemsToListDataInListWidget(currentDSL); - currentDSL.version = 26; - } - - if (currentDSL.version === 26) { - currentDSL = migrateDatePickerMinMaxDate(currentDSL); - currentDSL.version = 27; - } - if (currentDSL.version === 27) { - currentDSL = migrateFilterValueForDropDownWidget(currentDSL); - currentDSL.version = 28; - } - - if (currentDSL.version === 28) { - currentDSL = migrateTablePrimaryColumnsComputedValue(currentDSL); - currentDSL.version = 29; - } - - if (currentDSL.version === 29) { - currentDSL = migrateToNewMultiSelect(currentDSL); - currentDSL.version = 30; - } - if (currentDSL.version === 30) { - currentDSL = migrateTableWidgetDelimiterProperties(currentDSL); - currentDSL.version = 31; - } - - if (currentDSL.version === 31) { - currentDSL = migrateIsDisabledToButtonColumn(currentDSL); - currentDSL.version = 32; - } - - if (currentDSL.version === 32) { - currentDSL = migrateTableDefaultSelectedRow(currentDSL); - currentDSL.version = 33; - } - - if (currentDSL.version === 33) { - currentDSL = migrateMenuButtonWidgetButtonProperties(currentDSL); - currentDSL.version = 34; - } - - if (currentDSL.version === 34) { - currentDSL = migrateButtonWidgetValidation(currentDSL); - currentDSL.version = 35; - } - - if (currentDSL.version === 35) { - currentDSL = migrateInputValidation(currentDSL); - currentDSL.version = 36; - } - - if (currentDSL.version === 36) { - currentDSL = revertTableDefaultSelectedRow(currentDSL); - currentDSL.version = 37; - } - - if (currentDSL.version === 37) { - currentDSL = migrateTableSanitizeColumnKeys(currentDSL); - currentDSL.version = 38; - } - - if (currentDSL.version === 38) { - currentDSL = migrateResizableModalWidgetProperties(currentDSL); - currentDSL.version = 39; - } - - if (currentDSL.version === 39) { - currentDSL = migrateTableWidgetSelectedRowBindings(currentDSL); - currentDSL.version = 40; - } - - if (currentDSL.version === 40) { - currentDSL = revertButtonStyleToButtonColor(currentDSL); - currentDSL.version = 41; - } - - if (currentDSL.version === 41) { - currentDSL = migrateButtonVariant(currentDSL); - currentDSL.version = 42; - } - - if (currentDSL.version === 42) { - currentDSL = migrateMapWidgetIsClickedMarkerCentered(currentDSL); - currentDSL.version = 43; - } - - if (currentDSL.version === 43) { - currentDSL = mapAllowHorizontalScrollMigration(currentDSL); - currentDSL.version = 44; - } - if (currentDSL.version === 44) { - currentDSL = isSortableMigration(currentDSL); - currentDSL.version = 45; - } - - if (currentDSL.version === 45) { - currentDSL = migrateTableWidgetIconButtonVariant(currentDSL); - currentDSL.version = 46; - } - - if (currentDSL.version === 46) { - currentDSL = migrateCheckboxGroupWidgetInlineProperty(currentDSL); - currentDSL.version = 47; - } - - if (currentDSL.version === 47) { - // We're skipping this to fix a bad table migration. - // skipped migration is added as version 51 - currentDSL.version = 48; - } - - if (currentDSL.version === 48) { - currentDSL = migrateRecaptchaType(currentDSL); - currentDSL.version = 49; - } - - if (currentDSL.version === 49) { - currentDSL = addPrivateWidgetsToAllListWidgets(currentDSL); - currentDSL.version = 50; - } - - if (currentDSL.version === 50) { - /* - * We're skipping this to fix a bad table migration - migrateTableWidgetNumericColumnName - * it overwrites the computedValue of the table columns - */ - - currentDSL.version = 51; - } - - if (currentDSL.version === 51) { - currentDSL = migratePhoneInputWidgetAllowFormatting(currentDSL); - currentDSL.version = 52; - } - - if (currentDSL.version === 52) { - currentDSL = migrateModalIconButtonWidget(currentDSL); - currentDSL.version = 53; - } - - if (currentDSL.version === 53) { - currentDSL = migrateScrollTruncateProperties(currentDSL); - currentDSL.version = 54; - } - - if (currentDSL.version === 54) { - currentDSL = migratePhoneInputWidgetDefaultDialCode(currentDSL); - currentDSL.version = 55; - } - - if (currentDSL.version === 55) { - currentDSL = migrateCurrencyInputWidgetDefaultCurrencyCode(currentDSL); - currentDSL.version = 56; - } - - if (currentDSL.version === 56) { - currentDSL = migrateRadioGroupAlignmentProperty(currentDSL); - currentDSL.version = 57; - } - - if (currentDSL.version === 57) { - currentDSL = migrateStylingPropertiesForTheming(currentDSL); - currentDSL.version = 58; - } - - if (currentDSL.version === 58) { - currentDSL = migrateCheckboxSwitchProperty(currentDSL); - currentDSL.version = 59; - } - - if (currentDSL.version === 59) { - /** - * migrateChartWidgetReskinningData function will be executed again in version 61, - * since for older apps the accentColor and fontFamily didn't get migrated. - */ - currentDSL = migrateChartWidgetReskinningData(currentDSL); - currentDSL.version = 60; - } - - if (currentDSL.version === 60) { - currentDSL = migrateTableWidgetV2Validation(currentDSL); - currentDSL.version = 61; - } - - if (currentDSL.version === 61) { - currentDSL = migrateChartWidgetReskinningData(currentDSL); - currentDSL.version = 62; - } - - if (currentDSL.version === 62) { - currentDSL = MigrateSelectTypeWidgetDefaultValue(currentDSL); - currentDSL.version = 63; - } - - if (currentDSL.version === 63) { - currentDSL = migrateMapChartWidgetReskinningData(currentDSL); - currentDSL.version = 64; - } - - if (currentDSL.version === 64) { - currentDSL = migrateRateWidgetDisabledState(currentDSL); - currentDSL.version = 65; - } - - if (currentDSL.version === 65) { - currentDSL = migrateCodeScannerLayout(currentDSL); - currentDSL.version = 66; - } - - if (currentDSL.version === 66) { - currentDSL = migrateTableWidgetV2ValidationBinding(currentDSL); - currentDSL.version = 67; - } - - if (currentDSL.version === 67) { - currentDSL = migrateLabelPosition(currentDSL); - currentDSL.version = 68; - } - - if (currentDSL.version === 68) { - currentDSL = migratePropertiesForDynamicHeight(currentDSL); - currentDSL.version = 69; - } - - if (currentDSL.version === 69) { - currentDSL = migrateMenuButtonDynamicItems(currentDSL); - currentDSL.version = 70; - } - - if (currentDSL.version === 70) { - currentDSL = migrateChildStylesheetFromDynamicBindingPathList(currentDSL); - currentDSL.version = 71; - } - - if (currentDSL.version === 71) { - currentDSL = migrateTableWidgetV2SelectOption(currentDSL); - currentDSL.version = 72; - } - - if (currentDSL.version === 72) { - currentDSL = migrateListWidgetChildrenForAutoHeight(currentDSL); - currentDSL.version = 73; - } - - if (currentDSL.version === 73) { - currentDSL = migrateInputWidgetShowStepArrows(currentDSL); - currentDSL.version = 74; - } - - if (currentDSL.version === 74) { - currentDSL = migrateMenuButtonDynamicItemsInsideTableWidget(currentDSL); - currentDSL.version = 75; - } - - if (currentDSL.version === 75) { - currentDSL = migrateInputWidgetsMultiLineInputType(currentDSL); - currentDSL.version = 76; - } - - if (currentDSL.version === 76) { - currentDSL = migrateColumnFreezeAttributes(currentDSL); - currentDSL.version = 77; - } - - if (currentDSL.version === 77) { - currentDSL = migrateTableSelectOptionAttributesForNewRow(currentDSL); - currentDSL.version = 78; - } - - if (currentDSL.version == 78) { - currentDSL = - migrateBindingPrefixSuffixForInlineEditValidationControl(currentDSL); - currentDSL.version = 79; - } - - if (currentDSL.version == 79) { - currentDSL = migrateTableWidgetTableDataJsMode(currentDSL); - currentDSL.version = 80; - } - - if (currentDSL.version === 80) { - currentDSL = migrateSelectWidgetOptionToSourceData(currentDSL); - currentDSL.version = 81; - } - - if (currentDSL.version === 81) { - currentDSL = migrateSelectWidgetSourceDataBindingPathList(currentDSL); - currentDSL.version = 82; - } - - if (currentDSL.version == 82) { - currentDSL = migrateChartWidgetLabelOrientationStaggerOption(currentDSL); - currentDSL.version = 83; - } - - if (currentDSL.version == 83) { - currentDSL = migrateAddShowHideDataPointLabels(currentDSL); - currentDSL.version = 84; - } - - if (currentDSL.version === 84) { - currentDSL = migrateSelectWidgetAddSourceDataPropertyPathList(currentDSL); - currentDSL.version = 85; - } - - if (currentDSL.version === 85) { - currentDSL = migrateDefaultValuesForCustomEChart(currentDSL); - currentDSL.version = 86; - } - - if (currentDSL.version === 86) { - currentDSL = migrateTableServerSideFiltering(currentDSL); - currentDSL.version = LATEST_PAGE_VERSION; - } - - return currentDSL; -}; - -export const migrateButtonVariant = (currentDSL: DSLWidget) => { - if ( - currentDSL.type === "BUTTON_WIDGET" || - currentDSL.type === "FORM_BUTTON_WIDGET" || - currentDSL.type === "ICON_BUTTON_WIDGET" - ) { - switch (currentDSL.buttonVariant) { - case "OUTLINE": - currentDSL.buttonVariant = ButtonVariantTypes.SECONDARY; - break; - case "GHOST": - currentDSL.buttonVariant = ButtonVariantTypes.TERTIARY; - break; - default: - currentDSL.buttonVariant = ButtonVariantTypes.PRIMARY; - } - } - if (currentDSL.type === "MENU_BUTTON_WIDGET") { - switch (currentDSL.menuVariant) { - case "OUTLINE": - currentDSL.menuVariant = ButtonVariantTypes.SECONDARY; - break; - case "GHOST": - currentDSL.menuVariant = ButtonVariantTypes.TERTIARY; - break; - default: - currentDSL.menuVariant = ButtonVariantTypes.PRIMARY; - } - } - if (currentDSL.type === "TABLE_WIDGET") { - if (currentDSL.hasOwnProperty("primaryColumns")) { - Object.keys(currentDSL.primaryColumns).forEach((column) => { - if (currentDSL.primaryColumns[column].columnType === "iconButton") { - let newVariant = ButtonVariantTypes.PRIMARY; - switch (currentDSL.primaryColumns[column].buttonVariant) { - case "OUTLINE": - newVariant = ButtonVariantTypes.SECONDARY; - break; - case "GHOST": - newVariant = ButtonVariantTypes.TERTIARY; - break; - } - currentDSL.primaryColumns[column].buttonVariant = newVariant; - } - }); - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((child) => - migrateButtonVariant(child), - ); - } - return currentDSL; -}; - -export const revertTableDefaultSelectedRow = (currentDSL: DSLWidget) => { - if (currentDSL.type === "TABLE_WIDGET") { - if (currentDSL.version === 1 && currentDSL.defaultSelectedRow === "0") - currentDSL.defaultSelectedRow = undefined; - // update version to 3 for all table dsl - currentDSL.version = 3; - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((child) => - revertTableDefaultSelectedRow(child), - ); - } - return currentDSL; -}; - -export const revertButtonStyleToButtonColor = (currentDSL: DSLWidget) => { - if ( - currentDSL.type === "BUTTON_WIDGET" || - currentDSL.type === "FORM_BUTTON_WIDGET" || - currentDSL.type === "ICON_BUTTON_WIDGET" - ) { - if (currentDSL.hasOwnProperty("buttonStyle")) { - switch (currentDSL.buttonStyle) { - case ButtonStyleTypes.DANGER: - currentDSL.buttonColor = Colors.DANGER_SOLID; - break; - case ButtonStyleTypes.PRIMARY: - currentDSL.buttonColor = Colors.GREEN; - break; - case ButtonStyleTypes.WARNING: - currentDSL.buttonColor = Colors.WARNING_SOLID; - break; - case ButtonStyleTypes.INFO: - currentDSL.buttonColor = Colors.INFO_SOLID; - break; - case ButtonStyleTypes.SECONDARY: - currentDSL.buttonColor = Colors.GRAY; - break; - case "PRIMARY_BUTTON": - currentDSL.buttonColor = Colors.GREEN; - break; - case "SECONDARY_BUTTON": - currentDSL.buttonColor = Colors.GREEN; - currentDSL.buttonVariant = ButtonVariantTypes.SECONDARY; - break; - case "DANGER_BUTTON": - currentDSL.buttonColor = Colors.DANGER_SOLID; - break; - default: - if (!currentDSL.buttonColor) currentDSL.buttonColor = Colors.GREEN; - break; - } - delete currentDSL.buttonStyle; - } - } - if (currentDSL.type === "MENU_BUTTON_WIDGET") { - if (currentDSL.hasOwnProperty("menuStyle")) { - switch (currentDSL.menuStyle) { - case ButtonStyleTypes.DANGER: - currentDSL.menuColor = Colors.DANGER_SOLID; - break; - case ButtonStyleTypes.PRIMARY: - currentDSL.menuColor = Colors.GREEN; - break; - case ButtonStyleTypes.WARNING: - currentDSL.menuColor = Colors.WARNING_SOLID; - break; - case ButtonStyleTypes.INFO: - currentDSL.menuColor = Colors.INFO_SOLID; - break; - case ButtonStyleTypes.SECONDARY: - currentDSL.menuColor = Colors.GRAY; - break; - default: - if (!currentDSL.menuColor) currentDSL.menuColor = Colors.GREEN; - break; - } - delete currentDSL.menuStyle; - delete currentDSL.prevMenuStyle; - } - } - if (currentDSL.type === "TABLE_WIDGET") { - if (currentDSL.hasOwnProperty("primaryColumns")) { - Object.keys(currentDSL.primaryColumns).forEach((column) => { - if (currentDSL.primaryColumns[column].columnType === "button") { - currentDSL.primaryColumns[column].buttonColor = - currentDSL.primaryColumns[column].buttonStyle; - delete currentDSL.primaryColumns[column].buttonStyle; - } - }); - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((child) => - revertButtonStyleToButtonColor(child), - ); - } - return currentDSL; -}; - -export const migrateInputValidation = (currentDSL: DSLWidget) => { - if (currentDSL.type === "INPUT_WIDGET") { - if (has(currentDSL, "validation")) { - // convert boolean to string expression - if (typeof currentDSL.validation === "boolean") { - currentDSL.validation = String(currentDSL.validation); - } else if (typeof currentDSL.validation !== "string") { - // for any other type of value set to default undefined - currentDSL.validation = undefined; - } - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((child) => - migrateInputValidation(child), - ); - } - return currentDSL; -}; - -export const migrateButtonWidgetValidation = (currentDSL: DSLWidget) => { - if (currentDSL.type === "INPUT_WIDGET") { - if (!has(currentDSL, "validation")) { - currentDSL.validation = true; - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children.map((eachWidgetDSL: DSLWidget) => { - migrateButtonWidgetValidation(eachWidgetDSL); - }); - } - return currentDSL; -}; - -export const migrateTableDefaultSelectedRow = (currentDSL: DSLWidget) => { - if (currentDSL.type === "TABLE_WIDGET") { - if (!currentDSL.defaultSelectedRow) currentDSL.defaultSelectedRow = "0"; - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((child) => - migrateTableDefaultSelectedRow(child), - ); - } - return currentDSL; -}; - -const addIsDisabledToButtonColumn = (currentDSL: DSLWidget) => { - if (currentDSL.type === "TABLE_WIDGET") { - if (!isEmpty(currentDSL.primaryColumns)) { - for (const key of Object.keys( - currentDSL.primaryColumns as Record, - )) { - if (currentDSL.primaryColumns[key].columnType === "button") { - if (!currentDSL.primaryColumns[key].hasOwnProperty("isDisabled")) { - currentDSL.primaryColumns[key]["isDisabled"] = false; - } - } - if (!currentDSL.primaryColumns[key].hasOwnProperty("isCellVisible")) { - currentDSL.primaryColumns[key]["isCellVisible"] = true; - } - } - } - } - return currentDSL; -}; - -export const migrateIsDisabledToButtonColumn = (currentDSL: DSLWidget) => { - const newDSL = addIsDisabledToButtonColumn(currentDSL); - - newDSL.children = newDSL.children?.map((children: DSLWidget) => { - return migrateIsDisabledToButtonColumn(children); - }); - return currentDSL; -}; - -export const migrateToNewMultiSelect = (currentDSL: DSLWidget) => { - if (currentDSL.type === "DROP_DOWN_WIDGET") { - if (currentDSL.selectionType === "MULTI_SELECT") { - currentDSL.type = "MULTI_SELECT_WIDGET"; - delete currentDSL.isFilterable; - } - delete currentDSL.selectionType; - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((child) => - migrateToNewMultiSelect(child), - ); - } - return currentDSL; -}; - -export const migrateObjectFitToImageWidget = (dsl: DSLWidget) => { - const addObjectFitProperty = (widgetProps: DSLWidget) => { - widgetProps.objectFit = "cover"; - if (widgetProps.children && widgetProps.children.length) { - widgetProps.children.forEach((eachWidgetProp: DSLWidget) => { - if (widgetProps.type === "IMAGE_WIDGET") { - addObjectFitProperty(eachWidgetProp); - } - }); - } - }; - addObjectFitProperty(dsl); - return dsl; -}; - -export const migrateOverFlowingTabsWidgets = ( - currentDSL: DSLWidget, - canvasWidgets: any, -) => { - if ( - currentDSL.type === "TABS_WIDGET" && - currentDSL.version === 3 && - currentDSL.children && - currentDSL.children.length - ) { - const tabsWidgetHeight = - (currentDSL.bottomRow - currentDSL.topRow) * currentDSL.parentRowSpace; - const widgetHasOverflowingChildren = currentDSL.children.some((eachTab) => { - if (eachTab.children && eachTab.children.length) { - return eachTab.children.some((child: DSLWidget) => { - if (canvasWidgets[child.widgetId].repositioned) { - const tabHeight = child.bottomRow * child.parentRowSpace; - return tabsWidgetHeight < tabHeight; - } - return false; - }); - } - return false; - }); - if (widgetHasOverflowingChildren) { - currentDSL.shouldScrollContents = true; - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((eachChild) => - migrateOverFlowingTabsWidgets(eachChild, canvasWidgets), - ); - } - return currentDSL; -}; - -export const migrateWidgetsWithoutLeftRightColumns = ( - currentDSL: DSLWidget, - canvasWidgets: any, -) => { - if ( - currentDSL.widgetId !== MAIN_CONTAINER_WIDGET_ID && - !( - currentDSL.hasOwnProperty("leftColumn") && - currentDSL.hasOwnProperty("rightColumn") - ) - ) { - try { - const nextRow = nextAvailableRowInContainer( - currentDSL.parentId || MAIN_CONTAINER_WIDGET_ID, - omit(canvasWidgets, [currentDSL.widgetId]), - ); - canvasWidgets[currentDSL.widgetId].repositioned = true; - const leftColumn = 0; - // TODO(abhinav): Figure out a way to get the correct values from the widgets - const rightColumn = 4; - const bottomRow = nextRow + (currentDSL.bottomRow - currentDSL.topRow); - const topRow = nextRow; - currentDSL = { - ...currentDSL, - topRow, - bottomRow, - rightColumn, - leftColumn, - }; - } catch (error) { - Sentry.captureException({ - message: "Migrating position of widget on data loss failed", - oldData: currentDSL, - }); - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((dsl) => - migrateWidgetsWithoutLeftRightColumns(dsl, canvasWidgets), - ); - } - return currentDSL; -}; - -export const migrateNewlyAddedTabsWidgetsMissingData = ( - currentDSL: DSLWidget, -) => { - if (currentDSL.type === "TABS_WIDGET" && currentDSL.version === 2) { - try { - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map((each) => { - if (has(currentDSL, ["leftColumn", "rightColumn", "bottomRow"])) { - return each; - } - return { - ...each, - leftColumn: 0, - rightColumn: - (currentDSL.rightColumn - currentDSL.leftColumn) * - currentDSL.parentColumnSpace, - bottomRow: - (currentDSL.bottomRow - currentDSL.topRow) * - currentDSL.parentRowSpace, - }; - }); - } - currentDSL.version = 3; - } catch (error) { - Sentry.captureException({ - message: "Tabs Migration to add missing fields Failed", - oldData: currentDSL.children, - }); - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children = currentDSL.children.map( - migrateNewlyAddedTabsWidgetsMissingData, - ); - } - return currentDSL; -}; - -export const migrateToNewLayout = (dsl: DSLWidget) => { - const scaleWidget = (widgetProps: DSLWidget) => { - widgetProps.bottomRow *= GRID_DENSITY_MIGRATION_V1; - widgetProps.topRow *= GRID_DENSITY_MIGRATION_V1; - widgetProps.leftColumn *= GRID_DENSITY_MIGRATION_V1; - widgetProps.rightColumn *= GRID_DENSITY_MIGRATION_V1; - if (widgetProps.children && widgetProps.children.length) { - widgetProps.children.forEach((eachWidgetProp: DSLWidget) => { - scaleWidget(eachWidgetProp); - }); - } - }; - scaleWidget(dsl); - return dsl; -}; - -export const checkIfMigrationIsNeeded = ( - fetchPageResponse?: FetchPageResponse, -) => { - const currentDSL = fetchPageResponse?.data.layouts[0].dsl; - if (!currentDSL) return false; - return currentDSL.version !== LATEST_PAGE_VERSION; -}; - -export const migrateDatePickerMinMaxDate = (currentDSL: DSLWidget) => { - if (currentDSL.type === "DATE_PICKER_WIDGET2" && currentDSL.version === 2) { - if (currentDSL.minDate === "2001-01-01 00:00") { - currentDSL.minDate = "1920-12-31T18:30:00.000Z"; - } - if (currentDSL.maxDate === "2041-12-31 23:59") { - currentDSL.maxDate = "2121-12-31T18:29:00.000Z"; - } - } - if (currentDSL.children && currentDSL.children.length) { - currentDSL.children.map((eachWidgetDSL: DSLWidget) => { - migrateDatePickerMinMaxDate(eachWidgetDSL); - }); - } - return currentDSL; -}; - -const addFilterDefaultValue = (currentDSL: DSLWidget) => { - if (currentDSL.type === "DROP_DOWN_WIDGET") { - if (!currentDSL.hasOwnProperty("isFilterable")) { - currentDSL.isFilterable = true; - } - } - return currentDSL; -}; -export const migrateFilterValueForDropDownWidget = (currentDSL: DSLWidget) => { - const newDSL = addFilterDefaultValue(currentDSL); - - newDSL.children = newDSL.children?.map((children: DSLWidget) => { - return migrateFilterValueForDropDownWidget(children); - }); - - return newDSL; -}; + +// Need this otherwise TS will throw '--isolatedModules' error +export {}; + +// import { generateReactKey } from "./generators"; +// import { +// GridDefaults, +// LATEST_PAGE_VERSION, +// MAIN_CONTAINER_WIDGET_ID, +// } from "constants/WidgetConstants"; +// import { nextAvailableRowInContainer } from "entities/Widget/utils"; +// import { get, has, isEmpty, isString, omit, set } from "lodash"; +// import * as Sentry from "@sentry/react"; +// import type { ChartDataPoint } from "widgets/ChartWidget/constants"; +// import log from "loglevel"; +// import { migrateIncorrectDynamicBindingPathLists } from "./migrations/IncorrectDynamicBindingPathLists"; +// import { +// migrateTablePrimaryColumnsBindings, +// migrateTableWidgetHeaderVisibilityProperties, +// migrateTableWidgetParentRowSpaceProperty, +// tableWidgetPropertyPaneMigrations, +// migrateTablePrimaryColumnsComputedValue, +// migrateTableWidgetDelimiterProperties, +// migrateTableWidgetSelectedRowBindings, +// migrateTableSanitizeColumnKeys, +// isSortableMigration, +// migrateTableWidgetIconButtonVariant, +// migrateTableWidgetV2Validation, +// migrateTableWidgetV2ValidationBinding, +// migrateMenuButtonDynamicItemsInsideTableWidget, +// migrateTableWidgetV2SelectOption, +// migrateColumnFreezeAttributes, +// migrateTableSelectOptionAttributesForNewRow, +// migrateBindingPrefixSuffixForInlineEditValidationControl, +// migrateTableWidgetTableDataJsMode, +// migrateTableServerSideFiltering, +// } from "./migrations/TableWidget"; +// import { +// migrateTextStyleFromTextWidget, +// migrateScrollTruncateProperties, +// } from "./migrations/TextWidget"; +// import { DATA_BIND_REGEX_GLOBAL } from "constants/BindingsConstants"; +// import { theme } from "constants/DefaultTheme"; +// import { getCanvasSnapRows } from "./WidgetPropsUtils"; +// import type { FetchPageResponse } from "api/PageApi"; +// import { GRID_DENSITY_MIGRATION_V1 } from "WidgetProvider/constants"; +// // import defaultTemplate from "templates/default"; +// import { renameKeyInObject } from "./helpers"; +// import type { ColumnProperties } from "widgets/TableWidget/component/Constants"; +// import { +// migrateMenuButtonDynamicItems, +// migrateMenuButtonWidgetButtonProperties, +// } from "./migrations/MenuButtonWidget"; +// import { ButtonStyleTypes, ButtonVariantTypes } from "components/constants"; +// import { Colors } from "constants/Colors"; +// import { +// migrateModalIconButtonWidget, +// migrateResizableModalWidgetProperties, +// } from "./migrations/ModalWidget"; +// import { migrateCheckboxGroupWidgetInlineProperty } from "./migrations/CheckboxGroupWidget"; +// import { migrateMapWidgetIsClickedMarkerCentered } from "./migrations/MapWidget"; +// import type { DSLWidget } from "WidgetProvider/constants"; +// import { migrateRecaptchaType } from "./migrations/ButtonWidgetMigrations"; +// import type { PrivateWidgets } from "@appsmith/entities/DataTree/types"; +// import { +// migrateChildStylesheetFromDynamicBindingPathList, +// migrateStylingPropertiesForTheming, +// } from "./migrations/ThemingMigrations"; + +// import { +// migratePhoneInputWidgetAllowFormatting, +// migratePhoneInputWidgetDefaultDialCode, +// } from "./migrations/PhoneInputWidgetMigrations"; +// import { +// migrateCurrencyInputWidgetDefaultCurrencyCode, +// migrateInputWidgetShowStepArrows, +// } from "./migrations/CurrencyInputWidgetMigrations"; +// import { migrateRadioGroupAlignmentProperty } from "./migrations/RadioGroupWidget"; +// import { migrateCheckboxSwitchProperty } from "./migrations/PropertyPaneMigrations"; +// import { migrateChartWidgetReskinningData } from "./migrations/ChartWidgetReskinningMigrations"; +// import { +// MigrateSelectTypeWidgetDefaultValue, +// migrateSelectWidgetAddSourceDataPropertyPathList, +// migrateSelectWidgetOptionToSourceData, +// migrateSelectWidgetSourceDataBindingPathList, +// } from "./migrations/SelectWidget"; +// import { migrateMapChartWidgetReskinningData } from "./migrations/MapChartReskinningMigrations"; + +// import { migrateRateWidgetDisabledState } from "./migrations/RateWidgetMigrations"; +// import { migrateCodeScannerLayout } from "./migrations/CodeScannerWidgetMigrations"; +// import { migrateLabelPosition } from "./migrations/MigrateLabelPosition"; +// import { +// migrateInputWidgetsMultiLineInputType, +// migrateListWidgetChildrenForAutoHeight, +// migratePropertiesForDynamicHeight, +// } from "./migrations/autoHeightMigrations"; + +// import { +// migrateChartWidgetLabelOrientationStaggerOption, +// migrateAddShowHideDataPointLabels, +// migrateDefaultValuesForCustomEChart, +// } from "./migrations/ChartWidget"; +// import { flattenDSL } from "@shared/dsl"; + +// /** +// * adds logBlackList key for all list widget children +// * +// * @param currentDSL +// * @returns +// */ +// export const addLogBlackListToAllListWidgetChildren = ( +// currentDSL: DSLWidget, +// ) => { +// currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { +// if (children.type === "LIST_WIDGET") { +// const widgets = get( +// children, +// "children.0.children.0.children.0.children", +// ); + +// widgets.map((widget: any, index: number) => { +// const logBlackList: { [key: string]: boolean } = {}; + +// Object.keys(widget).map((key) => { +// logBlackList[key] = true; +// }); +// if (!widget.logBlackList) { +// set( +// children, +// `children.0.children.0.children.0.children.${index}.logBlackList`, +// logBlackList, +// ); +// } +// }); +// } + +// return children; +// }); + +// return currentDSL; +// }; + +// /** +// * adds 'privateWidgets' key for all list widgets +// * +// * @param currentDSL +// * @returns +// */ +// export const addPrivateWidgetsToAllListWidgets = (currentDSL: DSLWidget) => { +// currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { +// if (child.type === "LIST_WIDGET") { +// const privateWidgets: PrivateWidgets = {}; +// Object.keys(child.template).forEach((entityName) => { +// privateWidgets[entityName] = true; +// }); + +// if (!child.privateWidgets) { +// set(child, `privateWidgets`, privateWidgets); +// } +// } +// return child; +// }); + +// return currentDSL; +// }; + +// /** +// * changes items -> listData +// * +// * @param currentDSL +// * @returns +// */ +// export const migrateItemsToListDataInListWidget = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "LIST_WIDGET") { +// currentDSL = renameKeyInObject(currentDSL, "items", "listData"); + +// currentDSL.dynamicBindingPathList = currentDSL.dynamicBindingPathList?.map( +// (path: { key: string }) => { +// if (path.key === "items") { +// return { key: "listData" }; +// } + +// return path; +// }, +// ); + +// currentDSL.dynamicBindingPathList?.map((path: { key: string }) => { +// if ( +// get(currentDSL, path.key) && +// path.key !== "items" && +// path.key !== "listData" && +// isString(get(currentDSL, path.key)) +// ) { +// set( +// currentDSL, +// path.key, +// get(currentDSL, path.key, "").replace("items", "listData"), +// ); +// } +// }); + +// Object.keys(currentDSL.template).map((widgetName) => { +// const currentWidget = currentDSL.template[widgetName]; + +// currentWidget.dynamicBindingPathList?.map((path: { key: string }) => { +// set( +// currentWidget, +// path.key, +// get(currentWidget, path.key).replace("items", "listData"), +// ); +// }); +// }); +// } + +// if (currentDSL.children && currentDSL.children.length > 0) { +// currentDSL.children = currentDSL.children.map( +// migrateItemsToListDataInListWidget, +// ); +// } +// return currentDSL; +// }; + +// export const updateContainers = (dsl: DSLWidget) => { +// if (dsl.type === "CONTAINER_WIDGET" || dsl.type === "FORM_WIDGET") { +// if ( +// !( +// dsl.children && +// dsl.children.length > 0 && +// (dsl.children[0].type === "CANVAS_WIDGET" || +// dsl.children[0].type === "FORM_WIDGET") +// ) +// ) { +// const canvas = { +// ...dsl, +// backgroundColor: "transparent", +// type: "CANVAS_WIDGET", +// detachFromLayout: true, +// topRow: 0, +// leftColumn: 0, +// rightColumn: dsl.parentColumnSpace * (dsl.rightColumn - dsl.leftColumn), +// bottomRow: dsl.parentRowSpace * (dsl.bottomRow - dsl.topRow), +// widgetName: generateReactKey(), +// widgetId: generateReactKey(), +// parentRowSpace: 1, +// parentColumnSpace: 1, +// containerStyle: "none", +// canExtend: false, +// isVisible: true, +// }; +// // @ts-expect-error: Types are not available +// delete canvas.dynamicBindings; +// // @ts-expect-error: Types are not available +// delete canvas.dynamicProperties; +// if (canvas.children && canvas.children.length > 0) +// canvas.children = canvas.children.map(updateContainers); +// dsl.children = [{ ...canvas }]; +// } +// } +// return dsl; +// }; + +// //transform chart data, from old chart widget to new chart widget +// //updated chart widget has support for multiple series +// export const chartDataMigration = (currentDSL: DSLWidget) => { +// currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { +// if ( +// children.type === "CHART_WIDGET" && +// children.chartData && +// children.chartData.length && +// !Array.isArray(children.chartData[0]) +// ) { +// children.chartData = [{ data: children.chartData as ChartDataPoint[] }]; +// } else if ( +// children.type === "CONTAINER_WIDGET" || +// children.type === "FORM_WIDGET" || +// children.type === "CANVAS_WIDGET" || +// children.type === "TABS_WIDGET" +// ) { +// children = chartDataMigration(children); +// } +// return children; +// }); +// return currentDSL; +// }; + +// export const singleChartDataMigration = (currentDSL: DSLWidget) => { +// currentDSL.children = currentDSL.children?.map((child) => { +// if (child.type === "CHART_WIDGET") { +// // Check if chart widget has the deprecated singleChartData property +// if (child.hasOwnProperty("singleChartData")) { +// // This is to make sure that the format of the chartData is accurate +// if ( +// Array.isArray(child.singleChartData) && +// !child.singleChartData[0].hasOwnProperty("seriesName") +// ) { +// child.singleChartData = { +// seriesName: "Series 1", +// data: child.singleChartData || [], +// }; +// } +// //TODO: other possibilities? +// child.chartData = JSON.stringify([...child.singleChartData]); +// delete child.singleChartData; +// } +// } +// if (child.children && child.children.length > 0) { +// child = singleChartDataMigration(child); +// } +// return child; +// }); + +// return currentDSL; +// }; + +// export const mapDataMigration = (currentDSL: DSLWidget) => { +// currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { +// if (children.type === "MAP_WIDGET") { +// if (children.markers) { +// children.markers = children.markers.map( +// (marker: { lat: any; lng: any; long: any; title: any }) => { +// return { +// lat: marker.lat, +// long: marker.lng || marker.long, +// title: marker.title, +// }; +// }, +// ); +// } +// if (children.defaultMarkers) { +// const defaultMarkers = JSON.parse(children.defaultMarkers); +// children.defaultMarkers = defaultMarkers.map( +// (marker: { +// lat: number; +// lng: number; +// long: number; +// title: string; +// }) => { +// return { +// lat: marker.lat, +// long: marker.lng || marker.long, +// title: marker.title, +// }; +// }, +// ); +// } +// if (children.selectedMarker) { +// children.selectedMarker = { +// lat: children.selectedMarker.lat, +// long: children.selectedMarker.lng || children.selectedMarker.long, +// title: children.selectedMarker.title, +// }; +// } +// if (children.mapCenter) { +// children.mapCenter = { +// lat: children.mapCenter.lat, +// long: children.mapCenter.lng || children.mapCenter.long, +// title: children.mapCenter.title, +// }; +// } +// if (children.center) { +// children.center = { +// lat: children.center.lat, +// long: children.center.lng || children.center.long, +// title: children.center.title, +// }; +// } +// } else if (children.children && children.children.length > 0) { +// children = mapDataMigration(children); +// } +// return children; +// }); +// return currentDSL; +// }; + +// export const mapAllowHorizontalScrollMigration = (currentDSL: DSLWidget) => { +// currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { +// if (child.type === "CHART_WIDGET") { +// child.allowScroll = child.allowHorizontalScroll; +// delete child.allowHorizontalScroll; +// } + +// if (Array.isArray(child.children) && child.children.length > 0) +// child = mapAllowHorizontalScrollMigration(child); + +// return child; +// }); + +// return currentDSL; +// }; + +// export const tabsWidgetTabsPropertyMigration = (currentDSL: DSLWidget) => { +// currentDSL.children = currentDSL.children +// ?.filter(Boolean) +// .map((child: DSLWidget) => { +// if (child.type === "TABS_WIDGET") { +// try { +// const tabs = isString(child.tabs) +// ? JSON.parse(child.tabs) +// : child.tabs; +// const newTabs = tabs.map((tab: any) => { +// const childForTab = child.children +// ?.filter(Boolean) +// .find((tabChild: DSLWidget) => tabChild.tabId === tab.id); +// if (childForTab) { +// tab.widgetId = childForTab.widgetId; +// } +// return tab; +// }); +// child.tabs = JSON.stringify(newTabs); +// } catch (migrationError) { +// log.debug({ migrationError }); +// } +// } +// if (child.children && child.children.length) { +// child = tabsWidgetTabsPropertyMigration(child); +// } +// return child; +// }); +// return currentDSL; +// }; + +// export const dynamicPathListMigration = (currentDSL: DSLWidget) => { +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map(dynamicPathListMigration); +// } +// if (currentDSL.dynamicBindings) { +// currentDSL.dynamicBindingPathList = Object.keys( +// currentDSL.dynamicBindings, +// ).map((path) => ({ key: path })); +// delete currentDSL.dynamicBindings; +// } +// if (currentDSL.dynamicTriggers) { +// currentDSL.dynamicTriggerPathList = Object.keys( +// currentDSL.dynamicTriggers, +// ).map((path) => ({ key: path })); +// delete currentDSL.dynamicTriggers; +// } +// if (currentDSL.dynamicProperties) { +// currentDSL.dynamicPropertyPathList = Object.keys( +// currentDSL.dynamicProperties, +// ).map((path) => ({ key: path })); +// delete currentDSL.dynamicProperties; +// } +// return currentDSL; +// }; + +// export const addVersionNumberMigration = (currentDSL: DSLWidget) => { +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map(addVersionNumberMigration); +// } +// if (currentDSL.version === undefined) { +// currentDSL.version = 1; +// } +// return currentDSL; +// }; + +// export const canvasNameConflictMigration = ( +// currentDSL: DSLWidget, +// props = { counter: 1 }, +// ): DSLWidget => { +// if ( +// currentDSL.type === "CANVAS_WIDGET" && +// currentDSL.widgetName.startsWith("Canvas") +// ) { +// currentDSL.widgetName = `Canvas${props.counter}`; +// // Canvases inside tabs have `name` property as well +// if (currentDSL.name) { +// currentDSL.name = currentDSL.widgetName; +// } +// props.counter++; +// } +// currentDSL.children?.forEach((c) => canvasNameConflictMigration(c, props)); + +// return currentDSL; +// }; + +// export const renamedCanvasNameConflictMigration = ( +// currentDSL: DSLWidget, +// props = { counter: 1 }, +// ): DSLWidget => { +// // Rename all canvas widgets except for MainContainer +// if ( +// currentDSL.type === "CANVAS_WIDGET" && +// currentDSL.widgetName !== "MainContainer" +// ) { +// currentDSL.widgetName = `Canvas${props.counter}`; +// // Canvases inside tabs have `name` property as well +// if (currentDSL.name) { +// currentDSL.name = currentDSL.widgetName; +// } +// props.counter++; +// } +// currentDSL.children?.forEach((c) => canvasNameConflictMigration(c, props)); + +// return currentDSL; +// }; + +// export const rteDefaultValueMigration = (currentDSL: DSLWidget): DSLWidget => { +// if (currentDSL.type === "RICH_TEXT_EDITOR_WIDGET") { +// currentDSL.inputType = "html"; +// } +// currentDSL.children?.forEach((children) => +// rteDefaultValueMigration(children), +// ); + +// return currentDSL; +// }; + +// function migrateTabsDataUsingMigrator(currentDSL: DSLWidget) { +// if (currentDSL.type === "TABS_WIDGET" && currentDSL.version === 1) { +// try { +// currentDSL.type = "TABS_MIGRATOR_WIDGET"; +// currentDSL.version = 1; +// } catch (error) { +// Sentry.captureException({ +// message: "Tabs Migration Failed", +// oldData: currentDSL.tabs, +// }); +// currentDSL.tabsObj = {}; +// delete currentDSL.tabs; +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map(migrateTabsDataUsingMigrator); +// } +// return currentDSL; +// } + +// export const migrateTabsData = (currentDSL: DSLWidget) => { +// if ( +// ["TABS_WIDGET", "TABS_MIGRATOR_WIDGET"].includes(currentDSL.type as any) && +// currentDSL.version === 1 +// ) { +// try { +// currentDSL.type = "TABS_WIDGET"; +// const isTabsDataBinded = isString(currentDSL.tabs); +// currentDSL.dynamicPropertyPathList = +// currentDSL.dynamicPropertyPathList || []; +// currentDSL.dynamicBindingPathList = +// currentDSL.dynamicBindingPathList || []; + +// if (isTabsDataBinded) { +// const tabsString = currentDSL.tabs.replace( +// DATA_BIND_REGEX_GLOBAL, +// (word: any) => `"${word}"`, +// ); +// try { +// currentDSL.tabs = JSON.parse(tabsString); +// } catch (error) { +// return migrateTabsDataUsingMigrator(currentDSL); +// } +// const dynamicPropsList = currentDSL.tabs +// .filter((each: any) => DATA_BIND_REGEX_GLOBAL.test(each.isVisible)) +// .map((each: any) => { +// return { key: `tabsObj.${each.id}.isVisible` }; +// }); +// const dynamicBindablePropsList = currentDSL.tabs.map((each: any) => { +// return { key: `tabsObj.${each.id}.isVisible` }; +// }); +// currentDSL.dynamicPropertyPathList = [ +// ...currentDSL.dynamicPropertyPathList, +// ...dynamicPropsList, +// ]; +// currentDSL.dynamicBindingPathList = [ +// ...currentDSL.dynamicBindingPathList, +// ...dynamicBindablePropsList, +// ]; +// } +// currentDSL.dynamicPropertyPathList = +// currentDSL.dynamicPropertyPathList.filter((each) => { +// return each.key !== "tabs"; +// }); +// currentDSL.dynamicBindingPathList = +// currentDSL.dynamicBindingPathList.filter((each) => { +// return each.key !== "tabs"; +// }); +// currentDSL.tabsObj = currentDSL.tabs.reduce( +// (obj: any, tab: any, index: number) => { +// obj = { +// ...obj, +// [tab.id]: { +// ...tab, +// isVisible: tab.isVisible === undefined ? true : tab.isVisible, +// index, +// }, +// }; +// return obj; +// }, +// {}, +// ); +// currentDSL.version = 2; +// delete currentDSL.tabs; +// } catch (error) { +// Sentry.captureException({ +// message: "Tabs Migration Failed", +// oldData: currentDSL.tabs, +// }); +// currentDSL.tabsObj = {}; +// delete currentDSL.tabs; +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map(migrateTabsData); +// } +// return currentDSL; +// }; + +// // A rudimentary transform function which updates the DSL based on its version. +// export const migrateOldChartData = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "CHART_WIDGET") { +// if (isString(currentDSL.chartData)) { +// try { +// currentDSL.chartData = JSON.parse(currentDSL.chartData); +// } catch (error) { +// Sentry.captureException({ +// message: "Chart Migration Failed", +// oldData: currentDSL.chartData, +// }); +// currentDSL.chartData = []; +// } +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map(migrateOldChartData); +// } +// return currentDSL; +// }; + +// /** +// * changes chartData which we were using as array. now it will be a object +// * +// * +// * @param currentDSL +// * @returns +// */ +// export const migrateChartDataFromArrayToObject = (currentDSL: DSLWidget) => { +// currentDSL.children = currentDSL.children?.map((children: DSLWidget) => { +// if (children.type === "CHART_WIDGET") { +// if (Array.isArray(children.chartData)) { +// const newChartData = {}; +// const dynamicBindingPathList = children?.dynamicBindingPathList +// ? children?.dynamicBindingPathList.slice() +// : []; + +// children.chartData.map((datum: any, index: number) => { +// const generatedKey = generateReactKey(); +// set(newChartData, `${generatedKey}`, datum); + +// if ( +// Array.isArray(children.dynamicBindingPathList) && +// children.dynamicBindingPathList?.findIndex( +// (path) => (path.key = `chartData[${index}].data`), +// ) > -1 +// ) { +// const foundIndex = children.dynamicBindingPathList.findIndex( +// (path) => (path.key = `chartData[${index}].data`), +// ); + +// dynamicBindingPathList[foundIndex] = { +// key: `chartData.${generatedKey}.data`, +// }; +// } +// }); + +// children.dynamicBindingPathList = dynamicBindingPathList; +// children.chartData = newChartData; +// } +// } else if ( +// children.type === "CONTAINER_WIDGET" || +// children.type === "FORM_WIDGET" || +// children.type === "CANVAS_WIDGET" || +// children.type === "TABS_WIDGET" +// ) { +// children = migrateChartDataFromArrayToObject(children); +// } + +// return children; +// }); + +// return currentDSL; +// }; + +// const pixelToNumber = (pixel: string) => { +// if (pixel.includes("px")) { +// return parseInt(pixel.split("px").join("")); +// } +// return 0; +// }; + +// export const calculateDynamicHeight = () => { +// const screenHeight = window.innerHeight; +// const gridRowHeight = GridDefaults.DEFAULT_GRID_ROW_HEIGHT; +// // DGRH - DEFAULT_GRID_ROW_HEIGHT +// // View Mode: Header height + Page Selection Tab = 8 * DGRH (approx) +// // Edit Mode: Header height + Canvas control = 8 * DGRH (approx) +// // buffer: ~8 grid row height +// const buffer = +// gridRowHeight + +// 2 * pixelToNumber(theme.smallHeaderHeight) + +// pixelToNumber(theme.bottomBarHeight); +// const calculatedMinHeight = +// Math.floor((screenHeight - buffer) / gridRowHeight) * gridRowHeight; +// return calculatedMinHeight; +// }; + +// export const migrateInitialValues = (currentDSL: DSLWidget) => { +// currentDSL.children = currentDSL.children?.map((child: DSLWidget) => { +// if (child.type === "INPUT_WIDGET") { +// child = { +// isRequired: false, +// isDisabled: false, +// resetOnSubmit: false, +// ...child, +// }; +// } else if (child.type === "DROP_DOWN_WIDGET") { +// child = { +// isRequired: false, +// isDisabled: false, +// ...child, +// }; +// } else if (child.type === "DATE_PICKER_WIDGET2") { +// child = { +// minDate: "2001-01-01 00:00", +// maxDate: "2041-12-31 23:59", +// isRequired: false, +// ...child, +// }; +// } else if (child.type === "SWITCH_WIDGET") { +// child = { +// isDisabled: false, +// ...child, +// }; +// } else if (child.type === "ICON_WIDGET") { +// child = { +// isRequired: false, +// ...child, +// }; +// } else if (child.type === "VIDEO_WIDGET") { +// child = { +// isRequired: false, +// isDisabled: false, +// ...child, +// }; +// } else if (child.type === "CHECKBOX_WIDGET") { +// child = { +// isDisabled: false, +// isRequired: false, +// ...child, +// }; +// } else if (child.type === "RADIO_GROUP_WIDGET") { +// child = { +// isDisabled: false, +// isRequired: false, +// ...child, +// }; +// } else if (child.type === "FILE_PICKER_WIDGET") { +// child = { +// isDisabled: false, +// isRequired: false, +// allowedFileTypes: [], +// ...child, +// }; +// } else if (child.children && child.children.length > 0) { +// child = migrateInitialValues(child); +// } +// return child; +// }); +// return currentDSL; +// }; + +// // A rudimentary transform function which updates the DSL based on its version. +// // A more modular approach needs to be designed. +// // This needs the widget config to be already built to migrate correctly +// export const transformDSL = (currentDSL: DSLWidget, newPage = false) => { +// if (currentDSL.version === undefined) { +// // Since this top level widget is a CANVAS_WIDGET, +// // DropTargetComponent needs to know the minimum height the canvas can take +// // See DropTargetUtils.ts +// currentDSL.minHeight = calculateDynamicHeight(); +// currentDSL.bottomRow = +// currentDSL.minHeight - GridDefaults.DEFAULT_GRID_ROW_HEIGHT; +// // For the first time the DSL is created, remove one row from the total possible rows +// // to adjust for padding and margins. +// currentDSL.snapRows = +// Math.floor(currentDSL.bottomRow / GridDefaults.DEFAULT_GRID_ROW_HEIGHT) - +// 1; + +// // Force the width of the canvas to 1224 px +// currentDSL.rightColumn = 1224; +// // The canvas is a CANVAS_WIDGET which doesn't have a background or borders by default +// currentDSL.backgroundColor = "none"; +// currentDSL.containerStyle = "none"; +// currentDSL.type = "CANVAS_WIDGET"; +// currentDSL.detachFromLayout = true; +// currentDSL.canExtend = true; + +// // Update version to make sure this doesn't run every time. +// currentDSL.version = 1; +// } + +// if (currentDSL.version === 1) { +// if (currentDSL.children && currentDSL.children.length > 0) +// currentDSL.children = currentDSL.children.map(updateContainers); +// currentDSL.version = 2; +// } +// if (currentDSL.version === 2) { +// currentDSL = chartDataMigration(currentDSL); +// currentDSL.version = 3; +// } +// if (currentDSL.version === 3) { +// currentDSL = mapDataMigration(currentDSL); +// currentDSL.version = 4; +// } +// if (currentDSL.version === 4) { +// currentDSL = singleChartDataMigration(currentDSL); +// currentDSL.version = 5; +// } +// if (currentDSL.version === 5) { +// currentDSL = tabsWidgetTabsPropertyMigration(currentDSL); +// currentDSL.version = 6; +// } +// if (currentDSL.version === 6) { +// currentDSL = dynamicPathListMigration(currentDSL); +// currentDSL.version = 7; +// } + +// if (currentDSL.version === 7) { +// currentDSL = canvasNameConflictMigration(currentDSL); +// currentDSL.version = 8; +// } + +// if (currentDSL.version === 8) { +// currentDSL = renamedCanvasNameConflictMigration(currentDSL); +// currentDSL.version = 9; +// } + +// if (currentDSL.version === 9) { +// currentDSL = tableWidgetPropertyPaneMigrations(currentDSL); +// currentDSL.version = 10; +// } + +// if (currentDSL.version === 10) { +// currentDSL = addVersionNumberMigration(currentDSL); +// currentDSL.version = 11; +// } + +// if (currentDSL.version === 11) { +// currentDSL = migrateTablePrimaryColumnsBindings(currentDSL); +// currentDSL.version = 12; +// } + +// if (currentDSL.version === 12) { +// currentDSL = migrateIncorrectDynamicBindingPathLists(currentDSL); +// currentDSL.version = 13; +// } + +// if (currentDSL.version === 13) { +// currentDSL = migrateOldChartData(currentDSL); +// currentDSL.version = 14; +// } + +// if (currentDSL.version === 14) { +// currentDSL = rteDefaultValueMigration(currentDSL); +// currentDSL.version = 15; +// } + +// if (currentDSL.version === 15) { +// currentDSL = migrateTextStyleFromTextWidget(currentDSL); +// currentDSL.version = 16; +// } + +// if (currentDSL.version === 16) { +// currentDSL = migrateChartDataFromArrayToObject(currentDSL); +// currentDSL.version = 17; +// } + +// if (currentDSL.version === 17) { +// currentDSL = migrateTabsData(currentDSL); +// currentDSL.version = 18; +// } + +// if (currentDSL.version === 18) { +// currentDSL = migrateInitialValues(currentDSL); +// currentDSL.version = 19; +// } + +// if (currentDSL.version === 19) { +// currentDSL.snapColumns = GridDefaults.DEFAULT_GRID_COLUMNS; +// currentDSL.snapRows = getCanvasSnapRows(currentDSL.bottomRow); +// if (!newPage) { +// currentDSL = migrateToNewLayout(currentDSL); +// } +// currentDSL.version = 20; +// } + +// if (currentDSL.version === 20) { +// currentDSL = migrateNewlyAddedTabsWidgetsMissingData(currentDSL); +// currentDSL.version = 21; +// } + +// if (currentDSL.version === 21) { +// const canvasWidgets = flattenDSL(currentDSL); +// currentDSL = migrateWidgetsWithoutLeftRightColumns( +// currentDSL, +// canvasWidgets, +// ); +// currentDSL = migrateOverFlowingTabsWidgets(currentDSL, canvasWidgets); +// currentDSL.version = 22; +// } + +// if (currentDSL.version === 22) { +// currentDSL = migrateTableWidgetParentRowSpaceProperty(currentDSL); +// currentDSL.version = 23; +// } + +// if (currentDSL.version === 23) { +// currentDSL = addLogBlackListToAllListWidgetChildren(currentDSL); +// currentDSL.version = 24; +// } + +// if (currentDSL.version === 24) { +// currentDSL = migrateTableWidgetHeaderVisibilityProperties(currentDSL); +// currentDSL.version = 25; +// } + +// if (currentDSL.version === 25) { +// currentDSL = migrateItemsToListDataInListWidget(currentDSL); +// currentDSL.version = 26; +// } + +// if (currentDSL.version === 26) { +// currentDSL = migrateDatePickerMinMaxDate(currentDSL); +// currentDSL.version = 27; +// } +// if (currentDSL.version === 27) { +// currentDSL = migrateFilterValueForDropDownWidget(currentDSL); +// currentDSL.version = 28; +// } + +// if (currentDSL.version === 28) { +// currentDSL = migrateTablePrimaryColumnsComputedValue(currentDSL); +// currentDSL.version = 29; +// } + +// if (currentDSL.version === 29) { +// currentDSL = migrateToNewMultiSelect(currentDSL); +// currentDSL.version = 30; +// } +// if (currentDSL.version === 30) { +// currentDSL = migrateTableWidgetDelimiterProperties(currentDSL); +// currentDSL.version = 31; +// } + +// if (currentDSL.version === 31) { +// currentDSL = migrateIsDisabledToButtonColumn(currentDSL); +// currentDSL.version = 32; +// } + +// if (currentDSL.version === 32) { +// currentDSL = migrateTableDefaultSelectedRow(currentDSL); +// currentDSL.version = 33; +// } + +// if (currentDSL.version === 33) { +// currentDSL = migrateMenuButtonWidgetButtonProperties(currentDSL); +// currentDSL.version = 34; +// } + +// if (currentDSL.version === 34) { +// currentDSL = migrateButtonWidgetValidation(currentDSL); +// currentDSL.version = 35; +// } + +// if (currentDSL.version === 35) { +// currentDSL = migrateInputValidation(currentDSL); +// currentDSL.version = 36; +// } + +// if (currentDSL.version === 36) { +// currentDSL = revertTableDefaultSelectedRow(currentDSL); +// currentDSL.version = 37; +// } + +// if (currentDSL.version === 37) { +// currentDSL = migrateTableSanitizeColumnKeys(currentDSL); +// currentDSL.version = 38; +// } + +// if (currentDSL.version === 38) { +// currentDSL = migrateResizableModalWidgetProperties(currentDSL); +// currentDSL.version = 39; +// } + +// if (currentDSL.version === 39) { +// currentDSL = migrateTableWidgetSelectedRowBindings(currentDSL); +// currentDSL.version = 40; +// } + +// if (currentDSL.version === 40) { +// currentDSL = revertButtonStyleToButtonColor(currentDSL); +// currentDSL.version = 41; +// } + +// if (currentDSL.version === 41) { +// currentDSL = migrateButtonVariant(currentDSL); +// currentDSL.version = 42; +// } + +// if (currentDSL.version === 42) { +// currentDSL = migrateMapWidgetIsClickedMarkerCentered(currentDSL); +// currentDSL.version = 43; +// } + +// if (currentDSL.version === 43) { +// currentDSL = mapAllowHorizontalScrollMigration(currentDSL); +// currentDSL.version = 44; +// } +// if (currentDSL.version === 44) { +// currentDSL = isSortableMigration(currentDSL); +// currentDSL.version = 45; +// } + +// if (currentDSL.version === 45) { +// currentDSL = migrateTableWidgetIconButtonVariant(currentDSL); +// currentDSL.version = 46; +// } + +// if (currentDSL.version === 46) { +// currentDSL = migrateCheckboxGroupWidgetInlineProperty(currentDSL); +// currentDSL.version = 47; +// } + +// if (currentDSL.version === 47) { +// // We're skipping this to fix a bad table migration. +// // skipped migration is added as version 51 +// currentDSL.version = 48; +// } + +// if (currentDSL.version === 48) { +// currentDSL = migrateRecaptchaType(currentDSL); +// currentDSL.version = 49; +// } + +// if (currentDSL.version === 49) { +// currentDSL = addPrivateWidgetsToAllListWidgets(currentDSL); +// currentDSL.version = 50; +// } + +// if (currentDSL.version === 50) { +// /* +// * We're skipping this to fix a bad table migration - migrateTableWidgetNumericColumnName +// * it overwrites the computedValue of the table columns +// */ + +// currentDSL.version = 51; +// } + +// if (currentDSL.version === 51) { +// currentDSL = migratePhoneInputWidgetAllowFormatting(currentDSL); +// currentDSL.version = 52; +// } + +// if (currentDSL.version === 52) { +// currentDSL = migrateModalIconButtonWidget(currentDSL); +// currentDSL.version = 53; +// } + +// if (currentDSL.version === 53) { +// currentDSL = migrateScrollTruncateProperties(currentDSL); +// currentDSL.version = 54; +// } + +// if (currentDSL.version === 54) { +// currentDSL = migratePhoneInputWidgetDefaultDialCode(currentDSL); +// currentDSL.version = 55; +// } + +// if (currentDSL.version === 55) { +// currentDSL = migrateCurrencyInputWidgetDefaultCurrencyCode(currentDSL); +// currentDSL.version = 56; +// } + +// if (currentDSL.version === 56) { +// currentDSL = migrateRadioGroupAlignmentProperty(currentDSL); +// currentDSL.version = 57; +// } + +// if (currentDSL.version === 57) { +// currentDSL = migrateStylingPropertiesForTheming(currentDSL); +// currentDSL.version = 58; +// } + +// if (currentDSL.version === 58) { +// currentDSL = migrateCheckboxSwitchProperty(currentDSL); +// currentDSL.version = 59; +// } + +// if (currentDSL.version === 59) { +// /** +// * migrateChartWidgetReskinningData function will be executed again in version 61, +// * since for older apps the accentColor and fontFamily didn't get migrated. +// */ +// currentDSL = migrateChartWidgetReskinningData(currentDSL); +// currentDSL.version = 60; +// } + +// if (currentDSL.version === 60) { +// currentDSL = migrateTableWidgetV2Validation(currentDSL); +// currentDSL.version = 61; +// } + +// if (currentDSL.version === 61) { +// currentDSL = migrateChartWidgetReskinningData(currentDSL); +// currentDSL.version = 62; +// } + +// if (currentDSL.version === 62) { +// currentDSL = MigrateSelectTypeWidgetDefaultValue(currentDSL); +// currentDSL.version = 63; +// } + +// if (currentDSL.version === 63) { +// currentDSL = migrateMapChartWidgetReskinningData(currentDSL); +// currentDSL.version = 64; +// } + +// if (currentDSL.version === 64) { +// currentDSL = migrateRateWidgetDisabledState(currentDSL); +// currentDSL.version = 65; +// } + +// if (currentDSL.version === 65) { +// currentDSL = migrateCodeScannerLayout(currentDSL); +// currentDSL.version = 66; +// } + +// if (currentDSL.version === 66) { +// currentDSL = migrateTableWidgetV2ValidationBinding(currentDSL); +// currentDSL.version = 67; +// } + +// if (currentDSL.version === 67) { +// currentDSL = migrateLabelPosition(currentDSL); +// currentDSL.version = 68; +// } + +// if (currentDSL.version === 68) { +// currentDSL = migratePropertiesForDynamicHeight(currentDSL); +// currentDSL.version = 69; +// } + +// if (currentDSL.version === 69) { +// currentDSL = migrateMenuButtonDynamicItems(currentDSL); +// currentDSL.version = 70; +// } + +// if (currentDSL.version === 70) { +// currentDSL = migrateChildStylesheetFromDynamicBindingPathList(currentDSL); +// currentDSL.version = 71; +// } + +// if (currentDSL.version === 71) { +// currentDSL = migrateTableWidgetV2SelectOption(currentDSL); +// currentDSL.version = 72; +// } + +// if (currentDSL.version === 72) { +// currentDSL = migrateListWidgetChildrenForAutoHeight(currentDSL); +// currentDSL.version = 73; +// } + +// if (currentDSL.version === 73) { +// currentDSL = migrateInputWidgetShowStepArrows(currentDSL); +// currentDSL.version = 74; +// } + +// if (currentDSL.version === 74) { +// currentDSL = migrateMenuButtonDynamicItemsInsideTableWidget(currentDSL); +// currentDSL.version = 75; +// } + +// if (currentDSL.version === 75) { +// currentDSL = migrateInputWidgetsMultiLineInputType(currentDSL); +// currentDSL.version = 76; +// } + +// if (currentDSL.version === 76) { +// currentDSL = migrateColumnFreezeAttributes(currentDSL); +// currentDSL.version = 77; +// } + +// if (currentDSL.version === 77) { +// currentDSL = migrateTableSelectOptionAttributesForNewRow(currentDSL); +// currentDSL.version = 78; +// } + +// if (currentDSL.version == 78) { +// currentDSL = +// migrateBindingPrefixSuffixForInlineEditValidationControl(currentDSL); +// currentDSL.version = 79; +// } + +// if (currentDSL.version == 79) { +// currentDSL = migrateTableWidgetTableDataJsMode(currentDSL); +// currentDSL.version = 80; +// } + +// if (currentDSL.version === 80) { +// currentDSL = migrateSelectWidgetOptionToSourceData(currentDSL); +// currentDSL.version = 81; +// } + +// if (currentDSL.version === 81) { +// currentDSL = migrateSelectWidgetSourceDataBindingPathList(currentDSL); +// currentDSL.version = 82; +// } + +// if (currentDSL.version == 82) { +// currentDSL = migrateChartWidgetLabelOrientationStaggerOption(currentDSL); +// currentDSL.version = 83; +// } + +// if (currentDSL.version == 83) { +// currentDSL = migrateAddShowHideDataPointLabels(currentDSL); +// currentDSL.version = 84; +// } + +// if (currentDSL.version === 84) { +// currentDSL = migrateSelectWidgetAddSourceDataPropertyPathList(currentDSL); +// currentDSL.version = 85; +// } + +// if (currentDSL.version === 85) { +// currentDSL = migrateDefaultValuesForCustomEChart(currentDSL); +// currentDSL.version = 86; +// } + +// if (currentDSL.version === 86) { +// currentDSL = migrateTableServerSideFiltering(currentDSL); +// currentDSL.version = LATEST_PAGE_VERSION; +// } + +// return currentDSL; +// }; + +// export const migrateButtonVariant = (currentDSL: DSLWidget) => { +// if ( +// currentDSL.type === "BUTTON_WIDGET" || +// currentDSL.type === "FORM_BUTTON_WIDGET" || +// currentDSL.type === "ICON_BUTTON_WIDGET" +// ) { +// switch (currentDSL.buttonVariant) { +// case "OUTLINE": +// currentDSL.buttonVariant = ButtonVariantTypes.SECONDARY; +// break; +// case "GHOST": +// currentDSL.buttonVariant = ButtonVariantTypes.TERTIARY; +// break; +// default: +// currentDSL.buttonVariant = ButtonVariantTypes.PRIMARY; +// } +// } +// if (currentDSL.type === "MENU_BUTTON_WIDGET") { +// switch (currentDSL.menuVariant) { +// case "OUTLINE": +// currentDSL.menuVariant = ButtonVariantTypes.SECONDARY; +// break; +// case "GHOST": +// currentDSL.menuVariant = ButtonVariantTypes.TERTIARY; +// break; +// default: +// currentDSL.menuVariant = ButtonVariantTypes.PRIMARY; +// } +// } +// if (currentDSL.type === "TABLE_WIDGET") { +// if (currentDSL.hasOwnProperty("primaryColumns")) { +// Object.keys(currentDSL.primaryColumns).forEach((column) => { +// if (currentDSL.primaryColumns[column].columnType === "iconButton") { +// let newVariant = ButtonVariantTypes.PRIMARY; +// switch (currentDSL.primaryColumns[column].buttonVariant) { +// case "OUTLINE": +// newVariant = ButtonVariantTypes.SECONDARY; +// break; +// case "GHOST": +// newVariant = ButtonVariantTypes.TERTIARY; +// break; +// } +// currentDSL.primaryColumns[column].buttonVariant = newVariant; +// } +// }); +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((child) => +// migrateButtonVariant(child), +// ); +// } +// return currentDSL; +// }; + +// export const revertTableDefaultSelectedRow = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "TABLE_WIDGET") { +// if (currentDSL.version === 1 && currentDSL.defaultSelectedRow === "0") +// currentDSL.defaultSelectedRow = undefined; +// // update version to 3 for all table dsl +// currentDSL.version = 3; +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((child) => +// revertTableDefaultSelectedRow(child), +// ); +// } +// return currentDSL; +// }; + +// export const revertButtonStyleToButtonColor = (currentDSL: DSLWidget) => { +// if ( +// currentDSL.type === "BUTTON_WIDGET" || +// currentDSL.type === "FORM_BUTTON_WIDGET" || +// currentDSL.type === "ICON_BUTTON_WIDGET" +// ) { +// if (currentDSL.hasOwnProperty("buttonStyle")) { +// switch (currentDSL.buttonStyle) { +// case ButtonStyleTypes.DANGER: +// currentDSL.buttonColor = Colors.DANGER_SOLID; +// break; +// case ButtonStyleTypes.PRIMARY: +// currentDSL.buttonColor = Colors.GREEN; +// break; +// case ButtonStyleTypes.WARNING: +// currentDSL.buttonColor = Colors.WARNING_SOLID; +// break; +// case ButtonStyleTypes.INFO: +// currentDSL.buttonColor = Colors.INFO_SOLID; +// break; +// case ButtonStyleTypes.SECONDARY: +// currentDSL.buttonColor = Colors.GRAY; +// break; +// case "PRIMARY_BUTTON": +// currentDSL.buttonColor = Colors.GREEN; +// break; +// case "SECONDARY_BUTTON": +// currentDSL.buttonColor = Colors.GREEN; +// currentDSL.buttonVariant = ButtonVariantTypes.SECONDARY; +// break; +// case "DANGER_BUTTON": +// currentDSL.buttonColor = Colors.DANGER_SOLID; +// break; +// default: +// if (!currentDSL.buttonColor) currentDSL.buttonColor = Colors.GREEN; +// break; +// } +// delete currentDSL.buttonStyle; +// } +// } +// if (currentDSL.type === "MENU_BUTTON_WIDGET") { +// if (currentDSL.hasOwnProperty("menuStyle")) { +// switch (currentDSL.menuStyle) { +// case ButtonStyleTypes.DANGER: +// currentDSL.menuColor = Colors.DANGER_SOLID; +// break; +// case ButtonStyleTypes.PRIMARY: +// currentDSL.menuColor = Colors.GREEN; +// break; +// case ButtonStyleTypes.WARNING: +// currentDSL.menuColor = Colors.WARNING_SOLID; +// break; +// case ButtonStyleTypes.INFO: +// currentDSL.menuColor = Colors.INFO_SOLID; +// break; +// case ButtonStyleTypes.SECONDARY: +// currentDSL.menuColor = Colors.GRAY; +// break; +// default: +// if (!currentDSL.menuColor) currentDSL.menuColor = Colors.GREEN; +// break; +// } +// delete currentDSL.menuStyle; +// delete currentDSL.prevMenuStyle; +// } +// } +// if (currentDSL.type === "TABLE_WIDGET") { +// if (currentDSL.hasOwnProperty("primaryColumns")) { +// Object.keys(currentDSL.primaryColumns).forEach((column) => { +// if (currentDSL.primaryColumns[column].columnType === "button") { +// currentDSL.primaryColumns[column].buttonColor = +// currentDSL.primaryColumns[column].buttonStyle; +// delete currentDSL.primaryColumns[column].buttonStyle; +// } +// }); +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((child) => +// revertButtonStyleToButtonColor(child), +// ); +// } +// return currentDSL; +// }; + +// export const migrateInputValidation = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "INPUT_WIDGET") { +// if (has(currentDSL, "validation")) { +// // convert boolean to string expression +// if (typeof currentDSL.validation === "boolean") { +// currentDSL.validation = String(currentDSL.validation); +// } else if (typeof currentDSL.validation !== "string") { +// // for any other type of value set to default undefined +// currentDSL.validation = undefined; +// } +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((child) => +// migrateInputValidation(child), +// ); +// } +// return currentDSL; +// }; + +// export const migrateButtonWidgetValidation = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "INPUT_WIDGET") { +// if (!has(currentDSL, "validation")) { +// currentDSL.validation = true; +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children.map((eachWidgetDSL: DSLWidget) => { +// migrateButtonWidgetValidation(eachWidgetDSL); +// }); +// } +// return currentDSL; +// }; + +// export const migrateTableDefaultSelectedRow = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "TABLE_WIDGET") { +// if (!currentDSL.defaultSelectedRow) currentDSL.defaultSelectedRow = "0"; +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((child) => +// migrateTableDefaultSelectedRow(child), +// ); +// } +// return currentDSL; +// }; + +// const addIsDisabledToButtonColumn = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "TABLE_WIDGET") { +// if (!isEmpty(currentDSL.primaryColumns)) { +// for (const key of Object.keys( +// currentDSL.primaryColumns as Record, +// )) { +// if (currentDSL.primaryColumns[key].columnType === "button") { +// if (!currentDSL.primaryColumns[key].hasOwnProperty("isDisabled")) { +// currentDSL.primaryColumns[key]["isDisabled"] = false; +// } +// } +// if (!currentDSL.primaryColumns[key].hasOwnProperty("isCellVisible")) { +// currentDSL.primaryColumns[key]["isCellVisible"] = true; +// } +// } +// } +// } +// return currentDSL; +// }; + +// export const migrateIsDisabledToButtonColumn = (currentDSL: DSLWidget) => { +// const newDSL = addIsDisabledToButtonColumn(currentDSL); + +// newDSL.children = newDSL.children?.map((children: DSLWidget) => { +// return migrateIsDisabledToButtonColumn(children); +// }); +// return currentDSL; +// }; + +// export const migrateToNewMultiSelect = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "DROP_DOWN_WIDGET") { +// if (currentDSL.selectionType === "MULTI_SELECT") { +// currentDSL.type = "MULTI_SELECT_WIDGET"; +// delete currentDSL.isFilterable; +// } +// delete currentDSL.selectionType; +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((child) => +// migrateToNewMultiSelect(child), +// ); +// } +// return currentDSL; +// }; + +// export const migrateObjectFitToImageWidget = (dsl: DSLWidget) => { +// const addObjectFitProperty = (widgetProps: DSLWidget) => { +// widgetProps.objectFit = "cover"; +// if (widgetProps.children && widgetProps.children.length) { +// widgetProps.children.forEach((eachWidgetProp: DSLWidget) => { +// if (widgetProps.type === "IMAGE_WIDGET") { +// addObjectFitProperty(eachWidgetProp); +// } +// }); +// } +// }; +// addObjectFitProperty(dsl); +// return dsl; +// }; + +// export const migrateOverFlowingTabsWidgets = ( +// currentDSL: DSLWidget, +// canvasWidgets: any, +// ) => { +// if ( +// currentDSL.type === "TABS_WIDGET" && +// currentDSL.version === 3 && +// currentDSL.children && +// currentDSL.children.length +// ) { +// const tabsWidgetHeight = +// (currentDSL.bottomRow - currentDSL.topRow) * currentDSL.parentRowSpace; +// const widgetHasOverflowingChildren = currentDSL.children.some((eachTab) => { +// if (eachTab.children && eachTab.children.length) { +// return eachTab.children.some((child: DSLWidget) => { +// if (canvasWidgets[child.widgetId].repositioned) { +// const tabHeight = child.bottomRow * child.parentRowSpace; +// return tabsWidgetHeight < tabHeight; +// } +// return false; +// }); +// } +// return false; +// }); +// if (widgetHasOverflowingChildren) { +// currentDSL.shouldScrollContents = true; +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((eachChild) => +// migrateOverFlowingTabsWidgets(eachChild, canvasWidgets), +// ); +// } +// return currentDSL; +// }; + +// export const migrateWidgetsWithoutLeftRightColumns = ( +// currentDSL: DSLWidget, +// canvasWidgets: any, +// ) => { +// if ( +// currentDSL.widgetId !== MAIN_CONTAINER_WIDGET_ID && +// !( +// currentDSL.hasOwnProperty("leftColumn") && +// currentDSL.hasOwnProperty("rightColumn") +// ) +// ) { +// try { +// const nextRow = nextAvailableRowInContainer( +// currentDSL.parentId || MAIN_CONTAINER_WIDGET_ID, +// omit(canvasWidgets, [currentDSL.widgetId]), +// ); +// canvasWidgets[currentDSL.widgetId].repositioned = true; +// const leftColumn = 0; +// // TODO(abhinav): Figure out a way to get the correct values from the widgets +// const rightColumn = 4; +// const bottomRow = nextRow + (currentDSL.bottomRow - currentDSL.topRow); +// const topRow = nextRow; +// currentDSL = { +// ...currentDSL, +// topRow, +// bottomRow, +// rightColumn, +// leftColumn, +// }; +// } catch (error) { +// Sentry.captureException({ +// message: "Migrating position of widget on data loss failed", +// oldData: currentDSL, +// }); +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((dsl) => +// migrateWidgetsWithoutLeftRightColumns(dsl, canvasWidgets), +// ); +// } +// return currentDSL; +// }; + +// export const migrateNewlyAddedTabsWidgetsMissingData = ( +// currentDSL: DSLWidget, +// ) => { +// if (currentDSL.type === "TABS_WIDGET" && currentDSL.version === 2) { +// try { +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map((each) => { +// if (has(currentDSL, ["leftColumn", "rightColumn", "bottomRow"])) { +// return each; +// } +// return { +// ...each, +// leftColumn: 0, +// rightColumn: +// (currentDSL.rightColumn - currentDSL.leftColumn) * +// currentDSL.parentColumnSpace, +// bottomRow: +// (currentDSL.bottomRow - currentDSL.topRow) * +// currentDSL.parentRowSpace, +// }; +// }); +// } +// currentDSL.version = 3; +// } catch (error) { +// Sentry.captureException({ +// message: "Tabs Migration to add missing fields Failed", +// oldData: currentDSL.children, +// }); +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children = currentDSL.children.map( +// migrateNewlyAddedTabsWidgetsMissingData, +// ); +// } +// return currentDSL; +// }; + +// export const migrateToNewLayout = (dsl: DSLWidget) => { +// const scaleWidget = (widgetProps: DSLWidget) => { +// widgetProps.bottomRow *= GRID_DENSITY_MIGRATION_V1; +// widgetProps.topRow *= GRID_DENSITY_MIGRATION_V1; +// widgetProps.leftColumn *= GRID_DENSITY_MIGRATION_V1; +// widgetProps.rightColumn *= GRID_DENSITY_MIGRATION_V1; +// if (widgetProps.children && widgetProps.children.length) { +// widgetProps.children.forEach((eachWidgetProp: DSLWidget) => { +// scaleWidget(eachWidgetProp); +// }); +// } +// }; +// scaleWidget(dsl); +// return dsl; +// }; + +// export const checkIfMigrationIsNeeded = ( +// fetchPageResponse?: FetchPageResponse, +// ) => { +// const currentDSL = fetchPageResponse?.data.layouts[0].dsl; +// if (!currentDSL) return false; +// return currentDSL.version !== LATEST_PAGE_VERSION; +// }; + +// export const migrateDatePickerMinMaxDate = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "DATE_PICKER_WIDGET2" && currentDSL.version === 2) { +// if (currentDSL.minDate === "2001-01-01 00:00") { +// currentDSL.minDate = "1920-12-31T18:30:00.000Z"; +// } +// if (currentDSL.maxDate === "2041-12-31 23:59") { +// currentDSL.maxDate = "2121-12-31T18:29:00.000Z"; +// } +// } +// if (currentDSL.children && currentDSL.children.length) { +// currentDSL.children.map((eachWidgetDSL: DSLWidget) => { +// migrateDatePickerMinMaxDate(eachWidgetDSL); +// }); +// } +// return currentDSL; +// }; + +// const addFilterDefaultValue = (currentDSL: DSLWidget) => { +// if (currentDSL.type === "DROP_DOWN_WIDGET") { +// if (!currentDSL.hasOwnProperty("isFilterable")) { +// currentDSL.isFilterable = true; +// } +// } +// return currentDSL; +// }; +// export const migrateFilterValueForDropDownWidget = (currentDSL: DSLWidget) => { +// const newDSL = addFilterDefaultValue(currentDSL); + +// newDSL.children = newDSL.children?.map((children: DSLWidget) => { +// return migrateFilterValueForDropDownWidget(children); +// }); + +// return newDSL; +// }; diff --git a/app/client/src/utils/WidgetPropsUtils.test.tsx b/app/client/src/utils/WidgetPropsUtils.test.tsx index 6f6e32f2b3..344c442ce3 100644 --- a/app/client/src/utils/WidgetPropsUtils.test.tsx +++ b/app/client/src/utils/WidgetPropsUtils.test.tsx @@ -1,25 +1,8 @@ -import * as generators from "utils/generators"; -import { RenderModes } from "constants/WidgetConstants"; import { - migrateChartDataFromArrayToObject, - migrateToNewLayout, - migrateInitialValues, - migrateToNewMultiSelect, -} from "./DSLMigrations"; -import { - buildChildren, - widgetCanvasFactory, - buildDslWithChildren, -} from "test/factories/WidgetFactoryUtils"; -import { cloneDeep } from "lodash"; -import { GRID_DENSITY_MIGRATION_V1 } from "WidgetProvider/constants"; -import { - extractCurrentDSL, getDraggingSpacesFromBlocks, getMousePositionsOnCanvas, } from "./WidgetPropsUtils"; import type { WidgetDraggingBlock } from "layoutSystems/common/canvasArenas/ArenaTypes"; -import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants"; describe("WidgetProps tests", () => { it("should convert WidgetDraggingBlocks to occupied Spaces", () => { @@ -92,6 +75,7 @@ describe("WidgetProps tests", () => { right: 50, }); }); + it("getMousePositionsOnCanvas should even return negative Mouse Position relative to Canvas", () => { const gridProps = { parentColumnSpace: 10, @@ -110,820 +94,4 @@ describe("WidgetProps tests", () => { right: 0, }); }); - it("it checks if array to object migration functions for chart widget ", () => { - const input = { - type: "CANVAS_WIDGET", - widgetId: "0", - widgetName: "canvas", - parentColumnSpace: 1, - parentRowSpace: 1, - leftColumn: 0, - rightColumn: 0, - topRow: 0, - bottomRow: 0, - version: 17, - isLoading: false, - renderMode: RenderModes.CANVAS, - children: [ - { - widgetId: "some-random-id", - widgetName: "chart1", - parentColumnSpace: 1, - parentRowSpace: 1, - leftColumn: 0, - rightColumn: 0, - topRow: 0, - bottomRow: 0, - version: 17, - isLoading: false, - renderMode: RenderModes.CANVAS, - type: "CHART_WIDGET", - chartData: [ - { - seriesName: "seris1", - data: [{ x: 1, y: 2 }], - }, - ], - }, - ], - }; - - // mocking implementation of our generateReactKey function - const generatorReactKeyMock = jest.spyOn(generators, "generateReactKey"); - generatorReactKeyMock.mockImplementation(() => "some-random-key"); - - const result = migrateChartDataFromArrayToObject(input); - - const output = { - type: "CANVAS_WIDGET", - widgetId: "0", - widgetName: "canvas", - parentColumnSpace: 1, - parentRowSpace: 1, - leftColumn: 0, - rightColumn: 0, - topRow: 0, - bottomRow: 0, - version: 17, - isLoading: false, - renderMode: RenderModes.CANVAS, - children: [ - { - widgetId: "some-random-id", - widgetName: "chart1", - parentColumnSpace: 1, - parentRowSpace: 1, - leftColumn: 0, - rightColumn: 0, - topRow: 0, - bottomRow: 0, - version: 17, - isLoading: false, - renderMode: RenderModes.CANVAS, - type: "CHART_WIDGET", - dynamicBindingPathList: [], - chartData: { - "some-random-key": { - seriesName: "seris1", - data: [{ x: 1, y: 2 }], - }, - }, - }, - ], - }; - - expect(result).toStrictEqual(output); - }); - it("Grid density migration - Main container widgets", () => { - const dsl: any = buildDslWithChildren([{ type: "TABS_WIDGET" }]); - const newMigratedDsl: any = migrateToNewLayout(cloneDeep(dsl)); - expect(dsl.children[0].topRow * GRID_DENSITY_MIGRATION_V1).toBe( - newMigratedDsl.children[0].topRow, - ); - expect(dsl.children[0].bottomRow * GRID_DENSITY_MIGRATION_V1).toBe( - newMigratedDsl.children[0].bottomRow, - ); - expect(dsl.children[0].rightColumn * GRID_DENSITY_MIGRATION_V1).toBe( - newMigratedDsl.children[0].rightColumn, - ); - expect(dsl.children[0].leftColumn * GRID_DENSITY_MIGRATION_V1).toBe( - newMigratedDsl.children[0].leftColumn, - ); - }); - - it("Grid density migration - widgets inside a container", () => { - const childrenInsideContainer = buildChildren([ - { type: "SWITCH_WIDGET" }, - { type: "FORM_WIDGET" }, - { type: "CONTAINER_WIDGET" }, - ]); - const dslWithContainer: any = buildDslWithChildren([ - { type: "CONTAINER_WIDGET", children: childrenInsideContainer }, - ]); - const newMigratedDsl: any = migrateToNewLayout(cloneDeep(dslWithContainer)); - // Container migrated checks - const containerWidget = dslWithContainer.children[0]; - const migratedContainer = newMigratedDsl.children[0]; - expect(containerWidget.topRow * GRID_DENSITY_MIGRATION_V1).toBe( - migratedContainer.topRow, - ); - expect(containerWidget.bottomRow * GRID_DENSITY_MIGRATION_V1).toBe( - migratedContainer.bottomRow, - ); - expect(containerWidget.rightColumn * GRID_DENSITY_MIGRATION_V1).toBe( - migratedContainer.rightColumn, - ); - expect(containerWidget.leftColumn * GRID_DENSITY_MIGRATION_V1).toBe( - migratedContainer.leftColumn, - ); - // Children inside container miragted - - containerWidget.children.forEach((eachChild: any, index: any) => { - const migratedChild = migratedContainer.children[index]; - expect(eachChild.topRow * GRID_DENSITY_MIGRATION_V1).toBe( - migratedChild.topRow, - ); - expect(eachChild.bottomRow * GRID_DENSITY_MIGRATION_V1).toBe( - migratedChild.bottomRow, - ); - expect(eachChild.rightColumn * GRID_DENSITY_MIGRATION_V1).toBe( - migratedChild.rightColumn, - ); - expect(eachChild.leftColumn * GRID_DENSITY_MIGRATION_V1).toBe( - migratedChild.leftColumn, - ); - }); - }); -}); - -describe("Initial value migration test", () => { - const containerWidget = { - widgetName: "MainContainer", - backgroundColor: "none", - rightColumn: 1118, - snapColumns: 16, - detachFromLayout: true, - widgetId: "0", - topRow: 0, - bottomRow: 560, - snapRows: 33, - isLoading: false, - parentRowSpace: 1, - type: "CANVAS_WIDGET", - renderMode: RenderModes.CANVAS, - canExtend: true, - version: 18, - minHeight: 600, - parentColumnSpace: 1, - dynamicTriggerPathList: [], - dynamicBindingPathList: [], - leftColumn: 0, - }; - - it("Input widget", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "Input1", - rightColumn: 8, - widgetId: "ra3vyy3nt2", - topRow: 1, - bottomRow: 2, - parentRowSpace: 40, - isVisible: true, - label: "", - type: "INPUT_WIDGET", - version: 1, - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 3, - inputType: "TEXT", - renderMode: RenderModes.CANVAS, - resetOnSubmit: false, - }, - ], - }; - const output = { - ...containerWidget, - children: [ - { - widgetName: "Input1", - rightColumn: 8, - widgetId: "ra3vyy3nt2", - topRow: 1, - bottomRow: 2, - parentRowSpace: 40, - isVisible: true, - label: "", - type: "INPUT_WIDGET", - version: 1, - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - renderMode: "CANVAS", - leftColumn: 3, - inputType: "TEXT", - // will not override existing property - resetOnSubmit: false, - // following properties get added - isRequired: false, - isDisabled: false, - }, - ], - }; - - expect(migrateInitialValues(input)).toEqual(output); - }); - - it("SELECT_WIDGET", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "Select1", - rightColumn: 6, - selectionType: "SINGLE_SELECT", - widgetId: "1e3ytl2pl9", - topRow: 3, - bottomRow: 4, - parentRowSpace: 40, - isVisible: true, - label: "", - isRequired: false, - isDisabled: false, - type: "SELECT_WIDGET", - version: 1, - parentId: "0", - isLoading: false, - defaultOptionValue: "GREEN", - parentColumnSpace: 67.375, - renderMode: RenderModes.CANVAS, - leftColumn: 1, - options: [ - { - label: "Blue", - value: "BLUE", - }, - { - label: "Green", - value: "GREEN", - }, - { - label: "Red", - value: "RED", - }, - ], - }, - ], - }; - - const output = { - ...containerWidget, - children: [ - { - widgetName: "Select1", - rightColumn: 6, - widgetId: "1e3ytl2pl9", - topRow: 3, - bottomRow: 4, - parentRowSpace: 40, - isVisible: true, - label: "", - selectionType: "SINGLE_SELECT", - type: "SELECT_WIDGET", - version: 1, - parentId: "0", - isLoading: false, - defaultOptionValue: "GREEN", - parentColumnSpace: 67.375, - renderMode: "CANVAS", - leftColumn: 1, - options: [ - { - label: "Blue", - value: "BLUE", - }, - { - label: "Green", - value: "GREEN", - }, - { - label: "Red", - value: "RED", - }, - ], - isRequired: false, - isDisabled: false, - }, - ], - }; - - expect(migrateInitialValues(input)).toEqual(output); - }); - - it("MULTI_SELECT_WIDGET", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "Select2", - rightColumn: 59, - isFilterable: true, - widgetId: "zvgz9h4fh4", - topRow: 10, - bottomRow: 14, - parentRowSpace: 10, - isVisible: true, - label: "", - type: "DROP_DOWN_WIDGET", - version: 1, - parentId: "0y8sg136kg", - isLoading: false, - defaultOptionValue: "GREEN", - selectionType: "MULTI_SELECT", - parentColumnSpace: 8.35546875, - dynamicTriggerPathList: [], - leftColumn: 39, - dynamicBindingPathList: [], - renderMode: RenderModes.CANVAS, - options: [ - { - label: "Blue", - value: "BLUE", - }, - { - label: "Green", - value: "GREEN", - }, - { - label: "Red", - value: "RED", - }, - ], - }, - ], - }; - - const output = { - ...containerWidget, - children: [ - { - renderMode: RenderModes.CANVAS, - type: "MULTI_SELECT_WIDGET", - widgetName: "Select2", - rightColumn: 59, - widgetId: "zvgz9h4fh4", - topRow: 10, - bottomRow: 14, - parentRowSpace: 10, - isVisible: true, - label: "", - version: 1, - parentId: "0y8sg136kg", - isLoading: false, - defaultOptionValue: "GREEN", - parentColumnSpace: 8.35546875, - dynamicTriggerPathList: [], - leftColumn: 39, - dynamicBindingPathList: [], - options: [ - { - label: "Blue", - value: "BLUE", - }, - { - label: "Green", - value: "GREEN", - }, - { - label: "Red", - value: "RED", - }, - ], - }, - ], - }; - - expect(migrateToNewMultiSelect(input)).toEqual(output); - }); - - it("DATE_PICKER_WIDGET2", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "DatePicker1", - defaultDate: "2021-05-12T06:50:51.743Z", - rightColumn: 7, - dateFormat: "YYYY-MM-DD HH:mm", - widgetId: "5jbfazqnca", - topRow: 2, - bottomRow: 3, - parentRowSpace: 40, - isVisible: true, - datePickerType: "DATE_PICKER", - label: "", - type: "DATE_PICKER_WIDGET2", - renderMode: RenderModes.CANVAS, - version: 2, - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 2, - isDisabled: false, - }, - ], - }; - - const output = { - ...containerWidget, - children: [ - { - widgetName: "DatePicker1", - defaultDate: "2021-05-12T06:50:51.743Z", - rightColumn: 7, - dateFormat: "YYYY-MM-DD HH:mm", - widgetId: "5jbfazqnca", - topRow: 2, - bottomRow: 3, - parentRowSpace: 40, - isVisible: true, - datePickerType: "DATE_PICKER", - label: "", - type: "DATE_PICKER_WIDGET2", - renderMode: RenderModes.CANVAS, - version: 2, - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 2, - isDisabled: false, - // following properties get added - isRequired: false, - minDate: "2001-01-01 00:00", - maxDate: "2041-12-31 23:59", - }, - ], - }; - - expect(migrateInitialValues(input)).toEqual(output); - }); - - it("SWITCH_WIDGET", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "Switch1", - rightColumn: 5, - widgetId: "4ksqurxmwn", - topRow: 2, - bottomRow: 3, - parentRowSpace: 40, - isVisible: true, - label: "Label", - type: "SWITCH_WIDGET", - renderMode: RenderModes.CANVAS, - defaultSwitchState: true, - version: 1, - alignWidget: "LEFT", - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 3, - }, - ], - }; - - const output = { - ...containerWidget, - children: [ - { - widgetName: "Switch1", - rightColumn: 5, - widgetId: "4ksqurxmwn", - topRow: 2, - bottomRow: 3, - parentRowSpace: 40, - isVisible: true, - label: "Label", - type: "SWITCH_WIDGET", - renderMode: RenderModes.CANVAS, - defaultSwitchState: true, - version: 1, - alignWidget: "LEFT", - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 3, - // following properties get added - isDisabled: false, - }, - ], - }; - - expect(migrateInitialValues(input)).toEqual(output); - }); - - it("Video widget", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "Video1", - rightColumn: 9, - dynamicPropertyPathList: [], - widgetId: "ti5b5f5hvq", - topRow: 3, - bottomRow: 10, - parentRowSpace: 40, - isVisible: true, - type: "VIDEO_WIDGET", - renderMode: RenderModes.CANVAS, - version: 1, - onPlay: "", - url: `${ASSETS_CDN_URL}/widgets/bird.mp4`, - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 2, - autoPlay: false, - }, - ], - }; - const output = { - ...containerWidget, - children: [ - { - widgetName: "Video1", - rightColumn: 9, - dynamicPropertyPathList: [], - widgetId: "ti5b5f5hvq", - topRow: 3, - bottomRow: 10, - parentRowSpace: 40, - isVisible: true, - type: "VIDEO_WIDGET", - renderMode: RenderModes.CANVAS, - version: 1, - onPlay: "", - url: `${ASSETS_CDN_URL}/widgets/bird.mp4`, - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 2, - autoPlay: false, - // following properties get added - isRequired: false, - isDisabled: false, - }, - ], - }; - - expect(migrateInitialValues(input)).toEqual(output); - }); - - it("CHECKBOX_WIDGET", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "Checkbox1", - rightColumn: 8, - widgetId: "djxhhl1p7t", - topRow: 4, - bottomRow: 5, - parentRowSpace: 40, - isVisible: true, - label: "Label", - type: "CHECKBOX_WIDGET", - renderMode: RenderModes.CANVAS, - version: 1, - alignWidget: "LEFT", - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 5, - defaultCheckedState: true, - }, - ], - }; - const output = { - ...containerWidget, - children: [ - { - widgetName: "Checkbox1", - rightColumn: 8, - widgetId: "djxhhl1p7t", - topRow: 4, - bottomRow: 5, - parentRowSpace: 40, - isVisible: true, - label: "Label", - type: "CHECKBOX_WIDGET", - renderMode: RenderModes.CANVAS, - version: 1, - alignWidget: "LEFT", - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 5, - defaultCheckedState: true, - // following properties get added - isDisabled: false, - isRequired: false, - }, - ], - }; - - expect(migrateInitialValues(input)).toEqual(output); - }); - - it("RADIO_GROUP_WIDGET", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "RadioGroup1", - rightColumn: 5, - widgetId: "4ixyqnw2no", - topRow: 3, - bottomRow: 5, - parentRowSpace: 40, - isVisible: true, - label: "", - type: "RADIO_GROUP_WIDGET", - renderMode: RenderModes.CANVAS, - version: 1, - parentId: "0", - isLoading: false, - defaultOptionValue: "Y", - parentColumnSpace: 67.375, - leftColumn: 2, - options: [ - { - label: "Yes", - value: "Y", - }, - { - label: "No", - value: "N", - }, - ], - }, - ], - }; - const output = { - ...containerWidget, - children: [ - { - widgetName: "RadioGroup1", - rightColumn: 5, - widgetId: "4ixyqnw2no", - topRow: 3, - bottomRow: 5, - parentRowSpace: 40, - isVisible: true, - label: "", - type: "RADIO_GROUP_WIDGET", - renderMode: RenderModes.CANVAS, - version: 1, - parentId: "0", - isLoading: false, - defaultOptionValue: "Y", - parentColumnSpace: 67.375, - leftColumn: 2, - options: [ - { - label: "Yes", - value: "Y", - }, - { - label: "No", - value: "N", - }, - ], - // following properties get added - isDisabled: false, - isRequired: false, - }, - ], - }; - - expect(migrateInitialValues(input)).toEqual(output); - }); - - it("FILE_PICKER_WIDGET", () => { - const input = { - ...containerWidget, - children: [ - { - widgetName: "FilePicker1", - rightColumn: 5, - isDefaultClickDisabled: true, - widgetId: "fzajyy8qft", - topRow: 4, - bottomRow: 5, - parentRowSpace: 40, - isVisible: true, - label: "Select Files", - maxFileSize: 5, - type: "FILE_PICKER_WIDGET", - renderMode: RenderModes.CANVAS, - version: 1, - fileDataType: "Base64", - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 1, - files: [], - maxNumFiles: 1, - }, - ], - }; - - const output = { - ...containerWidget, - children: [ - { - widgetName: "FilePicker1", - rightColumn: 5, - isDefaultClickDisabled: true, - widgetId: "fzajyy8qft", - topRow: 4, - bottomRow: 5, - parentRowSpace: 40, - isVisible: true, - label: "Select Files", - maxFileSize: 5, - type: "FILE_PICKER_WIDGET", - renderMode: RenderModes.CANVAS, - version: 1, - fileDataType: "Base64", - parentId: "0", - isLoading: false, - parentColumnSpace: 67.375, - leftColumn: 1, - files: [], - maxNumFiles: 1, - // following properties get added - isDisabled: false, - isRequired: false, - allowedFileTypes: [], - }, - ], - }; - - expect(migrateInitialValues(input)).toEqual(output); - }); - it("", () => { - const tabsWidgetDSL: any = (version = 1) => { - const children: any = buildChildren([ - { - version, - type: "TABS_WIDGET", - children: [ - { - type: "CANVAS_WIDGET", - tabId: "tab1212332", - tabName: "Newly Added Tab", - widgetId: "o9ody00ep7", - parentId: "jd83uvbkmp", - detachFromLayout: true, - children: [], - parentRowSpace: 1, - parentColumnSpace: 1, - // leftColumn: 0, - // rightColumn: 592, // Commenting these coz they are not provided for a newly added tab in the Tabs widget version 2 - // bottomRow: 280, - topRow: 0, - isLoading: false, - widgetName: "Canvas1", - renderMode: "CANVAS", - }, - ], - }, - ]); - const dsl: any = widgetCanvasFactory.build({ - children, - }); - return { - data: { - layouts: [{ dsl }], - }, - }; - }; - const migratedDslV2: any = extractCurrentDSL({ - response: tabsWidgetDSL(), - }).dsl; - expect(migratedDslV2.children[0].children[0].leftColumn).toBeNaN(); - const migratedDslV3: any = extractCurrentDSL({ - response: tabsWidgetDSL(2), - }).dsl; - expect(migratedDslV3.children[0].version).toBe(3); - expect(migratedDslV3.children[0].children[0].leftColumn).not.toBeNaN(); - expect(migratedDslV3.children[0].children[0].leftColumn).toBe(0); - }); }); diff --git a/app/client/src/utils/WidgetPropsUtils.tsx b/app/client/src/utils/WidgetPropsUtils.tsx index 65a8f0fcbe..4bc1c2cb1a 100644 --- a/app/client/src/utils/WidgetPropsUtils.tsx +++ b/app/client/src/utils/WidgetPropsUtils.tsx @@ -12,7 +12,6 @@ import { snapToGrid } from "./helpers"; import type { OccupiedSpace } from "constants/CanvasEditorConstants"; import defaultTemplate from "templates/default"; import type { FlattenedWidgetProps } from "reducers/entityReducers/canvasWidgetsReducer"; -import { transformDSL } from "./DSLMigrations"; import type { WidgetType } from "../WidgetProvider/factory"; import type { DSLWidget } from "WidgetProvider/constants"; import type { ContainerWidgetProps } from "widgets/ContainerWidget/widget"; @@ -24,6 +23,7 @@ import type { WidgetDraggingBlock, XYCord, } from "layoutSystems/common/canvasArenas/ArenaTypes"; +import { migrateDSL } from "@shared/dsl"; export interface WidgetOperationParams { operation: WidgetOperation; @@ -36,40 +36,46 @@ const defaultDSL = defaultTemplate; /** * This function is responsible for the following operations: * 1. Using the default DSL if the response doesn't give us a DSL - * 2. Running all the DSL migrations on the DSL (transformDSL) + * 2. Running all the DSL migrations on the DSL (migrateDSL) * 3. Transforming the DSL for the specifications of the layout system (only if a DSLTransformer is passed as an argument) * @param dslTransformer A function that takes a DSL and returns a DSL transformed for the specifications of the layout system * @param fetchPageResponse The response from the fetchPage API Call * @returns The updated DSL and the layoutId */ -export const extractCurrentDSL = (params: { +export const extractCurrentDSL = ({ + dslTransformer, + migrateDSLLocally = true, + response, +}: { dslTransformer?: (dsl: DSLWidget) => DSLWidget; + migrateDSLLocally?: boolean; response?: FetchPageResponse; }): { dsl: DSLWidget; layoutId: string | undefined } => { // If fetch page response doesn't exist // It means we are creating a new page - const newPage = !params.response; + const newPage = !response; // Get the DSL from the response or default to the defaultDSL - const currentDSL = params.response?.data.layouts[0].dsl || { + const currentDSL = response?.data.layouts[0].dsl || { ...defaultDSL, }; - // Run all the migrations on this DSL - const transformedDSL = transformDSL( - currentDSL as ContainerWidgetProps, - newPage, - ); - - let dsl = transformedDSL; + let dsl = currentDSL as DSLWidget; + if (migrateDSLLocally) { + // Run all the migrations on this DSL + dsl = migrateDSL( + currentDSL as ContainerWidgetProps, + newPage, + ) as DSLWidget; + } // If this DSL is meant to be transformed // then the dslTransformer would have been passed by the caller - if (params.dslTransformer) { - dsl = params.dslTransformer(transformedDSL); + if (dslTransformer) { + dsl = dslTransformer(dsl); } return { dsl, - layoutId: params.response?.data.layouts[0].id, + layoutId: response?.data.layouts[0].id, }; }; diff --git a/app/client/src/widgets/TabsMigrator/widget/index.tsx b/app/client/src/widgets/TabsMigrator/widget/index.tsx index 81d6e6f882..98c80bc913 100644 --- a/app/client/src/widgets/TabsMigrator/widget/index.tsx +++ b/app/client/src/widgets/TabsMigrator/widget/index.tsx @@ -5,12 +5,113 @@ import type { TabsWidgetProps, } from "widgets/TabsWidget/constants"; import { selectedTabValidation } from "widgets/TabsWidget/widget"; -import { migrateTabsData } from "utils/DSLMigrations"; -import { cloneDeep, get } from "lodash"; +import { cloneDeep, get, isString } from "lodash"; import { ValidationTypes } from "constants/WidgetValidation"; import { generateReactKey } from "utils/generators"; import { EVAL_VALUE_PATH } from "utils/DynamicBindingUtils"; import { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType"; +import * as Sentry from "@sentry/react"; +import type { DSLWidget } from "WidgetProvider/constants"; +import { DATA_BIND_REGEX_GLOBAL } from "constants/BindingsConstants"; + +function migrateTabsDataUsingMigrator(currentDSL: DSLWidget) { + if (currentDSL.type === "TABS_WIDGET" && currentDSL.version === 1) { + try { + currentDSL.type = "TABS_MIGRATOR_WIDGET"; + currentDSL.version = 1; + } catch (error) { + Sentry.captureException({ + message: "Tabs Migration Failed", + oldData: currentDSL.tabs, + }); + currentDSL.tabsObj = {}; + delete currentDSL.tabs; + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map(migrateTabsDataUsingMigrator); + } + return currentDSL; +} + +const migrateTabsData = (currentDSL: DSLWidget) => { + if ( + ["TABS_WIDGET", "TABS_MIGRATOR_WIDGET"].includes(currentDSL.type as any) && + currentDSL.version === 1 + ) { + try { + currentDSL.type = "TABS_WIDGET"; + const isTabsDataBinded = isString(currentDSL.tabs); + currentDSL.dynamicPropertyPathList = + currentDSL.dynamicPropertyPathList || []; + currentDSL.dynamicBindingPathList = + currentDSL.dynamicBindingPathList || []; + + if (isTabsDataBinded) { + const tabsString = currentDSL.tabs.replace( + DATA_BIND_REGEX_GLOBAL, + (word: any) => `"${word}"`, + ); + try { + currentDSL.tabs = JSON.parse(tabsString); + } catch (error) { + return migrateTabsDataUsingMigrator(currentDSL); + } + const dynamicPropsList = currentDSL.tabs + .filter((each: any) => DATA_BIND_REGEX_GLOBAL.test(each.isVisible)) + .map((each: any) => { + return { key: `tabsObj.${each.id}.isVisible` }; + }); + const dynamicBindablePropsList = currentDSL.tabs.map((each: any) => { + return { key: `tabsObj.${each.id}.isVisible` }; + }); + currentDSL.dynamicPropertyPathList = [ + ...currentDSL.dynamicPropertyPathList, + ...dynamicPropsList, + ]; + currentDSL.dynamicBindingPathList = [ + ...currentDSL.dynamicBindingPathList, + ...dynamicBindablePropsList, + ]; + } + currentDSL.dynamicPropertyPathList = + currentDSL.dynamicPropertyPathList.filter((each) => { + return each.key !== "tabs"; + }); + currentDSL.dynamicBindingPathList = + currentDSL.dynamicBindingPathList.filter((each) => { + return each.key !== "tabs"; + }); + currentDSL.tabsObj = currentDSL.tabs.reduce( + (obj: any, tab: any, index: number) => { + obj = { + ...obj, + [tab.id]: { + ...tab, + isVisible: tab.isVisible === undefined ? true : tab.isVisible, + index, + }, + }; + return obj; + }, + {}, + ); + currentDSL.version = 2; + delete currentDSL.tabs; + } catch (error) { + Sentry.captureException({ + message: "Tabs Migration Failed", + oldData: currentDSL.tabs, + }); + currentDSL.tabsObj = {}; + delete currentDSL.tabs; + } + } + if (currentDSL.children && currentDSL.children.length) { + currentDSL.children = currentDSL.children.map(migrateTabsData); + } + return currentDSL; +}; class TabsMigratorWidget extends BaseWidget< TabsWidgetProps, diff --git a/app/client/yarn.lock b/app/client/yarn.lock index f6959fa3cf..62330cb7e2 100644 --- a/app/client/yarn.lock +++ b/app/client/yarn.lock @@ -7301,6 +7301,20 @@ __metadata: languageName: node linkType: hard +"@rollup/plugin-json@npm:^6.0.0": + version: 6.0.0 + resolution: "@rollup/plugin-json@npm:6.0.0" + dependencies: + "@rollup/pluginutils": ^5.0.1 + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + checksum: 77cfc941edaf77a5307977704ffaba706d83bea66f265b2b68f14be2a0af6d08b0fb1b04fdd773146c84cc70938ff64b00ae946808fd6ac057058af824d78128 + languageName: node + linkType: hard + "@rollup/plugin-node-resolve@npm:^11.2.1": version: 11.2.1 resolution: "@rollup/plugin-node-resolve@npm:11.2.1" @@ -7352,9 +7366,9 @@ __metadata: languageName: node linkType: hard -"@rollup/pluginutils@npm:^5.0.2": - version: 5.0.3 - resolution: "@rollup/pluginutils@npm:5.0.3" +"@rollup/pluginutils@npm:^5.0.1, @rollup/pluginutils@npm:^5.0.2": + version: 5.0.4 + resolution: "@rollup/pluginutils@npm:5.0.4" dependencies: "@types/estree": ^1.0.0 estree-walker: ^2.0.2 @@ -7364,7 +7378,7 @@ __metadata: peerDependenciesMeta: rollup: optional: true - checksum: 8efbdeac53c58ba7b26c353a0a95acb0286cb6afec9816e0c52c3537404be80af11d897f78416a3339a8a76cbce8600269bdf4853edfdebcc89b2e90c56bf3d9 + checksum: 893d5805ac4121fc704926963a0ae4e79e9e2bc8d736c3b28499ab69a404cce5119ca3a4e0c3d3a81d62f1beb3966f35285c36935d94b061794f26e94fed4cd1 languageName: node linkType: hard @@ -7537,6 +7551,7 @@ __metadata: dependencies: "@babel/runtime": ^7.21.0 "@rollup/plugin-commonjs": ^22.0.0 + "@rollup/plugin-json": ^6.0.0 "@types/escodegen": ^0.0.7 "@types/lodash": ^4.14.120 jest: ^29.5.0 diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/PageControllerCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/PageControllerCE.java index a8933073ba..75d6ca0283 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/PageControllerCE.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/PageControllerCE.java @@ -118,9 +118,10 @@ public class PageControllerCE { @GetMapping("/{defaultPageId}") public Mono> getPageById( @PathVariable String defaultPageId, - @RequestHeader(name = FieldName.BRANCH_NAME, required = false) String branchName) { + @RequestHeader(name = FieldName.BRANCH_NAME, required = false) String branchName, + @RequestParam(required = false, defaultValue = "false") Boolean migrateDsl) { return applicationPageService - .getPageByBranchAndDefaultPageId(defaultPageId, branchName, false) + .getPageAndMigrateDslByBranchAndDefaultPageId(defaultPageId, branchName, false, migrateDsl) .map(page -> new ResponseDTO<>(HttpStatus.OK.value(), page, null)); } @@ -128,9 +129,10 @@ public class PageControllerCE { @GetMapping("/{defaultPageId}/view") public Mono> getPageView( @PathVariable String defaultPageId, - @RequestHeader(name = FieldName.BRANCH_NAME, required = false) String branchName) { + @RequestHeader(name = FieldName.BRANCH_NAME, required = false) String branchName, + @RequestParam(required = false, defaultValue = "false") Boolean migrateDsl) { return applicationPageService - .getPageByBranchAndDefaultPageId(defaultPageId, branchName, true) + .getPageAndMigrateDslByBranchAndDefaultPageId(defaultPageId, branchName, true, migrateDsl) .map(page -> new ResponseDTO<>(HttpStatus.OK.value(), page, null)); } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ce/DslVersionDTO.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ce/DslVersionDTO.java new file mode 100644 index 0000000000..a6916b6d1d --- /dev/null +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ce/DslVersionDTO.java @@ -0,0 +1,12 @@ +package com.appsmith.server.dtos.ce; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@NoArgsConstructor +@Data +public class DslVersionDTO { + private int version; +} diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/DSLMigrationUtils.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/DSLMigrationUtils.java index e6645d7b0b..63455df494 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/DSLMigrationUtils.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/DSLMigrationUtils.java @@ -1,21 +1,26 @@ package com.appsmith.server.helpers; -import com.appsmith.server.configurations.CloudServicesConfig; +import com.appsmith.server.configurations.CommonConfig; +import com.appsmith.server.dtos.ResponseDTO; +import com.appsmith.server.dtos.ce.DslVersionDTO; import com.appsmith.util.WebClientUtils; import lombok.RequiredArgsConstructor; +import net.minidev.json.JSONObject; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.MediaType; import org.springframework.stereotype.Component; +import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; import reactor.netty.resources.ConnectionProvider; import java.time.Duration; -import java.util.List; @Component @RequiredArgsConstructor public class DSLMigrationUtils { - private final CloudServicesConfig cloudServicesConfig; + private final CommonConfig commonConfig; private final WebClient webClient = WebClientUtils.create(ConnectionProvider.builder("rts-provider") .maxConnections(100) @@ -30,16 +35,29 @@ public class DSLMigrationUtils { * @param pageDslVersion Version number of the page dsl * @return If the page dsl needs to be migrated or not */ - public Mono isMigrationRequired(String pageDslVersion) { - /*webClient - .post() - .uri(cloudServicesConfig.getBaseUrl() + "/api/v1/migration/dsl/check") - .contentType(MediaType.APPLICATION_JSON) - .body(BodyInserters.fromValue(pageDsl)) - .retrieve() - .bodyToMono(JSONObject.class) - .map(jsonObject -> jsonObject.get("isMigrationRequired"));*/ - return Mono.just(false); + private Mono isMigrationRequired(int pageDslVersion) { + ParameterizedTypeReference> parameterizedTypeReference = + new ParameterizedTypeReference<>() {}; + return webClient + .get() + .uri(commonConfig.getRtsBaseUrl() + "/rts-api/v1/dsl/version") + .retrieve() + .bodyToMono(parameterizedTypeReference) + .map(responseDTO -> { + int latestDslVersion = responseDTO.getData().getVersion(); + return pageDslVersion < latestDslVersion; + }); + } + + public Mono getLatestDslVersion() { + ParameterizedTypeReference> parameterizedTypeReference = + new ParameterizedTypeReference<>() {}; + return webClient + .get() + .uri(commonConfig.getRtsBaseUrl() + "/rts-api/v1/dsl/version") + .retrieve() + .bodyToMono(parameterizedTypeReference) + .map(responseDTO -> responseDTO.getData().getVersion()); } /** @@ -47,15 +65,17 @@ public class DSLMigrationUtils { * @param pageDsl List of dsl from the git file system * @return List of page dsl after migration */ - public Mono> migratePageDsl(List pageDsl) { - /*webClient - .post() - .uri(cloudServicesConfig.getBaseUrl() + "/api/v1/migration/dsl/migrate") - .contentType(MediaType.APPLICATION_JSON) - .body(BodyInserters.fromValue(pageDsl)) - .retrieve() - .bodyToMono(String.class) - .flatMap(migratedPageDsl -> Mono.just(List.of(migratedPageDsl)));*/ - return Mono.just(pageDsl); + public Mono migratePageDsl(JSONObject pageDsl) { + ParameterizedTypeReference> parameterizedTypeReference = + new ParameterizedTypeReference<>() {}; + + return webClient + .post() + .uri(commonConfig.getRtsBaseUrl() + "/rts-api/v1/dsl/migrate") + .contentType(MediaType.APPLICATION_JSON) + .body(BodyInserters.fromValue(pageDsl)) + .retrieve() + .bodyToMono(parameterizedTypeReference) + .map(responseDTO -> responseDTO.getData()); } } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/imports/NewPageImportableServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/imports/NewPageImportableServiceCEImpl.java index e4d88a17a1..74d12d1ca0 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/imports/NewPageImportableServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/imports/NewPageImportableServiceCEImpl.java @@ -580,6 +580,9 @@ public class NewPageImportableServiceCEImpl implements ImportableServiceCE { if (layout.getLayoutOnLoadActions() != null) { layout.getLayoutOnLoadActions().forEach(onLoadAction -> onLoadAction.stream() @@ -587,6 +590,7 @@ public class NewPageImportableServiceCEImpl implements ImportableServiceCE { actionDTO.setDefaultActionId(defaultActionId); actionDTO.setDefaultCollectionId(defaultCollectionId); + actionDTO.setCollectionId(collectionId); })); } }); @@ -609,6 +613,9 @@ public class NewPageImportableServiceCEImpl implements ImportableServiceCE getPage(String pageId, boolean viewMode); - Mono getPageByBranchAndDefaultPageId(String defaultPageId, String branchName, boolean viewMode); + Mono getPageAndMigrateDslByBranchAndDefaultPageId( + String defaultPageId, String branchName, boolean viewMode, boolean migrateDsl); Mono createApplication(Application application); diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java index fac78342cf..0f277cc471 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java @@ -34,6 +34,7 @@ import com.appsmith.server.dtos.PageNameIdDTO; import com.appsmith.server.dtos.PluginTypeAndCountDTO; import com.appsmith.server.exceptions.AppsmithError; import com.appsmith.server.exceptions.AppsmithException; +import com.appsmith.server.helpers.DSLMigrationUtils; import com.appsmith.server.helpers.GitFileUtils; import com.appsmith.server.helpers.ResponseUtils; import com.appsmith.server.helpers.UserPermissionUtils; @@ -65,6 +66,7 @@ import com.mongodb.client.result.UpdateResult; import jakarta.annotation.Nullable; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import net.minidev.json.JSONObject; import org.bson.types.ObjectId; import org.springframework.stereotype.Service; import org.springframework.transaction.reactive.TransactionalOperator; @@ -125,6 +127,7 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE { private final NewPageRepository newPageRepository; private final DatasourceRepository datasourceRepository; private final DatasourcePermission datasourcePermission; + private final DSLMigrationUtils dslMigrationUtils; public static final Integer EVALUATION_VERSION = 2; @@ -278,23 +281,84 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE { } @Override - public Mono getPageByBranchAndDefaultPageId(String defaultPageId, String branchName, boolean viewMode) { - + public Mono getPageAndMigrateDslByBranchAndDefaultPageId( + String defaultPageId, String branchName, boolean viewMode, boolean migrateDsl) { // Fetch the page with read permission in both editor and in viewer. - AclPermission permission = pagePermission.getReadPermission(); return newPageService - .findByBranchNameAndDefaultPageId(branchName, defaultPageId, permission) + .findByBranchNameAndDefaultPageId(branchName, defaultPageId, pagePermission.getReadPermission()) .flatMap(newPage -> { - return sendPageViewAnalyticsEvent(newPage, viewMode).then(getPage(newPage, viewMode)); + return sendPageViewAnalyticsEvent(newPage, viewMode) + .then(getPage(newPage, viewMode)) + .zipWith(Mono.just(newPage)); }) - .flatMap(page -> { - // Call the DSL Utils for on demand migration of the page. - // Based on view mode save the migrated DSL to the database - return Mono.just(page); + .flatMap(objects -> { + PageDTO pageDTO = objects.getT1(); + if (migrateDsl) { + // Call the DSL Utils for on demand migration of the page. + // Based on view mode save the migrated DSL to the database + // Migrate the DSL to the latest version if required + NewPage newPage = objects.getT2(); + if (pageDTO.getLayouts() != null) { + return migrateAndUpdatePageDsl(newPage, pageDTO, viewMode); + } + } + return Mono.just(pageDTO); }) .map(responseUtils::updatePageDTOWithDefaultResources); } + private Mono migrateAndUpdatePageDsl(NewPage newPage, PageDTO page, boolean viewMode) { + return dslMigrationUtils + .getLatestDslVersion() + .onErrorMap(throwable -> { + log.error("Error fetching latest DSL version", throwable); + return new AppsmithException(AppsmithError.RTS_SERVER_ERROR, "Error fetching latest DSL version"); + }) + .flatMap(latestDslVersion -> { + // ensuring that the page has only one layout, as we don't support multiple layouts yet + // when multiple layouts are supported, this code will have to be updated + assert page.getLayouts().size() == 1; + + Layout layout = page.getLayouts().get(0); + JSONObject layoutDsl = layout.getDsl(); + boolean isMigrationRequired = true; + String versionKey = "version"; + if (layoutDsl.containsKey(versionKey)) { + int currentDslVersion = + layoutDsl.getAsNumber(versionKey).intValue(); + if (currentDslVersion >= latestDslVersion) { + isMigrationRequired = false; + } + } + + if (isMigrationRequired) { + return dslMigrationUtils + .migratePageDsl(layoutDsl) + .onErrorMap(throwable -> { + log.error("Error while migrating DSL ", throwable); + return new AppsmithException( + AppsmithError.RTS_SERVER_ERROR, + "Error while migrating to latest DSL version"); + }) + .flatMap(migratedDsl -> { + // update the current page DTO with migrated dsl + page.getLayouts().get(0).setDsl(migratedDsl); + + // update the new page with migrated dsl and save to the database + PageDTO updatedPage; + if (viewMode) { + updatedPage = newPage.getPublishedPage(); + } else { + updatedPage = newPage.getUnpublishedPage(); + } + updatedPage.getLayouts().get(0).setDsl(migratedDsl); + return newPageService.save(newPage).thenReturn(page); + }); + } + return Mono.just(page); + }); + } + @Override public Mono getPageByName(String applicationName, String pageName, boolean viewMode) { AclPermission appPermission; diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ApplicationPageServiceTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ApplicationPageServiceTest.java index f4298e668d..58ad7c390f 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ApplicationPageServiceTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ApplicationPageServiceTest.java @@ -8,6 +8,7 @@ import com.appsmith.server.domains.Layout; import com.appsmith.server.domains.NewPage; import com.appsmith.server.domains.Workspace; import com.appsmith.server.dtos.PageDTO; +import com.appsmith.server.helpers.DSLMigrationUtils; import com.appsmith.server.newpages.base.NewPageService; import com.appsmith.server.repositories.ApplicationRepository; import com.appsmith.server.repositories.UserRepository; @@ -21,8 +22,10 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.security.test.context.support.WithUserDetails; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -37,6 +40,7 @@ import java.util.List; import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; @ExtendWith(SpringExtension.class) @SpringBootTest @@ -58,6 +62,9 @@ public class ApplicationPageServiceTest { @Autowired NewPageService newPageService; + @MockBean + DSLMigrationUtils dslMigrationUtils; + @Autowired ApplicationService applicationService; @@ -167,124 +174,200 @@ public class ApplicationPageServiceTest { } /** - * This test is to ensure that the DSL is migrated to the new format when the page is loaded in edit mode. - * After migrating the DSL, the page is saved again. This is to ensure that the updated DSL is stored in db. + * This test is to ensure that the DSL migration is not going to happen when RTS responds + * current DSL version as the latest DSL version. */ @Test @WithUserDetails("api_user") - public void getPageEditMode_DSLNotMigrated_MigratedRealTileSuccessfully() { + public void getPageAndMigrateDslByBranchAndDefaultPageId_WhenDslIsLatest_MigrationNotTriggered() { + String uuid = UUID.randomUUID().toString(); - NewPage newPage = createApplication("getPageEditMode_DSLNotMigrated_MigratedRealTileSuccessfully") + NewPage newPage = createApplication("App_" + uuid) .flatMap(application -> newPageService.getById(application.getPages().get(0).getId())) - .flatMap(pageDTO -> { - PageDTO unPublishedPageDTO = pageDTO.getUnpublishedPage(); - Layout layout = unPublishedPageDTO.getLayouts().get(0); - // Fetch Older DSL from the test resources - layout.setDsl(getOlderDSL()); - return newPageService - .update(pageDTO.getId(), pageDTO) - .flatMap(newpage -> applicationPageService.publish(pageDTO.getApplicationId(), true)) - .then(Mono.just(pageDTO)); - }) .block(); - StepVerifier.create(applicationPageService.getPageByBranchAndDefaultPageId(newPage.getId(), null, false)) - .assertNext(pageDTO -> { - // Assert for the migrated DSL in db and the one that was created before. - // The migrated DSL should have the new format. - // Match for widget version - // Match published and unpublished page DSL version number - }) - .verifyComplete(); - } + // mock the dsMigrationUtils to return the current DSL version as the latest DSL version + PageDTO unPublishedPageDTO = newPage.getUnpublishedPage(); + Layout layout = unPublishedPageDTO.getLayouts().get(0); + int currentDslVersion = layout.getDsl().getAsNumber("version").intValue(); + Mockito.when(dslMigrationUtils.getLatestDslVersion()).thenReturn(Mono.just(currentDslVersion)); - @Test - @WithUserDetails("api_user") - public void getPageEditMode_DSLMigrated_MigratedRealTileSuccessfully() { - NewPage newPage = createApplication("getPageEditMode_DSLMigrated_MigratedRealTileSuccessfully") - .flatMap(application -> - newPageService.getById(application.getPages().get(0).getId())) - .flatMap(pageDTO -> { - PageDTO unPublishedPageDTO = pageDTO.getUnpublishedPage(); - Layout layout = unPublishedPageDTO.getLayouts().get(0); - // Fetch Older DSL from the test resources - layout.setDsl(getOlderDSL()); - return newPageService - .update(pageDTO.getId(), pageDTO) - .flatMap(newpage -> applicationPageService.publish(pageDTO.getApplicationId(), true)) - .then(Mono.just(pageDTO)); - }) - .block(); - - StepVerifier.create(applicationPageService.getPageByBranchAndDefaultPageId(newPage.getId(), null, false)) + StepVerifier.create(applicationPageService.getPageAndMigrateDslByBranchAndDefaultPageId( + newPage.getId(), null, false, true)) .assertNext(pageDTO -> { - // Assert for the migrated DSL in db and the one that was created before. - // The migrated DSL should have the new format. - // Match for widget version - // Match published and unpublished page DSL version number + Layout layout2 = pageDTO.getLayouts().get(0); + assertThat(layout2.getDsl().getAsNumber("version").intValue()) + .isEqualTo(currentDslVersion); }) .verifyComplete(); } /** - * This test is to ensure that the DSL is migrated to the new format when the page is loaded in view mode. - * But the updated DSL is not stored in db due to the permission issue + * This test is to ensure that the DSL migration is triggered when RTS responds + * older DSL version as the latest DSL version in edit mode. + * In view mode, the DSL should be in view mode. */ @Test @WithUserDetails("api_user") - public void getPagePublishedMode_DSLNotMigrated_MigratedRealTileSuccessfully() { - NewPage newPage = createApplication("getPagePublishedMode_DSLNotMigrated_MigratedRealTileSuccessfully") + public void getPageAndMigrateDslByBranchAndDefaultPageId_WhenEditModeDslIsNotLatest_EditModeDslMigrated() { + String uuid = UUID.randomUUID().toString(); + NewPage newPage = createApplication("App_" + uuid) .flatMap(application -> newPageService.getById(application.getPages().get(0).getId())) - .flatMap(pageDTO -> { - PageDTO unPublishedPageDTO = pageDTO.getUnpublishedPage(); - Layout layout = unPublishedPageDTO.getLayouts().get(0); - // Fetch Older DSL from the test resources - layout.setDsl(getOlderDSL()); - return newPageService - .update(pageDTO.getId(), pageDTO) - .flatMap(newpage -> applicationPageService.publish(pageDTO.getApplicationId(), true)) - .then(Mono.just(pageDTO)); + .block(); + + // mock the dsMigrationUtils to return the (current DSL version-1) as the latest DSL version + PageDTO unPublishedPageDTO = newPage.getUnpublishedPage(); + Layout layout = unPublishedPageDTO.getLayouts().get(0); + JSONObject unpublishedDsl = layout.getDsl(); + int currentDslVersion = unpublishedDsl.getAsNumber("version").intValue(); + int olderDslVersion = currentDslVersion - 1; + unpublishedDsl.put("version", olderDslVersion); + + // update the page to set older version dsl in edit mode + newPageService.save(newPage).block(); + + Mockito.when(dslMigrationUtils.getLatestDslVersion()).thenReturn(Mono.just(olderDslVersion + 1)); + + // create a dsl after migration + JSONObject dslAfterMigration = new JSONObject(); + dslAfterMigration.put("version", olderDslVersion + 1); + dslAfterMigration.put("testKey", "testValue"); + + Mockito.when(dslMigrationUtils.migratePageDsl(any(JSONObject.class))).thenReturn(Mono.just(dslAfterMigration)); + + Mono newPageMono = applicationPageService + .getPageAndMigrateDslByBranchAndDefaultPageId(newPage.getId(), null, false, true) + .then(newPageService.getById(newPage.getId())); + + StepVerifier.create(newPageMono) + .assertNext(newpage -> { + // the edit mode dsl should be same as the dslAfterMigration + JSONObject unpublishedDslAfterMigration = + newpage.getUnpublishedPage().getLayouts().get(0).getDsl(); + assertThat(unpublishedDslAfterMigration + .getAsNumber("version") + .intValue()) + .isEqualTo(currentDslVersion); + assertThat(unpublishedDslAfterMigration.getAsString("testKey")) + .isEqualTo("testValue"); + + JSONObject publishedDslAfterMigration = + newpage.getPublishedPage().getLayouts().get(0).getDsl(); + assertThat(publishedDslAfterMigration.getAsNumber("version").intValue()) + .isEqualTo(currentDslVersion); + // testKey should not be found in the published dsl + assertThat(publishedDslAfterMigration.getAsString("testKey")) + .isNull(); + }) + .verifyComplete(); + } + + /** + * This test is to ensure that the DSL migration is triggered when DSL does not have version + */ + @Test + @WithUserDetails("api_user") + public void getPageAndMigrateDslByBranchAndDefaultPageId_WhenDSLHasNotVersion_DslMigratedToLatest() { + String uuid = UUID.randomUUID().toString(); + NewPage newPage = createApplication("App_" + uuid) + .flatMap(application -> + newPageService.getById(application.getPages().get(0).getId())) + .flatMap(page -> { + Layout layout = page.getUnpublishedPage().getLayouts().get(0); + JSONObject unpublishedDsl = layout.getDsl(); + unpublishedDsl.remove("version"); // removing version from DSL + return newPageService.save(page); }) .block(); - StepVerifier.create(applicationPageService.getPageByBranchAndDefaultPageId(newPage.getId(), null, true)) - .assertNext(pageDTO -> { - // Assert for the migrated DSL in db and the one that was created before. Both should be same since - // its view mode and the updated DSL is not stored in db due to the permission issue - // The migrated DSL should have the new format. - // Match for widget version - // Match published and unpublished page DSL version number + // update the page to set older version dsl in edit mode + newPageService.save(newPage).block(); + + int latestDslVersion = 999; + + // mock the dsMigrationUtils to return the latestDslVersion + Mockito.when(dslMigrationUtils.getLatestDslVersion()).thenReturn(Mono.just(latestDslVersion)); + + // the dsl that'll be returned by RTS after migration + JSONObject dslAfterMigration = new JSONObject(); + dslAfterMigration.put("version", latestDslVersion); + dslAfterMigration.put("testKey", "testValue"); + + Mockito.when(dslMigrationUtils.migratePageDsl(any(JSONObject.class))).thenReturn(Mono.just(dslAfterMigration)); + + Mono newPageMono = applicationPageService + .getPageAndMigrateDslByBranchAndDefaultPageId(newPage.getId(), null, false, true) + .then(newPageService.getById(newPage.getId())); + + StepVerifier.create(newPageMono) + .assertNext(newpage -> { + // the edit mode dsl should be same as the dslAfterMigration + JSONObject unpublishedDslAfterMigration = + newpage.getUnpublishedPage().getLayouts().get(0).getDsl(); + assertThat(unpublishedDslAfterMigration + .getAsNumber("version") + .intValue()) + .isEqualTo(latestDslVersion); + assertThat(unpublishedDslAfterMigration.getAsString("testKey")) + .isEqualTo("testValue"); }) .verifyComplete(); } @Test @WithUserDetails("api_user") - public void getPagePublishedMode_DSLMigrated_MigratedRealTileSuccessfully() { - NewPage newPage = createApplication("getPagePublishedMode_DSLMigrated_MigratedRealTileSuccessfully") + public void getPageAndMigrateDslByBranchAndDefaultPageId_WhenViewModeDslIsNotLatest_ViewModeDslMigrated() { + String uuid = UUID.randomUUID().toString(); + NewPage newPage = createApplication("App_" + uuid) .flatMap(application -> newPageService.getById(application.getPages().get(0).getId())) - .flatMap(pageDTO -> { - PageDTO unPublishedPageDTO = pageDTO.getUnpublishedPage(); - Layout layout = unPublishedPageDTO.getLayouts().get(0); - // Fetch Older DSL from the test resources - layout.setDsl(getOlderDSL()); - return newPageService - .update(pageDTO.getId(), pageDTO) - .flatMap(newpage -> applicationPageService.publish(pageDTO.getApplicationId(), true)) - .then(Mono.just(pageDTO)); - }) .block(); - StepVerifier.create(applicationPageService.getPageByBranchAndDefaultPageId(newPage.getId(), null, true)) - .assertNext(pageDTO -> { - // Assert for the migrated DSL in db and the one that was created before. Both should be same since - // its view mode and the updated DSL is not stored in db due to the permission issue - // The migrated DSL should have the new format. - // Match for widget version - // Match published and unpublished page DSL version number + // mock the dsMigrationUtils to return the (current DSL version-1) as the latest DSL version + PageDTO publishedPageDTO = newPage.getPublishedPage(); + Layout layout = publishedPageDTO.getLayouts().get(0); + JSONObject publishedDsl = layout.getDsl(); + int currentDslVersion = publishedDsl.getAsNumber("version").intValue(); + int olderDslVersion = currentDslVersion - 1; + publishedDsl.put("version", olderDslVersion); + + // update the page to set older version dsl in view mode + newPageService.save(newPage).block(); + + Mockito.when(dslMigrationUtils.getLatestDslVersion()).thenReturn(Mono.just(olderDslVersion + 1)); + + // create a dsl after migration + JSONObject dslAfterMigration = new JSONObject(); + dslAfterMigration.put("version", olderDslVersion + 1); + dslAfterMigration.put("testKey", "testValue"); + + Mockito.when(dslMigrationUtils.migratePageDsl(any(JSONObject.class))).thenReturn(Mono.just(dslAfterMigration)); + + Mono newPageMono = applicationPageService + .getPageAndMigrateDslByBranchAndDefaultPageId(newPage.getId(), null, true, true) + .then(newPageService.getById(newPage.getId())); + + StepVerifier.create(newPageMono) + .assertNext(newpage -> { + // testKey should not be found in the unpublished dsl + JSONObject unpublishedDslAfterMigration = + newpage.getUnpublishedPage().getLayouts().get(0).getDsl(); + assertThat(unpublishedDslAfterMigration + .getAsNumber("version") + .intValue()) + .isEqualTo(currentDslVersion); + assertThat(unpublishedDslAfterMigration.getAsString("testKey")) + .isNull(); + + // the view mode dsl should be same as the dslAfterMigration + JSONObject publishedDslAfterMigration = + newpage.getPublishedPage().getLayouts().get(0).getDsl(); + assertThat(publishedDslAfterMigration.getAsNumber("version").intValue()) + .isEqualTo(currentDslVersion); + assertThat(publishedDslAfterMigration.getAsString("testKey")) + .isEqualTo("testValue"); }) .verifyComplete(); } diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/NewPageServiceTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/NewPageServiceTest.java index 06307cf586..76513f4794 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/NewPageServiceTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/NewPageServiceTest.java @@ -253,8 +253,8 @@ public class NewPageServiceTest { pageDTO.setApplicationId(application1.getId()); return applicationPageService.createPage(pageDTO); }) - .flatMap(pageDTO -> - applicationPageService.getPageByBranchAndDefaultPageId(pageDTO.getId(), null, false)); + .flatMap(pageDTO -> applicationPageService.getPageAndMigrateDslByBranchAndDefaultPageId( + pageDTO.getId(), null, false, false)); StepVerifier.create(applicationPageDTOMono) .assertNext(applicationPageDTO -> {