From c76e6c031c699ad1c623140fa584b8aeb1f11c1c Mon Sep 17 00:00:00 2001 From: Valera Melnikov Date: Thu, 19 Sep 2024 16:01:03 +0300 Subject: [PATCH] chore:delete unused files (#36368) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description I used [knip](https://knip.dev/) to identify unused files. There will be a few more related PRs, after that I will add CI check for this. Fixes #35778 Related EE PR https://github.com/appsmithorg/appsmith-ee/pull/5165 ## Automation /ok-to-test tags="@tag.Sanity" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 31749570e9a3f9e4cce250eedba4ec18aace23f9 > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Thu, 19 Sep 2024 12:55:41 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No --- app/client/knip.json | 14 + app/client/package.json | 1 + .../ads-old/src/ListSegmentHeader/index.tsx | 43 -- .../design-system/ads-old/src/hooks/index.tsx | 2 - .../ads-old/src/hooks/useResizeObserver.ts | 21 - .../src/components/Field/HelpText.tsx | 45 -- .../widgets-old/src/constants/messages.tsx | 38 - .../dsl/src/migrate/migrations/047-SKIP.ts | 3 - .../dsl/src/migrate/migrations/050-SKIP.ts | 5 - ...61-migrate-chart-widget-reskinning-data.ts | 3 - .../DSLs/ParentRowSpaceUpdateDSLs.ts | 274 ------- app/client/src/api/WidgetConfigsApi.tsx | 20 - .../AdminSettings/BreadcrumbCategories.tsx | 59 -- app/client/src/ce/pages/Editor/routes.tsx | 79 -- .../businessEdition/UpgradeToBEPage.tsx | 114 --- .../src/components/TabItemBackgroundFill.tsx | 55 -- .../designSystems/appsmith/CloseButton.tsx | 40 - .../appsmith/CreatableDropdown.tsx | 141 ---- .../appsmith/DraggableListComponent.tsx | 151 ---- .../designSystems/appsmith/Dropdown.tsx | 113 --- .../appsmith/SignPostingBanner.tsx | 33 - .../designSystems/appsmith/StepComponent.tsx | 90 --- .../designSystems/appsmith/TabbedView.tsx | 72 -- .../appsmith/header/ThreeDotsLoading.tsx | 69 -- .../ActionRightPane/Connections.tsx | 132 ---- .../components/editorComponents/Checkbox.tsx | 57 -- .../editorComponents/CloseEditor.tsx | 78 -- .../editorComponents/ContextDropdown.tsx | 105 --- .../Debugger/DebuggerMessage.tsx | 30 - .../components/editorComponents/Divider.tsx | 10 - .../editorComponents/DropdownComponent.tsx | 254 ------- .../editorComponents/EntityNameComponent.tsx | 164 ---- .../editorComponents/InputComponent.tsx | 39 - .../editorComponents/LetterIcon.tsx | 20 - .../LightningMenu/LightningMenuTrigger.tsx | 96 --- .../LightningMenu/helpers.tsx | 232 ------ .../editorComponents/LightningMenu/index.tsx | 99 --- .../editorComponents/NavBarItem.tsx | 108 --- .../editorComponents/PageLoader.tsx | 37 - .../editorComponents/PaneWrapper.tsx | 12 - .../editorComponents/RequestView.tsx | 202 ----- .../editorComponents/SelectComponent.tsx | 48 -- .../form/CredentialsTooltip.tsx | 126 --- .../editorComponents/form/FieldError.tsx | 34 - .../form/FormActionButton.tsx | 13 - .../editorComponents/form/FormFooter.tsx | 62 -- .../editorComponents/form/FormGroup.tsx | 21 - .../editorComponents/form/FormMessage.tsx | 131 ---- .../editorComponents/form/FormTextField.tsx | 40 - .../form/fields/CheckboxField.tsx | 36 - .../form/fields/DynamicDropdownField.tsx | 14 - .../formControls/StyledControls.tsx | 286 ------- .../src/components/utils/AppsmithLoader.tsx | 1 - app/client/src/constants/StyleConstants.tsx | 1 - .../AdminSettings/BreadcrumbCategories.tsx | 1 - app/client/src/ee/pages/Editor/routes.tsx | 31 - app/client/src/icons/AlertIcons.tsx | 43 -- app/client/src/icons/FormIcons.tsx | 77 -- app/client/src/icons/HeaderIcons.tsx | 54 -- app/client/src/icons/HelpIcons.tsx | 82 -- .../canvasArenas/CanvasMultiPointerArena.tsx | 171 ----- .../buildingBlockExplorerDropTarget/index.tsx | 76 -- .../common/widgetName/DeleteControl.tsx | 47 -- .../common/widgetName/HelpControl.tsx | 55 -- .../Branding/previews/DashboardThumbnail.tsx | 39 - .../Branding/previews/LinkPreview.tsx | 32 - .../AdminSettings/FormGroup/TextAreaField.tsx | 72 -- .../AppViewer/AppViewerSideNavWrapper.tsx | 31 - app/client/src/pages/AppViewer/PageTabs.tsx | 232 ------ app/client/src/pages/AppViewer/SideNav.tsx | 116 --- .../src/pages/AppViewer/SideNavItem.tsx | 64 -- .../Applications/CreateApplicationForm.tsx | 104 --- .../EmbedSnippet/DimensionsInput.tsx | 53 -- .../EmbedSnippet/TooltipWrapper.tsx | 7 - .../ProductUpdatesModal/UpdatesButton.tsx | 70 -- .../src/pages/Editor/APIEditor/Search.tsx | 32 - .../Components/SwitchWrapper.tsx | 19 - .../Editor/AppSettingsPane/PaneHeader.tsx | 25 - .../pages/Editor/AppSettingsPane/index.tsx | 22 - .../components/TemplateCardPreview.tsx | 71 -- .../Editor/DataSourceEditor/BackButton.tsx | 47 -- .../DatasourceInfo/DatasourceEntity.tsx | 125 --- app/client/src/pages/Editor/EditorHeader.tsx | 328 -------- .../src/pages/Editor/Explorer/Datasources.tsx | 159 ---- .../Datasources/DataSourceContextMenu.tsx | 88 --- .../Editor/Explorer/Entity/Placeholder.tsx | 28 - .../pages/Editor/Explorer/ExplorerTitle.tsx | 23 - .../Editor/Explorer/Files/SubmenuHotkeys.tsx | 63 -- .../Editor/Explorer/Pages/PageEntity.tsx | 27 - .../pages/Editor/Explorer/TreeDropdown.tsx | 254 ------- .../src/pages/Editor/HelpBarInHeader.tsx | 23 - .../pages/Editor/IDE/EditorPane/GlobalAdd.tsx | 127 ---- .../IDE/EditorPane/components/MinimalTab.tsx | 24 - .../Editor/IDE/EditorTabs/ListButton.tsx | 63 -- .../IDE/EditorTabs/StyledComponents.tsx | 20 - .../IntegrationEditor/ActiveDataSources.tsx | 106 --- .../UnsupportedPluginDialog.tsx | 70 -- .../pages/Editor/PropertyPaneHelpButton.tsx | 38 - .../pages/Editor/QueryEditor/JSONViewer.tsx | 87 --- .../src/pages/Editor/RealtimeAppEditors.tsx | 107 --- .../Editor/SaaSEditor/DatasourceCard.tsx | 169 ----- .../src/pages/Editor/SaaSEditor/ListView.tsx | 236 ------ .../src/pages/Editor/SaaSEditor/routes.ts | 23 - .../src/pages/Editor/ShareApplicationForm.tsx | 89 --- .../ThemePropertyPane/ThemeBetaCard.tsx | 29 - .../WidgetsEditor/components/Toolbar.tsx | 9 - .../Editor/commons/EditorWrapperBody.tsx | 16 - .../Editor/commons/LockEntityExplorer.tsx | 107 --- .../gitSync/GitSyncModal/GitSyncModalV1.tsx | 184 ----- .../Editor/gitSync/Tabs/GitConnection.tsx | 525 ------------- .../gitSync/components/CredentialMode.tsx | 195 ----- .../gitSync/components/GitConnectError.tsx | 67 -- .../Editor/gitSync/components/TabItem.tsx | 56 -- .../components/UserGitProfileSettings.tsx | 204 ----- .../gitSync/components/ssh-key/CopySSHKey.tsx | 37 - .../components/ssh-key/StyledComponents.tsx | 71 -- .../ssh-key/SupportedKeyTypeList.tsx | 24 - .../components/ssh-key/getConfirmMenuItem.tsx | 35 - .../ssh-key/getNotificationBanner.tsx | 39 - .../gitSync/components/ssh-key/index.tsx | 171 ----- .../pages/Templates/LeftPaneTemplateList.tsx | 103 --- .../Templates/TemplatesModal/TemplateList.tsx | 82 -- app/client/src/pages/common/ArtBoard.tsx | 10 - .../src/pages/common/AvatarComponent.tsx | 38 - .../pages/common/CustomizedDropdown/Badge.tsx | 51 -- .../CustomizedDropdown/HeaderDropdownData.tsx | 31 - .../WorkspaceDropdownData.tsx | 58 -- app/client/src/pages/common/Loader.tsx | 10 - app/client/src/pages/common/LoginHeader.tsx | 49 -- app/client/src/pages/common/NotFound.tsx | 56 -- .../src/pages/common/PageSectionDivider.tsx | 7 - app/client/src/pages/common/PaneWrapper.tsx | 13 - app/client/src/pages/routes.tsx | 17 - app/client/src/pages/users/list.tsx | 1 - app/client/src/pages/users/view.tsx | 1 - .../pages/workspace/CreateWorkspaceForm.tsx | 68 -- .../pages/workspace/PartnerProgramCallout.tsx | 36 - app/client/src/pages/workspace/users.tsx | 25 - .../src/selectors/appCollabSelectors.tsx | 35 - app/client/src/selectors/helpSelectors.tsx | 8 - app/client/src/selectors/tourSelectors.tsx | 7 - app/client/src/utils/hooks/useAutoGrow.tsx | 22 - .../src/utils/hooks/useIsScrolledToBottom.tsx | 36 - .../utils/hooks/useProceedToNextTourStep.tsx | 37 - .../src/utils/hooks/useResizeObserver.tsx | 25 - .../DropdownWidget/component/index.styled.tsx | 73 -- .../QRGeneratorWidget/component/index.tsx | 109 --- .../widgets/QRGeneratorWidget/constants.ts | 5 - .../src/widgets/QRGeneratorWidget/icon.svg | 1 - .../src/widgets/QRGeneratorWidget/index.ts | 37 - .../QRGeneratorWidget/widget/index.tsx | 715 ------------------ .../TableWidget/component/TableActionIcon.tsx | 48 -- .../component/TableColumnsVisibility.tsx | 179 ----- .../TableWidget/component/TablePagination.tsx | 83 -- .../component/TableActionIcon.tsx | 48 -- .../cellComponents/AutoToolTipComponent.tsx | 191 ----- .../component/cellComponents/CheckboxCell.tsx | 30 - app/client/yarn.lock | 145 +++- 158 files changed, 146 insertions(+), 12036 deletions(-) create mode 100644 app/client/knip.json delete mode 100644 app/client/packages/design-system/ads-old/src/ListSegmentHeader/index.tsx delete mode 100644 app/client/packages/design-system/ads-old/src/hooks/index.tsx delete mode 100644 app/client/packages/design-system/ads-old/src/hooks/useResizeObserver.ts delete mode 100644 app/client/packages/design-system/headless/src/components/Field/HelpText.tsx delete mode 100644 app/client/packages/design-system/widgets-old/src/constants/messages.tsx delete mode 100644 app/client/packages/dsl/src/migrate/migrations/047-SKIP.ts delete mode 100644 app/client/packages/dsl/src/migrate/migrations/050-SKIP.ts delete mode 100644 app/client/packages/dsl/src/migrate/migrations/061-migrate-chart-widget-reskinning-data.ts delete mode 100644 app/client/packages/dsl/src/migrate/tests/TableWidgetV2/DSLs/ParentRowSpaceUpdateDSLs.ts delete mode 100644 app/client/src/api/WidgetConfigsApi.tsx delete mode 100644 app/client/src/ce/pages/AdminSettings/BreadcrumbCategories.tsx delete mode 100644 app/client/src/ce/pages/Editor/routes.tsx delete mode 100644 app/client/src/ce/pages/Upgrade/businessEdition/UpgradeToBEPage.tsx delete mode 100644 app/client/src/components/TabItemBackgroundFill.tsx delete mode 100644 app/client/src/components/designSystems/appsmith/CloseButton.tsx delete mode 100644 app/client/src/components/designSystems/appsmith/CreatableDropdown.tsx delete mode 100644 app/client/src/components/designSystems/appsmith/DraggableListComponent.tsx delete mode 100644 app/client/src/components/designSystems/appsmith/Dropdown.tsx delete mode 100644 app/client/src/components/designSystems/appsmith/SignPostingBanner.tsx delete mode 100644 app/client/src/components/designSystems/appsmith/StepComponent.tsx delete mode 100644 app/client/src/components/designSystems/appsmith/TabbedView.tsx delete mode 100644 app/client/src/components/designSystems/appsmith/header/ThreeDotsLoading.tsx delete mode 100644 app/client/src/components/editorComponents/ActionRightPane/Connections.tsx delete mode 100644 app/client/src/components/editorComponents/Checkbox.tsx delete mode 100644 app/client/src/components/editorComponents/CloseEditor.tsx delete mode 100644 app/client/src/components/editorComponents/ContextDropdown.tsx delete mode 100644 app/client/src/components/editorComponents/Debugger/DebuggerMessage.tsx delete mode 100644 app/client/src/components/editorComponents/Divider.tsx delete mode 100644 app/client/src/components/editorComponents/DropdownComponent.tsx delete mode 100644 app/client/src/components/editorComponents/EntityNameComponent.tsx delete mode 100644 app/client/src/components/editorComponents/InputComponent.tsx delete mode 100644 app/client/src/components/editorComponents/LetterIcon.tsx delete mode 100644 app/client/src/components/editorComponents/LightningMenu/LightningMenuTrigger.tsx delete mode 100644 app/client/src/components/editorComponents/LightningMenu/helpers.tsx delete mode 100644 app/client/src/components/editorComponents/LightningMenu/index.tsx delete mode 100644 app/client/src/components/editorComponents/NavBarItem.tsx delete mode 100644 app/client/src/components/editorComponents/PageLoader.tsx delete mode 100644 app/client/src/components/editorComponents/PaneWrapper.tsx delete mode 100644 app/client/src/components/editorComponents/RequestView.tsx delete mode 100644 app/client/src/components/editorComponents/SelectComponent.tsx delete mode 100644 app/client/src/components/editorComponents/form/CredentialsTooltip.tsx delete mode 100644 app/client/src/components/editorComponents/form/FieldError.tsx delete mode 100644 app/client/src/components/editorComponents/form/FormActionButton.tsx delete mode 100644 app/client/src/components/editorComponents/form/FormFooter.tsx delete mode 100644 app/client/src/components/editorComponents/form/FormGroup.tsx delete mode 100644 app/client/src/components/editorComponents/form/FormMessage.tsx delete mode 100644 app/client/src/components/editorComponents/form/FormTextField.tsx delete mode 100644 app/client/src/components/editorComponents/form/fields/CheckboxField.tsx delete mode 100644 app/client/src/components/editorComponents/form/fields/DynamicDropdownField.tsx delete mode 100644 app/client/src/components/formControls/StyledControls.tsx delete mode 100644 app/client/src/components/utils/AppsmithLoader.tsx delete mode 100644 app/client/src/constants/StyleConstants.tsx delete mode 100644 app/client/src/ee/pages/AdminSettings/BreadcrumbCategories.tsx delete mode 100644 app/client/src/ee/pages/Editor/routes.tsx delete mode 100644 app/client/src/icons/AlertIcons.tsx delete mode 100644 app/client/src/icons/FormIcons.tsx delete mode 100644 app/client/src/icons/HeaderIcons.tsx delete mode 100644 app/client/src/icons/HelpIcons.tsx delete mode 100644 app/client/src/layoutSystems/common/canvasArenas/CanvasMultiPointerArena.tsx delete mode 100644 app/client/src/layoutSystems/common/dropTarget/buildingBlockExplorerDropTarget/index.tsx delete mode 100644 app/client/src/layoutSystems/common/widgetName/DeleteControl.tsx delete mode 100644 app/client/src/layoutSystems/common/widgetName/HelpControl.tsx delete mode 100644 app/client/src/pages/AdminSettings/Branding/previews/DashboardThumbnail.tsx delete mode 100644 app/client/src/pages/AdminSettings/Branding/previews/LinkPreview.tsx delete mode 100644 app/client/src/pages/AdminSettings/FormGroup/TextAreaField.tsx delete mode 100644 app/client/src/pages/AppViewer/AppViewerSideNavWrapper.tsx delete mode 100644 app/client/src/pages/AppViewer/PageTabs.tsx delete mode 100644 app/client/src/pages/AppViewer/SideNav.tsx delete mode 100644 app/client/src/pages/AppViewer/SideNavItem.tsx delete mode 100644 app/client/src/pages/Applications/CreateApplicationForm.tsx delete mode 100644 app/client/src/pages/Applications/EmbedSnippet/DimensionsInput.tsx delete mode 100644 app/client/src/pages/Applications/EmbedSnippet/TooltipWrapper.tsx delete mode 100644 app/client/src/pages/Applications/ProductUpdatesModal/UpdatesButton.tsx delete mode 100644 app/client/src/pages/Editor/APIEditor/Search.tsx delete mode 100644 app/client/src/pages/Editor/AppSettingsPane/Components/SwitchWrapper.tsx delete mode 100644 app/client/src/pages/Editor/AppSettingsPane/PaneHeader.tsx delete mode 100644 app/client/src/pages/Editor/AppSettingsPane/index.tsx delete mode 100644 app/client/src/pages/Editor/CommunityTemplates/Modals/PublishCommunityTemplate/components/TemplateCardPreview.tsx delete mode 100644 app/client/src/pages/Editor/DataSourceEditor/BackButton.tsx delete mode 100644 app/client/src/pages/Editor/DatasourceInfo/DatasourceEntity.tsx delete mode 100644 app/client/src/pages/Editor/EditorHeader.tsx delete mode 100644 app/client/src/pages/Editor/Explorer/Datasources.tsx delete mode 100644 app/client/src/pages/Editor/Explorer/Datasources/DataSourceContextMenu.tsx delete mode 100644 app/client/src/pages/Editor/Explorer/Entity/Placeholder.tsx delete mode 100644 app/client/src/pages/Editor/Explorer/ExplorerTitle.tsx delete mode 100644 app/client/src/pages/Editor/Explorer/Files/SubmenuHotkeys.tsx delete mode 100644 app/client/src/pages/Editor/Explorer/Pages/PageEntity.tsx delete mode 100644 app/client/src/pages/Editor/Explorer/TreeDropdown.tsx delete mode 100644 app/client/src/pages/Editor/HelpBarInHeader.tsx delete mode 100644 app/client/src/pages/Editor/IDE/EditorPane/GlobalAdd.tsx delete mode 100644 app/client/src/pages/Editor/IDE/EditorPane/components/MinimalTab.tsx delete mode 100644 app/client/src/pages/Editor/IDE/EditorTabs/ListButton.tsx delete mode 100644 app/client/src/pages/Editor/IDE/EditorTabs/StyledComponents.tsx delete mode 100644 app/client/src/pages/Editor/IntegrationEditor/ActiveDataSources.tsx delete mode 100644 app/client/src/pages/Editor/IntegrationEditor/UnsupportedPluginDialog.tsx delete mode 100644 app/client/src/pages/Editor/PropertyPaneHelpButton.tsx delete mode 100644 app/client/src/pages/Editor/QueryEditor/JSONViewer.tsx delete mode 100644 app/client/src/pages/Editor/RealtimeAppEditors.tsx delete mode 100644 app/client/src/pages/Editor/SaaSEditor/DatasourceCard.tsx delete mode 100644 app/client/src/pages/Editor/SaaSEditor/ListView.tsx delete mode 100644 app/client/src/pages/Editor/SaaSEditor/routes.ts delete mode 100644 app/client/src/pages/Editor/ShareApplicationForm.tsx delete mode 100644 app/client/src/pages/Editor/ThemePropertyPane/ThemeBetaCard.tsx delete mode 100644 app/client/src/pages/Editor/WidgetsEditor/components/Toolbar.tsx delete mode 100644 app/client/src/pages/Editor/commons/EditorWrapperBody.tsx delete mode 100644 app/client/src/pages/Editor/commons/LockEntityExplorer.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV1.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/Tabs/GitConnection.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/CredentialMode.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/GitConnectError.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/TabItem.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/UserGitProfileSettings.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/ssh-key/CopySSHKey.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/ssh-key/StyledComponents.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/ssh-key/SupportedKeyTypeList.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/ssh-key/getConfirmMenuItem.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/ssh-key/getNotificationBanner.tsx delete mode 100644 app/client/src/pages/Editor/gitSync/components/ssh-key/index.tsx delete mode 100644 app/client/src/pages/Templates/LeftPaneTemplateList.tsx delete mode 100644 app/client/src/pages/Templates/TemplatesModal/TemplateList.tsx delete mode 100644 app/client/src/pages/common/ArtBoard.tsx delete mode 100644 app/client/src/pages/common/AvatarComponent.tsx delete mode 100644 app/client/src/pages/common/CustomizedDropdown/Badge.tsx delete mode 100644 app/client/src/pages/common/CustomizedDropdown/HeaderDropdownData.tsx delete mode 100644 app/client/src/pages/common/CustomizedDropdown/WorkspaceDropdownData.tsx delete mode 100644 app/client/src/pages/common/Loader.tsx delete mode 100644 app/client/src/pages/common/LoginHeader.tsx delete mode 100644 app/client/src/pages/common/NotFound.tsx delete mode 100644 app/client/src/pages/common/PageSectionDivider.tsx delete mode 100644 app/client/src/pages/common/PaneWrapper.tsx delete mode 100644 app/client/src/pages/routes.tsx delete mode 100644 app/client/src/pages/users/list.tsx delete mode 100644 app/client/src/pages/users/view.tsx delete mode 100644 app/client/src/pages/workspace/CreateWorkspaceForm.tsx delete mode 100644 app/client/src/pages/workspace/PartnerProgramCallout.tsx delete mode 100644 app/client/src/pages/workspace/users.tsx delete mode 100644 app/client/src/selectors/appCollabSelectors.tsx delete mode 100644 app/client/src/selectors/helpSelectors.tsx delete mode 100644 app/client/src/selectors/tourSelectors.tsx delete mode 100644 app/client/src/utils/hooks/useAutoGrow.tsx delete mode 100644 app/client/src/utils/hooks/useIsScrolledToBottom.tsx delete mode 100644 app/client/src/utils/hooks/useProceedToNextTourStep.tsx delete mode 100644 app/client/src/utils/hooks/useResizeObserver.tsx delete mode 100644 app/client/src/widgets/DropdownWidget/component/index.styled.tsx delete mode 100644 app/client/src/widgets/QRGeneratorWidget/component/index.tsx delete mode 100644 app/client/src/widgets/QRGeneratorWidget/constants.ts delete mode 100644 app/client/src/widgets/QRGeneratorWidget/icon.svg delete mode 100644 app/client/src/widgets/QRGeneratorWidget/index.ts delete mode 100644 app/client/src/widgets/QRGeneratorWidget/widget/index.tsx delete mode 100644 app/client/src/widgets/TableWidget/component/TableActionIcon.tsx delete mode 100644 app/client/src/widgets/TableWidget/component/TableColumnsVisibility.tsx delete mode 100644 app/client/src/widgets/TableWidget/component/TablePagination.tsx delete mode 100644 app/client/src/widgets/TableWidgetV2/component/TableActionIcon.tsx delete mode 100644 app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/AutoToolTipComponent.tsx delete mode 100644 app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/CheckboxCell.tsx diff --git a/app/client/knip.json b/app/client/knip.json new file mode 100644 index 00000000000..be642c7e057 --- /dev/null +++ b/app/client/knip.json @@ -0,0 +1,14 @@ +{ + "entry": ["src/index.tsx"], + "project": ["src/**/*.tsx"], + "ignore": [ + "packages/**/stories/**", + "packages/**/chromatic/**", + "packages/design-system/widgets/src/testing/**", + "**/*.stories.tsx", + "packages/rts/build.js", + "packages/design-system/ads/src/Documentation/**", + "src/components/designSystems/blueprintjs/**", + "packages/design-system/ads/plopfile.mjs" + ] +} diff --git a/app/client/package.json b/app/client/package.json index 500d3c2a328..6a6e80842c8 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -354,6 +354,7 @@ "jest-environment-jsdom": "^27.4.1", "jest-styled-components": "^7.0.8", "json5": "^2.2.3", + "knip": "^5.30.2", "lint-staged": "^14.0.1", "msw": "^0.28.0", "pg": "^8.11.3", diff --git a/app/client/packages/design-system/ads-old/src/ListSegmentHeader/index.tsx b/app/client/packages/design-system/ads-old/src/ListSegmentHeader/index.tsx deleted file mode 100644 index 37883db317a..00000000000 --- a/app/client/packages/design-system/ads-old/src/ListSegmentHeader/index.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import type { CSSProperties } from "react"; -import React from "react"; -import styled from "styled-components"; -import { typography } from "../constants/typography"; - -const StyledSegmentHeader = styled.div` - padding: var(--ads-spaces-3) var(--ads-spaces-5); - padding-right: 0; - font-weight: ${typography["u2"].fontWeight}; - font-size: ${typography["u2"].fontSize}px; - line-height: ${typography["u2"].lineHeight}px; - letter-spacing: ${typography["u2"].letterSpacing}px; - color: var(--ads-old-color-gray-10); - display: flex; - align-items: center; -`; - -const StyledHr = styled.div` - flex: 1; - height: 1px; - background-color: var(--ads-old-color-gray-10); - margin-left: var(--ads-spaces-3); -`; - -export interface SegmentHeaderProps { - title: string; - style?: CSSProperties; - hideStyledHr?: boolean; -} - -export default function SegmentHeader(props: SegmentHeaderProps) { - return ( - - {props.title} - {!props.hideStyledHr && ( - - )} - - ); -} diff --git a/app/client/packages/design-system/ads-old/src/hooks/index.tsx b/app/client/packages/design-system/ads-old/src/hooks/index.tsx deleted file mode 100644 index eec6f5c1c30..00000000000 --- a/app/client/packages/design-system/ads-old/src/hooks/index.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export { default as useDSEvent } from "./useDSEvent"; -export { default as useResizeObserver } from "./useResizeObserver"; diff --git a/app/client/packages/design-system/ads-old/src/hooks/useResizeObserver.ts b/app/client/packages/design-system/ads-old/src/hooks/useResizeObserver.ts deleted file mode 100644 index b7f2b512110..00000000000 --- a/app/client/packages/design-system/ads-old/src/hooks/useResizeObserver.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { useEffect } from "react"; -import ResizeObserver from "resize-observer-polyfill"; - -const useResizeObserver = ( - ref: HTMLDivElement | null, - callback: (entries: any) => void, -) => { - useEffect(() => { - if (ref) { - const resizeObserver = new ResizeObserver((entries: any) => { - callback(entries); - }); - - resizeObserver.observe(ref); - - return () => resizeObserver.unobserve(ref); - } - }, [ref, callback]); -}; - -export default useResizeObserver; diff --git a/app/client/packages/design-system/headless/src/components/Field/HelpText.tsx b/app/client/packages/design-system/headless/src/components/Field/HelpText.tsx deleted file mode 100644 index bedc4e7e688..00000000000 --- a/app/client/packages/design-system/headless/src/components/Field/HelpText.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import React, { forwardRef } from "react"; -import type { HTMLAttributes } from "react"; -import { useDOMRef } from "@react-spectrum/utils"; -import type { - DOMRef, - SpectrumHelpTextProps, - ValidationState, -} from "@react-types/shared"; - -interface HelpTextProps extends Omit { - /** Props for the help text description element. */ - descriptionProps?: HTMLAttributes; - /** Props for the help text error message element. */ - errorMessageProps?: HTMLAttributes; - /** validation state for help text */ - validationState: ValidationState; -} - -function _HelpText(props: HelpTextProps, ref: DOMRef) { - const { - description, - descriptionProps, - errorMessage, - errorMessageProps, - validationState, - } = props; - const domRef = useDOMRef(ref); - const isErrorMessage = Boolean(errorMessage) && validationState === "invalid"; - - return ( -
- {isErrorMessage ? ( -
- {errorMessage} -
- ) : ( -
- {description} -
- )} -
- ); -} - -export const HelpText = forwardRef(_HelpText); diff --git a/app/client/packages/design-system/widgets-old/src/constants/messages.tsx b/app/client/packages/design-system/widgets-old/src/constants/messages.tsx deleted file mode 100644 index 4093556d602..00000000000 --- a/app/client/packages/design-system/widgets-old/src/constants/messages.tsx +++ /dev/null @@ -1,38 +0,0 @@ -export function createMessage( - format: (...strArgs: any[]) => string, - ...args: any[] -) { - return format(...args); -} - -export const ERROR_MESSAGE_NAME_EMPTY = () => `Please select a name`; - -export const FORM_VALIDATION_INVALID_EMAIL = () => - `Please provide a valid email address`; - -export const INVITE_USERS_VALIDATION_EMAIL_LIST = () => - `Invalid email address(es) found`; - -export const REMOVE = () => "Remove"; - -export const DISPLAY_IMAGE_UPLOAD_LABEL = () => "Upload Display Picture"; - -export const ADD_REACTION = () => "Add reaction"; - -export const EMOJI = () => "Emoji"; - -// Showcase Carousel -export const NEXT = () => "NEXT"; -export const BACK = () => "BACK"; -export const SKIP = () => "SKIP"; - -export const LEARN_MORE = () => "Learn more"; - -export const SNIPPET_TOOLTIP = () => "Search code snippets"; - -export const ERROR_EMPTY_APPLICATION_NAME = () => - `Application name can't be empty`; - -export const ERROR_FILE_TOO_LARGE = (fileSize: string) => - `File size should be less than ${fileSize}!`; -export const REMOVE_FILE_TOOL_TIP = () => "Remove upload"; diff --git a/app/client/packages/dsl/src/migrate/migrations/047-SKIP.ts b/app/client/packages/dsl/src/migrate/migrations/047-SKIP.ts deleted file mode 100644 index 695c7acc8ad..00000000000 --- a/app/client/packages/dsl/src/migrate/migrations/047-SKIP.ts +++ /dev/null @@ -1,3 +0,0 @@ -// We're skipping this to fix a bad table migration. -// skipped migration is added as version 51 -export {}; diff --git a/app/client/packages/dsl/src/migrate/migrations/050-SKIP.ts b/app/client/packages/dsl/src/migrate/migrations/050-SKIP.ts deleted file mode 100644 index fb9b9bb0877..00000000000 --- a/app/client/packages/dsl/src/migrate/migrations/050-SKIP.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* - * We're skipping this to fix a bad table migration - migrateTableWidgetNumericColumnName - * it overwrites the computedValue of the table columns - */ -export {}; diff --git a/app/client/packages/dsl/src/migrate/migrations/061-migrate-chart-widget-reskinning-data.ts b/app/client/packages/dsl/src/migrate/migrations/061-migrate-chart-widget-reskinning-data.ts deleted file mode 100644 index 5005036a28e..00000000000 --- a/app/client/packages/dsl/src/migrate/migrations/061-migrate-chart-widget-reskinning-data.ts +++ /dev/null @@ -1,3 +0,0 @@ -// this is a repeat of the migration 059-migrate-chart-widget-reskinning-data - -export {}; diff --git a/app/client/packages/dsl/src/migrate/tests/TableWidgetV2/DSLs/ParentRowSpaceUpdateDSLs.ts b/app/client/packages/dsl/src/migrate/tests/TableWidgetV2/DSLs/ParentRowSpaceUpdateDSLs.ts deleted file mode 100644 index 22d58afc8d7..00000000000 --- a/app/client/packages/dsl/src/migrate/tests/TableWidgetV2/DSLs/ParentRowSpaceUpdateDSLs.ts +++ /dev/null @@ -1,274 +0,0 @@ -import type { DSLWidget } from "../../../types"; - -export const inputDsl: DSLWidget = { - widgetName: "MainContainer", - backgroundColor: "none", - rightColumn: 1224, - snapColumns: 16, - detachFromLayout: true, - widgetId: "0", - topRow: 0, - bottomRow: 1840, - containerStyle: "none", - snapRows: 33, - parentRowSpace: 1, - type: "CANVAS_WIDGET", - canExtend: true, - version: 7, - minHeight: 1292, - parentColumnSpace: 1, - dynamicBindingPathList: [], - leftColumn: 0, - isLoading: false, - parentId: "", - renderMode: "CANVAS", - children: [ - { - isVisible: true, - label: "Data", - widgetName: "Table1", - searchKey: "", - tableData: - '[\n {\n "id": 2381224,\n "email": "michael.lawson@reqres.in",\n "userName": "Michael Lawson",\n "productName": "Chicken Sandwich",\n "orderAmount": 4.99\n },\n {\n "id": 2736212,\n "email": "lindsay.ferguson@reqres.in",\n "userName": "Lindsay Ferguson",\n "productName": "Tuna Salad",\n "orderAmount": 9.99\n },\n {\n "id": 6788734,\n "email": "tobias.funke@reqres.in",\n "userName": "Tobias Funke",\n "productName": "Beef steak",\n "orderAmount": 19.99\n }\n]', - type: "TABLE_WIDGET", - isLoading: false, - parentColumnSpace: 74, - parentRowSpace: 40, - leftColumn: 0, - rightColumn: 8, - topRow: 19, - bottomRow: 26, - parentId: "0", - widgetId: "fs785w9gcy", - dynamicBindingPathList: [], - primaryColumns: { - id: { - index: 0, - width: 150, - id: "id", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "id", - computedValue: "", - }, - email: { - index: 1, - width: 150, - id: "email", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "email", - computedValue: "", - }, - userName: { - index: 2, - width: 150, - id: "userName", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "userName", - computedValue: "", - }, - productName: { - index: 3, - width: 150, - id: "productName", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "productName", - computedValue: "", - }, - orderAmount: { - index: 4, - width: 150, - id: "orderAmount", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "orderAmount", - computedValue: "", - }, - }, - textSize: "PARAGRAPH", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - renderMode: "CANVAS", - version: 1, - }, - ], -}; -export const outputDsl: DSLWidget = { - widgetName: "MainContainer", - backgroundColor: "none", - rightColumn: 1224, - snapColumns: 16, - detachFromLayout: true, - widgetId: "0", - topRow: 0, - bottomRow: 1840, - containerStyle: "none", - snapRows: 33, - parentRowSpace: 1, - type: "CANVAS_WIDGET", - canExtend: true, - version: 7, - minHeight: 1292, - parentColumnSpace: 1, - dynamicBindingPathList: [], - leftColumn: 0, - isLoading: false, - parentId: "", - renderMode: "CANVAS", - children: [ - { - isVisible: true, - label: "Data", - widgetName: "Table1", - searchKey: "", - tableData: - '[\n {\n "id": 2381224,\n "email": "michael.lawson@reqres.in",\n "userName": "Michael Lawson",\n "productName": "Chicken Sandwich",\n "orderAmount": 4.99\n },\n {\n "id": 2736212,\n "email": "lindsay.ferguson@reqres.in",\n "userName": "Lindsay Ferguson",\n "productName": "Tuna Salad",\n "orderAmount": 9.99\n },\n {\n "id": 6788734,\n "email": "tobias.funke@reqres.in",\n "userName": "Tobias Funke",\n "productName": "Beef steak",\n "orderAmount": 19.99\n }\n]', - type: "TABLE_WIDGET", - isLoading: false, - parentColumnSpace: 74, - parentRowSpace: 10, - leftColumn: 0, - rightColumn: 8, - topRow: 19, - bottomRow: 26, - parentId: "0", - widgetId: "fs785w9gcy", - dynamicBindingPathList: [], - primaryColumns: { - id: { - index: 0, - width: 150, - id: "id", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "id", - computedValue: "", - }, - email: { - index: 1, - width: 150, - id: "email", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "email", - computedValue: "", - }, - userName: { - index: 2, - width: 150, - id: "userName", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "userName", - computedValue: "", - }, - productName: { - index: 3, - width: 150, - id: "productName", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "productName", - computedValue: "", - }, - orderAmount: { - index: 4, - width: 150, - id: "orderAmount", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - columnType: "text", - textColor: "#231F20", - textSize: "PARAGRAPH", - fontStyle: "REGULAR", - enableFilter: true, - enableSort: true, - isVisible: true, - isDerived: false, - label: "orderAmount", - computedValue: "", - }, - }, - textSize: "PARAGRAPH", - horizontalAlignment: "LEFT", - verticalAlignment: "CENTER", - renderMode: "CANVAS", - version: 1, - }, - ], -}; diff --git a/app/client/src/api/WidgetConfigsApi.tsx b/app/client/src/api/WidgetConfigsApi.tsx deleted file mode 100644 index 2006d130556..00000000000 --- a/app/client/src/api/WidgetConfigsApi.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import Api from "api/Api"; -import type { WidgetType } from "constants/WidgetConstants"; -import type { WidgetProps } from "widgets/BaseWidget"; -import type { AxiosPromise } from "axios"; -import type { WidgetConfigProps } from "WidgetProvider/constants"; - -export interface WidgetConfigsResponse { - config: Record & WidgetConfigProps>; -} - -class WidgetConfigsApi extends Api { - static url = "/widgetConfigs"; - static async fetchWidgetConfigs(): Promise< - AxiosPromise - > { - return Api.get(WidgetConfigsApi.url); - } -} - -export default WidgetConfigsApi; diff --git a/app/client/src/ce/pages/AdminSettings/BreadcrumbCategories.tsx b/app/client/src/ce/pages/AdminSettings/BreadcrumbCategories.tsx deleted file mode 100644 index 054d0afed22..00000000000 --- a/app/client/src/ce/pages/AdminSettings/BreadcrumbCategories.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { APPLICATIONS_URL } from "constants/routes"; -import { SettingCategories } from "ee/pages/AdminSettings/config/types"; -import { adminSettingsCategoryUrl } from "ee/RouteBuilder"; - -export const BreadcrumbCategories = { - HOMEPAGE: { - href: APPLICATIONS_URL, - text: "Homepage", - }, - [SettingCategories.GENERAL]: { - href: adminSettingsCategoryUrl({ category: SettingCategories.GENERAL }), - text: "General", - }, - [SettingCategories.EMAIL]: { - href: adminSettingsCategoryUrl({ category: SettingCategories.EMAIL }), - text: "Email", - }, - [SettingCategories.DEVELOPER_SETTINGS]: { - href: adminSettingsCategoryUrl({ - category: SettingCategories.DEVELOPER_SETTINGS, - }), - text: "Developer settings", - }, - [SettingCategories.VERSION]: { - href: adminSettingsCategoryUrl({ category: SettingCategories.VERSION }), - text: "Version", - }, - [SettingCategories.ADVANCED]: { - href: adminSettingsCategoryUrl({ category: SettingCategories.ADVANCED }), - text: "Advanced", - }, - [SettingCategories.AUTHENTICATION]: { - href: adminSettingsCategoryUrl({ - category: SettingCategories.AUTHENTICATION, - }), - text: "Authentication", - }, - [SettingCategories.FORM_AUTH]: { - href: adminSettingsCategoryUrl({ - category: SettingCategories.AUTHENTICATION, - selected: SettingCategories.FORM_AUTH, - }), - text: "Form Login", - }, - [SettingCategories.GOOGLE_AUTH]: { - href: adminSettingsCategoryUrl({ - category: SettingCategories.AUTHENTICATION, - selected: SettingCategories.GOOGLE_AUTH, - }), - text: "Google Authentication", - }, - [SettingCategories.GITHUB_AUTH]: { - href: adminSettingsCategoryUrl({ - category: SettingCategories.AUTHENTICATION, - selected: SettingCategories.GITHUB_AUTH, - }), - text: "Github Authentication", - }, -}; diff --git a/app/client/src/ce/pages/Editor/routes.tsx b/app/client/src/ce/pages/Editor/routes.tsx deleted file mode 100644 index 4ad107d5a56..00000000000 --- a/app/client/src/ce/pages/Editor/routes.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import React from "react"; -import { Route, Switch } from "react-router-dom"; -import { useRouteMatch } from "react-router"; -import ApiEditor from "pages/Editor/APIEditor"; -import QueryEditor from "pages/Editor/QueryEditor"; -import JSEditor from "pages/Editor/JSEditor"; -import GeneratePage from "pages/Editor/GeneratePage"; -import { - API_EDITOR_ID_PATH, - BUILDER_CHECKLIST_PATH, - GENERATE_TEMPLATE_FORM_PATH, - INTEGRATION_EDITOR_PATH, - JS_COLLECTION_ID_PATH, - QUERIES_EDITOR_ID_PATH, -} from "constants/routes"; -import * as Sentry from "@sentry/react"; -import { SaaSEditorRoutes } from "pages/Editor/SaaSEditor/routes"; -import OnboardingChecklist from "pages/Editor/FirstTimeUserOnboarding/Checklist"; -import { DatasourceEditorRoutes } from "pages/routes"; -import CreateNewDatasourceTab from "pages/Editor/IntegrationEditor/CreateNewDatasourceTab"; - -const SentryRoute = Sentry.withSentryRouting(Route); - -function EditorRoutes() { - const { path } = useRouteMatch(); - - return ( - - - - - - - {SaaSEditorRoutes.map(({ component, path: childPath }) => ( - - ))} - {DatasourceEditorRoutes.map(({ component, path: childPath }) => ( - - ))} - - - ); -} - -export default EditorRoutes; diff --git a/app/client/src/ce/pages/Upgrade/businessEdition/UpgradeToBEPage.tsx b/app/client/src/ce/pages/Upgrade/businessEdition/UpgradeToBEPage.tsx deleted file mode 100644 index c295878f13e..00000000000 --- a/app/client/src/ce/pages/Upgrade/businessEdition/UpgradeToBEPage.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import { createMessage, MOVE_TO_BUSINESS_EDITION } from "ee/constants/messages"; -import { FooterComponent } from "../Footer"; -import useOnUpgrade from "utils/hooks/useOnUpgrade"; -import { Colors } from "constants/Colors"; -import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants"; -import { getAssetUrl } from "ee/utils/airgapHelpers"; - -export const UpgradeToBEPageWrapper = styled.div` - width: 100%; - height: 100%; - background: - linear-gradient(90deg, #fff 20px, transparent 1%) center, - linear-gradient(#fff 20px, transparent 1%) center, - #d2ddec; - background-size: 22px 22px; - position: relative; - - .upgrade-page-footer-container { - height: 90px; - z-index: 2; - .left { - min-width: 100px; - } - } -`; - -export const ImageContainer = styled.div` - margin-right: 32px; - img { - height: calc(100vh - 400px); - object-fit: contain; - } -`; - -export const Overlay = styled.div` - width: 100%; - height: 100%; - background: linear-gradient( - 70deg, - ${Colors.APPSMITH_BEIGE} 40%, - transparent 60% - ); - z-index: 1; -`; - -export const FlexContainer = styled.div` - display: flex; - align-items: center; - width: 100%; - height: calc(100% - 96px); - justify-content: center; -`; - -export const LeftWrapper = styled.div` - margin-left: 32px; - img { - object-fit: contain; - height: calc(100vh - 200px); - } -`; - -export const ContentWrapper = styled.div` - display: flex; - height: 100%; - flex-direction: row; - align-items: center; - justify-content: center; - overflow: hidden; -`; - -const BUSINESS_FEATURES_IMAGE = getAssetUrl( - `${ASSETS_CDN_URL}/business-features.svg`, -); - -const UPGRADE_BOX_IMAGE = getAssetUrl(`${ASSETS_CDN_URL}/upgrade-box.svg`); - -export const UpgradeToBEPage = () => { - const { onUpgrade } = useOnUpgrade({ - logEventName: "BILLING_UPGRADE_ADMIN_SETTINGS", - logEventData: { source: "Upgrade" }, - }); - - return ( - - - - - - Upgrade to business plan - - - Upgrade to business plan - - - - - onUpgrade()} - showHeading={false} - /> - - ); -}; diff --git a/app/client/src/components/TabItemBackgroundFill.tsx b/app/client/src/components/TabItemBackgroundFill.tsx deleted file mode 100644 index 03d15bf8ba8..00000000000 --- a/app/client/src/components/TabItemBackgroundFill.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import { getTypographyByKey } from "@appsmith/ads-old"; -import type { Theme } from "constants/DefaultTheme"; - -interface WrapperProps { - selected: boolean; - vertical: boolean; - theme: Theme; -} - -const getFocusedStyles = (props: WrapperProps) => ` - background-color: ${props.theme.colors.tabItemBackgroundFill.highlightBackground}; - color: ${props.theme.colors.tabItemBackgroundFill.highlightTextColor}; - font-weight: 500; -`; - -const Wrapper = styled.div` - display: flex; - ${getTypographyByKey("p1")} - - ${(props) => - props.selected - ? getFocusedStyles(props) - : ` - color: ${props.theme.colors.tabItemBackgroundFill.textColor}; - `}; - - &:hover, - &:focus { - color: ${(props) => - props.theme.colors.tabItemBackgroundFill.highlightTextColor};} - } - - padding: ${(props) => - `${props.theme.spaces[5] - 1}px ${props.theme.spaces[11]}px`}; - - width: 100%; -`; - -export default function TabItemBackgroundFill(props: { - tab: { - title: string; - }; - selected: boolean; - vertical: boolean; -}) { - const { selected, tab, vertical } = props; - - return ( - - {tab.title} - - ); -} diff --git a/app/client/src/components/designSystems/appsmith/CloseButton.tsx b/app/client/src/components/designSystems/appsmith/CloseButton.tsx deleted file mode 100644 index e46fa635317..00000000000 --- a/app/client/src/components/designSystems/appsmith/CloseButton.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import type { Color } from "constants/Colors"; -import { Button } from "@blueprintjs/core"; - -interface CloseButtonProps { - color: Color; - size: number; - onClick: React.MouseEventHandler; - className?: string; -} - -const StyledButton = styled(Button)` - position: absolute; - top: 0; - right: 3px; - justify-content: center; - padding: 0; - color: ${(props) => props.color}; - - & svg { - width: ${(props) => props.size}; - height: ${(props) => props.size}; - - & path { - fill: ${(props) => props.color}; - } - } -`; - -export function CloseButton(props: CloseButtonProps) { - return ( - - ); -} diff --git a/app/client/src/components/designSystems/appsmith/CreatableDropdown.tsx b/app/client/src/components/designSystems/appsmith/CreatableDropdown.tsx deleted file mode 100644 index a1e53ab28db..00000000000 --- a/app/client/src/components/designSystems/appsmith/CreatableDropdown.tsx +++ /dev/null @@ -1,141 +0,0 @@ -import React from "react"; -import type { InputActionMeta } from "react-select"; -import Select from "react-select"; -import type { WrappedFieldInputProps, WrappedFieldMetaProps } from "redux-form"; - -import { theme } from "constants/DefaultTheme"; -import type { SelectComponents } from "react-select/src/components"; - -interface DropdownProps { - options: Array<{ - value: string; - label: string; - }>; - placeholder: string; - isLoading?: boolean; - input: WrappedFieldInputProps; - meta: WrappedFieldMetaProps; - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - components: SelectComponents; - onCreateOption: (inputValue: string) => void; - formatCreateLabel?: (value: string) => React.ReactNode; - noOptionsMessage?: (obj: { inputValue: string }) => string; - inputValue?: string; - onInputChange: (value: string, actionMeta: InputActionMeta) => void; -} - -const selectStyles = { - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - placeholder: (provided: any) => ({ - ...provided, - color: "#a3b3bf", - }), - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - multiValue: (provided: any) => ({ - ...provided, - backgroundColor: "rgba(104,113,239,0.1)", - border: "1px solid rgba(104, 113, 239, 0.5)", - borderRadius: `${theme.radii[1]}px`, - padding: "2px 5px", - fontSize: "14px", - maxWidth: "95%", - position: "relative", - display: "inline-block", - transform: "none", - }), - multiValueRemove: () => { - return { - display: "none", - }; - }, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - container: (styles: any) => ({ - ...styles, - flex: 1, - zIndex: "5", - }), - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - control: (styles: any, state: any) => ({ - ...styles, - minHeight: "32px", - border: state.isFocused - ? `${theme.colors.secondary} solid 1px` - : `${theme.colors.inputInactiveBorders} solid 1px`, - boxShadow: state.isFocused ? "none" : "none", - "&:hover": { - border: `${theme.colors.secondary} solid 1px`, - }, - }), - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - indicatorsContainer: (provided: any) => ({ - ...provided, - height: "30px", - }), - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - clearIndicator: (provided: any) => ({ - ...provided, - padding: "5px", - }), - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - dropdownIndicator: (provided: any) => ({ - ...provided, - padding: "5px", - }), -}; - -class CreatableDropdown extends React.Component { - render() { - const { - components, - input, - inputValue, - isLoading, - noOptionsMessage, - onInputChange, - options, - placeholder, - } = this.props; - const optionalProps: Partial = {}; - - if (noOptionsMessage) optionalProps.noOptionsMessage = noOptionsMessage; - - if (components) optionalProps.components = components; - - if (inputValue) optionalProps.inputValue = inputValue; - - if (onInputChange) optionalProps.onInputChange = onInputChange; - - return ( - input.onChange(value)} - width={props.width} - {...props} - classNamePrefix="appsmith-select" - menuPlacement="auto" - placeholder={placeholder} - /> - ); -} - -function Dropdown(props: DropdownProps) { - return ; -} - -export default Dropdown; diff --git a/app/client/src/components/designSystems/appsmith/SignPostingBanner.tsx b/app/client/src/components/designSystems/appsmith/SignPostingBanner.tsx deleted file mode 100644 index d5f185e8507..00000000000 --- a/app/client/src/components/designSystems/appsmith/SignPostingBanner.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react"; -import type { ReactNode } from "react"; -import styled from "styled-components"; -import { Icon } from "@appsmith/ads"; - -export interface SignPostingBannerProps { - iconName: string; - content: ReactNode; -} - -export const Container = styled.div` - background-color: var(--ads-v2-color-blue-100); - width: 100%; - display: flex; -`; - -function SignPostingBanner(props: SignPostingBannerProps) { - return ( - -
- -
- {props.content} -
- ); -} - -export default SignPostingBanner; diff --git a/app/client/src/components/designSystems/appsmith/StepComponent.tsx b/app/client/src/components/designSystems/appsmith/StepComponent.tsx deleted file mode 100644 index c2df9a16328..00000000000 --- a/app/client/src/components/designSystems/appsmith/StepComponent.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import { Icon } from "@appsmith/ads"; -import React from "react"; -import styled from "styled-components"; - -const StyledIncreaseIcon = styled(Icon)` - display: flex; - justify-content: center; - align-items: center; - position: relative; - cursor: pointer; -`; - -const StyledDecreaseIcon = styled(Icon)` - display: flex; - justify-content: center; - align-items: center; - position: relative; - cursor: pointer; -`; - -const StepWrapper = styled.div` - display: flex; - align-items: center; - justify-content: center; - width: 100%; - background: #121518; - border-radius: 4px; - height: 32px; - line-height: 32px; -`; - -const InputWrapper = styled.div` - width: calc(100% - 80px); - height: 32px; - line-height: 32px; - background: #23292e; - font-size: 14px; - color: ${(props) => props.theme.colors.textOnDarkBG}; - text-align: center; - letter-spacing: 1.44px; -`; - -interface StepComponentProps { - value: number; - min: number; - max: number; - steps: number; - displayFormat: (value: number) => string; - onChange: (value: number) => void; -} - -export function StepComponent(props: StepComponentProps) { - function decrease() { - if (props.value < props.min) { - return; - } - - const value = props.value - props.steps; - - props.onChange(value); - } - - function increase() { - if (props.value > props.max) { - return; - } - - const value = props.value + props.steps; - - props.onChange(value); - } - - return ( - - - {props.displayFormat(props.value)} - - - ); -} - -export default StepComponent; diff --git a/app/client/src/components/designSystems/appsmith/TabbedView.tsx b/app/client/src/components/designSystems/appsmith/TabbedView.tsx deleted file mode 100644 index 7e3ccf26c9f..00000000000 --- a/app/client/src/components/designSystems/appsmith/TabbedView.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import React from "react"; -import { Tab, Tabs, TabList, TabPanel } from "react-tabs"; -import "react-tabs/style/react-tabs.css"; -import styled from "styled-components"; - -const TabsWrapper = styled.div<{ shouldOverflow?: boolean }>` - height: 100%; - .react-tabs { - height: 100%; - } - .react-tabs__tab-panel { - height: calc(100% - 46px); - scrollbar-width: none; - } - .react-tabs__tab-list { - border-bottom-color: #d0d7dd; - color: #a3b3bf; - ${(props) => - props.shouldOverflow && - ` - overflow-y: hidden; - overflow-x: auto; - white-space: nowrap; - `} - } - .react-tabs__tab { - padding: 6px 9px; - } - .react-tabs__tab:focus { - box-shadow: none; - border-color: ${(props) => props.theme.colors.primaryOld}; - } - .react-tabs__tab--selected { - color: ${(props) => props.theme.colors.primaryOld}; - border-color: #d0d7dd; - border-top: ${(props) => props.theme.colors.primaryOld} 5px solid; - border-radius: 0; - } -`; - -interface TabbedViewComponentType { - tabs: Array<{ - key: string; - title: string; - panelComponent: JSX.Element; - }>; - selectedIndex?: number; - setSelectedIndex?: (selectedIndex: number) => void; - overflow?: boolean; -} - -export function BaseTabbedView(props: TabbedViewComponentType) { - return ( - - { - props.setSelectedIndex && props.setSelectedIndex(index); - }} - selectedIndex={props.selectedIndex} - > - - {props.tabs.map((tab) => ( - {tab.title} - ))} - - {props.tabs.map((tab) => ( - {tab.panelComponent} - ))} - - - ); -} diff --git a/app/client/src/components/designSystems/appsmith/header/ThreeDotsLoading.tsx b/app/client/src/components/designSystems/appsmith/header/ThreeDotsLoading.tsx deleted file mode 100644 index dea0d2ab7c4..00000000000 --- a/app/client/src/components/designSystems/appsmith/header/ThreeDotsLoading.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/*Huge thanks to @tobiasahlin at http://tobiasahlin.com/spinkit/ */ - -import React from "react"; -import styled from "styled-components"; - -const Spinner = styled.div` - width: 30px; - text-align: center; - && > div { - width: 4px; - height: 4px; - background-color: #4b4848; - - border-radius: 100%; - display: inline-block; - -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; - animation: sk-bouncedelay 1.4s infinite ease-in-out both; - } - - && .bounce1 { - -webkit-animation-delay: -0.32s; - animation-delay: -0.32s; - } - - && .bounce2 { - -webkit-animation-delay: -0.16s; - animation-delay: -0.16s; - } - - @-webkit-keyframes sk-bouncedelay { - 0%, - 80%, - 100% { - -webkit-transform: scale(0); - } - 40% { - -webkit-transform: scale(1); - } - } - - @keyframes sk-bouncedelay { - 0%, - 80%, - 100% { - -webkit-transform: scale(0); - transform: scale(0); - } - 40% { - -webkit-transform: scale(1); - transform: scale(1); - } - } -`; - -interface Props { - className?: string; -} - -function ThreeDotLoading(props: Props) { - return ( - -
-
-
- - ); -} - -export default ThreeDotLoading; diff --git a/app/client/src/components/editorComponents/ActionRightPane/Connections.tsx b/app/client/src/components/editorComponents/ActionRightPane/Connections.tsx deleted file mode 100644 index 713341cb107..00000000000 --- a/app/client/src/components/editorComponents/ActionRightPane/Connections.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import React from "react"; -import { Text, TextType } from "@appsmith/ads-old"; -import styled from "styled-components"; -import LongArrowSVG from "assets/images/long-arrow-bottom.svg"; -import { useEntityLink } from "../Debugger/hooks/debuggerHooks"; -import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import { - createMessage, - INCOMING_ENTITIES, - NO_INCOMING_ENTITIES, - NO_OUTGOING_ENTITIES, - OUTGOING_ENTITIES, -} from "ee/constants/messages"; -import { Connection } from "../Debugger/EntityDependecies"; -import { Icon } from "@appsmith/ads"; -import Collapsible from "components/common/Collapsible"; - -const ConnectionType = styled.span` - span:nth-child(2) { - padding-left: ${(props) => props.theme.spaces[2] - 1}px; - } - padding-bottom: ${(props) => props.theme.spaces[2]}px; -`; - -const NoConnections = styled.div` - width: 100%; - padding: ${(props) => props.theme.spaces[4] + 1}px - ${(props) => props.theme.spaces[3]}px; - background-color: var(--ads-v2-color-bg); - border-radius: var(--ads-v2-border-radius); - border: 1px solid var(--ads-v2-color-border); - color: var(--ads-v2-color-fg); -`; - -const ConnectionFlow = styled.div` - display: flex; - align-items: center; - flex-direction: column; - - img { - padding-top: ${(props) => props.theme.spaces[1]}px; - padding-bottom: ${(props) => props.theme.spaces[2] + 1}px; - } -`; - -const ConnectionsContainer = styled.span` - width: 100%; - display: flex; - flex-wrap: wrap; - padding: ${(props) => props.theme.spaces[2] + 1}px; - - background-color: var(--ads-v2-color-bg); - border-radius: var(--ads-v2-border-radius); - border: 1px solid var(--ads-v2-color-border); - color: var(--ads-v2-color-fg); -`; - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function Dependencies(props: any) { - const { navigateToEntity } = useEntityLink(); - - const onClick = (entityName: string, entityType: string) => { - navigateToEntity(entityName); - AnalyticsUtil.logEvent("ASSOCIATED_ENTITY_CLICK", { - source: "INTEGRATION", - entityType: entityType, - }); - }; - - return props.dependencies.length ? ( - - {props.dependencies.map((entityName: string) => { - return ( - - ); - })} - - ) : ( - - {props.placeholder} - - ); -} - -interface ConnectionsProps { - actionName: string; - entityDependencies: { - inverseDependencies: string[]; - directDependencies: string[]; - } | null; -} - -function Connections(props: ConnectionsProps) { - return ( - - - - - {createMessage(INCOMING_ENTITIES)} - - - {/* Direct Dependencies */} - - - - {props.actionName} - - - - - {createMessage(OUTGOING_ENTITIES)} - - - - {/* Inverse dependencies */} - - - ); -} - -export default Connections; diff --git a/app/client/src/components/editorComponents/Checkbox.tsx b/app/client/src/components/editorComponents/Checkbox.tsx deleted file mode 100644 index 21d6ba32256..00000000000 --- a/app/client/src/components/editorComponents/Checkbox.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import type { ICheckboxProps } from "@blueprintjs/core"; -import { Checkbox as BlueprintCheckbox } from "@blueprintjs/core"; -import type { Intent } from "constants/DefaultTheme"; -import { IntentColors, getBorderCSSShorthand } from "constants/DefaultTheme"; - -export type CheckboxProps = ICheckboxProps & { - intent: Intent; - align: "left" | "right"; - input?: { - onChange?: (value: boolean) => void; - value?: boolean; - checked?: boolean; - }; - label: string; -}; - -export const StyledCheckbox = styled(BlueprintCheckbox)` - &&&& { - span.bp3-control-indicator { - outline: none; - box-shadow: none; - border-radius: ${(props) => props.theme.radii[1]}px; - border: ${(props) => getBorderCSSShorthand(props.theme.borders[3])}; - height: ${(props) => props.theme.fontSizes[5]}px; - width: ${(props) => props.theme.fontSizes[5]}px; - } - input:checked ~ span.bp3-control-indicator { - background: ${(props) => IntentColors[props.intent]}; - box-shadow: none; - outline: none; - } - } -`; - -export function Checkbox(props: CheckboxProps) { - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const handleChange = (e: any) => { - props.input && - props.input.onChange && - props.input.onChange(e.target.checked); - }; - - return ( - - ); -} - -export default Checkbox; diff --git a/app/client/src/components/editorComponents/CloseEditor.tsx b/app/client/src/components/editorComponents/CloseEditor.tsx deleted file mode 100644 index c3d8881fb80..00000000000 --- a/app/client/src/components/editorComponents/CloseEditor.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import React from "react"; -import { INTEGRATION_TABS } from "constants/routes"; -import { getQueryParams } from "utils/URLUtils"; -import { getIsGeneratePageInitiator } from "utils/GenerateCrudUtil"; -import { - generateTemplateFormURL, - integrationEditorURL, - widgetListURL, -} from "ee/RouteBuilder"; -import { useSelector } from "react-redux"; -import { getCurrentBasePageId } from "selectors/editorSelectors"; -import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import { Link } from "@appsmith/ads"; -import styled from "styled-components"; -import type { AppsmithLocationState } from "../../utils/history"; -import { NavigationMethod } from "../../utils/history"; -import { useHistory } from "react-router-dom"; - -const StyledLink = styled(Link)` - margin: var(--ads-v2-spaces-7) 0 0 var(--ads-v2-spaces-7); - width: fit-content; -`; - -function CloseEditor() { - const history = useHistory(); - const params: string = location.search; - const searchParamsInstance = new URLSearchParams(params); - const redirectTo = searchParamsInstance.get("from"); - const basePageId = useSelector(getCurrentBasePageId); - - const isGeneratePageInitiator = getIsGeneratePageInitiator(); - let integrationTab = INTEGRATION_TABS.ACTIVE; - - if (isGeneratePageInitiator) { - // When users routes to Integrations page via generate CRUD page form - // the INTEGRATION_TABS.ACTIVE is hidden and - // hence when routing back, user should go back to INTEGRATION_TABS.NEW tab. - integrationTab = INTEGRATION_TABS.NEW; - } - - const handleClose = () => { - // if it is a generate CRUD page flow from which user came here - // then route user back to `/generate-page/form` - // else go back to BUILDER_PAGE - const redirectURL = isGeneratePageInitiator - ? generateTemplateFormURL({ basePageId }) - : widgetListURL({ basePageId }); - - const URL = - redirectTo === "datasources" - ? integrationEditorURL({ - basePageId, - selectedTab: integrationTab, - params: getQueryParams(), - }) - : redirectURL; - - AnalyticsUtil.logEvent("BACK_BUTTON_CLICK", { - type: "BACK_BUTTON", - fromUrl: location.pathname, - toUrl: URL, - }); - history.push(URL, { invokedBy: NavigationMethod.ActionBackButton }); - }; - - return ( - - Back - - ); -} - -export default CloseEditor; diff --git a/app/client/src/components/editorComponents/ContextDropdown.tsx b/app/client/src/components/editorComponents/ContextDropdown.tsx deleted file mode 100644 index dc54ae78aad..00000000000 --- a/app/client/src/components/editorComponents/ContextDropdown.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import type { ReactNode } from "react"; -import React from "react"; -import styled from "styled-components"; -import type { ItemRenderer } from "@blueprintjs/select"; -import { Select } from "@blueprintjs/select"; -import type { Intent as BlueprintIntent } from "@blueprintjs/core"; -import { - Button, - MenuItem, - PopoverPosition, - PopoverInteractionKind, -} from "@blueprintjs/core"; -import { noop } from "utils/AppsmithUtils"; -import type { Intent } from "constants/DefaultTheme"; -import type { DropdownOption } from "components/constants"; -import { Icon } from "@appsmith/ads"; - -export type ContextDropdownOption = DropdownOption & { - onSelect: (event: React.MouseEvent) => void; - intent?: Intent; - children?: ContextDropdownOption[]; -}; -const Dropdown = Select.ofType(); - -const StyledMenuItem = styled(MenuItem)` - &&&&.bp3-menu-item:hover { - background: ${(props) => props.theme.colors.primaryOld}; - color: ${(props) => props.theme.colors.textOnDarkBG}; - } - &&&.bp3-menu-item.bp3-intent-danger:hover { - background: ${(props) => props.theme.colors.error}; - } -`; - -interface ContextDropdownProps { - options: ContextDropdownOption[]; - className: string; - toggle: { - type: "icon" | "button"; - icon: string; - iconSize?: number; - text?: string; - placeholder?: string; - color?: string; - }; -} - -function DropdownItem(option: ContextDropdownOption) { - return ( - - {option.children && option.children.map(DropdownItem)} - - ); -} - -export function ContextDropdown(props: ContextDropdownProps) { - let trigger: ReactNode; - - if (props.toggle.type === "icon" && props.toggle.icon) { - trigger = ; - } - - if (props.toggle.type === "button" && props.toggle.text) - trigger =
- - ); -} - -export default HelperTooltip; diff --git a/app/client/src/components/editorComponents/form/FieldError.tsx b/app/client/src/components/editorComponents/form/FieldError.tsx deleted file mode 100644 index 4e617c3fb59..00000000000 --- a/app/client/src/components/editorComponents/form/FieldError.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import { IntentColors } from "constants/DefaultTheme"; -// Note: This component is only for the input fields which donot have the -// popover error tooltip. This is also only for Appsmith components -// Not to be used in widgets / canvas - -const StyledError = styled.span<{ show: boolean }>` - text-align: left; - color: ${IntentColors.danger}; - font-size: ${(props) => props.theme.fontSizes[3]}px; - opacity: ${(props) => (props.show ? 1 : 0)}; - display: block; - position: relative; - margin-top: ${(props) => props.theme.spaces[1]}px; -`; - -interface FormFieldErrorProps { - error?: string; - className?: string; -} - -export function FormFieldError(props: FormFieldErrorProps) { - return ( - - {props.error || " "} - - ); -} - -export default FormFieldError; diff --git a/app/client/src/components/editorComponents/form/FormActionButton.tsx b/app/client/src/components/editorComponents/form/FormActionButton.tsx deleted file mode 100644 index e76b36ac39e..00000000000 --- a/app/client/src/components/editorComponents/form/FormActionButton.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import styled from "styled-components"; -import { Button } from "@blueprintjs/core"; -import type { Intent } from "constants/DefaultTheme"; -import { BlueprintButtonIntentsCSS } from "constants/DefaultTheme"; - -interface FormActionButtonProps { - intent?: Intent; - large?: boolean; -} - -export default styled(Button)` - ${BlueprintButtonIntentsCSS} -`; diff --git a/app/client/src/components/editorComponents/form/FormFooter.tsx b/app/client/src/components/editorComponents/form/FormFooter.tsx deleted file mode 100644 index 062e120f8da..00000000000 --- a/app/client/src/components/editorComponents/form/FormFooter.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import Button from "components/editorComponents/Button"; -import Divider from "components/editorComponents/Divider"; - -interface FormFooterProps { - onCancel?: () => void; - onSubmit?: () => void; - divider?: boolean; - submitting: boolean; - submitText?: string; - cancelText?: string; - submitOnEnter?: boolean; - canSubmit?: boolean; - size?: "large" | "small"; -} - -const FooterActions = styled.div` - margin: 1em; - display: flex; - justify-content: flex-end; - align-items: center; - & > button { - margin-left: 1em; - } - &&&& > .bp3-button { - color: ${(props) => props.theme.colors.formFooter.cancelBtn}; - } -`; - -const FormFooterContainer = styled.div``; - -export function FormFooter(props: FormFooterProps) { - return ( - - {props.divider && } - - {props.onCancel && ( - - - - -
- - - - - ); -} - -export default EditorHeader; diff --git a/app/client/src/pages/Editor/Explorer/Datasources.tsx b/app/client/src/pages/Editor/Explorer/Datasources.tsx deleted file mode 100644 index 1cbeb06416d..00000000000 --- a/app/client/src/pages/Editor/Explorer/Datasources.tsx +++ /dev/null @@ -1,159 +0,0 @@ -import React from "react"; -import { useSelector } from "react-redux"; -import Entity from "./Entity"; -import { - ADD_DATASOURCE_BUTTON, - createMessage, - CREATE_DATASOURCE_TOOLTIP, - EMPTY_DATASOURCE_BUTTON_TEXT, - EMPTY_DATASOURCE_MAIN_TEXT, -} from "ee/constants/messages"; -import styled from "styled-components"; -import { Icon, Button } from "@appsmith/ads"; -import { AddEntity, EmptyComponent } from "./common"; -import { getCurrentAppWorkspace } from "ee/selectors/selectedWorkspaceSelectors"; - -import type { AppState } from "ee/reducers"; -import { DatasourceCreateEntryPoints } from "constants/Datasource"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; -import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; -import { - getHasCreateDatasourcePermission, - getHasManageDatasourcePermission, -} from "ee/utils/BusinessFeatures/permissionPageHelpers"; -import { - useAppWideAndOtherDatasource, - useDatasourceSuggestions, -} from "ee/pages/Editor/Explorer/hooks"; -import { getPlugins } from "ee/selectors/entitiesSelector"; -import { keyBy } from "lodash"; -import { useDatasourceIdFromURL } from "ee/pages/Editor/Explorer/helpers"; -import type { Datasource } from "entities/Datasource"; -import ExplorerDatasourceEntity from "../DatasourceInfo/DatasourceEntity"; - -interface DatasourcesProps { - isDatasourcesOpen: boolean | null; - addDatasource: (source: string) => void; - onDatasourcesToggle: (isOpen: boolean) => void; - listDatasource: () => void; - entityId: string; -} - -const ShowAllButton = styled(Button)` - margin: 0.25rem 1.5rem; -`; - -const Datasources = React.memo((props: DatasourcesProps) => { - const { appWideDS, otherDS } = useAppWideAndOtherDatasource(); - const { - addDatasource, - isDatasourcesOpen, - listDatasource, - onDatasourcesToggle, - } = props; - const userWorkspacePermissions = useSelector( - (state: AppState) => getCurrentAppWorkspace(state).userPermissions ?? [], - ); - const plugins = useSelector(getPlugins); - const pluginGroups = React.useMemo(() => keyBy(plugins, "id"), [plugins]); - const isFeatureEnabled = useFeatureFlag(FEATURE_FLAG.license_gac_enabled); - - const canCreateDatasource = getHasCreateDatasourcePermission( - isFeatureEnabled, - userWorkspacePermissions, - ); - - const activeDatasourceId = useDatasourceIdFromURL(); - const datasourceSuggestions = useDatasourceSuggestions(); - - const datasourceElements = React.useMemo( - () => - appWideDS.concat(datasourceSuggestions).map((datasource: Datasource) => { - const datasourcePermissions = datasource.userPermissions || []; - - const canManageDatasource = getHasManageDatasourcePermission( - isFeatureEnabled, - datasourcePermissions, - ); - - return ( - - ); - }), - [appWideDS, props.entityId, activeDatasourceId], - ); - - return ( - - addDatasource(DatasourceCreateEntryPoints.ENTITY_EXPLORER_ADD_DS) - } - onToggle={onDatasourcesToggle} - searchKeyword={""} - showAddButton={canCreateDatasource} - step={0} - > - {datasourceElements.length ? ( - datasourceElements - ) : ( - - addDatasource( - DatasourceCreateEntryPoints.ENTITY_EXPLORER_NEW_DATASOURCE, - ), - })} - /> - )} - {datasourceElements.length > 0 && canCreateDatasource && ( - - addDatasource( - DatasourceCreateEntryPoints.ENTITY_EXPLORER_ADD_DS_CTA, - ) - } - entityId="add_new_datasource" - icon={} - name={createMessage(ADD_DATASOURCE_BUTTON)} - step={1} - /> - )} - {otherDS.length ? ( - - Show all datasources - - ) : null} - - ); -}); - -Datasources.displayName = "Datasources"; - -export default Datasources; diff --git a/app/client/src/pages/Editor/Explorer/Datasources/DataSourceContextMenu.tsx b/app/client/src/pages/Editor/Explorer/Datasources/DataSourceContextMenu.tsx deleted file mode 100644 index 583a7dbb22f..00000000000 --- a/app/client/src/pages/Editor/Explorer/Datasources/DataSourceContextMenu.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import React, { useCallback, useState } from "react"; -import { useDispatch, useSelector } from "react-redux"; -import { deleteDatasource } from "actions/datasourceActions"; -import { initExplorerEntityNameEdit } from "actions/explorerActions"; -import { - CONTEXT_RENAME, - CONTEXT_DELETE, - CONFIRM_CONTEXT_DELETE, - createMessage, -} from "ee/constants/messages"; -import type { AppState } from "ee/reducers"; - -import { getDatasource } from "ee/selectors/entitiesSelector"; -import type { TreeDropdownOption } from "pages/Editor/Explorer/ContextMenu"; -import ContextMenu from "pages/Editor/Explorer/ContextMenu"; -import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; -import { - getHasDeleteDatasourcePermission, - getHasManageDatasourcePermission, -} from "ee/utils/BusinessFeatures/permissionPageHelpers"; - -export function DataSourceContextMenu(props: { - datasourceId: string; - entityId: string; - className?: string; -}) { - const dispatch = useDispatch(); - const dispatchDelete = useCallback(() => { - dispatch(deleteDatasource({ id: props.datasourceId })); - }, [dispatch, props.datasourceId]); - const editDatasourceName = useCallback( - () => dispatch(initExplorerEntityNameEdit(props.entityId)), - [dispatch, props.entityId], - ); - - const [confirmDelete, setConfirmDelete] = useState(false); - - const datasource = useSelector((state: AppState) => - getDatasource(state, props.datasourceId), - ); - - const isFeatureEnabled = useFeatureFlag(FEATURE_FLAG.license_gac_enabled); - - const datasourcePermissions = datasource?.userPermissions || []; - - const canDeleteDatasource = getHasDeleteDatasourcePermission( - isFeatureEnabled, - datasourcePermissions, - ); - - const canManageDatasource = getHasManageDatasourcePermission( - isFeatureEnabled, - datasourcePermissions, - ); - - const treeOptions = [ - canManageDatasource && { - value: "rename", - className: "single-select t--datasource-rename", - onSelect: editDatasourceName, - label: createMessage(CONTEXT_RENAME), - }, - canDeleteDatasource && { - confirmDelete: confirmDelete, - className: "t--apiFormDeleteBtn single-select t--datasource-delete", - value: "delete", - onSelect: () => { - confirmDelete ? dispatchDelete() : setConfirmDelete(true); - }, - label: confirmDelete - ? createMessage(CONFIRM_CONTEXT_DELETE) - : createMessage(CONTEXT_DELETE), - intent: "danger", - }, - ].filter(Boolean); - - return treeOptions.length > 0 ? ( - - ) : null; -} - -export default DataSourceContextMenu; diff --git a/app/client/src/pages/Editor/Explorer/Entity/Placeholder.tsx b/app/client/src/pages/Editor/Explorer/Entity/Placeholder.tsx deleted file mode 100644 index aedf8e6412e..00000000000 --- a/app/client/src/pages/Editor/Explorer/Entity/Placeholder.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import type { ReactNode } from "react"; -import React from "react"; -import styled from "styled-components"; -const Wrapper = styled.div<{ step: number }>` - margin-left: ${(props) => props.step * props.theme.spaces[2]}px; - width: calc(100% - ${(props) => props.step * props.theme.spaces[2]}px); - font-size: ${(props) => props.theme.fontSizes[2]}px; - padding: 5px 20px; - text-align: left; - display: flex; - justify-content: flex-start; - align-items: center; - word-wrap: break-word; - width: 100%; -`; - -export function EntityPlaceholder(props: { - step: number; - children: ReactNode; -}) { - return ( - -

{props.children}

-
- ); -} - -export default EntityPlaceholder; diff --git a/app/client/src/pages/Editor/Explorer/ExplorerTitle.tsx b/app/client/src/pages/Editor/Explorer/ExplorerTitle.tsx deleted file mode 100644 index 21a0a7a0fe6..00000000000 --- a/app/client/src/pages/Editor/Explorer/ExplorerTitle.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react"; -import styled from "styled-components"; - -const Wrapper = styled.div` - display: flex; - align-items: center; - justify-content: space-between; - & h1 { - font-size: ${(props) => props.theme.fontSizes[3]}px; - letter-spacing: 3px; - font-weight: ${(props) => props.theme.fontWeights[2]}; - } -`; - -export function ExplorerTitle() { - return ( - -

