From 54a0f2b3c0c3995777242b844e04d047db1e5dff Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <66054987+a6hishekpandey@users.noreply.github.com> Date: Fri, 20 Sep 2024 19:19:22 +0530 Subject: [PATCH 1/8] fix: show bindings menu does not appear in split mode (#36378) ## Description Issue: Show bindings menu does not appear in split mode. This PR addresses issue https://github.com/appsmithorg/appsmith/issues/35775 by updating `left` style property appropriately based on the editor view mode (split screen/full screen). Fixes https://github.com/appsmithorg/appsmith/issues/35775 > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="" ### :mag: Cypress test results > [!CAUTION] > If you modify the content in this section, you are likely to disrupt the CI result for your PR. ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Enhanced the responsiveness of the EntityProperties component by adapting its layout based on the IDE view mode, improving user experience across different interface configurations. --- .../pages/Editor/Explorer/Entity/EntityProperties.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx b/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx index 437d82314830..21846b52a95d 100644 --- a/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx +++ b/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx @@ -13,6 +13,8 @@ import { Button } from "@appsmith/ads"; import { getEntityProperties } from "ee/pages/Editor/Explorer/Entity/getEntityProperties"; import store from "store"; import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; +import { getIDEViewMode } from "selectors/ideSelectors"; +import { EditorViewMode } from "ee/entities/IDE/constants"; import { DEFAULT_EXPLORER_PANE_WIDTH } from "constants/AppConstants"; import { BOTTOM_BAR_HEIGHT } from "components/BottomBar/constants"; @@ -44,6 +46,8 @@ export function EntityProperties() { (state: AppState) => state.ui.widgetDragResize.lastSelectedWidget, ); + const ideViewMode = useSelector(getIDEViewMode); + useEffect(() => { document.addEventListener("click", handleOutsideClick); @@ -123,7 +127,10 @@ export function EntityProperties() { ref.current.style.bottom = "unset"; } - ref.current.style.left = DEFAULT_EXPLORER_PANE_WIDTH + "px"; + ref.current.style.left = + ideViewMode === EditorViewMode.SplitScreen + ? "100%" + : DEFAULT_EXPLORER_PANE_WIDTH + "px"; } }, [entityId]); From 0ad0989a556b79b50f6f2e26bc7639acd78b1ba8 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Fri, 20 Sep 2024 19:37:10 +0530 Subject: [PATCH 2/8] chore: Adding a new hook to set `settingsConfig` for an action based on IDE type (#36442) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Adding a new hook to set `settingsConfig` for an action based on IDE type. This is being used in PluginActionEditor in the new modular flow. Fixes #36438 #36439 ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results > [!TIP] > 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ > Workflow run: > Commit: 447d926c31c6e26922bb24851c68727bec14d1ae > Cypress dashboard. > Tags: `@tag.All` > Spec: >
Fri, 20 Sep 2024 10:12:39 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Introduced a new hook, `useActionSettingsConfig`, for simplified access to plugin action settings. - Updated the `PluginActionEditor` to utilize the new hook, enhancing the logic for retrieving plugin settings. - Added a re-exporting mechanism for `useActionSettingsConfig` to improve organization within the Plugin Action Editor. - **Improvements** - Streamlined the process of accessing plugin configurations, improving overall code clarity and maintainability. --- .../src/PluginActionEditor/PluginActionEditor.tsx | 6 ++---- app/client/src/PluginActionEditor/hooks/index.ts | 1 + .../hooks/useActionSettingsConfig.ts | 11 +++++++++++ .../hooks/useActionSettingsConfig.ts | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 app/client/src/PluginActionEditor/hooks/index.ts create mode 100644 app/client/src/ce/PluginActionEditor/hooks/useActionSettingsConfig.ts create mode 100644 app/client/src/ee/PluginActionEditor/hooks/useActionSettingsConfig.ts diff --git a/app/client/src/PluginActionEditor/PluginActionEditor.tsx b/app/client/src/PluginActionEditor/PluginActionEditor.tsx index 40470b7bd837..5ffa8a4d777e 100644 --- a/app/client/src/PluginActionEditor/PluginActionEditor.tsx +++ b/app/client/src/PluginActionEditor/PluginActionEditor.tsx @@ -7,7 +7,6 @@ import { getDatasource, getEditorConfig, getPlugin, - getPluginSettingConfigs, } from "ee/selectors/entitiesSelector"; import { PluginActionContextProvider } from "./PluginActionContext"; import { get } from "lodash"; @@ -16,6 +15,7 @@ import Spinner from "components/editorComponents/Spinner"; import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper"; import { Text } from "@appsmith/ads"; import { useIsEditorInitialised } from "IDE/hooks"; +import { useActionSettingsConfig } from "./hooks"; interface ChildrenProps { children: React.ReactNode | React.ReactNode[]; @@ -35,9 +35,7 @@ const PluginActionEditor = (props: ChildrenProps) => { const datasourceId = get(action, "datasource.id", ""); const datasource = useSelector((state) => getDatasource(state, datasourceId)); - const settingsConfig = useSelector((state) => - getPluginSettingConfigs(state, pluginId), - ); + const settingsConfig = useActionSettingsConfig(action); const editorConfig = useSelector((state) => getEditorConfig(state, pluginId)); diff --git a/app/client/src/PluginActionEditor/hooks/index.ts b/app/client/src/PluginActionEditor/hooks/index.ts new file mode 100644 index 000000000000..5af0c9060d3a --- /dev/null +++ b/app/client/src/PluginActionEditor/hooks/index.ts @@ -0,0 +1 @@ +export { useActionSettingsConfig } from "ee/PluginActionEditor/hooks/useActionSettingsConfig"; diff --git a/app/client/src/ce/PluginActionEditor/hooks/useActionSettingsConfig.ts b/app/client/src/ce/PluginActionEditor/hooks/useActionSettingsConfig.ts new file mode 100644 index 000000000000..22ade9d6c371 --- /dev/null +++ b/app/client/src/ce/PluginActionEditor/hooks/useActionSettingsConfig.ts @@ -0,0 +1,11 @@ +import { useSelector } from "react-redux"; +import { getPluginSettingConfigs } from "ee/selectors/entitiesSelector"; +import type { Action } from "entities/Action"; + +function useActionSettingsConfig(action?: Action) { + return useSelector((state) => + getPluginSettingConfigs(state, action?.pluginId || ""), + ); +} + +export { useActionSettingsConfig }; diff --git a/app/client/src/ee/PluginActionEditor/hooks/useActionSettingsConfig.ts b/app/client/src/ee/PluginActionEditor/hooks/useActionSettingsConfig.ts new file mode 100644 index 000000000000..23112ff41e01 --- /dev/null +++ b/app/client/src/ee/PluginActionEditor/hooks/useActionSettingsConfig.ts @@ -0,0 +1 @@ +export * from "ce/PluginActionEditor/hooks/useActionSettingsConfig"; From e798ec66e758dc1481dc6962570c52ec2522c553 Mon Sep 17 00:00:00 2001 From: Rudraprasad Das Date: Fri, 20 Sep 2024 23:55:36 +0800 Subject: [PATCH 3/8] fix: fixing cta for git import modal (#36364) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Fixes CTA for git import modal to "Import App" Fixes https://github.com/appsmithorg/appsmith/issues/32388 ## Automation /ok-to-test tags="@tag.Git" ### :mag: Cypress test results > [!TIP] > 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ > Workflow run: > Commit: 3a4468f2750b956618a39de3f89315ecce9f372d > Cypress dashboard. > Tags: `@tag.Git` > Spec: >
Fri, 20 Sep 2024 11:44:10 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Introduced a new call-to-action message for importing an app, enhancing user guidance. - Improved the Git connection process by providing context-sensitive messages based on the import state. - **Bug Fixes** - Adjusted the text displayed during the Git connection steps to reflect the import status dynamically. --- app/client/src/ce/constants/messages.ts | 1 + .../Editor/gitSync/Tabs/GitConnectionV2/index.tsx | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index 8407a185902a..caef7eaad6c4 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -825,6 +825,7 @@ export const GIT_DISCONNECT_POPUP_MAIN_HEADING = () => `Are you sure?`; export const CONFIGURE_GIT = () => "Configure Git"; export const IMPORT_APP = () => "Import app via Git"; export const SETTINGS_GIT = () => "Settings"; +export const IMPORT_APP_CTA = () => "Import app"; export const GIT_CONNECTION = () => "Git connection"; export const GIT_IMPORT = () => "Git import"; diff --git a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/index.tsx b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/index.tsx index 93e8c2491ffc..78d4c81889de 100644 --- a/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/index.tsx +++ b/app/client/src/pages/Editor/gitSync/Tabs/GitConnectionV2/index.tsx @@ -20,6 +20,7 @@ import { GENERATE_SSH_KEY_STEP, GIT_CONNECT_WAITING, GIT_IMPORT_WAITING, + IMPORT_APP_CTA, PREVIOUS_STEP, createMessage, } from "ee/constants/messages"; @@ -83,12 +84,6 @@ const steps = [ const possibleSteps = steps.map((s) => s.key); -const nextStepText = { - [GIT_CONNECT_STEPS.CHOOSE_PROVIDER]: createMessage(CONFIGURE_GIT), - [GIT_CONNECT_STEPS.GENERATE_SSH_KEY]: createMessage(GENERATE_SSH_KEY_STEP), - [GIT_CONNECT_STEPS.ADD_DEPLOY_KEY]: createMessage(CONNECT_GIT_TEXT), -}; - interface FormDataState { gitProvider?: GitProvider; gitEmptyRepoExists?: string; @@ -109,6 +104,14 @@ function GitConnectionV2({ isImport = false }: GitConnectionV2Props) { const isImportingViaGit = useSelector(getIsImportingApplicationViaGit); const dispatch = useDispatch(); + const nextStepText = { + [GIT_CONNECT_STEPS.CHOOSE_PROVIDER]: createMessage(CONFIGURE_GIT), + [GIT_CONNECT_STEPS.GENERATE_SSH_KEY]: createMessage(GENERATE_SSH_KEY_STEP), + [GIT_CONNECT_STEPS.ADD_DEPLOY_KEY]: createMessage( + isImport ? IMPORT_APP_CTA : CONNECT_GIT_TEXT, + ), + }; + const [formData, setFormData] = useState({ gitProvider: undefined, gitEmptyRepoExists: undefined, From 7685c852ccd2167b1318489748712902c8900725 Mon Sep 17 00:00:00 2001 From: Diljit Date: Mon, 23 Sep 2024 08:21:07 +0530 Subject: [PATCH 4/8] chore: fix this.rootSpan undefined bug in PageLoadInstrumentation (#36459) --- .../src/UITelemetry/PageLoadInstrumentation.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/client/src/UITelemetry/PageLoadInstrumentation.ts b/app/client/src/UITelemetry/PageLoadInstrumentation.ts index ccb173d0b4af..801038068b11 100644 --- a/app/client/src/UITelemetry/PageLoadInstrumentation.ts +++ b/app/client/src/UITelemetry/PageLoadInstrumentation.ts @@ -41,15 +41,12 @@ export class PageLoadInstrumentation extends InstrumentationBase { this.ignoreResourceUrls = ignoreResourceUrls; // Start the root span for the page load this.rootSpan = startRootSpan("PAGE_LOAD", {}, 0); - } - init() { - // init method is present in the base class and needs to be implemented - // This is method is never called by the OpenTelemetry SDK - // Leaving it empty as it is done by other OpenTelemetry instrumentation classes + // Initialize the instrumentation after starting the root span + this.init(); } - enable(): void { + init() { // Register connection change listener this.addConnectionAttributes(); @@ -71,6 +68,11 @@ export class PageLoadInstrumentation extends InstrumentationBase { } } + enable() { + // enable method is present in the base class and needs to be implemented + // Leaving it empty as there is no need to do anything here + } + private addDeviceAttributes() { this.rootSpan.setAttributes({ deviceMemory: (navigator as TNavigator).deviceMemory, From 44f14865d7c9ec6f4b82cd5d242697a999361200 Mon Sep 17 00:00:00 2001 From: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:40:20 +0530 Subject: [PATCH 5/8] fix: Unit test fix (#36471) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.ImportExport" ### :mag: Cypress test results > [!IMPORTANT] > 🟣 🟣 🟣 Your tests are running. > Tests running at: > Commit: f59a3687d89d4e86a28c69fa7fec79190bc34ab3 > Workflow: `PR Automation test suite` > Tags: `@tag.ImportExport` > Spec: `` >
Mon, 23 Sep 2024 06:43:22 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Bug Fixes** - Updated error message for clarity when importing an invalid JSON file, ensuring consistent phrasing and capitalization. - Introduced a standardized error message constant for improved maintainability. --- .../server/constants/ImportExportConstants.java | 7 +++++++ .../imports/internal/ImportServiceCEImpl.java | 10 +++++----- .../imports/internal/ImportServiceTests.java | 14 ++++++-------- 3 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 app/server/appsmith-server/src/main/java/com/appsmith/server/constants/ImportExportConstants.java diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/constants/ImportExportConstants.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/constants/ImportExportConstants.java new file mode 100644 index 000000000000..5124c8002ec5 --- /dev/null +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/constants/ImportExportConstants.java @@ -0,0 +1,7 @@ +package com.appsmith.server.constants; + +public class ImportExportConstants { + + public static final String ARTIFACT_JSON_IMPORT_VALIDATION_ERROR_MESSAGE = + "'. Sorry! It seems you've imported a page-level JSON instead of an application. Please use the import within the page."; +} diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java index e409f047288e..28353b7d1fd7 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java @@ -5,6 +5,7 @@ import com.appsmith.external.models.Datasource; import com.appsmith.server.constants.ArtifactType; import com.appsmith.server.constants.FieldName; +import com.appsmith.server.constants.ImportExportConstants; import com.appsmith.server.converters.ArtifactExchangeJsonAdapter; import com.appsmith.server.domains.Application; import com.appsmith.server.domains.Artifact; @@ -421,11 +422,10 @@ private Mono importArtifactInWorkspace( log.error("Error in importing {}. Field {} is missing", artifactContextString, errorField); if (errorField.equals(artifactContextString)) { - return Mono.error( - new AppsmithException( - AppsmithError.VALIDATION_FAILURE, - "Field '" + artifactContextString - + "'. Sorry! It seems you've imported a page-level JSON instead of an application. Please use the import within the page.")); + return Mono.error(new AppsmithException( + AppsmithError.VALIDATION_FAILURE, + "Field '" + artifactContextString + + ImportExportConstants.ARTIFACT_JSON_IMPORT_VALIDATION_ERROR_MESSAGE)); } return Mono.error(new AppsmithException( diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/imports/internal/ImportServiceTests.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/imports/internal/ImportServiceTests.java index 8a742fa911d3..38337a84be5a 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/imports/internal/ImportServiceTests.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/imports/internal/ImportServiceTests.java @@ -21,6 +21,7 @@ import com.appsmith.server.actioncollections.base.ActionCollectionService; import com.appsmith.server.applications.base.ApplicationService; import com.appsmith.server.constants.FieldName; +import com.appsmith.server.constants.ImportExportConstants; import com.appsmith.server.datasources.base.DatasourceService; import com.appsmith.server.domains.ActionCollection; import com.appsmith.server.domains.Application; @@ -895,14 +896,11 @@ public void importArtifactFromInvalidJsonFileWithoutArtifactTest() { importService.extractArtifactExchangeJsonAndSaveArtifact(filePart, workspaceId, null); StepVerifier.create(resultMono) - .expectErrorMatches( - throwable -> throwable instanceof AppsmithException - && throwable - .getMessage() - .equals( - AppsmithError.VALIDATION_FAILURE.getMessage( - "Field '" + FieldName.APPLICATION - + "' Sorry! Seems like you've imported a page-level json instead of an application. Please use the import within the page."))) + .expectErrorMatches(throwable -> throwable instanceof AppsmithException + && throwable + .getMessage() + .equals(AppsmithError.VALIDATION_FAILURE.getMessage("Field '" + FieldName.APPLICATION + + ImportExportConstants.ARTIFACT_JSON_IMPORT_VALIDATION_ERROR_MESSAGE))) .verify(); } From eceaa43ebae1c8db59e34d0a08e568b3c85e38e2 Mon Sep 17 00:00:00 2001 From: Diljit Date: Mon, 23 Sep 2024 12:45:13 +0530 Subject: [PATCH 6/8] chore: Add cache control header for static files (#35461) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Add cache control header to static files in Caddy Fixes #34643 ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results > [!TIP] > 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ > Workflow run: > Commit: 779d12e84054412d436e8a0c0f26878e475d7469 > Cypress dashboard. > Tags: `@tag.All` > Spec: >
Mon, 23 Sep 2024 04:38:28 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Enhanced caching strategy for static assets, improving performance and reducing load times. - Introduced a `Cache-Control` header for static files to optimize browser caching. - Updated caching configuration to allow more frequent updates of JavaScript and CSS files. --- deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs b/deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs index 4d644c5d41bd..b5103011c427 100644 --- a/deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs +++ b/deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs @@ -92,6 +92,10 @@ parts.push(` X-Appsmith-Request-Id {http.request.uuid} } + header /static/* { + Cache-Control "public, max-age=31536000, immutable" + } + request_body { max_size ${process.env.APPSMITH_CODEC_SIZE || 150}MB } From 8fe96c9c200187476cb4dd897cf40342a72d2da1 Mon Sep 17 00:00:00 2001 From: Jacques Ikot Date: Mon, 23 Sep 2024 08:44:46 +0100 Subject: [PATCH 7/8] fix: isRequired validation property for table select column (#36375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description **Problem** The select column of the table widget does not have a validation property within its property pane to allow users add an isRequired validation to the table select column. **Solution** Added a Validation section to the table select column's property pane, which includes an isRequired toggle. When enabled, this feature will trigger a visual indication (error border colour) around the select widget if a required field is left unselected during "Add new row" or inline editing. Fixes #30091 ## Automation /ok-to-test tags="@tag.Widget, @tag.Table, @tag.Binding, @tag.Sanity, @tag.Select" ### :mag: Cypress test results > [!TIP] > 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ > Workflow run: > Commit: d2597e6a26938f2b99f2f997fca7bc110e5c2091 > Cypress dashboard. > Tags: `@tag.Widget, @tag.Table, @tag.Binding, @tag.Sanity, @tag.Select` > Spec: >
Fri, 20 Sep 2024 12:23:29 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **New Features** - Introduced end-to-end tests for Select column validation in Table widgets. - Enhanced validation logic to support Select column types in the Table widget. - Added visual feedback for required Select fields during row addition and inline editing. - Improved locator for single-select widget button control to enhance UI interaction. - **Bug Fixes** - Improved error handling and visual representation for invalid editable Select cells. - **Documentation** - Updated validation configuration to include Select column types for better usability. - **Refactor** - Enhanced code clarity for styled components related to Select fields. - Modified method to improve versatility in handling table interactions. --------- Co-authored-by: Sai Charan Co-authored-by: Pawan Kumar --- .../Table_select_validation_spec.ts | 128 ++++++++++++++++++ .../cypress/locators/commonlocators.json | 1 + app/client/cypress/support/Pages/Table.ts | 18 ++- .../component/cellComponents/SelectCell.tsx | 7 +- .../widgets/TableWidgetV2/widget/derived.js | 2 +- .../widgets/TableWidgetV2/widget/index.tsx | 1 + .../propertyConfig/PanelConfig/Validation.ts | 1 + .../PanelConfig/Validations/Common.ts | 29 ++-- 8 files changed, 163 insertions(+), 24 deletions(-) create mode 100644 app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Table_select_validation_spec.ts diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Table_select_validation_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Table_select_validation_spec.ts new file mode 100644 index 000000000000..cb440837abce --- /dev/null +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Table_select_validation_spec.ts @@ -0,0 +1,128 @@ +import commonlocators from "../../../../../../locators/commonlocators.json"; +import { + agHelper, + entityExplorer, + locators, + propPane, + table, +} from "../../../../../../support/Objects/ObjectsCore"; +import EditorNavigation, { + EntityType, +} from "../../../../../../support/Pages/EditorNavigation"; + +const TABLE_SELECT_WIDGET_ERROR_BORDER = "rgb(217, 25, 33)"; +const TABLE_SELECT_WIDGET_VALID_BORDER = "rgb(85, 61, 233)"; + +describe( + "Table widget - Select column validation", + { tags: ["@tag.Widget", "@tag.Table", "@tag.Select"] }, + () => { + before(() => { + entityExplorer.DragNDropWidget("tablewidgetv2", 350, 500); + table.AddSampleTableData(); + }); + it("1. should prevent adding a row when a required select column has no data", () => { + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); + + // Allow adding a row in table + propPane.TogglePropertyState("Allow adding a row", "On"); + + // Edit step column to select type + table.ChangeColumnType("step", "Select", "v2"); + table.EditColumn("step", "v2"); + + // Add data to select options + agHelper.UpdateCodeInput( + locators._controlOption, + ` + [ + { + "label": "#1", + "value": "#1" + }, + { + "label": "#2", + "value": "#2" + }, + { + "label": "#3", + "value": "#3" + } + ] + `, + ); + + // Set step column to editable + propPane.TogglePropertyState("Editable", "On"); + + // Set step column to required + propPane.TogglePropertyState("Required", "On"); + + // Click add a new row + table.AddNewRow(); + + // Expect the save row button to be disabled + agHelper.GetElement(table._saveNewRow).should("be.disabled"); + + // Expect select to have an error color + agHelper + .GetElement(commonlocators.singleSelectWidgetButtonControl) + .should("have.css", "border-color", TABLE_SELECT_WIDGET_ERROR_BORDER); + + // Select a valid option from the select table cell + agHelper.GetNClick(commonlocators.singleSelectWidgetButtonControl); + agHelper + .GetElement(commonlocators.singleSelectWidgetMenuItem) + .contains("#1") + .click(); + + // Expect the save row option to be enabled + agHelper.GetElement(table._saveNewRow).should("be.enabled"); + + // Expect button to have a valid color + agHelper + .GetElement(commonlocators.singleSelectWidgetButtonControl) + .should("have.css", "border-color", TABLE_SELECT_WIDGET_VALID_BORDER); + + // Discard save new row + agHelper.GetElement(table._discardRow).click({ force: true }); + }); + + it("2. should display an error when inline editing a required select cell in a table with no data", () => { + // Update table data to create emtpy cell in step column + propPane.NavigateBackToPropertyPane(); + propPane.UpdatePropertyFieldValue( + "Table data", + ` + [ + { + "task": "Drop a table", + "status": "βœ…", + "action": "" + }, + { + "step": "#2", + "task": "Create a query fetch_users with the Mock DB", + "status": "--", + "action": "" + }, + { + "step": "#3", + "task": "Bind the query using => fetch_users.data", + "status": "--", + "action": "" + } + ] + `, + ); + + // Click the first cell in the step column + table.ClickOnEditIcon(0, 0, true); + + // Exect the select to have an error color + agHelper + .GetElement(commonlocators.singleSelectWidgetButtonControl) + .should("have.css", "border-color", TABLE_SELECT_WIDGET_ERROR_BORDER); + }); + }, +); diff --git a/app/client/cypress/locators/commonlocators.json b/app/client/cypress/locators/commonlocators.json index 986c006820ce..9fe519e15adb 100644 --- a/app/client/cypress/locators/commonlocators.json +++ b/app/client/cypress/locators/commonlocators.json @@ -72,6 +72,7 @@ "callApi": ".t--property-control-onpagechange .t--open-dropdown-Select-Action", "singleSelectMenuItem": ".bp3-menu-item.single-select div", "singleSelectWidgetMenuItem": ".menu-item-link", + "singleSelectWidgetButtonControl": ".bp3-button.select-button", "singleSelectActiveMenuItem": ".menu-item-active div", "selectInputSearch": ".select-popover-wrapper .bp3-input", "multiSelectMenuItem": "rc-select-item.rc-select-item-option div", diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index 2f90efb052c7..d1439a589271 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -638,18 +638,24 @@ export class Table { this.agHelper.GetNClick(colSettings); } - public ClickOnEditIcon(rowIndex: number, colIndex: number) { + public ClickOnEditIcon( + rowIndex: number, + colIndex: number, + isSelectColumn: boolean = false, + ) { this.agHelper.HoverElement(this._tableRow(rowIndex, colIndex, "v2")); this.agHelper.GetNClick( this._tableRow(rowIndex, colIndex, "v2") + " " + this._editCellIconDiv, 0, true, ); - this.agHelper.AssertElementVisibility( - this._tableRow(rowIndex, colIndex, "v2") + - " " + - this._editCellEditorInput, - ); + if (!isSelectColumn) { + this.agHelper.AssertElementVisibility( + this._tableRow(rowIndex, colIndex, "v2") + + " " + + this._editCellEditorInput, + ); + } } public EditTableCell( diff --git a/app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx b/app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx index d29a7cdc4056..2e37cb7dd6c9 100644 --- a/app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx +++ b/app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx @@ -18,6 +18,7 @@ const StyledSelectComponent = styled(SelectComponent)<{ accentColor: string; height: number; isNewRow: boolean; + isValid: boolean; }>` &&& { width: ${(props) => @@ -37,7 +38,6 @@ const StyledSelectComponent = styled(SelectComponent)<{ } & button.bp3-button { - border-color: #fff; padding: 0 9px; min-height: ${(props) => { return props.isNewRow @@ -82,6 +82,7 @@ type SelectProps = BaseCellComponentProps & { value: string; width: number; isEditable: boolean; + isEditableCellValid: boolean; tableWidth: number; isCellEditable?: boolean; isCellEditMode?: boolean; @@ -131,6 +132,7 @@ export const SelectCell = (props: SelectProps) => { isCellEditMode, isCellVisible, isEditable, + isEditableCellValid, isFilterable = false, isHidden, isNewRow, @@ -236,13 +238,14 @@ export const SelectCell = (props: SelectProps) => { compactMode dropDownWidth={width} filterText={filterText} + hasError={!isEditableCellValid} height={TABLE_SIZES[compactMode].ROW_HEIGHT} hideCancelIcon isFilterable={isFilterable} isLoading={false} isNewRow={isNewRow} isOpen={autoOpen} - isValid + isValid={isEditableCellValid} labelText="" onClose={onClose} onFilterChange={onFilter} diff --git a/app/client/src/widgets/TableWidgetV2/widget/derived.js b/app/client/src/widgets/TableWidgetV2/widget/derived.js index 988cdd6b2a72..d27e7e84c593 100644 --- a/app/client/src/widgets/TableWidgetV2/widget/derived.js +++ b/app/client/src/widgets/TableWidgetV2/widget/derived.js @@ -1037,7 +1037,7 @@ export default { }; let editableColumns = []; - const validatableColumns = ["text", "number", "currency", "date"]; + const validatableColumns = ["text", "number", "currency", "date", "select"]; if (props.isAddRowInProgress) { Object.values(props.primaryColumns) diff --git a/app/client/src/widgets/TableWidgetV2/widget/index.tsx b/app/client/src/widgets/TableWidgetV2/widget/index.tsx index fc428163caac..046366812074 100644 --- a/app/client/src/widgets/TableWidgetV2/widget/index.tsx +++ b/app/client/src/widgets/TableWidgetV2/widget/index.tsx @@ -2156,6 +2156,7 @@ class TableWidgetV2 extends BaseWidget { isCellEditable={isCellEditable} isCellVisible={cellProperties.isCellVisible ?? true} isEditable={isColumnEditable} + isEditableCellValid={this.isColumnCellValid(alias)} isFilterable={cellProperties.isFilterable} isHidden={isHidden} isNewRow={isNewRow} diff --git a/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Validation.ts b/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Validation.ts index 64ae317f5b42..ec1bdb86505b 100644 --- a/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Validation.ts +++ b/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Validation.ts @@ -21,6 +21,7 @@ export default { ColumnTypes.NUMBER, ColumnTypes.DATE, ColumnTypes.CURRENCY, + ColumnTypes.SELECT, ], true, ) diff --git a/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Validations/Common.ts b/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Validations/Common.ts index edde51d680d0..78af47a0475d 100644 --- a/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Validations/Common.ts +++ b/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Validations/Common.ts @@ -6,6 +6,17 @@ import { getColumnPath, } from "widgets/TableWidgetV2/widget/propertyUtils"; +const hideColumnByType = (props: TableWidgetProps, propertyPath: string) => { + const path = getColumnPath(propertyPath); + + return showByColumnType( + props, + path, + [ColumnTypes.DATE, ColumnTypes.SELECT], + true, + ); +}; + export default [ { propertyName: "validation.regex", @@ -18,11 +29,7 @@ export default [ isBindProperty: true, isTriggerProperty: false, validation: { type: ValidationTypes.REGEX }, - hidden: (props: TableWidgetProps, propertyPath: string) => { - const path = getColumnPath(propertyPath); - - return showByColumnType(props, path, [ColumnTypes.DATE], true); - }, + hidden: hideColumnByType, }, { propertyName: "validation.isColumnEditableCellValid", @@ -39,11 +46,7 @@ export default [ default: true, }, }, - hidden: (props: TableWidgetProps, propertyPath: string) => { - const path = getColumnPath(propertyPath); - - return showByColumnType(props, path, [ColumnTypes.DATE], true); - }, + hidden: hideColumnByType, }, { propertyName: "validation.errorMessage", @@ -56,11 +59,7 @@ export default [ isBindProperty: true, isTriggerProperty: false, validation: { type: ValidationTypes.TEXT }, - hidden: (props: TableWidgetProps, propertyPath: string) => { - const path = getColumnPath(propertyPath); - - return showByColumnType(props, path, [ColumnTypes.DATE], true); - }, + hidden: hideColumnByType, }, { propertyName: "validation.isColumnEditableCellRequired", From cd3472ac1d7db9bfbd2bf54ae77cb69663159f00 Mon Sep 17 00:00:00 2001 From: Valera Melnikov Date: Mon, 23 Sep 2024 13:52:00 +0300 Subject: [PATCH 8/8] chore: delete unused code (#36461) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description The second round of deleting unused files, `.ts` were added to the check. [Related EE PR](https://github.com/appsmithorg/appsmith-ee/pull/5205) ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results > [!TIP] > 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ > Workflow run: > Commit: 7cfbcb9f9028c7cca5f06ae5a3836762e94214ec > Cypress dashboard. > Tags: `@tag.All` > Spec: >
Mon, 23 Sep 2024 10:51:02 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **New Features** - Expanded project file scope to include JavaScript files alongside TypeScript files. - **Bug Fixes** - Removed obsolete functions and constants related to help, tour, and API functionalities, improving overall code clarity and maintenance. - **Chores** - Deleted several unused files and constants across various components, enhancing project organization and reducing clutter. --- app/client/knip.json | 14 +- app/client/src/actions/helpActions.ts | 14 - app/client/src/actions/tourActions.ts | 22 - app/client/src/api/SaasApi.ts | 25 - .../assets/icons/blueprintjs/svgo.config.js | 24 - app/client/src/ce/actions/auditLogsAction.ts | 15 - app/client/src/ce/api/GitExtendedApi.ts | 12 - .../ce/entities/DataTree/actionTriggers.ts | 230 - app/client/src/ce/mocks/handlers.ts | 3 - .../workers/Evaluation/PlatformFunctions.ts | 148 - .../CodeEditor/utils/entityNavigationUtils.ts | 15 - .../editorComponents/LightningMenu/hooks.ts | 54 - app/client/src/constants/ProductUpdate.ts | 28 - app/client/src/constants/serverAssets.ts | 40 - app/client/src/ee/actions/auditLogsAction.ts | 1 - app/client/src/ee/api/GitExtendedApi.ts | 1 - .../ee/entities/DataTree/actionTriggers.ts | 1 - app/client/src/ee/mocks/handlers.ts | 1 - .../workers/Evaluation/PlatformFunctions.ts | 1 - .../src/entities/AppsmithConsole/action.ts | 3 - .../src/entities/AppsmithConsole/binding.ts | 5 - .../src/entities/AppsmithConsole/eval.ts | 3 - .../src/entities/AppsmithConsole/widget.ts | 1 - .../canvasArenas/utils/dndEventUtils.ts | 9 - .../anvil/utils/widgetAdditionUtils.ts | 66 - .../autolayout/utils/data/contentData.ts | 184 - .../layoutSystems/common/utils/commonTypes.ts | 27 - app/client/src/layoutSystems/constants.ts | 3 - .../src/mockComponentProps/WidgetPayloads.ts | 18 - app/client/src/mocks/browser.ts | 4 - app/client/src/mocks/widgetProps/container.ts | 19 - .../src/pages/AppViewer/AppPage/constants.ts | 1 - .../src/pages/Editor/Explorer/mockTestData.ts | 412 -- app/client/src/pages/hooks/utils/index.ts | 1 - .../PasteWidgetUtils.fixture.ts | 30 - app/client/src/sagas/WebsocketSagas/utils.ts | 8 - .../src/selectors/websocketSelectors.ts | 6 - app/client/src/utils/ProductRamps/index.ts | 13 - app/client/src/utils/decorators.ts | 13 - .../hooks/useCanvasMinHeightUpdateHook.ts | 32 - app/client/src/utils/layoutPropertiesUtils.ts | 213 - app/client/src/utils/testDSLs.ts | 3783 ----------------- .../widgets/ButtonGroupWidget/constants.ts | 2 - .../src/widgets/ButtonWidget/constants.ts | 5 - .../src/widgets/DividerWidget/constants.ts | 1 - .../src/widgets/ExternalWidget/constants.ts | 2 - .../src/widgets/IconButtonWidget/constants.ts | 1 - .../widgets/MultiSelectWidget/constants.ts | 1 - .../src/widgets/StatboxWidget/constants.ts | 1 - .../src/widgets/SwitchWidget/constants.ts | 1 - .../config/propertyPaneConfig/styleConfig.ts | 1 - .../WDSSelectWidget/config/featuresConfig.ts | 6 - .../config/propertyPaneConfig/styleConfig.ts | 1 - .../PanelConfig/Alignment.ts | 94 - .../propertyPaneConfig/PanelConfig/Icon.ts | 67 - .../propertyPaneConfig/PanelConfig/Select.ts | 139 - .../childPanels/configureMenuItemsConfig.ts | 219 - 57 files changed, 12 insertions(+), 6032 deletions(-) delete mode 100644 app/client/src/actions/helpActions.ts delete mode 100644 app/client/src/actions/tourActions.ts delete mode 100644 app/client/src/api/SaasApi.ts delete mode 100644 app/client/src/assets/icons/blueprintjs/svgo.config.js delete mode 100644 app/client/src/ce/actions/auditLogsAction.ts delete mode 100644 app/client/src/ce/api/GitExtendedApi.ts delete mode 100644 app/client/src/ce/entities/DataTree/actionTriggers.ts delete mode 100644 app/client/src/ce/mocks/handlers.ts delete mode 100644 app/client/src/ce/workers/Evaluation/PlatformFunctions.ts delete mode 100644 app/client/src/components/editorComponents/CodeEditor/utils/entityNavigationUtils.ts delete mode 100644 app/client/src/components/editorComponents/LightningMenu/hooks.ts delete mode 100644 app/client/src/constants/ProductUpdate.ts delete mode 100644 app/client/src/constants/serverAssets.ts delete mode 100644 app/client/src/ee/actions/auditLogsAction.ts delete mode 100644 app/client/src/ee/api/GitExtendedApi.ts delete mode 100644 app/client/src/ee/entities/DataTree/actionTriggers.ts delete mode 100644 app/client/src/ee/mocks/handlers.ts delete mode 100644 app/client/src/ee/workers/Evaluation/PlatformFunctions.ts delete mode 100644 app/client/src/entities/AppsmithConsole/action.ts delete mode 100644 app/client/src/entities/AppsmithConsole/binding.ts delete mode 100644 app/client/src/entities/AppsmithConsole/eval.ts delete mode 100644 app/client/src/entities/AppsmithConsole/widget.ts delete mode 100644 app/client/src/layoutSystems/anvil/editor/canvasArenas/utils/dndEventUtils.ts delete mode 100644 app/client/src/layoutSystems/anvil/utils/widgetAdditionUtils.ts delete mode 100644 app/client/src/layoutSystems/autolayout/utils/data/contentData.ts delete mode 100644 app/client/src/layoutSystems/common/utils/commonTypes.ts delete mode 100644 app/client/src/layoutSystems/constants.ts delete mode 100644 app/client/src/mockComponentProps/WidgetPayloads.ts delete mode 100644 app/client/src/mocks/browser.ts delete mode 100644 app/client/src/mocks/widgetProps/container.ts delete mode 100644 app/client/src/pages/AppViewer/AppPage/constants.ts delete mode 100644 app/client/src/pages/Editor/Explorer/mockTestData.ts delete mode 100644 app/client/src/pages/hooks/utils/index.ts delete mode 100644 app/client/src/sagas/PasteWidgetUtils/PasteWidgetUtils.fixture.ts delete mode 100644 app/client/src/sagas/WebsocketSagas/utils.ts delete mode 100644 app/client/src/selectors/websocketSelectors.ts delete mode 100644 app/client/src/utils/ProductRamps/index.ts delete mode 100644 app/client/src/utils/decorators.ts delete mode 100644 app/client/src/utils/hooks/useCanvasMinHeightUpdateHook.ts delete mode 100644 app/client/src/utils/layoutPropertiesUtils.ts delete mode 100644 app/client/src/utils/testDSLs.ts delete mode 100644 app/client/src/widgets/ButtonGroupWidget/constants.ts delete mode 100644 app/client/src/widgets/ButtonWidget/constants.ts delete mode 100644 app/client/src/widgets/DividerWidget/constants.ts delete mode 100644 app/client/src/widgets/ExternalWidget/constants.ts delete mode 100644 app/client/src/widgets/IconButtonWidget/constants.ts delete mode 100644 app/client/src/widgets/MultiSelectWidget/constants.ts delete mode 100644 app/client/src/widgets/StatboxWidget/constants.ts delete mode 100644 app/client/src/widgets/SwitchWidget/constants.ts delete mode 100644 app/client/src/widgets/wds/WDSCheckboxWidget/config/propertyPaneConfig/styleConfig.ts delete mode 100644 app/client/src/widgets/wds/WDSSelectWidget/config/featuresConfig.ts delete mode 100644 app/client/src/widgets/wds/WDSSwitchWidget/config/propertyPaneConfig/styleConfig.ts delete mode 100644 app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Alignment.ts delete mode 100644 app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Icon.ts delete mode 100644 app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Select.ts delete mode 100644 app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/childPanels/configureMenuItemsConfig.ts diff --git a/app/client/knip.json b/app/client/knip.json index be642c7e0578..c94a3f04bba5 100644 --- a/app/client/knip.json +++ b/app/client/knip.json @@ -1,6 +1,6 @@ { "entry": ["src/index.tsx"], - "project": ["src/**/*.tsx"], + "project": ["src/**/*.{tsx,ts,js}"], "ignore": [ "packages/**/stories/**", "packages/**/chromatic/**", @@ -9,6 +9,16 @@ "packages/rts/build.js", "packages/design-system/ads/src/Documentation/**", "src/components/designSystems/blueprintjs/**", - "packages/design-system/ads/plopfile.mjs" + "packages/design-system/ads/plopfile.mjs", + "src/plugins/Linting/**", + "src/ee/plugins/Linting/**", + "src/ce/plugins/Linting/**", + "src/workers/Evaluation/**", + "src/widgets/ExternalWidget/component/script.js", + "src/widgets/ListWidgetV2/widget/derived.js", + "src/workers/Tern/tern.worker.ts", + "src/widgets/CustomWidget/component/appsmithConsole.js", + "src/serviceWorker.ts", + "src/ee/utils/serviceWorkerUtils.ts" ] } diff --git a/app/client/src/actions/helpActions.ts b/app/client/src/actions/helpActions.ts deleted file mode 100644 index d55402828b90..000000000000 --- a/app/client/src/actions/helpActions.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; - -export const setHelpDefaultRefinement = (payload: string) => { - return { - type: ReduxActionTypes.SET_DEFAULT_REFINEMENT, - payload, - }; -}; -export const setHelpModalVisibility = (payload: boolean) => { - return { - type: ReduxActionTypes.SET_HELP_MODAL_OPEN, - payload, - }; -}; diff --git a/app/client/src/actions/tourActions.ts b/app/client/src/actions/tourActions.ts deleted file mode 100644 index 8b5814df7989..000000000000 --- a/app/client/src/actions/tourActions.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; -import type { TourType } from "entities/Tour"; - -export const setActiveTour = (tourType: TourType) => ({ - type: ReduxActionTypes.SET_ACTIVE_TOUR, - payload: tourType, -}); - -export const resetActiveTour = () => ({ - type: ReduxActionTypes.RESET_ACTIVE_TOUR, - payload: undefined, -}); - -export const setActiveTourIndex = (index: number) => ({ - type: ReduxActionTypes.SET_ACTIVE_TOUR_INDEX, - payload: index, -}); - -export const proceedToNextTourStep = () => ({ - type: ReduxActionTypes.PROCEED_TO_NEXT_TOUR_STEP, - payload: undefined, -}); diff --git a/app/client/src/api/SaasApi.ts b/app/client/src/api/SaasApi.ts deleted file mode 100644 index fc5420af6892..000000000000 --- a/app/client/src/api/SaasApi.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Api from "./Api"; -import type { AxiosPromise } from "axios"; -import type { ApiResponse } from "api/ApiResponses"; -import type { Datasource } from "entities/Datasource"; - -class SaasApi extends Api { - static url = "v1/saas"; - static async getAppsmithToken( - datasourceId: string, - pageId: string, - ): Promise>> { - return Api.post(`${SaasApi.url}/${datasourceId}/pages/${pageId}/oauth`); - } - - static async getAccessToken( - datasourceId: string, - token: string, - ): Promise>> { - return Api.post( - `${SaasApi.url}/${datasourceId}/token?appsmithToken=${token}`, - ); - } -} - -export default SaasApi; diff --git a/app/client/src/assets/icons/blueprintjs/svgo.config.js b/app/client/src/assets/icons/blueprintjs/svgo.config.js deleted file mode 100644 index bbed3b734b92..000000000000 --- a/app/client/src/assets/icons/blueprintjs/svgo.config.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - plugins: [ - // Optimize SVG icons. - // Most importantly, this removes namespace attributes like "xmlns:sketch" - // that breaks the build with β€œNamespace tags are not supported by default” - "preset-default", - - // Remove all fill or stroke attributes from SVGs, except for those that - // are set to "none". This is necessary because we’re using raw SVGs from - // the BlueprintJS repo, and they sometimes have incorrectly set fill or - // stroke colors. - // - // @blueprintjs/icons doesn’t have this issue because it doesn’t actually - // use raw SVGs – instead, it uses a custom build process that extracts - // the paths from the SVGs and puts them all into a single file. - // (https://github.com/palantir/blueprint/blob/release/3.x/packages/node-build-scripts/generate-icons-source.js) - { - name: "removeAttrs", - params: { - attrs: '(fill|stroke)(?!="none")', - }, - }, - ], -}; diff --git a/app/client/src/ce/actions/auditLogsAction.ts b/app/client/src/ce/actions/auditLogsAction.ts deleted file mode 100644 index fe9d78d70706..000000000000 --- a/app/client/src/ce/actions/auditLogsAction.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Code splitting helper for audit logs - */ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export const logActionExecutionForAudit = (payload: { - actionId: string; - pageId: string; - collectionId: string; - actionName: string; - pageName: string; -}) => { - return { - type: "", - }; -}; diff --git a/app/client/src/ce/api/GitExtendedApi.ts b/app/client/src/ce/api/GitExtendedApi.ts deleted file mode 100644 index 18cc9df154ff..000000000000 --- a/app/client/src/ce/api/GitExtendedApi.ts +++ /dev/null @@ -1,12 +0,0 @@ -import Api from "api/Api"; - -class GitExtendedApi extends Api { - static baseURL = `/v1/git`; - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - static async updateDefaultBranch(applicationId: string, branchName: string) { - return Promise.resolve(); - } -} - -export default GitExtendedApi; diff --git a/app/client/src/ce/entities/DataTree/actionTriggers.ts b/app/client/src/ce/entities/DataTree/actionTriggers.ts deleted file mode 100644 index 02bcec021c12..000000000000 --- a/app/client/src/ce/entities/DataTree/actionTriggers.ts +++ /dev/null @@ -1,230 +0,0 @@ -import type { NavigationTargetType_Dep } from "sagas/ActionExecution/NavigateActionSaga"; -import type { TypeOptions } from "react-toastify"; - -export type ActionTriggerKeys = - | "RUN_PLUGIN_ACTION" - | "CLEAR_PLUGIN_ACTION" - | "NAVIGATE_TO" - | "SHOW_ALERT" - | "SHOW_MODAL_BY_NAME" - | "CLOSE_MODAL" - | "STORE_VALUE" - | "REMOVE_VALUE" - | "CLEAR_STORE" - | "DOWNLOAD" - | "COPY_TO_CLIPBOARD" - | "RESET_WIDGET_META_RECURSIVE_BY_NAME" - | "SET_INTERVAL" - | "CLEAR_INTERVAL" - | "GET_CURRENT_LOCATION" - | "WATCH_CURRENT_LOCATION" - | "STOP_WATCHING_CURRENT_LOCATION" - | "CONFIRMATION_MODAL" - | "POST_MESSAGE" - | "SET_TIMEOUT" - | "CLEAR_TIMEOUT"; - -export const ActionTriggerFunctionNames: Record = { - CLEAR_INTERVAL: "clearInterval", - CLEAR_PLUGIN_ACTION: "action.clear", - CLOSE_MODAL: "closeModal", - COPY_TO_CLIPBOARD: "copyToClipboard", - DOWNLOAD: "download", - NAVIGATE_TO: "navigateTo", - RESET_WIDGET_META_RECURSIVE_BY_NAME: "resetWidget", - RUN_PLUGIN_ACTION: "action.run", - SET_INTERVAL: "setInterval", - SHOW_ALERT: "showAlert", - SHOW_MODAL_BY_NAME: "showModal", - STORE_VALUE: "storeValue", - REMOVE_VALUE: "removeValue", - CLEAR_STORE: "clearStore", - GET_CURRENT_LOCATION: "getCurrentLocation", - WATCH_CURRENT_LOCATION: "watchLocation", - STOP_WATCHING_CURRENT_LOCATION: "stopWatch", - CONFIRMATION_MODAL: "ConfirmationModal", - POST_MESSAGE: "postWindowMessage", - SET_TIMEOUT: "setTimeout", - CLEAR_TIMEOUT: "clearTimeout", -}; - -export interface ActionDescriptionInterface { - type: Type; - payload: T; -} - -export type RunPluginActionDescription = ActionDescriptionInterface< - { - actionId: string; - params?: Record; - onSuccess?: string; - onError?: string; - }, - "RUN_PLUGIN_ACTION" ->; - -export type ClearPluginActionDescription = ActionDescriptionInterface< - { - actionId: string; - }, - "CLEAR_PLUGIN_ACTION" ->; - -export type NavigateActionDescription = ActionDescriptionInterface< - { - pageNameOrUrl: string; - params?: Record; - target?: NavigationTargetType_Dep; - }, - "NAVIGATE_TO" ->; - -export type ShowAlertActionDescription = ActionDescriptionInterface< - { - message: string | unknown; - style?: TypeOptions; - }, - "SHOW_ALERT" ->; - -export type ShowModalActionDescription = ActionDescriptionInterface< - { - modalName: string; - }, - "SHOW_MODAL_BY_NAME" ->; - -export type CloseModalActionDescription = ActionDescriptionInterface< - { - modalName: string; - }, - "CLOSE_MODAL" ->; - -export type StoreValueActionDescription = ActionDescriptionInterface< - { - key: string; - value: string; - persist: boolean; - }, - "STORE_VALUE" ->; - -export type RemoveValueActionDescription = ActionDescriptionInterface< - { - key: string; - }, - "REMOVE_VALUE" ->; - -export type ClearStoreActionDescription = ActionDescriptionInterface< - null, - "CLEAR_STORE" ->; - -export type DownloadActionDescription = ActionDescriptionInterface< - { - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - data: any; - name: string; - type: string; - }, - "DOWNLOAD" ->; - -export type CopyToClipboardDescription = ActionDescriptionInterface< - { - data: string; - options: { debug?: boolean; format?: string }; - }, - "COPY_TO_CLIPBOARD" ->; - -export type ResetWidgetDescription = ActionDescriptionInterface< - { - widgetName: string; - resetChildren: boolean; - }, - "RESET_WIDGET_META_RECURSIVE_BY_NAME" ->; - -export type SetIntervalDescription = ActionDescriptionInterface< - { - callback: string; - interval: number; - id?: string; - }, - "SET_INTERVAL" ->; - -export type ClearIntervalDescription = ActionDescriptionInterface< - { - id: string; - }, - "CLEAR_INTERVAL" ->; - -interface GeolocationOptions { - maximumAge?: number; - timeout?: number; - enableHighAccuracy?: boolean; -} - -interface GeolocationPayload { - onSuccess?: string; - onError?: string; - options?: GeolocationOptions; -} - -export type GetCurrentLocationDescription = ActionDescriptionInterface< - GeolocationPayload, - "GET_CURRENT_LOCATION" ->; - -export type WatchCurrentLocationDescription = ActionDescriptionInterface< - GeolocationPayload, - "WATCH_CURRENT_LOCATION" ->; - -export type StopWatchingCurrentLocationDescription = ActionDescriptionInterface< - Record | undefined, - "STOP_WATCHING_CURRENT_LOCATION" ->; - -export type ConfirmationModalDescription = ActionDescriptionInterface< - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Record | undefined, - "CONFIRMATION_MODAL" ->; - -export type PostMessageDescription = ActionDescriptionInterface< - { - message: unknown; - source: string; - targetOrigin: string; - }, - "POST_MESSAGE" ->; - -export type ActionDescription = - | RunPluginActionDescription - | ClearPluginActionDescription - | NavigateActionDescription - | ShowAlertActionDescription - | ShowModalActionDescription - | CloseModalActionDescription - | StoreValueActionDescription - | RemoveValueActionDescription - | ClearStoreActionDescription - | DownloadActionDescription - | CopyToClipboardDescription - | ResetWidgetDescription - | SetIntervalDescription - | ClearIntervalDescription - | GetCurrentLocationDescription - | WatchCurrentLocationDescription - | StopWatchingCurrentLocationDescription - | ConfirmationModalDescription - | PostMessageDescription; diff --git a/app/client/src/ce/mocks/handlers.ts b/app/client/src/ce/mocks/handlers.ts deleted file mode 100644 index 5317c4271e12..000000000000 --- a/app/client/src/ce/mocks/handlers.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* import { rest } from "msw"; */ - -export const handlers = []; diff --git a/app/client/src/ce/workers/Evaluation/PlatformFunctions.ts b/app/client/src/ce/workers/Evaluation/PlatformFunctions.ts deleted file mode 100644 index 244dc620efe5..000000000000 --- a/app/client/src/ce/workers/Evaluation/PlatformFunctions.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ -import type { ActionDescription } from "ee/entities/DataTree/actionTriggers"; -import { ExecutionType } from "ee/workers/Evaluation/Actions"; -import _ from "lodash"; -import uniqueId from "lodash/uniqueId"; -import type { NavigationTargetType_Dep } from "sagas/ActionExecution/NavigateActionSaga"; - -export type ActionDescriptionWithExecutionType = ActionDescription & { - executionType: ExecutionType; -}; - -export type ActionDispatcherWithExecutionType = ( - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...args: any[] -) => ActionDescriptionWithExecutionType; - -export const PLATFORM_FUNCTIONS: Record< - string, - ActionDispatcherWithExecutionType -> = { - navigateTo: function ( - pageNameOrUrl: string, - params: Record, - target?: NavigationTargetType_Dep, - ) { - return { - type: "NAVIGATE_TO", - payload: { pageNameOrUrl, params, target }, - executionType: ExecutionType.PROMISE, - }; - }, - showAlert: function ( - message: string, - style: "info" | "success" | "warning" | "error" | "default", - ) { - return { - type: "SHOW_ALERT", - payload: { message, style }, - executionType: ExecutionType.PROMISE, - }; - }, - showModal: function (modalName: string) { - return { - type: "SHOW_MODAL_BY_NAME", - payload: { modalName }, - executionType: ExecutionType.PROMISE, - }; - }, - closeModal: function (modalName: string) { - return { - type: "CLOSE_MODAL", - payload: { modalName }, - executionType: ExecutionType.PROMISE, - }; - }, - storeValue: function (key: string, value: string, persist = true) { - // momentarily store this value in local state to support loops - _.set(self, ["appsmith", "store", key], value); - - return { - type: "STORE_VALUE", - payload: { - key, - value, - persist, - uniqueActionRequestId: uniqueId("store_value_id_"), - }, - executionType: ExecutionType.PROMISE, - }; - }, - removeValue: function (key: string) { - return { - type: "REMOVE_VALUE", - payload: { key }, - executionType: ExecutionType.PROMISE, - }; - }, - clearStore: function () { - return { - type: "CLEAR_STORE", - executionType: ExecutionType.PROMISE, - payload: null, - }; - }, - download: function (data: string, name: string, type: string) { - return { - type: "DOWNLOAD", - payload: { data, name, type }, - executionType: ExecutionType.PROMISE, - }; - }, - copyToClipboard: function ( - data: string, - options?: { debug?: boolean; format?: string }, - ) { - return { - type: "COPY_TO_CLIPBOARD", - payload: { - data, - options: { debug: options?.debug, format: options?.format }, - }, - executionType: ExecutionType.PROMISE, - }; - }, - resetWidget: function (widgetName: string, resetChildren = true) { - return { - type: "RESET_WIDGET_META_RECURSIVE_BY_NAME", - payload: { widgetName, resetChildren }, - executionType: ExecutionType.PROMISE, - }; - }, - setInterval: function (callback: Function, interval: number, id?: string) { - return { - type: "SET_INTERVAL", - payload: { - callback: callback?.toString(), - interval, - id, - }, - executionType: ExecutionType.TRIGGER, - }; - }, - clearInterval: function (id: string) { - return { - type: "CLEAR_INTERVAL", - payload: { - id, - }, - executionType: ExecutionType.TRIGGER, - }; - }, - postWindowMessage: function ( - message: unknown, - source: string, - targetOrigin: string, - ) { - return { - type: "POST_MESSAGE", - payload: { - message, - source, - targetOrigin, - }, - executionType: ExecutionType.TRIGGER, - }; - }, -}; diff --git a/app/client/src/components/editorComponents/CodeEditor/utils/entityNavigationUtils.ts b/app/client/src/components/editorComponents/CodeEditor/utils/entityNavigationUtils.ts deleted file mode 100644 index 7043be37cd71..000000000000 --- a/app/client/src/components/editorComponents/CodeEditor/utils/entityNavigationUtils.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { EntityNavigationData } from "selectors/navigationSelectors"; - -export const addThisReference = ( - navigationData: EntityNavigationData, - entityName?: string, -) => { - if (entityName && entityName in navigationData) { - return { - ...navigationData, - this: navigationData[entityName], - }; - } - - return navigationData; -}; diff --git a/app/client/src/components/editorComponents/LightningMenu/hooks.ts b/app/client/src/components/editorComponents/LightningMenu/hooks.ts deleted file mode 100644 index ecdd25612f9b..000000000000 --- a/app/client/src/components/editorComponents/LightningMenu/hooks.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { useSelector } from "react-redux"; -import type { AppState } from "ee/reducers"; -import type { WidgetProps } from "widgets/BaseWidget"; -import type { Action } from "entities/Action"; -import { PluginType } from "entities/Action"; - -export const useWidgets = () => { - return useSelector((state: AppState) => { - const canvasWidgets = state.entities.canvasWidgets; - const final = Object.values(canvasWidgets).filter( - (widget: WidgetProps) => - !widget.children || widget.children?.length === 0, - ); - - return final; - }); -}; - -export const useActions = () => { - const actions = useSelector((state: AppState) => { - const currentPageId = state.entities.pageList.currentPageId; - - return state.entities.actions.filter( - (action) => action.config.pageId === currentPageId, - ); - }); - const apis: Action[] = actions - .filter((action) => action.config.pluginType === PluginType.API) - .map((action) => action.config); - - const queries: Action[] = actions - .filter((action) => action.config.pluginType === PluginType.DB) - .map((action) => action.config); - - const saas: Action[] = actions - .filter( - (action) => - action.config.pluginType === PluginType.SAAS || - action.config.pluginType === PluginType.REMOTE || - action.config.pluginType === PluginType.INTERNAL || - action.config.pluginType === PluginType.AI, - ) - .map((action) => action.config); - - return { apis, queries, saas }; -}; - -export const usePageId = () => { - const pageId = useSelector((state: AppState) => { - return state.entities.pageList.currentPageId; - }); - - return pageId || ""; -}; diff --git a/app/client/src/constants/ProductUpdate.ts b/app/client/src/constants/ProductUpdate.ts deleted file mode 100644 index a463f7d30c19..000000000000 --- a/app/client/src/constants/ProductUpdate.ts +++ /dev/null @@ -1,28 +0,0 @@ -/*** - * Product update is used to show a fixed banner to (all) users at the bottom - * of the screen. It should only be shown to - * - */ - -interface ProductUpdate { - id: string; // ID is important for dismissal and remindLater to work - enabled: boolean; // Won't be shown till this is true - title: string; - message: string; - learnMoreLink: string; - canDismiss: boolean; // Can the user close this message. - remindLaterDays?: number; // If the user chooses to remind later, // it will be shown again after these many days -} - -const update: ProductUpdate = { - enabled: false, - id: "1", - title: "Test issue", - message: - "Something is wrong. Lorem ipsum something something. You need to learn this", - learnMoreLink: "https://docs.appsmith.com", - canDismiss: true, - remindLaterDays: 1, -}; - -export default update; diff --git a/app/client/src/constants/serverAssets.ts b/app/client/src/constants/serverAssets.ts deleted file mode 100644 index a5c0c0200812..000000000000 --- a/app/client/src/constants/serverAssets.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { ASSETS_CDN_URL } from "./ThirdPartyConstants"; - -/* Since the script download-assets.js actually needs the url to download the assets, we need the urls we get from server response at build time. */ - -export const postgresqlIcon = `${ASSETS_CDN_URL}/logo/postgresql.svg`; -export const mongodbIcon = `${ASSETS_CDN_URL}/logo/mongodb.svg`; -export const restApiIcon = `${ASSETS_CDN_URL}/RestAPI.png`; -export const mysqlIcon = `${ASSETS_CDN_URL}/logo/mysql.svg`; -export const elasticIcon = `${ASSETS_CDN_URL}/logo/elastic.svg`; -export const dynamoDBIcon = `${ASSETS_CDN_URL}/logo/aws-dynamodb.svg`; -export const redisIcon = `${ASSETS_CDN_URL}/logo/redis.svg`; -export const mssqlIcon = `${ASSETS_CDN_URL}/logo/mssql.svg`; -export const s3Icon = `${ASSETS_CDN_URL}/logo/aws-s3.svg`; -export const googleSheetsIcon = `${ASSETS_CDN_URL}/GoogleSheets.svg`; -export const snowflakeIcon = `${ASSETS_CDN_URL}/logo/snowflake.svg`; -export const arangodbIcon = `${ASSETS_CDN_URL}/logo/arangodb.svg`; -export const jsFileIcon = `${ASSETS_CDN_URL}/JSFile.svg`; -export const smtpIcon = `${ASSETS_CDN_URL}/smtp-icon.svg`; -export const graphqlIcon = `${ASSETS_CDN_URL}/logo/graphql.svg`; -export const oracleIcon = `${ASSETS_CDN_URL}/oracle.svg`; - -// Unsupported plugin assets -export const openaiLogo = `${ASSETS_CDN_URL}/integrations/openai-logo-png.jpg`; -export const firestoreIcon = `${ASSETS_CDN_URL}/logo/firestore.svg`; -export const redshiftIcon = `${ASSETS_CDN_URL}/logo/aws-redshift.svg`; -export const hubspotIcon = `${ASSETS_CDN_URL}/integrations/HubSpot.png`; -export const airtableIcon = `${ASSETS_CDN_URL}/integrations/airtable.svg`; -export const twilioIcon = `${ASSETS_CDN_URL}/integrations/twilio_24.png`; -export const twilioIcon1 = `${ASSETS_CDN_URL}/integrations/twilio.png`; -export const sendgridTwilioIcon = `${ASSETS_CDN_URL}/integrations/sendgrid_twilio.jpg`; -export const huggingFaceLogo = `${ASSETS_CDN_URL}/integrations/Hugging-Face-Logo.png`; -export const dropboxIcon = `${ASSETS_CDN_URL}/integrations/dropbox.png`; -export const figmaIcon = `${ASSETS_CDN_URL}/integrations/Figma-1-logo.png`; - -// Assets for CRUD page generator -export const sqlWorkflowIcon = `${ASSETS_CDN_URL}/crud/workflow_sql.svg`; -export const s3WorkflowIcon = `${ASSETS_CDN_URL}/crud/workflow_s3.svg`; - -// Assets from tenant configuration -export const appsmithFavicon = `${ASSETS_CDN_URL}/appsmith-favicon-orange.ico`; diff --git a/app/client/src/ee/actions/auditLogsAction.ts b/app/client/src/ee/actions/auditLogsAction.ts deleted file mode 100644 index 4cbd4fbdd2bc..000000000000 --- a/app/client/src/ee/actions/auditLogsAction.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "ce/actions/auditLogsAction"; diff --git a/app/client/src/ee/api/GitExtendedApi.ts b/app/client/src/ee/api/GitExtendedApi.ts deleted file mode 100644 index b7d37df709c1..000000000000 --- a/app/client/src/ee/api/GitExtendedApi.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "ce/api/GitExtendedApi"; diff --git a/app/client/src/ee/entities/DataTree/actionTriggers.ts b/app/client/src/ee/entities/DataTree/actionTriggers.ts deleted file mode 100644 index ab8d4cf88318..000000000000 --- a/app/client/src/ee/entities/DataTree/actionTriggers.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "ce/entities/DataTree/actionTriggers"; diff --git a/app/client/src/ee/mocks/handlers.ts b/app/client/src/ee/mocks/handlers.ts deleted file mode 100644 index aeafd81009d0..000000000000 --- a/app/client/src/ee/mocks/handlers.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "ce/mocks/handlers"; diff --git a/app/client/src/ee/workers/Evaluation/PlatformFunctions.ts b/app/client/src/ee/workers/Evaluation/PlatformFunctions.ts deleted file mode 100644 index db2755dfa48f..000000000000 --- a/app/client/src/ee/workers/Evaluation/PlatformFunctions.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "ce/workers/Evaluation/PlatformFunctions"; diff --git a/app/client/src/entities/AppsmithConsole/action.ts b/app/client/src/entities/AppsmithConsole/action.ts deleted file mode 100644 index 6dae43aa2de3..000000000000 --- a/app/client/src/entities/AppsmithConsole/action.ts +++ /dev/null @@ -1,3 +0,0 @@ -export enum ActionError { - EXECUTION_TIMEOUT = "action:execution:timeout", -} diff --git a/app/client/src/entities/AppsmithConsole/binding.ts b/app/client/src/entities/AppsmithConsole/binding.ts deleted file mode 100644 index 64d1584be0c6..000000000000 --- a/app/client/src/entities/AppsmithConsole/binding.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum BindingError { - SYNTAX = "binding:syntax", - UNKNOWN_VARIABLE = "binding:unknown_variable", - DISALLOWED_FUNCTION = "binding:disallowed_function", -} diff --git a/app/client/src/entities/AppsmithConsole/eval.ts b/app/client/src/entities/AppsmithConsole/eval.ts deleted file mode 100644 index 877ed33a94fb..000000000000 --- a/app/client/src/entities/AppsmithConsole/eval.ts +++ /dev/null @@ -1,3 +0,0 @@ -export enum EvalError { - CYCLIC = "eval:cyclic", -} diff --git a/app/client/src/entities/AppsmithConsole/widget.ts b/app/client/src/entities/AppsmithConsole/widget.ts deleted file mode 100644 index 63212f410903..000000000000 --- a/app/client/src/entities/AppsmithConsole/widget.ts +++ /dev/null @@ -1 +0,0 @@ -export enum WidgetError {} diff --git a/app/client/src/layoutSystems/anvil/editor/canvasArenas/utils/dndEventUtils.ts b/app/client/src/layoutSystems/anvil/editor/canvasArenas/utils/dndEventUtils.ts deleted file mode 100644 index c2c834e13cb1..000000000000 --- a/app/client/src/layoutSystems/anvil/editor/canvasArenas/utils/dndEventUtils.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const resetAnvilDnDListener = ( - anvilDnDListener: HTMLDivElement | null, -) => { - if (anvilDnDListener) { - anvilDnDListener.style.backgroundColor = "unset"; - anvilDnDListener.style.color = "unset"; - anvilDnDListener.innerText = ""; - } -}; diff --git a/app/client/src/layoutSystems/anvil/utils/widgetAdditionUtils.ts b/app/client/src/layoutSystems/anvil/utils/widgetAdditionUtils.ts deleted file mode 100644 index fd0b10c24b7f..000000000000 --- a/app/client/src/layoutSystems/anvil/utils/widgetAdditionUtils.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { FlattenedWidgetProps } from "WidgetProvider/constants"; -import type { WidgetAddChild } from "actions/pageActions"; -import { WidgetReduxActionTypes } from "ee/constants/ReduxActionConstants"; -import { ENTITY_TYPE } from "ee/entities/AppsmithConsole/utils"; -import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer"; -import { call, put } from "redux-saga/effects"; -import { - type GeneratedWidgetPayload, - generateChildWidgets, -} from "sagas/WidgetAdditionSagas"; -import { traverseTreeAndExecuteBlueprintChildOperations } from "sagas/WidgetBlueprintSagas"; -import AppsmithConsole from "utils/AppsmithConsole"; - -export function* addNewWidgetToDsl( - allWidgets: CanvasWidgetsReduxState, - addChildPayload: WidgetAddChild, -) { - const { widgetId } = addChildPayload; - - const widgets = Object.assign({}, allWidgets); - // Get the current parent widget whose child will be the new widget. - const stateParent: FlattenedWidgetProps = allWidgets[widgetId]; - - // Generate the full WidgetProps of the widget to be added. - const childWidgetPayload: GeneratedWidgetPayload = yield generateChildWidgets( - stateParent, - addChildPayload, - widgets, - // sending blueprint for onboarding use case - addChildPayload.props?.blueprint, - ); - - // Update widgets to put back in the canvasWidgetsReducer - const parent = { - ...stateParent, - children: [...(stateParent.children || []), childWidgetPayload.widgetId], - }; - - widgets[parent.widgetId] = parent; - AppsmithConsole.info({ - text: "Widget was created", - source: { - type: ENTITY_TYPE.WIDGET, - id: childWidgetPayload.widgetId, - name: childWidgetPayload.widgets[childWidgetPayload.widgetId].widgetName, - }, - }); - yield put({ - type: WidgetReduxActionTypes.WIDGET_CHILD_ADDED, - payload: { - widgetId: childWidgetPayload.widgetId, - type: addChildPayload.type, - }, - }); - // some widgets need to update property of parent if the parent have CHILD_OPERATIONS - // so here we are traversing up the tree till we get to MAIN_CONTAINER_WIDGET_ID - // while traversing, if we find any widget which has CHILD_OPERATION, we will call the fn in it - const updatedWidgets: CanvasWidgetsReduxState = yield call( - traverseTreeAndExecuteBlueprintChildOperations, - parent, - [addChildPayload.newWidgetId], - widgets, - ); - - return updatedWidgets; -} diff --git a/app/client/src/layoutSystems/autolayout/utils/data/contentData.ts b/app/client/src/layoutSystems/autolayout/utils/data/contentData.ts deleted file mode 100644 index 4460b8050a79..000000000000 --- a/app/client/src/layoutSystems/autolayout/utils/data/contentData.ts +++ /dev/null @@ -1,184 +0,0 @@ -export const CONTAINER_WITH_TEXT_WIDGET = { - "0": { - widgetName: "MainContainer", - backgroundColor: "none", - rightColumn: 1224, - snapColumns: 64, - detachFromLayout: true, - widgetId: "0", - topRow: 0, - bottomRow: 297.53125, - containerStyle: "none", - snapRows: 47, - parentRowSpace: 1, - type: "CANVAS_WIDGET", - canExtend: true, - version: 78, - minHeight: 490, - useAutoLayout: true, - parentColumnSpace: 1, - responsiveBehavior: "fill", - dynamicBindingPathList: [], - leftColumn: 0, - children: ["1"], - positioning: "vertical", - flexLayers: [ - { - children: [ - { - id: "1", - align: "start", - }, - ], - }, - ], - }, - 3: { - mobileBottomRow: 7, - widgetName: "Text1", - displayName: "Text", - iconSVG: "/static/media/icon.97c59b523e6f70ba6f40a10fc2c7c5b5.svg", - searchTags: ["typography", "paragraph", "label"], - topRow: 0, - bottomRow: 4, - parentRowSpace: 10, - type: "TEXT_WIDGET", - hideCard: false, - mobileRightColumn: 64, - animateLoading: true, - overflow: "NONE", - fontFamily: "{{appsmith.theme.fontFamily.appFont}}", - parentColumnSpace: 18.5625, - dynamicTriggerPathList: [], - leftColumn: 0, - dynamicBindingPathList: [ - { - key: "truncateButtonColor", - }, - { - key: "fontFamily", - }, - { - key: "borderRadius", - }, - ], - shouldTruncate: false, - truncateButtonColor: "{{appsmith.theme.colors.primaryColor}}", - text: "Label Label Label Label ", - key: "4doabtw6p3", - isDeprecated: false, - rightColumn: 64, - textAlign: "LEFT", - dynamicHeight: "AUTO_HEIGHT", - widgetId: "3", - minWidth: 450, - isVisible: true, - fontStyle: "BOLD", - textColor: "#231F20", - version: 1, - parentId: "2", - renderMode: "CANVAS", - isLoading: false, - mobileTopRow: 3, - responsiveBehavior: "fill", - borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", - mobileLeftColumn: 0, - maxDynamicHeight: 9000, - fontSize: "1rem", - alignment: "start", - minDynamicHeight: 4, - }, - "2": { - mobileBottomRow: 100, - widgetName: "Canvas1", - displayName: "Canvas", - topRow: 0, - bottomRow: 277.53125, - parentRowSpace: 1, - type: "CANVAS_WIDGET", - canExtend: false, - hideCard: true, - minHeight: 100, - mobileRightColumn: 64, - parentColumnSpace: 1, - leftColumn: 0, - dynamicBindingPathList: [], - children: ["3"], - key: "ab5j0zc6sp", - isDeprecated: false, - rightColumn: 64, - detachFromLayout: true, - widgetId: "2", - containerStyle: "none", - minWidth: 450, - isVisible: true, - version: 1, - parentId: "1", - renderMode: "CANVAS", - isLoading: false, - mobileTopRow: 0, - responsiveBehavior: "fill", - mobileLeftColumn: 0, - flexLayers: [ - { - children: [ - { - id: "3", - align: "start", - }, - ], - }, - ], - }, - 1: { - boxShadow: "{{appsmith.theme.boxShadow.appBoxShadow}}", - mobileBottomRow: 36, - widgetName: "Container1", - borderColor: "#E0DEDE", - isCanvas: true, - displayName: "Container", - iconSVG: "/static/media/icon.1977dca3370505e2db3a8e44cfd54907.svg", - searchTags: ["div", "parent", "group"], - topRow: 0, - bottomRow: 27.753125, - parentRowSpace: 10, - type: "CONTAINER_WIDGET", - hideCard: false, - shouldScrollContents: true, - mobileRightColumn: 64, - animateLoading: true, - parentColumnSpace: 18.84375, - leftColumn: 0, - dynamicBindingPathList: [ - { - key: "borderRadius", - }, - { - key: "boxShadow", - }, - ], - children: ["2"], - borderWidth: "1", - flexVerticalAlignment: "start", - key: "4pbxn6c6w2", - backgroundColor: "#FFFFFF", - isDeprecated: false, - rightColumn: 64, - dynamicHeight: "AUTO_HEIGHT", - widgetId: "1", - containerStyle: "card", - minWidth: 450, - isVisible: true, - version: 1, - parentId: "0", - renderMode: "CANVAS", - isLoading: false, - mobileTopRow: 26, - responsiveBehavior: "fill", - borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}", - mobileLeftColumn: 0, - maxDynamicHeight: 9000, - alignment: "start", - minDynamicHeight: 10, - }, -}; diff --git a/app/client/src/layoutSystems/common/utils/commonTypes.ts b/app/client/src/layoutSystems/common/utils/commonTypes.ts deleted file mode 100644 index a34cc9d043b6..000000000000 --- a/app/client/src/layoutSystems/common/utils/commonTypes.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { WidgetType } from "WidgetProvider/factory"; -import type { RenderMode } from "constants/WidgetConstants"; -import type { - FlexLayerAlignment, - FlexVerticalAlignment, - ResponsiveBehavior, -} from "layoutSystems/common/utils/constants"; -import type { ReactNode } from "react"; - -export interface AutoLayoutProps { - alignment: FlexLayerAlignment; - children: ReactNode; - componentHeight: number; - componentWidth: number; - focused?: boolean; - parentId?: string; - responsiveBehavior?: ResponsiveBehavior; - selected?: boolean; - isResizeDisabled?: boolean; - widgetId: string; - widgetName: string; - widgetType: WidgetType; - parentColumnSpace: number; - flexVerticalAlignment: FlexVerticalAlignment; - isMobile: boolean; - renderMode: RenderMode; -} diff --git a/app/client/src/layoutSystems/constants.ts b/app/client/src/layoutSystems/constants.ts deleted file mode 100644 index cf13dc70f369..000000000000 --- a/app/client/src/layoutSystems/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { v4 as uuid } from "uuid"; - -export const LAYOUT_WRAPPER_ID = uuid(); diff --git a/app/client/src/mockComponentProps/WidgetPayloads.ts b/app/client/src/mockComponentProps/WidgetPayloads.ts deleted file mode 100644 index 244bdf95c4d6..000000000000 --- a/app/client/src/mockComponentProps/WidgetPayloads.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { RenderModes } from "constants/WidgetConstants"; - -export default { - dummyWidgetProps: { - bottomRow: 0, - isLoading: false, - leftColumn: 0, - parentColumnSpace: 0, - parentRowSpace: 0, - renderMode: RenderModes.CANVAS, - rightColumn: 0, - topRow: 0, - type: "SKELETON_WIDGET", - version: 0, - widgetId: "", - widgetName: "", - }, -}; diff --git a/app/client/src/mocks/browser.ts b/app/client/src/mocks/browser.ts deleted file mode 100644 index 506a92903631..000000000000 --- a/app/client/src/mocks/browser.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { setupWorker } from "msw"; -import { handlers } from "ee/mocks/handlers"; - -export const worker = setupWorker(...handlers); diff --git a/app/client/src/mocks/widgetProps/container.ts b/app/client/src/mocks/widgetProps/container.ts deleted file mode 100644 index 4da2447783ec..000000000000 --- a/app/client/src/mocks/widgetProps/container.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ResponsiveBehavior } from "layoutSystems/common/utils/constants"; -import { generateReactKey } from "utils/generators"; -import type { BaseWidgetProps } from "widgets/BaseWidgetHOC/withBaseWidgetHOC"; - -export const mockContainerProps = (): BaseWidgetProps => ({ - type: "CONTAINER_WIDGET", - widgetId: generateReactKey(), - widgetName: "Container1", - renderMode: "CANVAS", - version: 1, - isLoading: false, - parentColumnSpace: 10, - parentRowSpace: 10, - leftColumn: 0, - rightColumn: 30, - topRow: 0, - bottomRow: 5, - responsiveBehavior: ResponsiveBehavior.Fill, -}); diff --git a/app/client/src/pages/AppViewer/AppPage/constants.ts b/app/client/src/pages/AppViewer/AppPage/constants.ts deleted file mode 100644 index d7900e08a440..000000000000 --- a/app/client/src/pages/AppViewer/AppPage/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const RESIZE_DEBOUNCE_THRESHOLD = 100; diff --git a/app/client/src/pages/Editor/Explorer/mockTestData.ts b/app/client/src/pages/Editor/Explorer/mockTestData.ts deleted file mode 100644 index bf70f8fc988d..000000000000 --- a/app/client/src/pages/Editor/Explorer/mockTestData.ts +++ /dev/null @@ -1,412 +0,0 @@ -export const mockDatasources = [ - { - id: "61e0f447cd5225210fa81dd8", - name: "09bd6b2f", - pluginId: "5c9f512f96c1a50004819786", - workspaceId: "607d2c9c1a5f642a171ebd9b", - datasourceConfiguration: { - connection: { - mode: "READ_WRITE", - ssl: { - authType: "DEFAULT", - }, - }, - endpoints: [ - { - host: "localhost", - port: 5432, - }, - ], - authentication: { - authenticationType: "dbAuth", - username: "postgres", - databaseName: "fakeapi", - }, - sshProxyEnabled: false, - }, - invalids: [], - messages: [ - "You may not be able to access your localhost if Appsmith is running inside a docker container or on the cloud. To enable access to your localhost you may use ngrok to expose your local endpoint to the internet. Please check out Appsmith's documentation to understand more.", - ], - isConfigured: false, - isValid: true, - new: false, - }, - { - id: "61e0e47bcd5225210fa81d59", - name: "2dcc265f", - pluginId: "5c9f512f96c1a50004819786", - workspaceId: "607d2c9c1a5f642a171ebd9b", - datasourceConfiguration: { - connection: { - mode: "READ_WRITE", - ssl: { - authType: "DEFAULT", - }, - }, - endpoints: [ - { - host: "localhost", - port: 5432, - }, - ], - authentication: { - authenticationType: "dbAuth", - username: "postgres", - databaseName: "fakeapi", - }, - sshProxyEnabled: false, - }, - }, - { - id: "61e0f171cd5225210fa81dad", - name: "f688c404", - pluginId: "5c9f512f96c1a50004819786", - workspaceId: "607d2c9c1a5f642a171ebd9b", - datasourceConfiguration: { - connection: { - mode: "READ_WRITE", - ssl: { - authType: "DEFAULT", - }, - }, - endpoints: [ - { - host: "localhost", - port: 5432, - }, - ], - authentication: { - authenticationType: "dbAuth", - username: "postgres", - databaseName: "fakeapi", - }, - sshProxyEnabled: false, - }, - }, - { - id: "61e0e47bcd5225210fa81d59", - name: "2dcc265f", - pluginId: "5c9f512f96c1a50004819786", - workspaceId: "607d2c9c1a5f642a171ebd9b", - datasourceConfiguration: { - connection: { - mode: "READ_WRITE", - ssl: { - authType: "DEFAULT", - }, - }, - endpoints: [ - { - host: "localhost", - port: 5432, - }, - ], - authentication: { - authenticationType: "dbAuth", - username: "postgres", - databaseName: "fakeapi", - }, - sshProxyEnabled: false, - }, - }, - { - id: "61e0f171cd5225210fa81dad", - name: "f688c404", - pluginId: "5c9f512f96c1a50004819786", - workspaceId: "607d2c9c1a5f642a171ebd9b", - datasourceConfiguration: { - connection: { - mode: "READ_WRITE", - ssl: { - authType: "DEFAULT", - }, - }, - endpoints: [ - { - host: "localhost", - port: 5432, - }, - ], - authentication: { - authenticationType: "dbAuth", - username: "postgres", - databaseName: "fakeapi", - }, - sshProxyEnabled: false, - }, - }, - { - id: "61e0e47bcd5225210fa81d59", - name: "qwerty12", - pluginId: "5c9f512f96c1a50004819786", - workspaceId: "607d2c9c1a5f642a171ebd9b", - datasourceConfiguration: { - connection: { - mode: "READ_WRITE", - ssl: { - authType: "DEFAULT", - }, - }, - endpoints: [ - { - host: "localhost", - port: 5432, - }, - ], - authentication: { - authenticationType: "dbAuth", - username: "postgres", - databaseName: "fakeapi", - }, - sshProxyEnabled: false, - }, - }, - { - id: "61e0f171cd5225210f121dad", - name: "poiuyt09", - pluginId: "5c9f512f96c1a50004819786", - workspaceId: "607d2c9c1a5f642a171ebd9b", - datasourceConfiguration: { - connection: { - mode: "READ_WRITE", - ssl: { - authType: "DEFAULT", - }, - }, - endpoints: [ - { - host: "localhost", - port: 5432, - }, - ], - authentication: { - authenticationType: "dbAuth", - username: "postgres", - databaseName: "fakeapi", - }, - sshProxyEnabled: false, - }, - }, -]; - -export const mockApiDatas = [ - { - id: "634929568f35a90ce8a428dc", - workspaceId: "607d2c9c1a5f642a171ebd9b", - pluginType: "API", - pluginId: "5c9f512f96c1a50004819786", - name: "Api1", - datasource: { - userPermissions: [], - name: "poiuyt09", - pluginId: "5c9f512f96c1a50004819786", - workspaceId: "607d2c9c1a5f642a171ebd9b", - datasourceConfiguration: { - connection: { - mode: "READ_WRITE", - ssl: { - authType: "DEFAULT", - }, - }, - endpoints: [ - { - host: "localhost", - port: 5432, - }, - ], - authentication: { - authenticationType: "dbAuth", - username: "postgres", - databaseName: "fakeapi", - }, - sshProxyEnabled: false, - }, - }, - actionConfiguration: { - timeoutInMillisecond: 10000, - paginationType: "NONE", - headers: [], - encodeParamsToggle: true, - queryParameters: [], - bodyFormData: [], - httpMethod: "GET", - selfReferencingDataPaths: [], - pluginSpecifiedTemplates: [ - { - value: true, - }, - ], - formData: { - apiContentType: "none", - }, - }, - executeOnLoad: false, - dynamicBindingPathList: [], - isValid: true, - invalids: [], - messages: [], - jsonPathKeys: [], - confirmBeforeExecute: false, - userPermissions: [ - "read:actions", - "delete:actions", - "execute:actions", - "manage:actions", - ], - validName: "Api1", - }, -]; - -export const mockJsActions = [ - { - id: "634926dc8f35a90ce8a428d2", - workspaceId: "607d2c9c1a5f642a171ebd9b", - name: "JSObject1", - pluginId: "634925cd8f35a90ce8a42841", - pluginType: "JS", - actionIds: [], - archivedActionIds: [], - actions: [ - { - id: "634926dc8f35a90ce8a428d0", - workspaceId: "607d2c9c1a5f642a171ebd9b", - pluginType: "JS", - pluginId: "634925cd8f35a90ce8a42841", - name: "myFun1", - fullyQualifiedName: "JSObject1.myFun1", - datasource: { - userPermissions: [], - name: "UNUSED_DATASOURCE", - pluginId: "634925cd8f35a90ce8a42841", - workspaceId: "607d2c9c1a5f642a171ebd9b", - messages: [], - isValid: true, - new: true, - }, - collectionId: "634926dc8f35a90ce8a428d2", - actionConfiguration: { - timeoutInMillisecond: 10000, - paginationType: "NONE", - encodeParamsToggle: true, - body: "() => {}", - selfReferencingDataPaths: [], - jsArguments: [], - }, - executeOnLoad: false, - clientSideExecution: true, - dynamicBindingPathList: [ - { - key: "body", - }, - ], - isValid: true, - invalids: [], - messages: [], - jsonPathKeys: ["() => {}"], - confirmBeforeExecute: false, - userPermissions: [ - "read:actions", - "delete:actions", - "execute:actions", - "manage:actions", - ], - validName: "JSObject1.myFun1", - }, - { - id: "634926dc8f35a90ce8a428cf", - workspaceId: "607d2c9c1a5f642a171ebd9b", - pluginType: "JS", - pluginId: "634925cd8f35a90ce8a42841", - name: "myFun2", - fullyQualifiedName: "JSObject1.myFun2", - datasource: { - userPermissions: [], - name: "UNUSED_DATASOURCE", - pluginId: "634925cd8f35a90ce8a42841", - workspaceId: "607d2c9c1a5f642a171ebd9b", - messages: [], - isValid: true, - new: true, - }, - collectionId: "634926dc8f35a90ce8a428d2", - actionConfiguration: { - timeoutInMillisecond: 10000, - paginationType: "NONE", - encodeParamsToggle: true, - body: "async () => {}", - selfReferencingDataPaths: [], - jsArguments: [], - }, - executeOnLoad: false, - clientSideExecution: true, - dynamicBindingPathList: [ - { - key: "body", - }, - ], - isValid: true, - invalids: [], - messages: [], - jsonPathKeys: ["async () => {}"], - confirmBeforeExecute: false, - userPermissions: [ - "read:actions", - "delete:actions", - "execute:actions", - "manage:actions", - ], - validName: "JSObject1.myFun2", - }, - ], - archivedActions: [], - body: "export default {sad\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t}\n}", - variables: [ - { - name: "myVar1", - value: "[]", - }, - { - name: "myVar2", - value: "{}", - }, - ], - userPermissions: [ - "read:actions", - "delete:actions", - "execute:actions", - "manage:actions", - ], - }, -]; - -export const mockEntitiesFilesSelector = () => [ - { - type: "group", - entity: { - name: "APIs", - }, - }, - { - type: "API", - entity: { - id: "634929568f35a90ce8a428dc", - name: "Api1", - }, - group: "APIs", - }, - { - type: "group", - entity: { - name: "JS Objects", - }, - }, - { - type: "JS", - entity: { - id: "634926dc8f35a90ce8a428d2", - name: "JSObject1", - }, - group: "JS Objects", - }, -]; diff --git a/app/client/src/pages/hooks/utils/index.ts b/app/client/src/pages/hooks/utils/index.ts deleted file mode 100644 index b2d9ed1e5c5f..000000000000 --- a/app/client/src/pages/hooks/utils/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { resolveCanvasWidth } from "./resolveCanvasWidth"; diff --git a/app/client/src/sagas/PasteWidgetUtils/PasteWidgetUtils.fixture.ts b/app/client/src/sagas/PasteWidgetUtils/PasteWidgetUtils.fixture.ts deleted file mode 100644 index 5a026cb01e8e..000000000000 --- a/app/client/src/sagas/PasteWidgetUtils/PasteWidgetUtils.fixture.ts +++ /dev/null @@ -1,30 +0,0 @@ -export const widget = { - image: "{{table1.selectedRowData.image}}", - text: "{{table1.selectedRowData.name}}", - sourceData: "{{table1.selectedRowData.sourceData}}", - }, - expectedImageUpdate = { - image: "{{table1Copy.selectedRowData.image}}", - text: "{{table1.selectedRowData.name}}", - sourceData: "{{table1.selectedRowData.sourceData}}", - }, - expectedTextUpdate = { - image: "{{table1.selectedRowData.image}}", - text: "{{table1Copy.selectedRowData.name}}", - sourceData: "{{table1.selectedRowData.sourceData}}", - }, - expectedSourceDataUpdate = { - image: "{{table1.selectedRowData.image}}", - text: "{{table1.selectedRowData.name}}", - sourceData: "{{table1Copy.selectedRowData.sourceData}}", - }, - widget2 = { - image: "{{table2.selectedRowData.image}}", - text: "{{table2.selectedRowData.name}}", - sourceData: "{{table2.selectedRowData.sourceData}}", - }, - emptywidget = { - image: "", - text: "", - sourceData: "", - }; diff --git a/app/client/src/sagas/WebsocketSagas/utils.ts b/app/client/src/sagas/WebsocketSagas/utils.ts deleted file mode 100644 index c4a723e5c5ff..000000000000 --- a/app/client/src/sagas/WebsocketSagas/utils.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const getPageLevelSocketRoomId = ( - pageId: string, - currentGitBranch?: string, -) => { - return currentGitBranch - ? `${pageId}-${currentGitBranch}` - : (pageId as string); -}; diff --git a/app/client/src/selectors/websocketSelectors.ts b/app/client/src/selectors/websocketSelectors.ts deleted file mode 100644 index 3e4a577a8b9a..000000000000 --- a/app/client/src/selectors/websocketSelectors.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { AppState } from "ee/reducers"; - -export const getIsPageLevelSocketConnected = (state: AppState) => - state.ui.websocket.pageLevelSocketConnected; -export const getIsAppLevelSocketConnected = (state: AppState) => - state.ui.websocket.appLevelSocketConnected; diff --git a/app/client/src/utils/ProductRamps/index.ts b/app/client/src/utils/ProductRamps/index.ts deleted file mode 100644 index 1ce770270aa9..000000000000 --- a/app/client/src/utils/ProductRamps/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { SupportedRampsType } from "./RampTypes"; -import { - CUSTOM_ROLES, - INVITE_USER_TO_APP, - MULTIPLE_ENV, - RAMP_NAME, -} from "./RampsControlList"; - -export const PRODUCT_RAMPS_LIST: { [key: string]: SupportedRampsType } = { - [RAMP_NAME.INVITE_USER_TO_APP]: INVITE_USER_TO_APP, - [RAMP_NAME.CUSTOM_ROLES]: CUSTOM_ROLES, - [RAMP_NAME.MULTIPLE_ENV]: MULTIPLE_ENV, -}; diff --git a/app/client/src/utils/decorators.ts b/app/client/src/utils/decorators.ts deleted file mode 100644 index bfd990567750..000000000000 --- a/app/client/src/utils/decorators.ts +++ /dev/null @@ -1,13 +0,0 @@ -import memo from "micro-memoize"; - -export function memoize(options: { maxSize: number }) { - return ( - target: unknown, - methodName: unknown, - descriptor: PropertyDescriptor, - ) => { - descriptor.value = memo(descriptor.value, { - maxSize: options.maxSize || 1, - }); - }; -} diff --git a/app/client/src/utils/hooks/useCanvasMinHeightUpdateHook.ts b/app/client/src/utils/hooks/useCanvasMinHeightUpdateHook.ts deleted file mode 100644 index d913f840a229..000000000000 --- a/app/client/src/utils/hooks/useCanvasMinHeightUpdateHook.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { MAIN_CONTAINER_WIDGET_ID } from "constants/WidgetConstants"; -import { useEffect } from "react"; -import { useDispatch } from "react-redux"; -import type { AppState } from "ee/reducers"; -import { APP_MODE } from "entities/App"; -import { getWidget } from "sagas/selectors"; -import { getAppMode } from "ee/selectors/applicationSelectors"; -import { useSelector } from "react-redux"; -import { updateWidgetMetaPropAndEval } from "actions/metaActions"; -import WidgetFactory from "WidgetProvider/factory"; - -const WidgetTypes = WidgetFactory.widgetTypes; - -export const useCanvasMinHeightUpdateHook = ( - widgetId: string, - minHeight = 0, -) => { - const widget = useSelector((state: AppState) => getWidget(state, widgetId)); - const dispatch = useDispatch(); - const appMode = useSelector(getAppMode); - const canUpdateWidgetMinHeight = - appMode === APP_MODE.EDIT && - widgetId !== MAIN_CONTAINER_WIDGET_ID && - widget && - widget.type === WidgetTypes.CANVAS_WIDGET; - - useEffect(() => { - if (canUpdateWidgetMinHeight && widget.minHeight !== minHeight) { - dispatch(updateWidgetMetaPropAndEval(widgetId, "minHeight", minHeight)); - } - }, [minHeight]); -}; diff --git a/app/client/src/utils/layoutPropertiesUtils.ts b/app/client/src/utils/layoutPropertiesUtils.ts deleted file mode 100644 index 8058aac09993..000000000000 --- a/app/client/src/utils/layoutPropertiesUtils.ts +++ /dev/null @@ -1,213 +0,0 @@ -import { - AlignItems, - Alignment, - FlexDirection, - FlexVerticalAlignment, - JustifyContent, - LayoutDirection, - Positioning, - ResponsiveBehavior, - Spacing, -} from "layoutSystems/common/utils/constants"; -import { ValidationTypes } from "constants/WidgetValidation"; - -export interface LayoutProperties { - flexDirection: FlexDirection; - justifyContent: JustifyContent; - alignItems: AlignItems; -} - -export const horizontalAlignment: { [key in Alignment]: LayoutProperties } = { - top: { - flexDirection: FlexDirection.Row, - justifyContent: JustifyContent.FlexStart, - alignItems: AlignItems.FlexStart, - }, - bottom: { - flexDirection: FlexDirection.Row, - justifyContent: JustifyContent.FlexStart, - alignItems: AlignItems.FlexEnd, - }, - left: { - flexDirection: FlexDirection.Row, - justifyContent: JustifyContent.FlexStart, - alignItems: AlignItems.FlexStart, - }, - right: { - flexDirection: FlexDirection.RowReverse, - justifyContent: JustifyContent.FlexStart, - alignItems: AlignItems.FlexStart, - }, -}; - -export const verticalAlignment: { [key in Alignment]: LayoutProperties } = { - top: { - flexDirection: FlexDirection.Column, - justifyContent: JustifyContent.FlexStart, - alignItems: AlignItems.Center, - }, - bottom: { - flexDirection: FlexDirection.ColumnReverse, - justifyContent: JustifyContent.FlexStart, - alignItems: AlignItems.Center, - }, - left: { - flexDirection: FlexDirection.Column, - justifyContent: JustifyContent.FlexStart, - alignItems: AlignItems.FlexStart, - }, - right: { - flexDirection: FlexDirection.Column, - justifyContent: JustifyContent.FlexStart, - alignItems: AlignItems.FlexEnd, - }, -}; - -export function getLayoutProperties( - direction: LayoutDirection = LayoutDirection.Horizontal, - alignment: Alignment, - spacing: Spacing, -): LayoutProperties { - let properties: LayoutProperties = - direction === LayoutDirection.Horizontal - ? horizontalAlignment[alignment] - : verticalAlignment[alignment]; - - if (spacing !== Spacing.None) { - properties = { - ...properties, - justifyContent: - spacing === Spacing.Equal - ? JustifyContent.SpaceEvenly - : JustifyContent.SpaceBetween, - }; - } - - return properties; -} - -export const generateResponsiveBehaviorConfig = ( - value: ResponsiveBehavior, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any -): any => { - return { - helpText: "Widget layout behavior on smaller view port", - propertyName: "responsiveBehavior", - label: "Responsive behavior", - controlType: "DROP_DOWN", - defaultValue: value || ResponsiveBehavior.Hug, - options: [ - { label: "Fill", value: ResponsiveBehavior.Fill }, - { label: "Hug", value: ResponsiveBehavior.Hug }, - ], - isJSConvertible: false, - isBindProperty: false, - isTriggerProperty: true, - validation: { type: ValidationTypes.TEXT }, - }; -}; - -export const generateAlignmentConfig = ( - value: Alignment = Alignment.Left, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any -): any => { - return { - helpText: - "Alignment of children with respect to this parent (applies to Stack positioning)", - propertyName: "alignment", - label: "Alignment", - controlType: "DROP_DOWN", - defaultValue: value, - options: [ - { label: "Top", value: Alignment.Top }, - { label: "Bottom", value: Alignment.Bottom }, - { label: "Left", value: Alignment.Left }, - { label: "Right", value: Alignment.Right }, - ], - isJSConvertible: true, - isBindProperty: false, - isTriggerProperty: true, - validation: { type: ValidationTypes.TEXT }, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - hidden: (props: any) => props?.positioning === Positioning.Fixed, - }; -}; - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const generateSpacingConfig = (value: Spacing = Spacing.None): any => { - return { - helpText: "Spacing between the children (applies to Stack positioning)", - propertyName: "spacing", - label: "Spacing", - controlType: "DROP_DOWN", - defaultValue: value, - options: [ - { label: "None", value: Spacing.None }, - { label: "Equal", value: Spacing.Equal }, - { label: "Space between", value: Spacing.SpaceBetween }, - ], - isJSConvertible: true, - isBindProperty: false, - isTriggerProperty: true, - validation: { type: ValidationTypes.TEXT }, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - hidden: (props: any) => props?.positioning === Positioning.Fixed, - }; -}; - -export const generatePositioningConfig = ( - value: Positioning = Positioning.Vertical, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any -): any => { - return { - helpText: "Position styles to be applied to the children", - propertyName: "positioning", - label: "Positioning", - controlType: "DROP_DOWN", - defaultValue: value, - options: [ - { label: "Fixed", value: Positioning.Fixed }, - // { label: "Horizontal stack", value: Positioning.Horizontal }, - { label: "Vertical stack", value: Positioning.Vertical }, - ], - isJSConvertible: false, - isBindProperty: true, - isTriggerProperty: true, - validation: { type: ValidationTypes.TEXT }, - }; -}; - -export const generateVerticalAlignmentConfig = ( - value: FlexVerticalAlignment = FlexVerticalAlignment.Top, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any -): any => { - return { - helpText: "Vertical alignment with respect to the siblings in the same row", - propertyName: "flexVerticalAlignment", - label: "Vertical alignment", - controlType: "DROP_DOWN", - defaultValue: value, - options: [ - { label: "Top", value: FlexVerticalAlignment.Top }, - { label: "Center", value: FlexVerticalAlignment.Center }, - { label: "Bottom", value: FlexVerticalAlignment.Bottom }, - ], - isJSConvertible: false, - isBindProperty: true, - isTriggerProperty: true, - validation: { type: ValidationTypes.TEXT }, - }; -}; - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function getLayoutConfig(alignment: Alignment, spacing: Spacing): any[] { - return [generateAlignmentConfig(alignment), generateSpacingConfig(spacing)]; -} diff --git a/app/client/src/utils/testDSLs.ts b/app/client/src/utils/testDSLs.ts deleted file mode 100644 index ea833cee14e2..000000000000 --- a/app/client/src/utils/testDSLs.ts +++ /dev/null @@ -1,3783 +0,0 @@ -import { getAssetUrl } from "ee/utils/airgapHelpers"; -import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants"; - -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.name)}}", - 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/src/widgets/ButtonGroupWidget/constants.ts b/app/client/src/widgets/ButtonGroupWidget/constants.ts deleted file mode 100644 index 6e2d84b768fd..000000000000 --- a/app/client/src/widgets/ButtonGroupWidget/constants.ts +++ /dev/null @@ -1,2 +0,0 @@ -// This file contains common constants which can be used across the widget configuration file (index.ts), widget and component folders. -export const BUTTONGROUP_WIDGET_CONSTANT = ""; diff --git a/app/client/src/widgets/ButtonWidget/constants.ts b/app/client/src/widgets/ButtonWidget/constants.ts deleted file mode 100644 index ef4360e0665b..000000000000 --- a/app/client/src/widgets/ButtonWidget/constants.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type ButtonStyle = - | "PRIMARY_BUTTON" - | "SECONDARY_BUTTON" - | "SUCCESS_BUTTON" - | "DANGER_BUTTON"; diff --git a/app/client/src/widgets/DividerWidget/constants.ts b/app/client/src/widgets/DividerWidget/constants.ts deleted file mode 100644 index b7f45812841f..000000000000 --- a/app/client/src/widgets/DividerWidget/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const MY_DIVIDER_WIDGET_CONSTANT = ""; diff --git a/app/client/src/widgets/ExternalWidget/constants.ts b/app/client/src/widgets/ExternalWidget/constants.ts deleted file mode 100644 index 76662d74abcb..000000000000 --- a/app/client/src/widgets/ExternalWidget/constants.ts +++ /dev/null @@ -1,2 +0,0 @@ -// This file contains common constants which can be used across the widget configuration file (index.ts), widget and component folders. -export const EXTERNAL_WIDGET_CONSTANT = ""; diff --git a/app/client/src/widgets/IconButtonWidget/constants.ts b/app/client/src/widgets/IconButtonWidget/constants.ts deleted file mode 100644 index 37359b28d63b..000000000000 --- a/app/client/src/widgets/IconButtonWidget/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const MY_ICONBUTTON_WIDGET_CONSTANT = ""; diff --git a/app/client/src/widgets/MultiSelectWidget/constants.ts b/app/client/src/widgets/MultiSelectWidget/constants.ts deleted file mode 100644 index 0989dc036a98..000000000000 --- a/app/client/src/widgets/MultiSelectWidget/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const MY_MULTISELECT_WIDGET_CONSTANT = ""; diff --git a/app/client/src/widgets/StatboxWidget/constants.ts b/app/client/src/widgets/StatboxWidget/constants.ts deleted file mode 100644 index bdf2acaacb5e..000000000000 --- a/app/client/src/widgets/StatboxWidget/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const MY_STATBOX_WIDGET_CONSTANT = ""; diff --git a/app/client/src/widgets/SwitchWidget/constants.ts b/app/client/src/widgets/SwitchWidget/constants.ts deleted file mode 100644 index a739bd81e237..000000000000 --- a/app/client/src/widgets/SwitchWidget/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export default "constants"; diff --git a/app/client/src/widgets/wds/WDSCheckboxWidget/config/propertyPaneConfig/styleConfig.ts b/app/client/src/widgets/wds/WDSCheckboxWidget/config/propertyPaneConfig/styleConfig.ts deleted file mode 100644 index a7666dd33724..000000000000 --- a/app/client/src/widgets/wds/WDSCheckboxWidget/config/propertyPaneConfig/styleConfig.ts +++ /dev/null @@ -1 +0,0 @@ -export const propertyPaneStyleConfig = []; diff --git a/app/client/src/widgets/wds/WDSSelectWidget/config/featuresConfig.ts b/app/client/src/widgets/wds/WDSSelectWidget/config/featuresConfig.ts deleted file mode 100644 index 60a677c66cb6..000000000000 --- a/app/client/src/widgets/wds/WDSSelectWidget/config/featuresConfig.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const featuresConfig = { - dynamicHeight: { - sectionIndex: 3, - active: true, - }, -}; diff --git a/app/client/src/widgets/wds/WDSSwitchWidget/config/propertyPaneConfig/styleConfig.ts b/app/client/src/widgets/wds/WDSSwitchWidget/config/propertyPaneConfig/styleConfig.ts deleted file mode 100644 index a7666dd33724..000000000000 --- a/app/client/src/widgets/wds/WDSSwitchWidget/config/propertyPaneConfig/styleConfig.ts +++ /dev/null @@ -1 +0,0 @@ -export const propertyPaneStyleConfig = []; diff --git a/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Alignment.ts b/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Alignment.ts deleted file mode 100644 index bff24713d33b..000000000000 --- a/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Alignment.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { ValidationTypes } from "constants/WidgetValidation"; -import type { TableWidgetProps } from "widgets/wds/WDSTableWidget/constants"; -import { ColumnTypes } from "widgets/wds/WDSTableWidget/constants"; -import { hideByColumnType } from "../../../widget/propertyUtils"; - -export default { - 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: "start", - }, - { - startIcon: "align-center", - value: "center", - }, - { - startIcon: "align-right", - value: "end", - }, - ], - defaultValue: "start", - isJSConvertible: true, - customJSControl: "TABLE_COMPUTE_VALUE", - dependencies: ["primaryColumns", "columnOrder"], - isBindProperty: true, - validation: { - type: ValidationTypes.ARRAY_OF_TYPE_OR_TYPE, - params: { - type: ValidationTypes.TEXT, - params: { - allowedValues: ["start", "center", "end"], - }, - }, - }, - isTriggerProperty: false, - hidden: (props: TableWidgetProps, propertyPath: string) => { - return hideByColumnType(props, propertyPath, [ - ColumnTypes.URL, - ColumnTypes.TEXT, - ColumnTypes.NUMBER, - ]); - }, - }, - { - 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: "start", - }, - { - startIcon: "vertical-align-middle", - value: "center", - }, - { - startIcon: "vertical-align-bottom", - value: "end", - }, - ], - defaultValue: "center", - isJSConvertible: true, - customJSControl: "TABLE_COMPUTE_VALUE", - dependencies: ["primaryColumns", "columnOrder"], - isBindProperty: true, - validation: { - type: ValidationTypes.ARRAY_OF_TYPE_OR_TYPE, - params: { - type: ValidationTypes.TEXT, - params: { - allowedValues: ["start", "center", "end"], - }, - }, - }, - isTriggerProperty: false, - hidden: (props: TableWidgetProps, propertyPath: string) => { - return hideByColumnType(props, propertyPath, [ - ColumnTypes.URL, - ColumnTypes.TEXT, - ColumnTypes.NUMBER, - ]); - }, - }, - ], -}; diff --git a/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Icon.ts b/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Icon.ts deleted file mode 100644 index 5e6b9cb14233..000000000000 --- a/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Icon.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { ValidationTypes } from "constants/WidgetValidation"; -import type { TableWidgetProps } from "widgets/wds/WDSTableWidget/constants"; -import { ICON_NAMES } from "widgets/wds/WDSTableWidget/constants"; -import { - hideByColumnType, - updateIconAlignment, -} from "../../../widget/propertyUtils"; -import { ColumnTypes } from "widgets/wds/WDSTableWidget/constants"; - -export default { - sectionName: "Icon", - children: [ - { - propertyName: "menuButtoniconName", - label: "Icon", - helpText: "Sets the icon to be used for the menu button", - hidden: (props: TableWidgetProps, propertyPath: string) => { - return hideByColumnType(props, propertyPath, [ColumnTypes.MENU_BUTTON]); - }, - updateHook: updateIconAlignment, - dependencies: ["primaryColumns", "columnOrder"], - controlType: "ICON_SELECT", - isJSConvertible: true, - isBindProperty: true, - isTriggerProperty: false, - validation: { - type: ValidationTypes.ARRAY_OF_TYPE_OR_TYPE, - params: { - type: ValidationTypes.TEXT, - params: { - allowedValues: ICON_NAMES, - }, - }, - }, - }, - { - 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, - hidden: (props: TableWidgetProps, propertyPath: string) => { - return hideByColumnType(props, propertyPath, [ColumnTypes.MENU_BUTTON]); - }, - dependencies: ["primaryColumns", "columnOrder"], - validation: { - type: ValidationTypes.TEXT, - params: { - allowedValues: ["left", "right"], - }, - }, - }, - ], -}; diff --git a/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Select.ts b/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Select.ts deleted file mode 100644 index d1cb66a30fa9..000000000000 --- a/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/Select.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { ValidationTypes } from "constants/WidgetValidation"; -import { get } from "lodash"; -import type { TableWidgetProps } from "widgets/wds/WDSTableWidget/constants"; -import { - getBasePropertyPath, - hideByColumnType, - selectColumnOptionsValidation, -} from "../../../widget/propertyUtils"; -import { ColumnTypes } from "widgets/wds/WDSTableWidget/constants"; - -export default { - sectionName: "Select properties", - hidden: (props: TableWidgetProps, propertyPath: string) => { - return hideByColumnType(props, propertyPath, [ColumnTypes.SELECT], true); - }, - children: [ - { - propertyName: "selectOptions", - helpText: "Options to be shown on the select dropdown", - label: "Options", - - isJSConvertible: false, - isBindProperty: true, - validation: { - type: ValidationTypes.FUNCTION, - params: { - expected: { - type: 'Array<{ "label": string | number, "value": string | number}>', - example: '[{"label": "abc", "value": "abc"}]', - }, - fnString: selectColumnOptionsValidation.toString(), - }, - }, - isTriggerProperty: false, - dependencies: ["primaryColumns"], - hidden: (props: TableWidgetProps, propertyPath: string) => { - return hideByColumnType(props, propertyPath, [ColumnTypes.SELECT]); - }, - }, - { - 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, - hidden: (props: TableWidgetProps) => { - return !props.allowAddNewRow; - }, - dependencies: ["primaryColumns", "allowAddNewRow"], - validation: { type: ValidationTypes.BOOLEAN }, - }, - { - 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: ValidationTypes.FUNCTION, - params: { - expected: { - type: 'Array<{ "label": string | number, "value": string | number}>', - example: '[{"label": "abc", "value": "abc"}]', - }, - fnString: selectColumnOptionsValidation.toString(), - }, - }, - isTriggerProperty: false, - dependencies: ["primaryColumns", "allowAddNewRow"], - hidden: (props: TableWidgetProps, propertyPath: string) => { - const baseProperty = getBasePropertyPath(propertyPath); - - if (baseProperty) { - const columnType = get(props, `${baseProperty}.columnType`, ""); - const allowSameOptionsInNewRow = get( - props, - `${baseProperty}.allowSameOptionsInNewRow`, - ); - - if ( - columnType === ColumnTypes.SELECT && - props.allowAddNewRow && - !allowSameOptionsInNewRow - ) { - return false; - } else { - return true; - } - } - }, - }, - { - propertyName: "placeholderText", - helpText: "Sets a Placeholder Text", - label: "Placeholder", - controlType: "INPUT_TEXT", - placeholderText: "Enter placeholder text", - isBindProperty: true, - isTriggerProperty: false, - validation: { type: ValidationTypes.TEXT }, - }, - { - propertyName: "isFilterable", - label: "Filterable", - helpText: "Makes the dropdown list filterable", - controlType: "SWITCH", - isJSConvertible: true, - isBindProperty: true, - isTriggerProperty: false, - validation: { type: ValidationTypes.BOOLEAN }, - }, - { - 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: ValidationTypes.BOOLEAN }, - }, - { - propertyName: "serverSideFiltering", - helpText: "Enables server side filtering of the data", - label: "Server side filtering", - controlType: "SWITCH", - isJSConvertible: true, - isBindProperty: true, - isTriggerProperty: false, - validation: { type: ValidationTypes.BOOLEAN }, - }, - ], -}; diff --git a/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/childPanels/configureMenuItemsConfig.ts b/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/childPanels/configureMenuItemsConfig.ts deleted file mode 100644 index 30414e721ee2..000000000000 --- a/app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/PanelConfig/childPanels/configureMenuItemsConfig.ts +++ /dev/null @@ -1,219 +0,0 @@ -import { ValidationTypes } from "constants/WidgetValidation"; -import { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType"; -import { ICON_NAMES } from "widgets/MenuButtonWidget/constants"; -import { - booleanForEachRowValidation, - colorForEachRowValidation, - iconNamesForEachRowValidation, - iconPositionForEachRowValidation, - textForEachRowValidation, -} from "widgets/wds/WDSTableWidget/widget/propertyUtils"; -import { getSourceDataAndCaluclateKeysForEventAutoComplete } from "widgets/wds/WDSTableWidget/widget/utilities"; - -export default { - 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: ValidationTypes.FUNCTION, - params: { - expected: { - type: "Array of values", - example: `['option1', 'option2'] | [{ "label": "label1", "value": "value1" }]`, - autocompleteDataType: AutocompleteDataType.ARRAY, - }, - fnString: textForEachRowValidation.toString(), - }, - }, - evaluatedDependencies: ["primaryColumns"], - }, - { - 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: ValidationTypes.FUNCTION, - params: { - fnString: booleanForEachRowValidation.toString(), - }, - }, - customJSControl: "MENU_BUTTON_DYNAMIC_ITEMS", - evaluatedDependencies: ["primaryColumns"], - }, - { - 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: ValidationTypes.FUNCTION, - params: { - fnString: booleanForEachRowValidation.toString(), - }, - }, - customJSControl: "MENU_BUTTON_DYNAMIC_ITEMS", - evaluatedDependencies: ["primaryColumns"], - }, - ], - }, - { - 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, - additionalAutoComplete: - getSourceDataAndCaluclateKeysForEventAutoComplete, - evaluatedDependencies: ["primaryColumns"], - }, - ], - }, - ], - 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: ValidationTypes.FUNCTION, - params: { - allowedValues: ICON_NAMES, - fnString: iconNamesForEachRowValidation.toString(), - }, - }, - customJSControl: "MENU_BUTTON_DYNAMIC_ITEMS", - evaluatedDependencies: ["primaryColumns"], - }, - { - 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: ValidationTypes.FUNCTION, - params: { - allowedValues: ["center", "left", "right"], - fnString: iconPositionForEachRowValidation.toString(), - }, - }, - customJSControl: "MENU_BUTTON_DYNAMIC_ITEMS", - evaluatedDependencies: ["primaryColumns"], - }, - ], - }, - { - 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: ValidationTypes.FUNCTION, - params: { - regex: /^(?![<|{{]).+/, - fnString: colorForEachRowValidation.toString(), - }, - }, - }, - { - 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: ValidationTypes.FUNCTION, - params: { - regex: /^(?![<|{{]).+/, - fnString: colorForEachRowValidation.toString(), - }, - }, - }, - { - 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: ValidationTypes.FUNCTION, - params: { - regex: /^(?![<|{{]).+/, - fnString: colorForEachRowValidation.toString(), - }, - }, - }, - ], - }, - ], -};