EXPLORER

-
- ); -} - -export default ExplorerTitle; diff --git a/app/client/src/pages/Editor/Explorer/Files/SubmenuHotkeys.tsx b/app/client/src/pages/Editor/Explorer/Files/SubmenuHotkeys.tsx deleted file mode 100644 index 3d1f0751cd8..00000000000 --- a/app/client/src/pages/Editor/Explorer/Files/SubmenuHotkeys.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import React from "react"; -import { Hotkey, Hotkeys, HotkeysTarget } from "@blueprintjs/core"; -import type { SelectEvent } from "components/editorComponents/GlobalSearch/utils"; - -interface Props { - handleUpKey: () => void; - handleDownKey: () => void; - handleSubmitKey: (e: SelectEvent) => void; - children: React.ReactNode; -} - -@HotkeysTarget -class SubmenuHotKeys extends React.Component { - get hotKeysConfig() { - return [ - { - combo: "up", - onKeyDown: () => { - this.props.handleUpKey(); - }, - allowInInput: true, - label: "Move up the list", - }, - { - combo: "down", - onKeyDown: this.props.handleDownKey, - allowInInput: true, - label: "Move down the list", - }, - { - combo: "return", - onKeyDown: this.props.handleSubmitKey, - allowInInput: true, - label: "Submit", - }, - ]; - } - - renderHotkeys() { - return ( - - {this.hotKeysConfig.map( - ({ allowInInput, combo, label, onKeyDown }, index) => ( - - ), - )} - - ); - } - - render() { - return
{this.props.children}
; - } -} - -export default SubmenuHotKeys; diff --git a/app/client/src/pages/Editor/Explorer/Pages/PageEntity.tsx b/app/client/src/pages/Editor/Explorer/Pages/PageEntity.tsx deleted file mode 100644 index 30278059b6f..00000000000 --- a/app/client/src/pages/Editor/Explorer/Pages/PageEntity.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react"; -import ExplorerWidgetGroup from "../Widgets/WidgetGroup"; -import Files from "../Files"; - -interface ExplorerPageEntityProps { - step: number; - searchKeyword?: string; - showWidgetsSidebar: () => void; -} - -export function ExplorerPageEntity(props: ExplorerPageEntityProps) { - return ( -
- - - -
- ); -} - -ExplorerPageEntity.displayName = "ExplorerPageEntity"; - -export default ExplorerPageEntity; diff --git a/app/client/src/pages/Editor/Explorer/TreeDropdown.tsx b/app/client/src/pages/Editor/Explorer/TreeDropdown.tsx deleted file mode 100644 index 6a4745da1ee..00000000000 --- a/app/client/src/pages/Editor/Explorer/TreeDropdown.tsx +++ /dev/null @@ -1,254 +0,0 @@ -import React, { useState } from "react"; -import styled from "styled-components"; -import { find, noop } from "lodash"; -import type { DropdownOption } from "components/constants"; -import { StyledMenu } from "@appsmith/ads-old"; -import type { IPopoverSharedProps, Position } from "@blueprintjs/core"; -import { - Button as BlueprintButton, - PopoverInteractionKind, - PopoverPosition, - Popover, - Classes, - MenuItem, -} from "@blueprintjs/core"; -import { IconNames } from "@blueprintjs/icons"; -import { Colors } from "constants/Colors"; -import { - EntityClassNames, - entityTooltipCSS, -} from "pages/Editor/Explorer/Entity"; -import { useCloseMenuOnScroll } from "ee/pages/Editor/Explorer/hooks"; -import { SIDEBAR_ID } from "constants/Explorer"; - -export type TreeDropdownOption = DropdownOption & { - onSelect?: (value: TreeDropdownOption, setter?: Setter) => void; - children?: TreeDropdownOption[]; - className?: string; - type?: string; - confirmDelete?: boolean; - disabled?: boolean; -}; - -type Setter = (value: TreeDropdownOption, defaultVal?: string) => void; - -interface TreeDropdownProps { - optionTree: TreeDropdownOption[]; - selectedValue: string; - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - getDefaults?: (value: any) => any; - defaultText: string; - onSelect: Setter; - selectedLabelModifier?: ( - option: TreeDropdownOption, - displayValue?: string, - ) => React.ReactNode; - displayValue?: string; - toggle?: React.ReactNode; - className?: string; - modifiers?: IPopoverSharedProps["modifiers"]; - setConfirmDelete?: (val: boolean) => void; - onMenuToggle?: (isOpen: boolean) => void; - position?: Position; - icon?: React.ReactNode; - editorPage?: boolean; - menuWidth?: number; -} - -export const StyledPopover = styled(Popover)<{ - children?: React.ReactNode; -}>` - .${Classes.POPOVER_TARGET} { - ${entityTooltipCSS} - } - div { - flex: 1 1 auto; - } - span { - width: 100%; - position: relative; - } - .${Classes.BUTTON} { - display: flex; - width: 100%; - align-items: center; - justify-content: space-between; - } - .${Classes.BUTTON_TEXT} { - text-overflow: ellipsis; - text-align: left; - overflow: hidden; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - } - && { - .${Classes.ICON} { - width: fit-content; - color: ${Colors.SLATE_GRAY}; - } - } -`; - -function getSelectedOption( - selectedValue: string, - defaultText: string, - options: TreeDropdownOption[], -) { - let selectedOption: TreeDropdownOption = { - label: defaultText, - value: "", - }; - - options.length > 0 && - options.forEach((option) => { - // Find the selected option in the OptionsTree - if (option.value === selectedValue) { - selectedOption = option; - } else { - const childOption = find(option.children, { - value: selectedValue, - }); - - if (childOption) { - selectedOption = childOption; - } - } - }); - - return selectedOption; -} - -export default function TreeDropdown(props: TreeDropdownProps) { - const { - defaultText, - displayValue, - getDefaults, - menuWidth, - onSelect, - optionTree, - selectedLabelModifier, - selectedValue, - setConfirmDelete, - toggle, - } = props; - const selectedOption = getSelectedOption( - selectedValue, - defaultText, - optionTree, - ); - - const [isOpen, setIsOpen] = useState(false); - - useCloseMenuOnScroll(SIDEBAR_ID, isOpen, () => setIsOpen(false)); - - const handleSelect = (option: TreeDropdownOption) => { - if (option.onSelect) { - option.onSelect(option, props.onSelect); - - if (option.value === "delete" && !option.confirmDelete) { - setIsOpen(true); - } else { - setIsOpen(false); - } - } else { - const defaultVal = getDefaults ? getDefaults(option.value) : undefined; - - onSelect(option, defaultVal); - } - }; - - function renderTreeOption(option: TreeDropdownOption) { - const isSelected = - selectedOption.value === option.value || - selectedOption.type === option.value; - - return ( - { - handleSelect(option); - e.stopPropagation(); - } - } - popoverProps={{ - minimal: true, - interactionKind: PopoverInteractionKind.CLICK, - position: PopoverPosition.RIGHT, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - targetProps: { onClick: (e: any) => e.stopPropagation() }, - }} - text={option.label} - > - {option.children && option.children.map(renderTreeOption)} - - ); - } - - const list = optionTree.map(renderTreeOption); - - const menuItems = ( - - {list} - - ); - - const defaultToggle = ( -
- -
- ); - - return ( - { - setIsOpen(false); - setConfirmDelete ? setConfirmDelete(false) : null; - }} - position={props.position || PopoverPosition.RIGHT_TOP} - targetProps={{ - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - onClick: (e: any) => { - setIsOpen(true); - e.stopPropagation(); - }, - }} - > - {toggle ? toggle : defaultToggle} - - ); -} diff --git a/app/client/src/pages/Editor/HelpBarInHeader.tsx b/app/client/src/pages/Editor/HelpBarInHeader.tsx deleted file mode 100644 index de0348dd8ad..00000000000 --- a/app/client/src/pages/Editor/HelpBarInHeader.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react"; -import classNames from "classnames"; -import HelpBar from "components/editorComponents/GlobalSearch/HelpBar"; -import { HeaderSection } from "./commons/EditorHeaderComponents"; - -export const HelperBarInHeader = ({ - isPreview = false, -}: { - isPreview?: boolean; -}) => { - return ( - - - - ); -}; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/GlobalAdd.tsx b/app/client/src/pages/Editor/IDE/EditorPane/GlobalAdd.tsx deleted file mode 100644 index 2c5e93b09dd..00000000000 --- a/app/client/src/pages/Editor/IDE/EditorPane/GlobalAdd.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import UIEntitySidebar from "pages/Editor/widgetSidebar/UIEntitySidebar"; -import React, { useCallback } from "react"; -import styled from "styled-components"; -import { Button, Flex, Icon, Text } from "@appsmith/ads"; -import { useDispatch, useSelector } from "react-redux"; -import { getCurrentBasePageId } from "selectors/editorSelectors"; -import history from "utils/history"; -import { queryAddURL } from "ee/RouteBuilder"; -import { createNewJSCollection } from "actions/jsPaneActions"; -import PaneHeader from "../LeftPane/PaneHeader"; - -const CTABox = styled.div` - height: 62px; - width: 100%; - padding: var(--ads-v2-spaces-3); - border-radius: 4px; - gap: var(--ads-v2-spaces-3); - border: 1px solid var(--ads-v2-color-border); - display: flex; - align-items: flex-start; - flex-direction: column; - cursor: pointer; - &:hover { - background-color: var(--ads-v2-color-bg-subtle); - } -`; - -const CTAIcon = styled.div<{ bgColor: string; color: string }>` - .ads-v2-icon { - padding: var(--ads-v2-spaces-2); - background-color: ${(props) => props.bgColor}; - border-radius: var(--ads-v2-spaces-1); - } - svg { - & path { - fill: ${(props) => props.color}; - } - } -`; - -const CreateCTA = (props: { - title: string; - icon: { - name: string; - bgColor: string; - color: string; - }; - onClick: () => void; -}) => { - return ( - - - - - {props.title} - - ); -}; - -const GlobalAdd = () => { - const basePageId = useSelector(getCurrentBasePageId); - const dispatch = useDispatch(); - const onCreateNewQuery = useCallback(() => { - history.push(queryAddURL({ basePageId })); - }, [basePageId]); - const onCreateJS = useCallback(() => { - dispatch(createNewJSCollection(basePageId, "ADD_PANE")); - }, [basePageId]); - - return ( - - history.goBack()} - size="sm" - startIcon={"close-line"} - /> - } - title="Add" - /> - - Create new.. - - - - - - - - Drag & drop widgets - - - - - ); -}; - -export default GlobalAdd; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/components/MinimalTab.tsx b/app/client/src/pages/Editor/IDE/EditorPane/components/MinimalTab.tsx deleted file mode 100644 index 897508925f2..00000000000 --- a/app/client/src/pages/Editor/IDE/EditorPane/components/MinimalTab.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react"; -import type { FlexProps } from "@appsmith/ads"; -import { Flex } from "@appsmith/ads"; - -const MinimalTab = ({ children, ...rest }: FlexProps) => { - return ( - - {children} - - ); -}; - -export { MinimalTab }; diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/ListButton.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/ListButton.tsx deleted file mode 100644 index 06db8ea027d..00000000000 --- a/app/client/src/pages/Editor/IDE/EditorTabs/ListButton.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import React, { useState } from "react"; -import type { EntityItem } from "ee/entities/IDE/constants"; -import { - Button, - Flex, - Menu, - MenuContent, - MenuItem, - MenuTrigger, - Text, -} from "@appsmith/ads"; -import { ListIconContainer, ListTitle } from "./StyledComponents"; - -interface Props { - items: EntityItem[]; - navigateToTab: (item: EntityItem) => void; -} - -const ListButton = (props: Props) => { - const { items, navigateToTab } = props; - const [isOpen, setOpen] = useState(false); - - if (items.length === 0) { - return null; - } - - return ( - - - - - - {items.map((item) => ( - navigateToTab(item)}> - - {item.icon} - {item.title} - - - ))} - - - ); -}; - -export default ListButton; diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/StyledComponents.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/StyledComponents.tsx deleted file mode 100644 index d396860bfde..00000000000 --- a/app/client/src/pages/Editor/IDE/EditorTabs/StyledComponents.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import styled from "styled-components"; - -export const ListIconContainer = styled.div` - height: 18px; - width: 18px; - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - img { - width: 18px; - } -`; - -export const ListTitle = styled.span` - width: 100%; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -`; diff --git a/app/client/src/pages/Editor/IntegrationEditor/ActiveDataSources.tsx b/app/client/src/pages/Editor/IntegrationEditor/ActiveDataSources.tsx deleted file mode 100644 index 298161f7418..00000000000 --- a/app/client/src/pages/Editor/IntegrationEditor/ActiveDataSources.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import React, { useMemo } from "react"; -import styled from "styled-components"; -import { useSelector } from "react-redux"; -import type { AppState } from "ee/reducers"; -import type { Datasource } from "entities/Datasource"; -import DatasourceCard from "./DatasourceCard"; -import { Text, TextType } from "@appsmith/ads-old"; -import { Button } from "@appsmith/ads"; -import { thinScrollbar } from "constants/DefaultTheme"; -import { keyBy } from "lodash"; -import { - createMessage, - EMPTY_ACTIVE_DATA_SOURCES, -} from "ee/constants/messages"; -import { getCurrentAppWorkspace } from "ee/selectors/selectedWorkspaceSelectors"; -import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; -import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; -import { getHasCreateDatasourcePermission } from "ee/utils/BusinessFeatures/permissionPageHelpers"; - -const QueryHomePage = styled.div` - ${thinScrollbar}; - overflow: auto; - display: flex; - flex-direction: column; - flex: 1; - - .sectionHeader { - font-weight: ${(props) => props.theme.fontWeights[2]}; - font-size: ${(props) => props.theme.fontSizes[4]}px; - margin-top: 10px; - } -`; - -const EmptyActiveDatasource = styled.div` - display: flex; - flex-direction: column; - flex: 1; - align-items: center; - justify-content: center; - gap: 1rem; -`; - -interface ActiveDataSourcesProps { - dataSources: Datasource[]; - basePageId: string; - location: { - search: string; - }; - history: { - replace: (data: string) => void; - push: (data: string) => void; - }; - onCreateNew: () => void; -} - -function ActiveDataSources(props: ActiveDataSourcesProps) { - const { dataSources } = props; - const plugins = useSelector((state: AppState) => { - return state.entities.plugins.list; - }); - const pluginGroups = useMemo(() => keyBy(plugins, "id"), [plugins]); - - const userWorkspacePermissions = useSelector( - (state: AppState) => getCurrentAppWorkspace(state).userPermissions ?? [], - ); - - const isFeatureEnabled = useFeatureFlag(FEATURE_FLAG.license_gac_enabled); - - const canCreateDatasource = getHasCreateDatasourcePermission( - isFeatureEnabled, - userWorkspacePermissions, - ); - - if (dataSources.length === 0) { - return ( - - - {createMessage(EMPTY_ACTIVE_DATA_SOURCES)} - - - - ); - } - - return ( - - {dataSources.map((datasource, idx) => { - return ( - - ); - })} - - ); -} - -export default ActiveDataSources; diff --git a/app/client/src/pages/Editor/IntegrationEditor/UnsupportedPluginDialog.tsx b/app/client/src/pages/Editor/IntegrationEditor/UnsupportedPluginDialog.tsx deleted file mode 100644 index ef7b267e229..00000000000 --- a/app/client/src/pages/Editor/IntegrationEditor/UnsupportedPluginDialog.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import React from "react"; -import { Text, TextType } from "@appsmith/ads-old"; -import { - Button, - Modal, - ModalBody, - ModalContent, - ModalHeader, - ModalFooter, -} from "@appsmith/ads"; -import { UNSUPPORTED_PLUGIN_DIALOG_MAIN_HEADING } from "ee/constants/messages"; -import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import { - UNSUPPORTED_PLUGIN_DIALOG_TITLE, - UNSUPPORTED_PLUGIN_DIALOG_SUBTITLE, -} from "ee/constants/messages"; - -interface Props { - isModalOpen: boolean; - onClose: () => void; - onContinue: () => void; -} - -// Unsupported Plugin for gen CRUD page -function UnsupportedPluginDialog(props: Props) { - const { isModalOpen, onContinue } = props; - const handleClose = () => { - props.onClose(); - }; - - return ( - - - {UNSUPPORTED_PLUGIN_DIALOG_MAIN_HEADING()} - - {UNSUPPORTED_PLUGIN_DIALOG_TITLE()} -
- {UNSUPPORTED_PLUGIN_DIALOG_SUBTITLE()} -
- - - - -
-
- ); -} - -export default UnsupportedPluginDialog; diff --git a/app/client/src/pages/Editor/PropertyPaneHelpButton.tsx b/app/client/src/pages/Editor/PropertyPaneHelpButton.tsx deleted file mode 100644 index ded7f93f3e9..00000000000 --- a/app/client/src/pages/Editor/PropertyPaneHelpButton.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React, { useCallback } from "react"; -import { useSelector, useDispatch } from "react-redux"; - -import { - setGlobalSearchQuery, - toggleShowGlobalSearchModal, -} from "actions/globalSearchActions"; -import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import WidgetFactory from "WidgetProvider/factory"; -import { getSelectedWidget } from "sagas/selectors"; -import { Icon } from "@appsmith/ads"; - -function PropertyPaneHelpButton() { - const selectedWidget = useSelector(getSelectedWidget); - const selectedWidgetType = selectedWidget?.type || ""; - const dispatch = useDispatch(); - const displayName = - WidgetFactory.widgetConfigMap.get(selectedWidgetType)?.displayName || ""; - - /** - * on click open the omnibar and toggle global search - */ - const onClick = useCallback(() => { - dispatch(setGlobalSearchQuery(displayName)); - dispatch(toggleShowGlobalSearchModal()); - AnalyticsUtil.logEvent("OPEN_OMNIBAR", { - source: "PROPERTY_PANE_HELP_BUTTON", - }); - }, [selectedWidgetType]); - - return ( - - ); -} - -export default PropertyPaneHelpButton; diff --git a/app/client/src/pages/Editor/QueryEditor/JSONViewer.tsx b/app/client/src/pages/Editor/QueryEditor/JSONViewer.tsx deleted file mode 100644 index 91a5287869c..00000000000 --- a/app/client/src/pages/Editor/QueryEditor/JSONViewer.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import React from "react"; -import ReactJson from "react-json-view"; -import styled from "styled-components"; -import { Card } from "@blueprintjs/core"; - -const OutputContainer = styled.div` - background: #f5f6f7; - border: 1px solid #d0d7dd; - box-sizing: border-box; - padding: 6px; -`; - -const ResponseContent = styled.div` - overflow: auto; -`; - -const Record = styled(Card)` - margin: 5px; - border-radius: 0; - span.string-value { - overflow-wrap: anywhere; - } -`; - -interface JSONOutputProps { - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - src: Record[]; -} - -type Props = JSONOutputProps; - -class JSONOutput extends React.Component { - render() { - const { src } = this.props; - const reactJsonProps = { - name: null, - enableClipboard: false, - displayObjectSize: false, - displayDataTypes: false, - style: { - fontSize: "14px", - }, - collapsed: 2, - collapseStringsAfterLength: 20, - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - shouldCollapse: (field: any) => { - const index = field.name * 1; - - return index >= 2; - }, - }; - - if (typeof src !== "object") { - return {src}; - } - - if (!src.length) { - return ( - - - - - - - - ); - } - - return ( - - - {src.map((record, index) => { - return ( - - - - ); - })} - - - ); - } -} - -export default JSONOutput; diff --git a/app/client/src/pages/Editor/RealtimeAppEditors.tsx b/app/client/src/pages/Editor/RealtimeAppEditors.tsx deleted file mode 100644 index 6e4866f8250..00000000000 --- a/app/client/src/pages/Editor/RealtimeAppEditors.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import React, { useEffect } from "react"; -import { useDispatch, useSelector } from "react-redux"; -import { getRealtimeAppEditors } from "selectors/appCollabSelectors"; -import { getTypographyByKey } from "@appsmith/ads-old"; -import ProfileImage from "pages/common/ProfileImage"; -import UserApi from "ee/api/UserApi"; -import styled from "styled-components"; -import { - collabStartEditingAppEvent, - collabStopEditingAppEvent, - collabResetAppEditors, -} from "actions/appCollabActions"; -import { getCurrentPageId } from "selectors/editorSelectors"; -import { getIsAppLevelSocketConnected } from "selectors/websocketSelectors"; -import { Tooltip } from "@appsmith/ads"; - -const UserImageContainer = styled.div` - display: flex; - margin-right: ${(props) => props.theme.spaces[3]}px; - - div { - cursor: default; - margin-left: ${(props) => props.theme.spaces[1]}px; - width: 24px; - height: 24px; - margin-left: 0px; - } - - .profile-image { - margin-right: -6px; - border: 1px solid var(--ads-v2-color-white); - span { - color: var(--ads-v2-color-fg); - font-weight: normal; - ${getTypographyByKey("btnSmall")}; - } - } - - .more { - z-index: 1; - } -`; - -interface RealtimeAppEditorsProps { - applicationId?: string; -} - -export function useEditAppCollabEvents(applicationId?: string) { - const dispatch = useDispatch(); - - const isWebsocketConnected = useSelector(getIsAppLevelSocketConnected); - - const currentPageId = useSelector(getCurrentPageId); - - useEffect(() => { - // websocket has to be connected as we only fire this event once. - isWebsocketConnected && - applicationId && - dispatch(collabStartEditingAppEvent(applicationId)); - - return () => { - dispatch(collabResetAppEditors()); - isWebsocketConnected && - applicationId && - dispatch(collabStopEditingAppEvent(applicationId)); - }; - }, [applicationId, currentPageId, isWebsocketConnected]); -} - -function RealtimeAppEditors(props: RealtimeAppEditorsProps) { - const { applicationId } = props; - const realtimeAppEditors = useSelector(getRealtimeAppEditors); - - useEditAppCollabEvents(applicationId); - - return realtimeAppEditors.length > 0 ? ( - - {realtimeAppEditors.slice(0, 3).map((el) => ( - - - {el.name || el.email} - - Editing - - } - key={el.email} - > - - - ))} - {realtimeAppEditors.length > 3 ? ( - - ) : null} - - ) : null; -} - -export default RealtimeAppEditors; diff --git a/app/client/src/pages/Editor/SaaSEditor/DatasourceCard.tsx b/app/client/src/pages/Editor/SaaSEditor/DatasourceCard.tsx deleted file mode 100644 index d309a9f135d..00000000000 --- a/app/client/src/pages/Editor/SaaSEditor/DatasourceCard.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import type { Datasource } from "entities/Datasource"; -import { isStoredDatasource } from "entities/Action"; -import React from "react"; -import { isEmpty } from "lodash"; -import { useSelector } from "react-redux"; -import { Colors } from "constants/Colors"; -import { useParams } from "react-router"; - -import { - getCurrentActions, - getPluginImages, -} from "ee/selectors/entitiesSelector"; -import styled from "styled-components"; -import type { AppState } from "ee/reducers"; -import history from "utils/history"; - -import RenderDatasourceInformation from "pages/Editor/DataSourceEditor/DatasourceSection"; -import { BaseButton } from "components/designSystems/appsmith/BaseButton"; -import { saasEditorDatasourceIdURL } from "ee/RouteBuilder"; -import { getAssetUrl } from "ee/utils/airgapHelpers"; -import { Button } from "@appsmith/ads"; - -const Wrapper = styled.div` - border: 2px solid #d6d6d6; - padding: 18px; - margin-top: 18px; -`; - -const ActionButton = styled(BaseButton)` - &&&& { - height: 36px; - max-width: 120px; - width: auto; - } - - span > svg > path { - stroke: white; - } -`; - -const DatasourceImage = styled.img` - height: 24px; - width: auto; -`; - -const EditDatasourceButton = styled(Button)` - &&&& { - height: 36px; - max-width: 160px; - border: 1px solid var(--ads-v2-color-border); - width: auto; - } -`; - -const DatasourceName = styled.span` - margin-left: 10px; - font-size: 16px; - font-weight: 500; -`; - -const DatasourceCardHeader = styled.div` - justify-content: space-between; - display: flex; -`; - -const DatasourceNameWrapper = styled.div` - flex-direction: row; - align-items: center; - display: flex; -`; - -const Queries = styled.div` - color: ${Colors.DOVE_GRAY}; - font-size: 14px; - display: inline-block; - margin-top: 11px; -`; - -const ButtonsWrapper = styled.div` - display: flex; - gap: 10px; -`; - -interface DatasourceCardProps { - datasource: Datasource; - onCreate: (datasource: Datasource) => void; -} - -// TODO: This is largely a quick copy pasta and edit of QueryEditor/DatasourceCard.tsx -// When we move Google Sheets over to regular oauth2 integrations, we will need to refactor this. -function DatasourceCard(props: DatasourceCardProps) { - const pluginImages = useSelector(getPluginImages); - const params = useParams<{ - pageId: string; - pluginPackageName: string; - }>(); - const { datasource } = props; - const datasourceFormConfigs = useSelector( - (state: AppState) => state.entities.plugins.formConfigs, - ); - const queryActions = useSelector(getCurrentActions); - const queriesWithThisDatasource = queryActions.filter( - (action) => - isStoredDatasource(action.config.datasource) && - action.config.datasource.id === datasource.id, - ).length; - - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const currentFormConfig: Array = - datasourceFormConfigs[datasource?.pluginId ?? ""]; - const QUERY = queriesWithThisDatasource > 1 ? "APIs" : "API"; - - const editDatasource = () => { - history.push( - saasEditorDatasourceIdURL({ - ...params, - datasourceId: datasource.id, - }), - ); - }; - - return ( - - -
- - - {datasource.name} - - - {queriesWithThisDatasource - ? `${queriesWithThisDatasource} ${QUERY} on this page` - : "No API is using this datasource"} - -
- - - Edit Datasource - - props.onCreate(datasource)} - text="New API" - /> - -
- {!isEmpty(currentFormConfig) ? ( - - ) : undefined} -
- ); -} - -export default DatasourceCard; diff --git a/app/client/src/pages/Editor/SaaSEditor/ListView.tsx b/app/client/src/pages/Editor/SaaSEditor/ListView.tsx deleted file mode 100644 index f674534551c..00000000000 --- a/app/client/src/pages/Editor/SaaSEditor/ListView.tsx +++ /dev/null @@ -1,236 +0,0 @@ -import React from "react"; -import { connect } from "react-redux"; -import type { RouteComponentProps } from "react-router"; -import type { Plugin } from "api/PluginApi"; -import { - getDatasourcesByPluginId, - getPluginByPackageName, -} from "ee/selectors/entitiesSelector"; -import NotFound from "pages/common/NotFound"; -import type { AppState } from "ee/reducers"; -import { createDatasourceFromForm } from "actions/datasourceActions"; -import type { SaaSAction } from "entities/Action"; -import { createActionRequest } from "actions/pluginActionActions"; -import type { Datasource } from "entities/Datasource"; -import type { ActionDataState } from "ee/reducers/entityReducers/actionsReducer"; - -// Design -import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper"; -import styled from "styled-components"; -import { Spinner, Button } from "@blueprintjs/core"; -import DatasourceCard from "pages/Editor/SaaSEditor/DatasourceCard"; -import { - getCurrentApplicationId, - getIsEditorInitialized, - selectURLSlugs, -} from "selectors/editorSelectors"; -import { INTEGRATION_TABS } from "constants/routes"; -import { integrationEditorURL } from "ee/RouteBuilder"; - -const IntegrationHomePage = styled.div` - padding: 20px; - padding-top: 30px; - overflow: auto; - display: flex; - flex-direction: column; - flex: 1; - - .sectionHeader { - font-weight: ${(props) => props.theme.fontWeights[2]}; - font-size: ${(props) => props.theme.fontSizes[4]}px; - } -`; - -const LoadingContainer = styled(CenteredWrapper)` - height: 50%; -`; - -const AddDatasource = styled(Button)` - padding: 23px; - border: 2px solid #d6d6d6; - justify-content: flex-start; - font-size: 16px; - font-weight: 500; -`; - -const Boundary = styled.hr` - border: 1px solid #d0d7dd; - margin-top: 16px; -`; - -interface StateProps { - plugin?: Plugin; - actions: ActionDataState; - datasources: Datasource[]; - isCreating: boolean; - isEditorInitialized: boolean; - applicationId: string; - applicationSlug: string; - pageSlug: string; -} - -interface DispatchFunctions { - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - createDatasource: (data: any) => void; - createAction: (data: Partial) => void; -} - -type RouteProps = RouteComponentProps<{ - basePageId: string; - pluginPackageName: string; -}>; - -type Props = StateProps & DispatchFunctions & RouteProps; -class ListView extends React.Component { - handleCreateNewDatasource = (pluginId: string) => { - this.props.createDatasource({ pluginId }); - }; - - handleCreateNewAPI = (datasource: Datasource) => { - const { - location, - match: { - params: { basePageId }, - }, - } = this.props; - const params: string = location.search; - let pgId = new URLSearchParams(params).get("importTo"); - - if (!pgId) { - pgId = basePageId; - } - - if (pgId) { - this.props.createAction({ - pageId: pgId, - pluginId: datasource.pluginId, - datasource: { - id: datasource.id, - }, - }); - } - }; - - render() { - const { isCreating, isEditorInitialized, plugin } = this.props; - - if (!plugin) { - return this.renderNotFound(); - } - - if (isCreating || !isEditorInitialized) { - return this.renderLoading(); - } - - return this.renderPage(); - } - - renderPage() { - const { datasources, plugin } = this.props; - - if (!plugin) { - return this.renderNotFound(); - } - - return ( - -

Select a datasource or create a new one

- - - this.handleCreateNewDatasource(plugin.id)} - text="New datasource" - /> - - {datasources.map((datasource) => { - return ( - - ); - })} -
- ); - } - - renderLoading() { - return ( - - - - ); - } - - renderNotFound() { - const { - history, - match: { - params: { basePageId }, - }, - } = this.props; - - return ( - - - history.push( - integrationEditorURL({ - basePageId, - selectedTab: INTEGRATION_TABS.ACTIVE, - }), - ) - } - title="Datasources/Queries Not found" - /> - - ); - } -} - -const mapStateToProps = (state: AppState, props: RouteProps): StateProps => { - const plugin = getPluginByPackageName( - state, - props.match.params.pluginPackageName, - ); - let datasources: Datasource[] = []; - - if (plugin) { - datasources = getDatasourcesByPluginId(state, plugin.id); - } - - const { applicationSlug, pageSlug } = selectURLSlugs(state); - - return { - plugin, - actions: state.entities.actions, - isCreating: state.ui.apiPane.isCreating, - isEditorInitialized: getIsEditorInitialized(state), - datasources: datasources, - applicationId: getCurrentApplicationId(state), - applicationSlug, - pageSlug, - }; -}; - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const mapDispatchToProps = (dispatch: any): DispatchFunctions => { - return { - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - createDatasource: (data: any) => dispatch(createDatasourceFromForm(data)), - createAction: (data: Partial) => { - dispatch(createActionRequest(data)); - }, - }; -}; - -export default connect(mapStateToProps, mapDispatchToProps)(ListView); diff --git a/app/client/src/pages/Editor/SaaSEditor/routes.ts b/app/client/src/pages/Editor/SaaSEditor/routes.ts deleted file mode 100644 index 4aa2c6316e3..00000000000 --- a/app/client/src/pages/Editor/SaaSEditor/routes.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { - SAAS_EDITOR_PATH, - SAAS_EDITOR_DATASOURCE_ID_PATH, - SAAS_EDITOR_API_ID_PATH, -} from "pages/Editor/SaaSEditor/constants"; -import ListView from "pages/Editor/SaaSEditor/ListView"; -import DatasourceForm from "pages/Editor/SaaSEditor/DatasourceForm"; -import QueryEditor from "../QueryEditor"; - -export const SaaSEditorRoutes = [ - { - path: SAAS_EDITOR_PATH, - component: ListView, - }, - { - path: SAAS_EDITOR_DATASOURCE_ID_PATH, - component: DatasourceForm, - }, - { - path: SAAS_EDITOR_API_ID_PATH, - component: QueryEditor, - }, -]; diff --git a/app/client/src/pages/Editor/ShareApplicationForm.tsx b/app/client/src/pages/Editor/ShareApplicationForm.tsx deleted file mode 100644 index 4a157746f84..00000000000 --- a/app/client/src/pages/Editor/ShareApplicationForm.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import { withRouter } from "react-router"; -import { connect } from "react-redux"; -import type { AppState } from "ee/reducers"; -import { Switch } from "@appsmith/ads-old"; -import Spinner from "components/editorComponents/Spinner"; -import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; -import { getCurrentApplicationId } from "selectors/editorSelectors"; - -const ShareWithPublicOption = styled.div` - { - display: flex; - padding-top: 20px; - justify-content: space-between; - } -`; - -const ShareToggle = styled.div` - { - &&& label { - margin-bottom: 0px; - } - &&& div { - margin-right: 5px; - } - display: flex; - } -`; - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function ShareApplicationForm(props: any) { - const { - applicationId, - changeAppViewAccess, - currentApplicationDetails, - isChangingViewAccess, - isFetchingApplication, - } = props; - - return ( - - Share the application with anyone - - {(isChangingViewAccess || isFetchingApplication) && ( - - )} - {currentApplicationDetails && ( - { - changeAppViewAccess( - applicationId, - !currentApplicationDetails.isPublic, - ); - }} - /> - )} - - - ); -} - -const mapStateToProps = (state: AppState) => ({ - currentApplicationDetails: state.ui.applications.currentApplication, - isFetchingApplication: state.ui.applications.isFetchingApplication, - isChangingViewAccess: state.ui.applications.isChangingViewAccess, - applicationId: getCurrentApplicationId(state), -}); - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const mapDispatchToProps = (dispatch: any) => ({ - changeAppViewAccess: (applicationId: string, publicAccess: boolean) => - dispatch({ - type: ReduxActionTypes.CHANGE_APPVIEW_ACCESS_INIT, - payload: { - applicationId, - publicAccess, - }, - }), -}); - -export default withRouter( - connect(mapStateToProps, mapDispatchToProps)(ShareApplicationForm), -); diff --git a/app/client/src/pages/Editor/ThemePropertyPane/ThemeBetaCard.tsx b/app/client/src/pages/Editor/ThemePropertyPane/ThemeBetaCard.tsx deleted file mode 100644 index e318055ddb0..00000000000 --- a/app/client/src/pages/Editor/ThemePropertyPane/ThemeBetaCard.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react"; -import { useDispatch } from "react-redux"; - -import { closeAppThemingBetaCard } from "actions/appThemingActions"; -import { - createMessage, - APP_THEME_BETA_CARD_HEADING, - APP_THEME_BETA_CARD_CONTENT, -} from "ee/constants/messages"; -import { Button } from "@appsmith/ads"; - -export function ThemeBetaCard() { - const dispatch = useDispatch(); - - const closeThemeBetaCard = () => { - dispatch(closeAppThemingBetaCard()); - }; - - return ( -
- {createMessage(APP_THEME_BETA_CARD_HEADING)} -
{createMessage(APP_THEME_BETA_CARD_CONTENT)}
-
- - -
-
- ); -} diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/Toolbar.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/Toolbar.tsx deleted file mode 100644 index 663a52ede38..00000000000 --- a/app/client/src/pages/Editor/WidgetsEditor/components/Toolbar.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; - -function Toolbar() { - return ( -
- ); -} - -export default Toolbar; diff --git a/app/client/src/pages/Editor/commons/EditorWrapperBody.tsx b/app/client/src/pages/Editor/commons/EditorWrapperBody.tsx deleted file mode 100644 index cc3b1c982b3..00000000000 --- a/app/client/src/pages/Editor/commons/EditorWrapperBody.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react"; - -interface EditorWrapperBodyProps { - children: React.ReactNode; - id: string; -} - -function EditorWrapperBody({ children, id }: EditorWrapperBodyProps) { - return ( -
- {children} -
- ); -} - -export default EditorWrapperBody; diff --git a/app/client/src/pages/Editor/commons/LockEntityExplorer.tsx b/app/client/src/pages/Editor/commons/LockEntityExplorer.tsx deleted file mode 100644 index 214c3a1b48e..00000000000 --- a/app/client/src/pages/Editor/commons/LockEntityExplorer.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import React, { useCallback } from "react"; -import { Button, Icon, Tooltip } from "@appsmith/ads"; -import { - CLOSE_ENTITY_EXPLORER_MESSAGE, - LOCK_ENTITY_EXPLORER_MESSAGE, - createMessage, -} from "ee/constants/messages"; -import { modText } from "utils/helpers"; -import classNames from "classnames"; -import { - setExplorerActiveAction, - setExplorerPinnedAction, -} from "actions/explorerActions"; -import { getExplorerPinned } from "selectors/explorerSelector"; -import { useDispatch, useSelector } from "react-redux"; -import styled from "styled-components"; - -export const SidebarNavButton = styled(Button)` - .ads-v2-button__content { - padding: 0; - } - .group { - height: 36px; - width: 36px; - display: flex; - align-items: center; - justify-content: center; - } -`; - -export const LockEntityExplorer = ({ - isPreviewingApp = false, -}: { - isPreviewingApp?: boolean; -}) => { - const pinned = useSelector(getExplorerPinned); - const dispatch = useDispatch(); - - /** - * on hovering the menu, make the explorer active - */ - const onMenuHover = useCallback(() => { - dispatch(setExplorerActiveAction(true)); - }, [setExplorerActiveAction]); - - /** - * toggles the pinned state of sidebar - */ - const onPin = useCallback(() => { - dispatch(setExplorerPinnedAction(!pinned)); - }, [pinned, dispatch, setExplorerPinnedAction]); - - return ( - - - {!pinned - ? createMessage(LOCK_ENTITY_EXPLORER_MESSAGE) - : createMessage(CLOSE_ENTITY_EXPLORER_MESSAGE)} - - {modText()} / -
- } - placement="bottomLeft" - > - -
- - {pinned && ( - - )} - {!pinned && ( - - )} -
-
- - ); -}; diff --git a/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV1.tsx b/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV1.tsx deleted file mode 100644 index 07295382313..00000000000 --- a/app/client/src/pages/Editor/gitSync/GitSyncModal/GitSyncModalV1.tsx +++ /dev/null @@ -1,184 +0,0 @@ -import React, { useCallback, useEffect } from "react"; -import { - getActiveGitSyncModalTab, - getIsDeploying, - getIsGitConnected, - getIsGitSyncModalOpen, -} from "selectors/gitSyncSelectors"; -import { useDispatch, useSelector } from "react-redux"; -import { setIsGitSyncModalOpen } from "actions/gitSyncActions"; -import { setWorkspaceIdForImport } from "ee/actions/applicationActions"; -import Menu from "../Menu"; -import Deploy from "../Tabs/Deploy"; -import Merge from "../Tabs/Merge"; -import GitConnection from "../Tabs/GitConnection"; - -import GitErrorPopup from "../components/GitErrorPopup"; -import styled from "styled-components"; -import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import { Modal, ModalContent, ModalHeader } from "@appsmith/ads"; -import { - createMessage, - GIT_CONNECTION, - DEPLOY, - MERGE, - CONNECT_TO_GIT, - DEPLOY_YOUR_APPLICATION, - MERGE_CHANGES, - GIT_IMPORT, - IMPORT_FROM_GIT_REPOSITORY, -} from "ee/constants/messages"; -import { GitSyncModalTab } from "entities/GitSync"; -import { getCurrentApplicationId } from "selectors/editorSelectors"; - -const ModalContentContainer = styled(ModalContent)` - min-height: 650px; -`; - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const ComponentsByTab: { [K in GitSyncModalTab]?: any } = { - [GitSyncModalTab.GIT_CONNECTION]: GitConnection, - [GitSyncModalTab.DEPLOY]: Deploy, - [GitSyncModalTab.MERGE]: Merge, -}; - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const MENU_ITEMS_MAP: { [K in GitSyncModalTab]?: any } = { - [GitSyncModalTab.GIT_CONNECTION]: { - key: GitSyncModalTab.GIT_CONNECTION, - title: createMessage(GIT_CONNECTION), - modalTitle: createMessage(CONNECT_TO_GIT), - }, - [GitSyncModalTab.DEPLOY]: { - key: GitSyncModalTab.DEPLOY, - title: createMessage(DEPLOY), - modalTitle: createMessage(DEPLOY_YOUR_APPLICATION), - }, - [GitSyncModalTab.MERGE]: { - key: GitSyncModalTab.MERGE, - title: createMessage(MERGE), - modalTitle: createMessage(MERGE_CHANGES), - }, -}; - -const allMenuOptions = Object.values(MENU_ITEMS_MAP); - -function GitSyncModalV1(props: { isImport?: boolean }) { - const dispatch = useDispatch(); - const isModalOpen = useSelector(getIsGitSyncModalOpen); - const isDeploying = useSelector(getIsDeploying); - const isGitConnected = useSelector(getIsGitConnected); - - const activeTabKey = useSelector(getActiveGitSyncModalTab); - const appId = useSelector(getCurrentApplicationId); - - const handleClose = useCallback(() => { - dispatch(setIsGitSyncModalOpen({ isOpen: false })); - dispatch( - setWorkspaceIdForImport({ editorId: appId || "", workspaceId: "" }), - ); - }, [dispatch, setIsGitSyncModalOpen]); - - const setActiveTabKey = useCallback( - (tabKey: GitSyncModalTab) => { - if (tabKey === GitSyncModalTab.DEPLOY) { - AnalyticsUtil.logEvent("GS_DEPLOY_GIT_MODAL_TRIGGERED", { - source: `${activeTabKey}_TAB`, - }); - } else if (tabKey === GitSyncModalTab.MERGE) { - AnalyticsUtil.logEvent("GS_MERGE_GIT_MODAL_TRIGGERED", { - source: `${activeTabKey}_TAB`, - }); - } - - dispatch( - setIsGitSyncModalOpen({ - isOpen: isModalOpen, - tab: tabKey, - isDeploying, - }), - ); - }, - [dispatch, setIsGitSyncModalOpen, isModalOpen], - ); - - useEffect(() => { - if (!isGitConnected && activeTabKey !== GitSyncModalTab.GIT_CONNECTION) { - setActiveTabKey(GitSyncModalTab.DEPLOY); - } - }, [activeTabKey]); - - useEffect(() => { - // when git connected - if (isGitConnected && activeTabKey === GitSyncModalTab.GIT_CONNECTION) { - setActiveTabKey(GitSyncModalTab.DEPLOY); - } - }, [isGitConnected]); - - let menuOptions = allMenuOptions; - - if (props.isImport) { - menuOptions = [ - { - key: GitSyncModalTab.GIT_CONNECTION, - modalTitle: createMessage(IMPORT_FROM_GIT_REPOSITORY), - title: createMessage(GIT_IMPORT), - }, - ]; - } else { - menuOptions = isGitConnected - ? allMenuOptions - : [MENU_ITEMS_MAP.GIT_CONNECTION]; - } - - useEffect(() => { - // onMount or onChange of activeTabKey - if ( - activeTabKey !== GitSyncModalTab.GIT_CONNECTION && - menuOptions.findIndex((option) => option.key === activeTabKey) === -1 - ) { - setActiveTabKey(GitSyncModalTab.GIT_CONNECTION); - } - }, [activeTabKey]); - - const BodyComponent = - ComponentsByTab[activeTabKey || GitSyncModalTab.GIT_CONNECTION]; - - return ( - <> - { - if (!open) { - handleClose(); - } - }} - open={isModalOpen} - > - - - {MENU_ITEMS_MAP[activeTabKey]?.modalTitle ?? ""} - - - setActiveTabKey(tabKey as GitSyncModalTab) - } - options={menuOptions} - /> - {activeTabKey === GitSyncModalTab.GIT_CONNECTION && ( - - )} - {activeTabKey !== GitSyncModalTab.GIT_CONNECTION && } - - - - - ); -} - -export default GitSyncModalV1; diff --git a/app/client/src/pages/Editor/gitSync/Tabs/GitConnection.tsx b/app/client/src/pages/Editor/gitSync/Tabs/GitConnection.tsx deleted file mode 100644 index bfad163e844..00000000000 --- a/app/client/src/pages/Editor/gitSync/Tabs/GitConnection.tsx +++ /dev/null @@ -1,525 +0,0 @@ -import React, { - useCallback, - useEffect, - useMemo, - useRef, - useState, -} from "react"; -import { Container, Space } from "../components/StyledComponents"; -import { - CONNECT_BTN_LABEL, - CONNECT_TO_GIT_SUBTITLE, - CONNECTING_REPO, - createMessage, - GENERATE_KEY, - IMPORT_BTN_LABEL, - IMPORT_URL_INFO, - IMPORTING_APP_FROM_GIT, - LEARN_MORE, - PASTE_SSH_URL_INFO, - REMOTE_URL, - REMOTE_URL_INFO, - REMOTE_URL_INPUT_PLACEHOLDER, - UPDATE_CONFIG, -} from "ee/constants/messages"; -import styled from "styled-components"; -import { emailValidator } from "@appsmith/ads-old"; -import UserGitProfileSettings from "../components/UserGitProfileSettings"; -import { AUTH_TYPE_OPTIONS, Classes } from "../constants"; -import { useDispatch, useSelector } from "react-redux"; -import copy from "copy-to-clipboard"; -import { - getCurrentAppGitMetaData, - getCurrentApplication, -} from "ee/selectors/applicationSelectors"; -import { - fetchGlobalGitConfigInit, - fetchLocalGitConfigInit, - importAppFromGit, - remoteUrlInputValue, - resetSSHKeys, - setDisconnectingGitApplication, - setIsDisconnectGitModalOpen, - setIsGitSyncModalOpen, - updateLocalGitConfigInit, -} from "actions/gitSyncActions"; -import equal from "fast-deep-equal/es6"; -import { - getGitConnectError, - getGlobalGitConfig, - getIsFetchingGlobalGitConfig, - getIsFetchingLocalGitConfig, - getIsImportingApplicationViaGit, - getLocalGitConfig, - getTempRemoteUrl, - getUseGlobalProfile, -} from "selectors/gitSyncSelectors"; -import Statusbar, { - StatusbarWrapper, -} from "pages/Editor/gitSync/components/Statusbar"; -import Keys from "../components/ssh-key"; -import GitConnectError from "../components/GitConnectError"; -import { - Button, - Input, - Text, - Tooltip, - Link, - ModalBody, - ModalFooter, -} from "@appsmith/ads"; -import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import { GIT_DOC_URLs, isValidGitRemoteUrl } from "../utils"; -import { useGitConnect, useSSHKeyPair } from "../hooks"; - -const UrlContainer = styled.div<{ - isConnected: boolean; -}>` - display: flex; - align-items: flex-end; - gap: 3px; - width: ${({ isConnected }) => (isConnected ? "100%" : "calc(100% - 39px)")}; -`; - -const ButtonContainer = styled.div<{ topMargin: number }>` - margin-top: ${(props) => `${props.theme.spaces[props.topMargin]}px`}; -`; - -const RemoteUrlInfoWrapper = styled.div` - margin-bottom: 4px; - display: flex; - .learn-more-link { - padding-left: 2px; - > span { - font-size: 12px; - } - } -`; - -// v1 only support SSH -const selectedAuthType = AUTH_TYPE_OPTIONS[0]; - -interface AuthorInfo { - authorName: string; - authorEmail: string; -} - -interface Props { - isImport?: boolean; -} - -function GitConnection({ isImport }: Props) { - const placeholderText = createMessage(REMOTE_URL_INPUT_PLACEHOLDER); - - const dispatch = useDispatch(); - const useGlobalProfile = useSelector(getUseGlobalProfile); - const globalGitConfig = useSelector(getGlobalGitConfig); - const localGitConfig = useSelector(getLocalGitConfig); - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const { tempRemoteUrl = "" } = useSelector(getTempRemoteUrl) || ({} as any); - const currentApp = useSelector(getCurrentApplication); - const isFetchingGlobalGitConfig = useSelector(getIsFetchingGlobalGitConfig); - const isFetchingLocalGitConfig = useSelector(getIsFetchingLocalGitConfig); - const { remoteUrl: remoteUrlInStore = "" } = - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - useSelector(getCurrentAppGitMetaData) || ({} as any); - const RepoUrlDocumentUrl = isImport - ? GIT_DOC_URLs.import - : GIT_DOC_URLs.connect; - const isImportingApplicationViaGit = useSelector( - getIsImportingApplicationViaGit, - ); - const gitConnectError = useSelector(getGitConnectError); - - const { - deployKeyDocUrl, - fetchingSSHKeyPair, - fetchSSHKeyPair, - generateSSHKey, - generatingSSHKey, - SSHKeyPair, - } = useSSHKeyPair(); - - const { connectToGit, isConnectingToGit } = useGitConnect(); - - const [remoteUrl, setRemoteUrl] = useState(remoteUrlInStore || tempRemoteUrl); - const isGitConnected = !!remoteUrlInStore; - - const [authorInfo, setAuthorInfo] = useState({ - authorName: "", - authorEmail: "", - }); - const [useGlobalConfigInputVal, setUseGlobalConfigInputVal] = useState(false); - - const [triedSubmit, setTriedSubmit] = useState(false); - const [isInvalidRemoteUrl, setIsValidRemoteUrl] = useState(false); - const [showCopied, setShowCopied] = useState(false); - const timerRef = useRef(0); - - useEffect(() => { - // On unmount clear timer to avoid memory leak - return () => { - if (timerRef.current) { - clearTimeout(timerRef.current); - } - }; - }, []); - - useEffect(() => { - // when disconnected remoteURL becomes undefined - if (!remoteUrlInStore) { - setRemoteUrl(tempRemoteUrl || ""); - } - }, [remoteUrlInStore]); - - useEffect(() => { - const initialGlobalConfigInputVal = !isGitConnected - ? true - : useGlobalProfile; - - setUseGlobalConfigInputVal(!!initialGlobalConfigInputVal); - }, [useGlobalProfile, isGitConnected]); - - useEffect(() => { - setAuthorInfo(localGitConfig); - }, [localGitConfig, useGlobalConfigInputVal]); - - useEffect(() => { - // OnMount fetch global and local config - dispatch(fetchGlobalGitConfigInit()); - dispatch(fetchLocalGitConfigInit()); - }, []); - - useEffect(() => { - // On mount check SSHKeyPair is defined, if not fetchSSHKeyPair - if (!SSHKeyPair && !isImport) { - fetchSSHKeyPair(); - } - }, []); - - const stopShowingCopiedAfterDelay = () => { - timerRef.current = setTimeout(() => { - setShowCopied(false); - }, 2000); - }; - - const copyToClipboard = () => { - if (SSHKeyPair) { - copy(SSHKeyPair); - setShowCopied(true); - stopShowingCopiedAfterDelay(); - } - - AnalyticsUtil.logEvent("GS_COPY_SSH_KEY_BUTTON_CLICK"); - }; - - const isAuthorInfoUpdated = useCallback(() => { - return ( - !equal(localGitConfig?.authorEmail, authorInfo.authorEmail) || - !equal(localGitConfig?.authorName, authorInfo.authorName) - ); - }, [authorInfo.authorEmail, authorInfo.authorName, localGitConfig]); - - const remoteUrlChangeHandler = (value: string) => { - const isInvalid = !isValidGitRemoteUrl(value); - - setIsValidRemoteUrl(isInvalid); - setRemoteUrl(value); - dispatch(remoteUrlInputValue({ tempRemoteUrl: value })); - AnalyticsUtil.logEvent("GS_REPO_URL_EDIT", { - repoUrl: value, - }); - }; - - const isUseGlobalProfileFlagUpdated = - useGlobalConfigInputVal !== !!useGlobalProfile; - - const submitButtonDisabled = useMemo(() => { - const isAuthInfoUpdated = isAuthorInfoUpdated(); - let buttonDisabled; - - if (isGitConnected) { - const isFetchingConfig = - isFetchingGlobalGitConfig || isFetchingLocalGitConfig; - - buttonDisabled = - (!isAuthInfoUpdated && !isUseGlobalProfileFlagUpdated) || - isFetchingConfig; - } else { - buttonDisabled = isInvalidRemoteUrl; - } - - return buttonDisabled; - }, [ - isAuthorInfoUpdated, - isGitConnected, - isFetchingGlobalGitConfig, - isFetchingLocalGitConfig, - isInvalidRemoteUrl, - isUseGlobalProfileFlagUpdated, - ]); - - const submitButtonIsLoading = isConnectingToGit; - - const isAuthorInfoValid = useMemo(() => { - return ( - useGlobalConfigInputVal || - (authorInfo.authorName && - authorInfo.authorEmail && - emailValidator(authorInfo.authorEmail).isValid) - ); - }, [useGlobalConfigInputVal, authorInfo.authorName, authorInfo.authorEmail]); - - const onSubmit = useCallback(() => { - if (isConnectingToGit || submitButtonDisabled) return; - - setTriedSubmit(true); - AnalyticsUtil.logEvent("GS_CONNECT_BUTTON_ON_GIT_SYNC_MODAL_CLICK"); - - if (!isAuthorInfoValid) return; - - if (isGitConnected) { - const updatedGitConfig = useGlobalConfigInputVal - ? localGitConfig - : authorInfo; - - dispatch( - updateLocalGitConfigInit({ - ...updatedGitConfig, - useGlobalProfile: useGlobalConfigInputVal, - }), - ); - } else { - isImport - ? dispatch( - importAppFromGit({ - payload: { - remoteUrl, - gitProfile: { - ...authorInfo, - useDefaultProfile: useGlobalConfigInputVal, - }, - }, - }), - ) - : connectToGit({ - remoteUrl, - gitProfile: { - ...authorInfo, - useDefaultProfile: useGlobalConfigInputVal, - }, - }); - } - }, [ - updateLocalGitConfigInit, - isAuthorInfoUpdated, - connectToGit, - useGlobalConfigInputVal, - remoteUrl, - ]); - - const toggleHandler = useCallback(() => { - setUseGlobalConfigInputVal(!useGlobalConfigInputVal); - AnalyticsUtil.logEvent("GS_DEFAULT_CONFIGURATION_CHECKBOX_TOGGLED", { - value: !useGlobalConfigInputVal, - }); - }, [setUseGlobalConfigInputVal, useGlobalConfigInputVal]); - - const scrollWrapperRef = React.createRef(); - - useEffect(() => { - if (gitConnectError && scrollWrapperRef.current) { - setTimeout(() => { - const top = scrollWrapperRef.current?.scrollHeight || 0; - - scrollWrapperRef.current?.scrollTo({ - top: top, - }); - }, 100); - } - }, [scrollWrapperRef, gitConnectError]); - - const openDisconnectGitModal = useCallback(() => { - AnalyticsUtil.logEvent("GS_DISCONNECT_GIT_CLICK", { - source: "GIT_CONNECTION_MODAL", - }); - dispatch(setIsGitSyncModalOpen({ isOpen: false })); - dispatch( - setDisconnectingGitApplication({ - id: currentApp?.id || "", - name: currentApp?.name || "", - }), - ); - dispatch(setIsDisconnectGitModalOpen(true)); - }, []); - - // reset on unmount - useEffect(() => { - return () => { - dispatch(remoteUrlInputValue({ tempRemoteUrl: "" })); - dispatch(resetSSHKeys()); - }; - }, []); - - return ( - <> - {/* @ts-expect-error Figure out how to pass string to constant className */} - - - - {createMessage(CONNECT_TO_GIT_SUBTITLE)} - - - - - - {createMessage( - isImport ? IMPORT_URL_INFO : REMOTE_URL_INFO, - )} - - { - AnalyticsUtil.logEvent( - "GS_GIT_DOCUMENTATION_LINK_CLICK", - { - source: "REMOTE_URL_ON_GIT_CONNECTION_MODAL", - }, - ); - }} - target={"_blank"} - to={RepoUrlDocumentUrl} - > - {createMessage(LEARN_MORE)} - - - ) : null - } - errorMessage={ - isInvalidRemoteUrl ? createMessage(PASTE_SSH_URL_INFO) : "" - } - isDisabled={remoteUrl === remoteUrlInStore && !!remoteUrl} - label={createMessage(REMOTE_URL)} - onChange={remoteUrlChangeHandler} - placeholder={placeholderText} - size="md" - type="url" - value={remoteUrl} - /> - {SSHKeyPair && isGitConnected && ( - - - ) : null} - - {/* Action button to import, update or connect */} - {!(isConnectingToGit || isImportingApplicationViaGit) && SSHKeyPair ? ( - - ) : null} - - - ); -} - -export default GitConnection; diff --git a/app/client/src/pages/Editor/gitSync/components/CredentialMode.tsx b/app/client/src/pages/Editor/gitSync/components/CredentialMode.tsx deleted file mode 100644 index a32476ec343..00000000000 --- a/app/client/src/pages/Editor/gitSync/components/CredentialMode.tsx +++ /dev/null @@ -1,195 +0,0 @@ -import { - Classes as AdsClasses, - Text, - Case, - FontWeight, - TextType, - TooltipComponent, -} from "@appsmith/ads-old"; -import { Colors } from "constants/Colors"; -import React, { useState, useEffect, useCallback } from "react"; -import styled from "styled-components"; -import { CREDENTIAL_MODE } from "../constants"; -import { DOCS_BASE_URL } from "constants/ThirdPartyConstants"; -import { Icon } from "@appsmith/ads"; - -const Container = styled.div` - margin-top: ${(props) => props.theme.spaces[7]}px; - margin-bottom: ${(props) => props.theme.spaces[11]}px; -`; - -export const Radio = styled.label<{ - disabled?: boolean; - columns?: number; - rows?: number; - backgroundColor?: string; -}>` - display: block; - position: relative; - padding-left: ${(props) => props.theme.spaces[12] - 2}px; - cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")}; - font-size: ${(props) => props.theme.typography.p1.fontSize}px; - font-weight: ${(props) => props.theme.typography.p1.fontWeight}; - line-height: ${(props) => props.theme.typography.p1.lineHeight}px; - letter-spacing: ${(props) => props.theme.typography.p1.letterSpacing}px; - color: ${(props) => props.theme.colors.radio.text}; - margin-bottom: ${(props) => props.theme.spaces[7]}px; - ${(props) => - props.columns && props.columns > 0 - ? ` - flex-basis: calc(100% / ${props.columns}); - ` - : props.rows && props.rows > 0 - ? ` - margin-bottom: ${props.theme.spaces[11] + 1}px;` - : null}; - - input { - position: absolute; - opacity: 0; - cursor: pointer; - } - - .checkbox { - position: absolute; - top: 0; - left: 0; - width: ${(props) => props.theme.spaces[8]}px; - height: ${(props) => props.theme.spaces[8]}px; - background-color: transparent; - border: ${(props) => props.theme.spaces[1] - 2}px solid ${Colors.BLACK}; - border-radius: 50%; - margin-top: ${(props) => props.theme.spaces[0]}px; - } - - .checkbox:after { - content: ""; - position: absolute; - display: none; - } - - input:checked ~ .checkbox:after { - display: block; - } - - input:disabled ~ .checkbox:after { - background-color: ${(props) => props.theme.colors.radio.disabled}; - } - - .checkbox:after { - content: ""; - position: absolute; - width: ${(props) => props.theme.spaces[4]}px; - height: ${(props) => props.theme.spaces[4]}px; - ${(props) => - props.disabled - ? `background-color: ${props.theme.colors.radio.disabled}` - : `background-color: ${props.backgroundColor || Colors.BLACK};`}; - top: ${(props) => props.theme.spaces[1] - 2}px; - left: ${(props) => props.theme.spaces[1] - 2}px; - border-radius: 50%; - } -`; - -const LabelWrapper = styled.div``; -const Row = styled.div` - display: flex; - margin-bottom: 5px; - .${AdsClasses.TEXT} { - margin-right: ${(props) => props.theme.spaces[2]}px; - } -`; - -const LinkText = styled.div` - cursor: pointer; - .${AdsClasses.ICON} { - margin-right: ${(props) => props.theme.spaces[3]}px; - display: inline-flex; - } - display: inline-flex; - align-items: center; - justify-content: center; -`; - -function LabelWithHelper(props: { label: string; tooltip: string }) { - return ( - - {props.label} - - - - - ); -} - -export default function CredentialMode(props: { - defaultValue: string; - onSelect?: (value: CREDENTIAL_MODE) => void; -}) { - const [selected, setSelected] = useState(props.defaultValue); - - useEffect(() => { - setSelected(props.defaultValue); - }, [props.defaultValue]); - - const onChangeHandler = (value: CREDENTIAL_MODE) => { - setSelected(value); - props.onSelect && props.onSelect(value); - }; - - const downloadJson = useCallback(() => { - window.open(DOCS_BASE_URL, "_blank"); - }, []); - - return ( - - - - - - - Choose the datasource and add the missing credentials - - - - onChangeHandler(CREDENTIAL_MODE.MANUALLY)} - type="radio" - value={CREDENTIAL_MODE.MANUALLY} - /> - - - - - - - Upload using JSON Block - - - - - - DOWNLOAD SAMPLE JSON - - - - - onChangeHandler(CREDENTIAL_MODE.IMPORT_JSON)} - type="radio" - value={CREDENTIAL_MODE.IMPORT_JSON} - /> - - - - ); -} diff --git a/app/client/src/pages/Editor/gitSync/components/GitConnectError.tsx b/app/client/src/pages/Editor/gitSync/components/GitConnectError.tsx deleted file mode 100644 index e6c3d023625..00000000000 --- a/app/client/src/pages/Editor/gitSync/components/GitConnectError.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React, { useEffect, useRef } from "react"; -import { useSelector } from "react-redux"; -import { - getConnectingErrorDocUrl, - getGitConnectError, -} from "selectors/gitSyncSelectors"; -import { Callout, Text } from "@appsmith/ads"; -import styled from "styled-components"; - -const Container = styled.div` - width: calc(100% - 39px); - - & .t--git-connection-error > .ads-v2-callout__children { - margin-top: 0; - } -`; - -export default function GitConnectError({ - onClose, - onDisplay, -}: { - onClose?: () => void; - onDisplay?: () => void; -}) { - const containerRef = useRef(null); - const error = useSelector(getGitConnectError); - const connectingErrorDocumentUrl = useSelector(getConnectingErrorDocUrl); - const titleMessage = error?.errorType - ? error.errorType.replaceAll("_", " ") - : ""; - - useEffect(() => { - if (error && onDisplay) { - onDisplay(); - } - - if (containerRef.current) { - containerRef.current.scrollIntoView(); - } - }, [error]); - - return error ? ( - - - - {titleMessage} - -
- - {error?.message} - -
-
- ) : null; -} diff --git a/app/client/src/pages/Editor/gitSync/components/TabItem.tsx b/app/client/src/pages/Editor/gitSync/components/TabItem.tsx deleted file mode 100644 index 1361cb4ad4a..00000000000 --- a/app/client/src/pages/Editor/gitSync/components/TabItem.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import type { Theme } from "constants/DefaultTheme"; -import { getTypographyByKey } from "@appsmith/ads-old"; -import { Colors } from "constants/Colors"; - -interface WrapperProps { - selected: boolean; - vertical: boolean; - theme: Theme; -} - -const getSelectedStyles = (props: WrapperProps) => - props.selected - ? `color: ${props.theme.colors.tabItemBackgroundFill.highlightTextColor}; - font-weight: 500; - border-bottom: 2px solid var(--ads-color-brand); - - ` - : `color: ${Colors.GREY_7} - `; - -const Wrapper = styled.div` - display: flex; - ${getTypographyByKey("p0")}; - ${(props) => getSelectedStyles(props)}; - - &:hover, - &:focus { - color: ${(props) => - props.theme.colors.tabItemBackgroundFill.highlightTextColor}; - } - - padding: ${(props) => `${props.theme.spaces[5]}px 0px`}; - - width: 100%; - - align-items: center; -`; - -export default function TabItem(props: { - tab: { - key: string; - title: string; - }; - selected: boolean; - vertical: boolean; -}) { - const { selected, tab, vertical } = props; - - return ( - - {tab.title} - - ); -} diff --git a/app/client/src/pages/Editor/gitSync/components/UserGitProfileSettings.tsx b/app/client/src/pages/Editor/gitSync/components/UserGitProfileSettings.tsx deleted file mode 100644 index e4baad98eac..00000000000 --- a/app/client/src/pages/Editor/gitSync/components/UserGitProfileSettings.tsx +++ /dev/null @@ -1,204 +0,0 @@ -import React, { useCallback, useState, useMemo } from "react"; -import { Space } from "./StyledComponents"; -import { - AUTHOR_EMAIL, - AUTHOR_NAME, - AUTHOR_NAME_CANNOT_BE_EMPTY, - FORM_VALIDATION_INVALID_EMAIL, - USER_PROFILE_SETTINGS_TITLE, - USE_DEFAULT_CONFIGURATION, - createMessage, -} from "ee/constants/messages"; -import styled from "styled-components"; -import { emailValidator } from "@appsmith/ads-old"; -import { useSelector } from "react-redux"; -import { - getIsFetchingGlobalGitConfig, - getIsFetchingLocalGitConfig, -} from "selectors/gitSyncSelectors"; -import { Checkbox, Input, Text } from "@appsmith/ads"; - -const InputContainer = styled.div` - display: flex; - align-items: center; - margin-bottom: ${(props) => props.theme.spaces[5]}px; -`; - -const MainContainer = styled.div` - width: calc(100% - 39px); -`; - -const DefaultConfigContainer = styled.div` - display: flex; - align-items: flex-start; - margin-top: ${(props) => props.theme.spaces[3]}px; - margin-left: 3px; -`; - -interface AuthorInfo { - authorName: string; - authorEmail: string; -} - -const AUTHOR_INFO_LABEL = { - EMAIL: "authorEmail", - NAME: "authorName", -}; - -type SetAuthorInfo = (authorInfo: AuthorInfo) => void; - -const setAuthorState = ({ - authorInfo, - label, - setAuthorInfo, - value, -}: { - authorInfo: AuthorInfo; - label: string; - value: string; - setAuthorInfo: SetAuthorInfo; -}) => { - switch (label) { - case AUTHOR_INFO_LABEL.NAME: - setAuthorInfo({ - authorEmail: authorInfo.authorEmail, - authorName: value, - }); - break; - case AUTHOR_INFO_LABEL.EMAIL: - setAuthorInfo({ - authorEmail: value, - authorName: authorInfo.authorName, - }); - break; - default: - break; - } -}; - -// Component -interface UserGitProfileSettingsProps { - authType: string; - authorInfo: AuthorInfo; - setAuthorInfo: SetAuthorInfo; - useGlobalConfig: boolean; - toggleUseDefaultConfig: (useDefaultConfig: boolean) => void; - triedSubmit: boolean; -} - -function UserGitProfileSettings({ - authorInfo, - setAuthorInfo, - toggleUseDefaultConfig, - triedSubmit, - useGlobalConfig, -}: UserGitProfileSettingsProps) { - // - const [emailInputFocused, setEmailInputFocused] = useState(false); - const [nameInputFocused, setNameInputFocused] = useState(false); - const isFetchingGlobalGitConfig = useSelector(getIsFetchingGlobalGitConfig); - const isFetchingLocalGitConfig = useSelector(getIsFetchingLocalGitConfig); - - const changeHandler = useCallback( - (label: string, value: string) => - setAuthorState({ - label, - value, - authorInfo, - setAuthorInfo, - }), - [authorInfo, setAuthorInfo], - ); - - const disableInput = useGlobalConfig; - - const isValidEmail = useMemo( - () => - authorInfo.authorEmail && emailValidator(authorInfo.authorEmail).isValid, - [authorInfo.authorEmail], - ); - - const isFetchingConfig = - isFetchingGlobalGitConfig || isFetchingLocalGitConfig; - - const showDefaultConfig = !isFetchingConfig; - const nameInvalid = - !isFetchingConfig && - !useGlobalConfig && - !authorInfo.authorName && - !nameInputFocused && - triedSubmit; - - const emailInvalid = - !isFetchingConfig && - !useGlobalConfig && - !isValidEmail && - !emailInputFocused && - triedSubmit; - - return ( - - - {createMessage(USER_PROFILE_SETTINGS_TITLE)} - - {showDefaultConfig ? ( - - - {createMessage(USE_DEFAULT_CONFIGURATION)} - - - ) : null} - - - <> - - setNameInputFocused(false)} - onChange={(value: string) => - changeHandler(AUTHOR_INFO_LABEL.NAME, value) - } - onFocus={() => setNameInputFocused(true)} - // trimValue={false} - size="md" - type="text" - value={authorInfo.authorName} - /> - - - setEmailInputFocused(false)} - onChange={(value: string) => - changeHandler(AUTHOR_INFO_LABEL.EMAIL, value) - } - onFocus={() => setEmailInputFocused(true)} - size="md" - type="email" - value={authorInfo.authorEmail} - /> - - - - ); -} - -export default UserGitProfileSettings; diff --git a/app/client/src/pages/Editor/gitSync/components/ssh-key/CopySSHKey.tsx b/app/client/src/pages/Editor/gitSync/components/ssh-key/CopySSHKey.tsx deleted file mode 100644 index e327b2c5f5c..00000000000 --- a/app/client/src/pages/Editor/gitSync/components/ssh-key/CopySSHKey.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { TooltipWrapper, IconContainer } from "./StyledComponents"; -import { COPY_SSH_KEY, createMessage } from "ee/constants/messages"; -import React from "react"; -import { Button, Icon, Tooltip } from "@appsmith/ads"; - -function getCopiedSuccessIcon() { - return ( - - - - ); -} - -function getToCopyIcon(copyToClipboard: () => void) { - return ( - - - - - - - ); -} diff --git a/app/client/src/pages/Editor/gitSync/components/ssh-key/getNotificationBanner.tsx b/app/client/src/pages/Editor/gitSync/components/ssh-key/getNotificationBanner.tsx deleted file mode 100644 index 7d2a63efdac..00000000000 --- a/app/client/src/pages/Editor/gitSync/components/ssh-key/getNotificationBanner.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from "react"; -import { NotificationBannerContainer } from "./StyledComponents"; -import { - createMessage, - DEPLOY_KEY_USAGE_GUIDE_MESSAGE, -} from "ee/constants/messages"; -import { Callout } from "@appsmith/ads"; - -/** - * getNotificationBanner returns a notification banner about copying the key to repo settings. - * @param learnMoreClickHandler {() => void} link that takes user to documentation - * @param setShowKeyGeneratedMessage {( value: ((prevState: boolean) => boolean) | boolean ) => void} - */ -export default function getNotificationBanner( - deployKeyDocUrl: string, - learnMoreClickHandler: (e: React.MouseEvent) => void, - setShowKeyGeneratedMessage: (value: boolean) => void, -): JSX.Element { - return ( - - setShowKeyGeneratedMessage(false)} - > - {createMessage(DEPLOY_KEY_USAGE_GUIDE_MESSAGE)} - - - ); -} diff --git a/app/client/src/pages/Editor/gitSync/components/ssh-key/index.tsx b/app/client/src/pages/Editor/gitSync/components/ssh-key/index.tsx deleted file mode 100644 index d028c887807..00000000000 --- a/app/client/src/pages/Editor/gitSync/components/ssh-key/index.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { - createMessage, - SSH_KEY, - SSH_KEY_GENERATED, -} from "ee/constants/messages"; -import React, { useCallback, useState } from "react"; -import { Space } from "pages/Editor/gitSync/components/StyledComponents"; -import AnalyticsUtil from "ee/utils/AnalyticsUtil"; -import { useSSHKeyPair } from "../../hooks"; -import { - DeployedKeyContainer, - FlexRow, - KeyText, - KeyType, - MoreMenuWrapper, -} from "./StyledComponents"; -import { CopySSHKey } from "./CopySSHKey"; -import { supportedKeyTypeList } from "./SupportedKeyTypeList"; -import getNotificationBanner from "./getNotificationBanner"; -import { getConfirmMenuItem } from "./getConfirmMenuItem"; -import type { SSHKeyType } from "actions/gitSyncActions"; -import { - Button, - toast, - Menu, - MenuTrigger, - MenuItem, - MenuContent, - Text, - Icon, - MenuGroupName, -} from "@appsmith/ads"; - -interface KeysProps { - copyToClipboard: () => void; - deployKeyDocUrl: string; - showCopied: boolean; - SSHKeyPair: string; - isImport?: boolean; -} - -const defaultKeyTypes: SSHKeyType[] = [ - { - keySize: 256, - platFormSupported: "", - protocolName: "ECDSA", - }, - { - keySize: 4096, - platFormSupported: "Azure Devops", - protocolName: "RSA", - }, -]; - -function Keys(props: KeysProps) { - const { copyToClipboard, deployKeyDocUrl, showCopied, SSHKeyPair } = props; - const { generateSSHKey } = useSSHKeyPair(); - const [isMenuOpen, setIsMenuOpen] = useState(false); - const [showConfirmation, setShowConfirmation] = useState(false); - const [showKeyGeneratedMessage, setShowKeyGeneratedMessage] = useState(true); - const [newKeyType, setNewKeyType] = useState("ECDSA"); - const [keyType, keyVal, keyName] = SSHKeyPair.split(" "); - const exactKeyType = keyType.startsWith("ecdsa") ? "ECDSA" : "RSA"; - const supportedKeys = supportedKeyTypeList(defaultKeyTypes, exactKeyType); - const keyText = `${keyVal} ${keyName}`; - const learnMoreClickHandler = () => { - AnalyticsUtil.logEvent("GS_GIT_DOCUMENTATION_LINK_CLICK", { - source: "SSH_KEY_ON_GIT_CONNECTION_TAB", - }); - }; - const regenerateKey = useCallback(() => { - AnalyticsUtil.logEvent("GS_REGENERATE_SSH_KEY_CONFIRM_CLICK", { - oldKeyType: keyType, - newKeyType: newKeyType, - }); - generateSSHKey(newKeyType); - setShowConfirmation(false); - setIsMenuOpen(false); - setShowKeyGeneratedMessage(true); - toast.show(createMessage(SSH_KEY_GENERATED), { - kind: "success", - }); - }, [newKeyType]); - - const handleMenuClose = () => { - setShowConfirmation(false); - setIsMenuOpen(false); - }; - - return ( - <> - - - {createMessage(SSH_KEY)} - - - - - - {keyType} - {keyText} - {CopySSHKey(showCopied, copyToClipboard)} - - - - { - if (!open && !showConfirmation) { - setIsMenuOpen(false); - } - }} - open={isMenuOpen} - > - - - - - {showKeyGeneratedMessage && - getNotificationBanner( - deployKeyDocUrl, - learnMoreClickHandler, - setShowKeyGeneratedMessage, - )} - - ); -} - -export default Keys; diff --git a/app/client/src/pages/Templates/LeftPaneTemplateList.tsx b/app/client/src/pages/Templates/LeftPaneTemplateList.tsx deleted file mode 100644 index 11daca2d51d..00000000000 --- a/app/client/src/pages/Templates/LeftPaneTemplateList.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import React from "react"; -import { useSelector } from "react-redux"; -import { useParams } from "react-router"; -import { getTemplatesSelector } from "selectors/templatesSelectors"; -import styled from "styled-components"; -import { Classes, Text, TextType } from "@appsmith/ads-old"; -import history from "utils/history"; -import { thinScrollbar } from "constants/DefaultTheme"; -import { Colors } from "constants/Colors"; -import { createMessage, TEMPLATES } from "ee/constants/messages"; -import { templateIdUrl } from "ee/RouteBuilder"; - -const Wrapper = styled.div` - width: ${(props) => props.theme.homePage.sidebar}px; - height: 100%; - display: flex; - padding-left: ${(props) => props.theme.spaces[7]}px; - padding-top: ${(props) => props.theme.spaces[11]}px; - flex-direction: column; - box-shadow: 1px 0px 0px ${Colors.GALLERY_2}; -`; - -const TempelateListWrapper = styled.div` - .title { - margin-bottom: ${(props) => props.theme.spaces[4]}px; - padding-left: ${(props) => props.theme.spaces[6] + 1}px; - } - - .list-wrapper { - margin-top: ${(props) => props.theme.spaces[4]}px; - overflow: auto; - height: calc(100vh - ${(props) => props.theme.homePage.header + 244}px); - ${thinScrollbar} - } -`; - -const SecondWrapper = styled.div` - height: calc(100vh - ${(props) => props.theme.homePage.header + 24}px); - position: relative; -`; - -const TemplateItem = styled.div<{ selected: boolean }>` - cursor: pointer; - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; - padding: ${(props) => - `${props.theme.spaces[2]}px ${props.theme.spaces[6]}px ${props.theme.spaces[2]}px ${props.theme.spaces[11]}px`}; - .${Classes.TEXT} { - color: ${Colors.MIRAGE_2}; - } - ${(props) => - props.selected && - ` - background-color: ${Colors.GALLERY_1}; - .${Classes.TEXT} { - color: ${Colors.EBONY_CLAY_2}; - } - `} - - &:hover { - background-color: ${Colors.GALLERY_1}; - } -`; - -function LeftPaneTemplateList() { - const templates = useSelector(getTemplatesSelector); - const params = useParams<{ templateId: string }>(); - - const onClick = (id: string) => { - history.push(templateIdUrl({ id })); - }; - - return ( - - - - - {createMessage(TEMPLATES)} - -
- {templates.map((template) => { - return ( - onClick(template.id)} - selected={template.id === params.templateId} - > - - {template.title} - - - ); - })} -
-
-
-
- ); -} - -export default LeftPaneTemplateList; diff --git a/app/client/src/pages/Templates/TemplatesModal/TemplateList.tsx b/app/client/src/pages/Templates/TemplatesModal/TemplateList.tsx deleted file mode 100644 index 389f8125494..00000000000 --- a/app/client/src/pages/Templates/TemplatesModal/TemplateList.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import { - FETCHING_TEMPLATE_LIST, - FORKING_TEMPLATE, - createMessage, -} from "ee/constants/messages"; -import type { Template } from "api/TemplatesApi"; -import React from "react"; -import { useSelector } from "react-redux"; -import { - isFetchingTemplatesSelector, - isImportingTemplateToAppSelector, -} from "selectors/templatesSelectors"; -import styled from "styled-components"; -import LoadingScreen from "./LoadingScreen"; -import TemplateFilters from "../TemplateFilters"; -import { TemplateContent } from "../TemplateContent"; - -const Wrapper = styled.div` - display: flex; - height: 85vh; - overflow-y: hidden; - - .templates-search { - background-color: var(--ads-v2-color-bg); - } -`; - -const FilterWrapper = styled.div` - .filter-wrapper { - width: 200px; - margin-right: 10px; - } -`; - -const ListWrapper = styled.div` - height: 79vh; - overflow: auto; - width: 100%; -`; - -interface TemplateListProps { - onTemplateClick: (id: string) => void; - onClose: () => void; -} - -function TemplateList(props: TemplateListProps) { - const onForkTemplateClick = (template: Template) => { - props.onTemplateClick(template.id); - }; - const isImportingTemplateToApp = useSelector( - isImportingTemplateToAppSelector, - ); - const isFetchingTemplates = useSelector(isFetchingTemplatesSelector); - - if (isFetchingTemplates) { - return ; - } - - if (isImportingTemplateToApp) { - return ; - } - - return ( - -
- - - - - - -
-
- ); -} - -export default TemplateList; diff --git a/app/client/src/pages/common/ArtBoard.tsx b/app/client/src/pages/common/ArtBoard.tsx deleted file mode 100644 index 351056630a2..00000000000 --- a/app/client/src/pages/common/ArtBoard.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import styled from "styled-components"; -export default styled.div<{ width: number }>` - width: ${(props) => props.width}px; - margin: 0 auto; - position: relative; - background: ${(props) => { - return props.theme.colors.artboard; - }}; - padding: 0 0 ${(props) => props.theme.canvasBottomPadding}px 0px; -`; diff --git a/app/client/src/pages/common/AvatarComponent.tsx b/app/client/src/pages/common/AvatarComponent.tsx deleted file mode 100644 index 6363615e520..00000000000 --- a/app/client/src/pages/common/AvatarComponent.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from "react"; -import { Avatar } from "@appsmith/ads"; - -export interface AvatarProps { - className?: string; - commonName?: string; - userName?: string; - size: string; - source?: string; - label?: string; - isTooltipEnabled?: boolean; -} - -// TODO: Fix this the next time the file is edited -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function AvatarComponent(props: any) { - const getInitials = (name: string) => { - const names = name.split(" "); - let initials = names[0].substring(0, 1).toUpperCase(); - - if (names.length > 1) { - initials += names[names.length - 1].substring(0, 1).toUpperCase(); - } - - return initials; - }; - - return ( - - ); -} diff --git a/app/client/src/pages/common/CustomizedDropdown/Badge.tsx b/app/client/src/pages/common/CustomizedDropdown/Badge.tsx deleted file mode 100644 index b9dda86ef3c..00000000000 --- a/app/client/src/pages/common/CustomizedDropdown/Badge.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -const BadgeWrapper = styled.div` - &&&&& { - display: flex; - flex-directition: row; - justify-content: flex-start; - img { - flex-basis: 0 1 auto; - width: 32px; - height: 32px; - border-radius: 50%; - margin-right: 16px; - } - div { - flex-basis: 1 0 auto; - flex-direction: column; - justify-content: space-around; - align-self: center; - & h3, - h5 { - font-weight: ${(props) => props.theme.fontWeights[1]}; - margin: 0; - } - & h5 { - color: ${(props) => props.theme.colors.paneText}; - font-size: ${(props) => props.theme.fontSizes[3]}px; - } - } - } -`; - -interface BadgeProps { - imageURL?: string; - text: string; - subtext?: string; -} - -export function Badge(props: BadgeProps) { - return ( - - {props.text} -
-

{props.text}

- {props.subtext &&
{props.subtext}
} -
-
- ); -} - -export default Badge; diff --git a/app/client/src/pages/common/CustomizedDropdown/HeaderDropdownData.tsx b/app/client/src/pages/common/CustomizedDropdown/HeaderDropdownData.tsx deleted file mode 100644 index 9933422acbf..00000000000 --- a/app/client/src/pages/common/CustomizedDropdown/HeaderDropdownData.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Directions } from "utils/helpers"; -import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; -import { getOnSelectAction, DropdownOnSelectActions } from "./dropdownHelpers"; -import type { CustomizedDropdownProps } from "./index"; -import type { User } from "constants/userConstants"; - -export const options = ( - user: User, - dropdownMainMenuName: string, -): CustomizedDropdownProps => ({ - sections: [ - { - options: [ - { - content: "Sign Out", - onSelect: () => - getOnSelectAction(DropdownOnSelectActions.DISPATCH, { - type: ReduxActionTypes.LOGOUT_USER_INIT, - }), - }, - ], - }, - ], - trigger: { - text: dropdownMainMenuName, - outline: false, - }, - openDirection: Directions.DOWN, -}); - -export default options; diff --git a/app/client/src/pages/common/CustomizedDropdown/WorkspaceDropdownData.tsx b/app/client/src/pages/common/CustomizedDropdown/WorkspaceDropdownData.tsx deleted file mode 100644 index e5c8e773d5e..00000000000 --- a/app/client/src/pages/common/CustomizedDropdown/WorkspaceDropdownData.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import React from "react"; -import Badge from "./Badge"; -import { Directions } from "utils/helpers"; -import { getOnSelectAction, DropdownOnSelectActions } from "./dropdownHelpers"; -import type { CustomizedDropdownProps } from "./index"; -import type { User } from "constants/userConstants"; -import _ from "lodash"; - -export const options = ( - user: User, - workspaceName: string, - workspaceId: string, -): CustomizedDropdownProps => { - return { - sections: [ - { - options: [ - { - content: ( - - ), - disabled: true, - shouldCloseDropdown: false, - }, - { - content: "Workspace Settings", - onSelect: () => - getOnSelectAction(DropdownOnSelectActions.REDIRECT, { - path: `/workspace/${workspaceId}/settings`, - }), - }, - { - content: "Share", - onSelect: () => _.noop("Share option selected"), - }, - { - content: "Members", - onSelect: () => - getOnSelectAction(DropdownOnSelectActions.REDIRECT, { - path: `/workspace/${workspaceId}/settings`, - }), - }, - ], - }, - ], - trigger: { - icon: "WORKSPACE_ICON", - text: workspaceName, - outline: false, - }, - openDirection: Directions.DOWN, - }; -}; - -export default options; diff --git a/app/client/src/pages/common/Loader.tsx b/app/client/src/pages/common/Loader.tsx deleted file mode 100644 index 7f93896b5c7..00000000000 --- a/app/client/src/pages/common/Loader.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from "react"; -import styled from "styled-components"; - -const StyledLoader = styled.div``; - -export function Loader() { - return ; -} - -export default Loader; diff --git a/app/client/src/pages/common/LoginHeader.tsx b/app/client/src/pages/common/LoginHeader.tsx deleted file mode 100644 index 08e4dc2e50e..00000000000 --- a/app/client/src/pages/common/LoginHeader.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import React from "react"; -import { Link } from "react-router-dom"; -import { connect } from "react-redux"; -import { getCurrentUser } from "selectors/usersSelectors"; -import styled from "styled-components"; -import StyledHeader from "components/designSystems/appsmith/StyledHeader"; -import type { AppState } from "ee/reducers"; -import { BASE_URL } from "constants/routes"; -import { Colors } from "constants/Colors"; -import { importSvg } from "@appsmith/ads-old"; - -const AppsmithLogo = importSvg( - async () => import("assets/svg/appsmith_logo_primary.svg"), -); - -const StyledPageHeader = styled(StyledHeader)` - width: 100%; - height: 48px; - background: ${Colors.WHITE}; - display: flex; - justify-content: center; - box-shadow: none; - padding: 0px ${(props) => props.theme.spaces[12]}px; -`; - -const LogoContainer = styled.div` - svg { - max-width: 160px; - width: 160px; - } -`; - -export function LoginHeader() { - return ( - - - - - - - - ); -} - -const mapStateToProps = (state: AppState) => ({ - user: getCurrentUser(state), -}); - -export default connect(mapStateToProps)(LoginHeader); diff --git a/app/client/src/pages/common/NotFound.tsx b/app/client/src/pages/common/NotFound.tsx deleted file mode 100644 index c28fc29df7f..00000000000 --- a/app/client/src/pages/common/NotFound.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import React from "react"; -import styled from "styled-components"; -import Button from "components/editorComponents/Button"; -import IntegrationUnavailableImage from "assets/images/404-image.png"; - -const Wrapper = styled.div` - text-align: center; - margin-top: 5%; - .bold-text { - font-weight: ${(props) => props.theme.fontWeights[3]}; - font-size: 24px; - } - .unavailable-img { - width: 35%; - } - .button-position { - margin: auto; - } -`; - -interface Props { - title: string; - subtitle?: string; - buttonText: string; - onBackButton: () => void; -} - -function NotFound(props: Props) { - const { buttonText, onBackButton, subtitle, title } = props; - - return ( - - {title -
-

{title}

- {subtitle &&

{subtitle}

} -
-
- ); -} - -export default NotFound; diff --git a/app/client/src/pages/common/PageSectionDivider.tsx b/app/client/src/pages/common/PageSectionDivider.tsx deleted file mode 100644 index eb8ae63a7ff..00000000000 --- a/app/client/src/pages/common/PageSectionDivider.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import styled from "styled-components"; -import { Divider } from "@blueprintjs/core"; - -export default styled(Divider)` - margin: ${(props) => props.theme.spaces[11]}px auto; - width: 100%; -`; diff --git a/app/client/src/pages/common/PaneWrapper.tsx b/app/client/src/pages/common/PaneWrapper.tsx deleted file mode 100644 index ddf006ca734..00000000000 --- a/app/client/src/pages/common/PaneWrapper.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig"; -import styled from "styled-components"; - -export default styled.div<{ themeMode?: EditorTheme }>` - background-color: ${(props) => props.theme.colors.propertyPane.bg}; - border-radius: 0px; - border-color: ${(props) => props.theme.colors.propertyPane.bg} !important; - box-shadow: 12px 0px 28px rgba(0, 0, 0, 0.32) !important; - padding: ${(props) => props.theme.spaces[5]}px - ${(props) => props.theme.spaces[7]}px; - color: ${(props) => props.theme.colors.propertyPane.label}; - text-transform: capitalize; -`; diff --git a/app/client/src/pages/routes.tsx b/app/client/src/pages/routes.tsx deleted file mode 100644 index 8169d11cc3a..00000000000 --- a/app/client/src/pages/routes.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { - DATA_SOURCES_EDITOR_ID_PATH, - DATA_SOURCES_EDITOR_LIST_PATH, -} from "constants/routes"; -import DataSourceEditor from "pages/Editor/DataSourceEditor"; -import DatasourceBlankState from "pages/Editor/DataSourceEditor/DatasourceBlankState"; - -export const DatasourceEditorRoutes = [ - { - path: DATA_SOURCES_EDITOR_ID_PATH, - component: DataSourceEditor, - }, - { - path: DATA_SOURCES_EDITOR_LIST_PATH, - component: DatasourceBlankState, - }, -]; diff --git a/app/client/src/pages/users/list.tsx b/app/client/src/pages/users/list.tsx deleted file mode 100644 index 0dd0dbd4471..00000000000 --- a/app/client/src/pages/users/list.tsx +++ /dev/null @@ -1 +0,0 @@ -export default "list users"; diff --git a/app/client/src/pages/users/view.tsx b/app/client/src/pages/users/view.tsx deleted file mode 100644 index 1d41523f485..00000000000 --- a/app/client/src/pages/users/view.tsx +++ /dev/null @@ -1 +0,0 @@ -export default "view user"; diff --git a/app/client/src/pages/workspace/CreateWorkspaceForm.tsx b/app/client/src/pages/workspace/CreateWorkspaceForm.tsx deleted file mode 100644 index dbd1ee29610..00000000000 --- a/app/client/src/pages/workspace/CreateWorkspaceForm.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import React, { useCallback } from "react"; -import type { InjectedFormProps } from "redux-form"; -import { Form, reduxForm } from "redux-form"; -import { CREATE_WORKSPACE_FORM_NAME } from "ee/constants/forms"; -import type { CreateWorkspaceFormValues } from "ee/pages/workspace/helpers"; -import { createWorkspaceSubmitHandler } from "ee/pages/workspace/helpers"; -import { noSpaces } from "utils/formhelpers"; -import TextField from "components/editorComponents/form/fields/TextField"; -import FormGroup from "components/editorComponents/form/FormGroup"; -import FormFooter from "components/editorComponents/form/FormFooter"; -import FormMessage from "components/editorComponents/form/FormMessage"; - -// TODO(abhinav): abstract onCancel out. -export function CreateApplicationForm( - props: InjectedFormProps< - CreateWorkspaceFormValues, - { onCancel: () => void } - > & { - onCancel: () => void; - }, -) { - const { error, handleSubmit, invalid, onCancel, pristine, submitting } = - props; - const submitHandler = useCallback( - async (data, dispatch) => { - const result = await createWorkspaceSubmitHandler(data, dispatch); - - if (typeof onCancel === "function") onCancel(); // close after submit - - return result; - }, - [handleSubmit, onCancel], - ); - - return ( -
- {error && !pristine && } - - - - - - ); -} - -export default reduxForm void }>({ - form: CREATE_WORKSPACE_FORM_NAME, -})(CreateApplicationForm); diff --git a/app/client/src/pages/workspace/PartnerProgramCallout.tsx b/app/client/src/pages/workspace/PartnerProgramCallout.tsx deleted file mode 100644 index b4c2555ab0c..00000000000 --- a/app/client/src/pages/workspace/PartnerProgramCallout.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import type { CalloutLinkProps } from "@appsmith/ads"; -import { Callout } from "@appsmith/ads"; -import React from "react"; -import { - PARTNER_PROGRAM_CALLOUT, - PARTNER_PROGRAM_CALLOUT_LINK, - createMessage, -} from "ee/constants/messages"; - -interface PartnerProgramCalloutProps { - email: string; - onClose: () => void; -} - -export default function PartnerProgramCallout( - props: PartnerProgramCalloutProps, -) { - const links: CalloutLinkProps[] = [ - { - children: createMessage(PARTNER_PROGRAM_CALLOUT_LINK), - to: "https://www.appsmith.com/partner-program", - endIcon: "share-box-line", - }, - ]; - - return ( - - {createMessage(PARTNER_PROGRAM_CALLOUT, props.email)} - - ); -} diff --git a/app/client/src/pages/workspace/users.tsx b/app/client/src/pages/workspace/users.tsx deleted file mode 100644 index 9f060d4f6f6..00000000000 --- a/app/client/src/pages/workspace/users.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react"; -import { useHistory } from "react-router-dom"; -import { WORKSPACE_INVITE_USERS_PAGE_URL } from "constants/routes"; -import PageSectionHeader from "pages/common/PageSectionHeader"; -import Button from "components/editorComponents/Button"; - -export function WorkspaceMembers() { - const history = useHistory(); - - return ( - -

Users

- -
- - - - ); -} diff --git a/app/client/src/widgets/TableWidgetV2/component/TableActionIcon.tsx b/app/client/src/widgets/TableWidgetV2/component/TableActionIcon.tsx deleted file mode 100644 index 44f10d7e79d..00000000000 --- a/app/client/src/widgets/TableWidgetV2/component/TableActionIcon.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from "react"; -import { Tooltip } from "@blueprintjs/core"; -import { IconWrapper } from "constants/IconConstants"; -import { Colors } from "constants/Colors"; -import { TableIconWrapper } from "./TableStyledWrappers"; - -interface TableActionIconProps { - tooltip: string; - selected: boolean; - selectMenu: (selected: boolean) => void; - className: string; - children: React.ReactNode; - icon?: React.ReactNode; -} - -function TableActionIcon(props: TableActionIconProps) { - return ( - - { - props.selectMenu(!props.selected); - e.stopPropagation(); - }} - selected={props.selected} - > - - {props.children} - - - - ); -} - -export default TableActionIcon; diff --git a/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/AutoToolTipComponent.tsx b/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/AutoToolTipComponent.tsx deleted file mode 100644 index a624d61dfea..00000000000 --- a/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/AutoToolTipComponent.tsx +++ /dev/null @@ -1,191 +0,0 @@ -import React, { createRef, useEffect, useState } from "react"; -import { Tooltip } from "@blueprintjs/core"; -import { CellWrapper, TooltipContentWrapper } from "../TableStyledWrappers"; -import type { CellAlignment, VerticalAlignment } from "../Constants"; -import styled from "styled-components"; -import { ColumnTypes } from "widgets/wds/WDSTableWidget/constants"; -import { importSvg } from "@appsmith/ads-old"; - -const OpenNewTabIcon = importSvg( - async () => import("assets/icons/control/open-new-tab.svg"), -); - -export const OpenNewTabIconWrapper = styled.div` - left: 4px; - top: -2px; - position: relative; -`; - -export const ColumnWrapper = styled.div<{ - textColor?: string; -}>` - display: flex; - align-items: center; - height: 100%; - color: ${(props) => props.textColor}; -`; - -export const Content = styled.span` - overflow: hidden; - text-overflow: ellipsis; - width: 100%; -`; - -const WIDTH_OFFSET = 32; -const MAX_WIDTH = 300; -const TOOLTIP_OPEN_DELAY = 500; - -function useToolTip( - children: React.ReactNode, - tableWidth?: number, - title?: string, -) { - const ref = createRef(); - const [requiresTooltip, setRequiresTooltip] = useState(false); - - useEffect(() => { - let timeout: ReturnType; - - const mouseEnterHandler = () => { - const element = ref.current?.querySelector("div") as HTMLDivElement; - - /* - * Using setTimeout to simulate hoverOpenDelay of the tooltip - * during initial render - */ - timeout = setTimeout(() => { - if (element && element.offsetWidth < element.scrollWidth) { - setRequiresTooltip(true); - } else { - setRequiresTooltip(false); - } - - ref.current?.removeEventListener("mouseenter", mouseEnterHandler); - ref.current?.removeEventListener("mouseleave", mouseLeaveHandler); - }, TOOLTIP_OPEN_DELAY); - }; - - const mouseLeaveHandler = () => { - clearTimeout(timeout); - }; - - ref.current?.addEventListener("mouseenter", mouseEnterHandler); - ref.current?.addEventListener("mouseleave", mouseLeaveHandler); - - return () => { - ref.current?.removeEventListener("mouseenter", mouseEnterHandler); - ref.current?.removeEventListener("mouseleave", mouseLeaveHandler); - clearTimeout(timeout); - }; - }, [children]); - - return requiresTooltip && children ? ( - - {title} - - } - defaultIsOpen - hoverOpenDelay={TOOLTIP_OPEN_DELAY} - position="top" - > - { - - {children} - - } - - ) : ( - - {children} - - ); -} - -interface Props { - isHidden?: boolean; - isCellVisible?: boolean; - children: React.ReactNode; - title: string; - tableWidth?: number; - columnType?: string; - className?: string; - compactMode?: string; - allowCellWrapping?: boolean; - horizontalAlignment?: CellAlignment; - verticalAlignment?: VerticalAlignment; - textColor?: string; - fontStyle?: string; - cellBackground?: string; - textSize?: string; - disablePadding?: boolean; - url?: string; - isCellDisabled?: boolean; -} - -function LinkWrapper(props: Props) { - const content = useToolTip(props.children, props.tableWidth, props.title); - - return ( - ) => { - e.stopPropagation(); - window.open(props.url, "_blank"); - }} - textColor={props.textColor} - textSize={props.textSize} - verticalAlignment={props.verticalAlignment} - > -
{content}
- - - -
- ); -} - -function AutoToolTipComponent(props: Props) { - const content = useToolTip(props.children, props.tableWidth, props.title); - - if (props.columnType === ColumnTypes.URL && props.title) { - return ; - } - - return ( - - - {content} - - - ); -} - -export default AutoToolTipComponent; diff --git a/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/CheckboxCell.tsx b/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/CheckboxCell.tsx deleted file mode 100644 index 852eda079e2..00000000000 --- a/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/CheckboxCell.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React, { memo } from "react"; -import type { BaseCellComponentProps } from "../Constants"; -import { Checkbox } from "@appsmith/wds"; - -type CheckboxCellProps = BaseCellComponentProps & { - value: boolean; - accentColor: string; - isDisabled?: boolean; - onChange: () => void; - borderRadius: string; - hasUnSavedChanges?: boolean; - disabledCheckbox: boolean; - isCellEditable: boolean; - disabledCheckboxMessage: string; -}; - -const CheckboxCellComponent = (props: CheckboxCellProps) => { - const { disabledCheckbox, isCellEditable, onChange, value } = props; - - return ( - onChange()} - /> - ); -}; - -export const CheckboxCell = memo(CheckboxCellComponent); diff --git a/app/client/yarn.lock b/app/client/yarn.lock index cbd1c58cd4b..0c400dbe84f 100644 --- a/app/client/yarn.lock +++ b/app/client/yarn.lock @@ -4892,7 +4892,7 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": +"@nodelib/fs.walk@npm:1.2.8, @nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: @@ -9256,6 +9256,19 @@ __metadata: languageName: node linkType: hard +"@snyk/github-codeowners@npm:1.1.0": + version: 1.1.0 + resolution: "@snyk/github-codeowners@npm:1.1.0" + dependencies: + commander: ^4.1.1 + ignore: ^5.1.8 + p-map: ^4.0.0 + bin: + github-codeowners: dist/cli.js + checksum: 133f867fa968f96229ebce724d8aedaa124218e20add96a3a7d39ea45e52007fee50cc90c39e406c9e662483d003da9326e00dc4d612afa5c2ca069d1cdab9d7 + languageName: node + linkType: hard + "@socket.io/component-emitter@npm:~3.1.0": version: 3.1.0 resolution: "@socket.io/component-emitter@npm:3.1.0" @@ -13370,6 +13383,7 @@ __metadata: jshint: ^2.13.4 json5: ^2.2.3 klona: ^2.0.5 + knip: ^5.30.2 konva: 8.0.1 libphonenumber-js: ^1.9.44 linkedom: ^0.14.20 @@ -15790,7 +15804,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^4.0.0": +"commander@npm:^4.0.0, commander@npm:^4.1.1": version: 4.1.1 resolution: "commander@npm:4.1.1" checksum: d7b9913ff92cae20cb577a4ac6fcc121bd6223319e54a40f51a14740a681ad5c574fd29a57da478a5f234a6fa6c52cbf0b7c641353e03c648b1ae85ba670b977 @@ -17957,6 +17971,19 @@ __metadata: languageName: node linkType: hard +"easy-table@npm:1.2.0": + version: 1.2.0 + resolution: "easy-table@npm:1.2.0" + dependencies: + ansi-regex: ^5.0.1 + wcwidth: ^1.0.1 + dependenciesMeta: + wcwidth: + optional: true + checksum: 66961b19751a68d2d30ce9b74ef750c374cc3112bbcac3d1ed5a939e43c035ecf6b1954098df2d5b05f1e853ab2b67de893794390dcbf0abe1f157fddeb52174 + languageName: node + linkType: hard + "ecc-jsbn@npm:~0.1.1": version: 0.1.2 resolution: "ecc-jsbn@npm:0.1.2" @@ -18192,13 +18219,13 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.7.0": - version: 5.12.0 - resolution: "enhanced-resolve@npm:5.12.0" +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.17.1, enhanced-resolve@npm:^5.7.0": + version: 5.17.1 + resolution: "enhanced-resolve@npm:5.17.1" dependencies: graceful-fs: ^4.2.4 tapable: ^2.2.0 - checksum: bf3f787facaf4ce3439bef59d148646344e372bef5557f0d37ea8aa02c51f50a925cd1f07b8d338f18992c29f544ec235a8c64bcdb56030196c48832a5494174 + checksum: 4bc38cf1cea96456f97503db7280394177d1bc46f8f87c267297d04f795ac5efa81e48115a2f5b6273c781027b5b6bfc5f62b54df629e4d25fa7001a86624f59 languageName: node linkType: hard @@ -21500,10 +21527,10 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.2.0, ignore@npm:^5.2.4": - version: 5.2.4 - resolution: "ignore@npm:5.2.4" - checksum: 3d4c309c6006e2621659311783eaea7ebcd41fe4ca1d78c91c473157ad6666a57a2df790fe0d07a12300d9aac2888204d7be8d59f9aaf665b1c7fcdb432517ef +"ignore@npm:^5.1.8, ignore@npm:^5.2.0, ignore@npm:^5.2.4": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 2acfd32a573260ea522ea0bfeff880af426d68f6831f973129e2ba7363f422923cf53aab62f8369cbf4667c7b25b6f8a3761b34ecdb284ea18e87a5262a865be languageName: node linkType: hard @@ -23765,12 +23792,12 @@ __metadata: languageName: node linkType: hard -"jiti@npm:^1.18.2": - version: 1.19.3 - resolution: "jiti@npm:1.19.3" +"jiti@npm:^1.18.2, jiti@npm:^1.21.6": + version: 1.21.6 + resolution: "jiti@npm:1.21.6" bin: jiti: bin/jiti.js - checksum: de3dacdfe30948d96b69712b04cc28127c17f43d5233a5aa069933e04ac4c9aaf265bef4cdf2b0c2a6f5af236a58aea9bfea83e8e289e2490802bdff7f99bff7 + checksum: 9ea4a70a7bb950794824683ed1c632e2ede26949fbd348e2ba5ec8dc5efa54dc42022d85ae229cadaa60d4b95012e80ea07d625797199b688cc22ab0e8891d32 languageName: node linkType: hard @@ -24169,6 +24196,36 @@ __metadata: languageName: node linkType: hard +"knip@npm:^5.30.2": + version: 5.30.2 + resolution: "knip@npm:5.30.2" + dependencies: + "@nodelib/fs.walk": 1.2.8 + "@snyk/github-codeowners": 1.1.0 + easy-table: 1.2.0 + enhanced-resolve: ^5.17.1 + fast-glob: ^3.3.2 + jiti: ^1.21.6 + js-yaml: ^4.1.0 + minimist: ^1.2.8 + picocolors: ^1.0.0 + picomatch: ^4.0.1 + pretty-ms: ^9.0.0 + smol-toml: ^1.1.4 + strip-json-comments: 5.0.1 + summary: 2.1.0 + zod: ^3.22.4 + zod-validation-error: ^3.0.3 + peerDependencies: + "@types/node": ">=18" + typescript: ">=5.0.4" + bin: + knip: bin/knip.js + knip-bun: bin/knip-bun.js + checksum: fafb6ee078c1e9f24e83c08c6b97c7ad82ef78d043eff6a064639e08354a4b81cbb132d705acc53874d0f0d02dc690d960f75efe8783ac349fde491bcbf1b742 + languageName: node + linkType: hard + "konva@npm:8.0.1": version: 8.0.1 resolution: "konva@npm:8.0.1" @@ -26976,6 +27033,13 @@ __metadata: languageName: node linkType: hard +"parse-ms@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-ms@npm:4.0.0" + checksum: 673c801d9f957ff79962d71ed5a24850163f4181a90dd30c4e3666b3a804f53b77f1f0556792e8b2adbb5d58757907d1aa51d7d7dc75997c2a56d72937cbc8b7 + languageName: node + linkType: hard + "parse-passwd@npm:^1.0.0": version: 1.0.0 resolution: "parse-passwd@npm:1.0.0" @@ -27286,6 +27350,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^4.0.1": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: a7a5188c954f82c6585720e9143297ccd0e35ad8072231608086ca950bee672d51b0ef676254af0788205e59bd4e4deb4e7708769226bed725bf13370a7d1464 + languageName: node + linkType: hard + "pidtree@npm:0.6.0": version: 0.6.0 resolution: "pidtree@npm:0.6.0" @@ -28818,6 +28889,15 @@ __metadata: languageName: node linkType: hard +"pretty-ms@npm:^9.0.0": + version: 9.1.0 + resolution: "pretty-ms@npm:9.1.0" + dependencies: + parse-ms: ^4.0.0 + checksum: 0f66507467f2005040cccdcb36f35b82674d7809f41c4432009235ed6c920787afa17f621c25b7ccb8ccd80b0840c7b71f7f4a3addb8f0eeef3a033ff1e5cf71 + languageName: node + linkType: hard + "prismjs@npm:^1.27.0, prismjs@npm:~1.27.0": version: 1.27.0 resolution: "prismjs@npm:1.27.0" @@ -32314,6 +32394,13 @@ __metadata: languageName: node linkType: hard +"smol-toml@npm:^1.1.4": + version: 1.3.0 + resolution: "smol-toml@npm:1.3.0" + checksum: 79e1db6b6cd32a13ad7602bfe1a02f20894fe599657a5cc2c8ffab7c3de4ba51f7426b701b513f9b859560918b36a63f7c73f7eaf6def8a1dc73db74ffd9b601 + languageName: node + linkType: hard + "snake-case@npm:^3.0.4": version: 3.0.4 resolution: "snake-case@npm:3.0.4" @@ -33113,6 +33200,13 @@ __metadata: languageName: node linkType: hard +"strip-json-comments@npm:5.0.1": + version: 5.0.1 + resolution: "strip-json-comments@npm:5.0.1" + checksum: b314af70c6666a71133e309a571bdb87687fc878d9fd8b38ebed393a77b89835b92f191aa6b0bc10dfd028ba99eed6b6365985001d64c5aef32a4a82456a156b + languageName: node + linkType: hard + "strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -33223,6 +33317,13 @@ __metadata: languageName: node linkType: hard +"summary@npm:2.1.0": + version: 2.1.0 + resolution: "summary@npm:2.1.0" + checksum: 10ac12ce12c013b56ad44c37cfac206961f0993d98867b33b1b03a27b38a1cf8dd2db0b788883356c5335bbbb37d953772ef4a381d6fc8f408faf99f2bc54af5 + languageName: node + linkType: hard + "superagent@npm:^8.0.5": version: 8.0.9 resolution: "superagent@npm:8.0.9" @@ -36367,6 +36468,22 @@ __metadata: languageName: node linkType: hard +"zod-validation-error@npm:^3.0.3": + version: 3.4.0 + resolution: "zod-validation-error@npm:3.4.0" + peerDependencies: + zod: ^3.18.0 + checksum: b07fbfc39582dbdf6972f5f5f0c3bac9e6b5e6d2e55ef3dd891fd08f1966ebf1023a4bc270e9b569eaa48ed1684ac2252c9f260b0bd07b167671596e6e4d0fa8 + languageName: node + linkType: hard + +"zod@npm:^3.22.4": + version: 3.23.8 + resolution: "zod@npm:3.23.8" + checksum: 15949ff82118f59c893dacd9d3c766d02b6fa2e71cf474d5aa888570c469dbf5446ac5ad562bb035bf7ac9650da94f290655c194f4a6de3e766f43febd432c5c + languageName: node + linkType: hard + "zone.js@npm:^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0": version: 0.14.8 resolution: "zone.js@npm:0.14.8"