From 54786b81f59cc0734f26e9edb2fcdf965f0dee5e Mon Sep 17 00:00:00 2001 From: RAHEEL Date: Fri, 29 Dec 2023 01:08:00 +0500 Subject: [PATCH 01/41] publish comps workflow --- .github/workflows/publish-comps.yml | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/publish-comps.yml diff --git a/.github/workflows/publish-comps.yml b/.github/workflows/publish-comps.yml new file mode 100644 index 000000000..dd42d3ccd --- /dev/null +++ b/.github/workflows/publish-comps.yml @@ -0,0 +1,51 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Publish Lowcoder Comps + +on: + push: + branches: [ "publish-comps-workflow" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-node@v3 + - name: Install dependencies + uses: borales/actions-yarn@v4.2.0 + with: + cmd: install + dir: client/packages/lowcoder-comps + - name: Run tests + uses: borales/actions-yarn@v4.2.0 + with: + cmd: test + dir: client/packages/lowcoder-comps + + publish-package: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: cat .npmrc + - run: echo ${{ secrets.NPM_TOKEN }} + - name: Install dependencies + uses: borales/actions-yarn@v4.2.0 + with: + cmd: install + dir: client/packages/lowcoder-comps + - name: Publish + uses: borales/actions-yarn@v4.2.0 + with: + cmd: build_publish + dir: client/packages/lowcoder-comps + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file From ae43e5f2e77fecf665de0443c5947bdb34301143 Mon Sep 17 00:00:00 2001 From: RAHEEL Date: Sat, 30 Dec 2023 01:21:31 +0500 Subject: [PATCH 02/41] upgrade styles-components dependency --- client/package.json | 4 +- .../src/comps/calendarComp/calendarComp.tsx | 6 +- .../comps/calendarComp/calendarConstants.tsx | 18 +- .../chartComp/chartConfigs/chartUrls.tsx | 2 +- .../src/comps/chartComp/chartUtils.ts | 4 +- .../src/components/Collapase.tsx | 20 +- .../src/components/CustomModal.tsx | 6 +- .../src/components/Dropdown.tsx | 28 +- .../src/components/ExternalLink.tsx | 2 +- .../lowcoder-design/src/components/Label.tsx | 26 +- .../src/components/Loading.tsx | 40 +-- .../lowcoder-design/src/components/Menu.tsx | 2 +- .../src/components/MenuItem.tsx | 12 +- .../src/components/Modal/handler.tsx | 30 +- .../lowcoder-design/src/components/Search.tsx | 2 +- .../src/components/Section.tsx | 22 +- .../src/components/SuspensionBox.tsx | 8 +- .../lowcoder-design/src/components/Switch.tsx | 16 +- .../lowcoder-design/src/components/Tab.tsx | 14 +- .../lowcoder-design/src/components/button.tsx | 24 +- .../src/components/colorSelect/index.tsx | 16 +- .../src/components/control.tsx | 36 +- .../src/components/customSelect.tsx | 16 +- .../lowcoder-design/src/components/edit.tsx | 10 +- .../lowcoder-design/src/components/form.tsx | 12 +- .../src/components/iconSelect/index.tsx | 8 +- .../src/components/keyValueList.tsx | 6 +- .../lowcoder-design/src/components/option.tsx | 18 +- .../src/components/popover.tsx | 10 +- .../src/components/popupCard.tsx | 6 +- .../lowcoder-design/src/components/query.tsx | 6 +- .../src/components/tacoInput.tsx | 24 +- .../src/components/toolTip.tsx | 20 +- client/packages/lowcoder/package.json | 4 +- client/packages/lowcoder/src/app-env.d.ts | 5 +- .../src/base/codeEditor/codeEditor.tsx | 48 +-- .../lowcoder/src/components/ColorPicker.tsx | 8 +- .../lowcoder/src/components/CompName.tsx | 16 +- .../src/components/CreateAppButton.tsx | 2 +- .../DraggableTree/DraggableItem.tsx | 62 ++-- .../DraggableTree/DroppablePlaceHolder.tsx | 42 +-- .../src/components/JSLibraryModal.tsx | 10 +- .../lowcoder/src/components/JSLibraryTree.tsx | 6 +- .../src/components/KeyValueItemList.tsx | 12 +- .../src/components/LinkPlusButton.tsx | 2 +- .../PermissionDialog/Permission.tsx | 18 +- .../PermissionDialog/PermissionDialog.tsx | 6 +- .../PermissionDialog/PermissionList.tsx | 18 +- .../PermissionDialog/commonComponents.tsx | 14 +- .../src/components/ResCreatePanel.tsx | 28 +- .../lowcoder/src/components/SnapshotList.tsx | 8 +- .../src/components/TypographyText.tsx | 4 +- .../lowcoder/src/components/layout/Header.tsx | 8 +- .../lowcoder/src/components/layout/Layout.tsx | 4 +- .../src/components/layout/SideBarItem.tsx | 14 +- .../resultPanel/BottomResultPanel.tsx | 6 +- .../src/components/resultPanel/index.tsx | 2 +- .../src/components/table/columnTypeView.tsx | 54 +-- .../src/comps/comps/appSettingsComp.tsx | 14 +- .../comps/buttonComp/toggleButtonComp.tsx | 16 +- .../lowcoder/src/comps/comps/carouselComp.tsx | 12 +- .../comps/containerComp/containerView.tsx | 6 +- .../comps/containerComp/flowContainerView.tsx | 10 +- .../src/comps/comps/formComp/createForm.tsx | 36 +- .../comps/comps/gridLayoutComp/canvasView.tsx | 20 +- .../comps/comps/layout/mobileTabLayout.tsx | 8 +- .../videoMeetingControllerComp.tsx | 2 +- .../meetingComp/videoMeetingStreamComp.tsx | 2 +- .../meetingComp/videoSharingStreamComp.tsx | 4 +- .../moduleContainerComp.tsx | 6 +- .../navComp/components/DraggableItem.tsx | 10 +- .../components/DroppablePlaceHolder.tsx | 6 +- .../src/comps/comps/navComp/navComp.tsx | 42 +-- .../lowcoder/src/comps/comps/preLoadComp.tsx | 2 +- .../comps/queryLibrary/inputListComp.tsx | 10 +- .../comps/queryLibrary/queryLibraryComp.tsx | 8 +- .../src/comps/comps/richTextEditorComp.tsx | 8 +- .../selectInputComp/selectCompConstants.tsx | 2 +- .../src/comps/comps/signatureComp.tsx | 6 +- .../column/columnTypeComps/columnLinkComp.tsx | 2 +- .../columnTypeComps/columnLinksComp.tsx | 2 +- .../columnTypeComps/columnProgressComp.tsx | 2 +- .../comps/comps/tableComp/tableCompView.tsx | 28 +- .../comps/tableComp/tablePropertyView.tsx | 4 +- .../comps/tableComp/tableToolbarComp.tsx | 30 +- .../lowcoder/src/comps/comps/textComp.tsx | 10 +- .../comps/triContainerComp/triContainer.tsx | 38 +-- .../src/comps/controls/boolControl.tsx | 16 +- .../src/comps/controls/keyValueControl.tsx | 12 +- .../src/comps/controls/labelControl.tsx | 52 +-- .../src/comps/controls/multiSelectControl.tsx | 8 +- .../queries/httpQuery/httpQueryConstants.tsx | 8 +- .../src/layout/compSelectionWrapper.tsx | 76 ++--- .../lowcoder/src/layout/gridLayout.tsx | 32 +- .../packages/lowcoder/src/layout/handler.tsx | 30 +- .../pages/ApplicationV2/CreateDropdown.tsx | 13 +- .../src/pages/ApplicationV2/HomeLayout.tsx | 2 +- .../src/pages/ApplicationV2/HomeResCard.tsx | 8 +- .../pages/ApplicationV2/HomeResOptions.tsx | 2 +- .../pages/ApplicationV2/TrashTableView.tsx | 3 +- .../src/pages/ApplicationV2/index.tsx | 24 +- .../src/pages/ComponentDoc/common/Example.tsx | 6 +- .../lowcoder/src/pages/common/header.tsx | 6 +- .../lowcoder/src/pages/common/help.tsx | 8 +- .../lowcoder/src/pages/common/orgLogo.tsx | 2 +- .../src/pages/common/previewHeader.tsx | 6 +- .../src/pages/common/profileImage.tsx | 24 +- .../src/pages/common/shortcutListPopup.tsx | 18 +- .../src/pages/common/styledComponent.tsx | 14 +- .../pages/datasource/datasourceEditPage.tsx | 8 +- .../src/pages/datasource/datasourceList.tsx | 2 +- .../src/pages/datasource/datasourceModal.tsx | 12 +- .../datasource/form/esDatasourceForm.tsx | 4 +- .../form/googleSheetsDatasourceForm.tsx | 4 +- .../datasource/form/graphqlDatasourceForm.tsx | 8 +- .../datasource/form/httpDatasourceForm.tsx | 8 +- .../datasource/form/mongoDatasourceForm.tsx | 2 +- .../datasource/form/oracleDatasourceForm.tsx | 4 +- .../datasource/form/pluginDataSourceForm.tsx | 4 +- .../datasource/form/redisDatasourceForm.tsx | 2 +- .../datasource/form/smtpDatasourceForm.tsx | 4 +- .../form/snowflakeDatasourceForm.tsx | 4 +- .../datasource/form/sqlDatasourceForm.tsx | 4 +- .../lowcoder/src/pages/editor/LeftContent.tsx | 2 +- .../lowcoder/src/pages/editor/appSnapshot.tsx | 2 +- .../pages/editor/bottom/BottomMetaDrawer.tsx | 8 +- .../src/pages/editor/bottom/BottomSidebar.tsx | 30 +- .../src/pages/editor/bottom/BottomTabs.tsx | 44 +-- .../src/pages/editor/codeEditorPanel.tsx | 4 +- .../lowcoder/src/pages/editor/editorView.tsx | 10 +- .../pages/editor/right/styledComponent.tsx | 10 +- .../src/pages/editor/right/uiCompPanel.tsx | 2 +- .../src/pages/editor/styledComponents.tsx | 4 +- .../src/pages/queryLibrary/LeftNav.tsx | 30 +- .../queryLibrary/QueryLibraryHistoryView.tsx | 12 +- .../queryLibrary/queryLibraryEditorView.tsx | 4 +- .../setting/permission/styledComponents.tsx | 8 +- .../setting/profile/profileComponets.tsx | 2 +- .../src/pages/setting/theme/createModal.tsx | 2 +- .../pages/setting/theme/styledComponents.tsx | 44 +-- .../src/pages/setting/theme/themeList.tsx | 2 +- .../src/pages/userAuth/authComponents.tsx | 12 +- .../lowcoder/src/util/bottomResUtils.tsx | 18 +- client/yarn.lock | 317 +++++++++++++----- 144 files changed, 1188 insertions(+), 1040 deletions(-) diff --git a/client/package.json b/client/package.json index 0b64d0cd5..2f49baf8c 100644 --- a/client/package.json +++ b/client/package.json @@ -34,7 +34,6 @@ "@types/react-resizable": "^3.0.5", "@types/react-router-dom": "^5.3.2", "@types/shelljs": "^0.8.11", - "@types/styled-components": "^5.1.19", "@types/stylis": "^4.0.2", "@types/tern": "0.23.4", "@types/ua-parser-js": "^0.7.36", @@ -71,6 +70,9 @@ }, "dependencies": { "@lottiefiles/react-lottie-player": "^3.5.3", + "@testing-library/react": "^14.1.2", + "@testing-library/user-event": "^14.5.1", + "@types/styled-components": "^5.1.34", "antd-mobile": "^5.28.0", "chalk": "4", "number-precision": "^1.6.0", diff --git a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx index 37c15507f..0265ab4c8 100644 --- a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx +++ b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx @@ -290,11 +290,11 @@ let CalendarBasicComp = (function () { return ( ` position: relative; height: 100%; @@ -205,9 +205,9 @@ export const Wrapper = styled.div<{ flex-direction: inherit; } .fc-day-today .fc-daygrid-day-number { - background-color: ${(props) => props.theme.primary}; + background-color: ${(props) => props.$theme.primary}; color: ${(props) => - contrastText(props.theme.primary || "", props.theme.textDark, props.theme.textLight)}; + contrastText(props.$theme.primary || "", props.$theme.textDark, props.$theme.textLight)}; } .fc-daygrid-day-events { padding: 1px 0 5px 0; @@ -261,7 +261,7 @@ export const Wrapper = styled.div<{ border-radius: 4px; box-shadow: 0 0px 10px 4px rgba(0, 0, 0, 0.25); overflow: hidden; - left: ${(props) => `min(${props.left}px, calc(100% - 210px)) !important`}; + left: ${(props) => `min(${props.$left}px, calc(100% - 210px)) !important`}; .fc-popover-body { padding: 4px 0; min-width: 200px; @@ -368,7 +368,7 @@ export const Wrapper = styled.div<{ } &:hover { .event-remove { - opacity: ${(props) => props.editable && 1}; + opacity: ${(props) => props.$editable ? 1 : undefined}; } } } @@ -585,10 +585,10 @@ export const Wrapper = styled.div<{ } .fc-day-today.fc-col-header-cell { background-color: ${(props) => - isDarkColor(props.$style.background) ? "#ffffff19" : toHex(props.theme.primary!) + "19"}; + isDarkColor(props.$style.background) ? "#ffffff19" : toHex(props.$theme.primary!) + "19"}; a { color: ${(props) => - !isDarkColor(props.$style.background) && darkenColor(props.theme.primary!, 0.1)}; + !isDarkColor(props.$style.background) && darkenColor(props.$theme.primary!, 0.1)}; } } .fc-col-header-cell-cushion { diff --git a/client/packages/lowcoder-comps/src/comps/chartComp/chartConfigs/chartUrls.tsx b/client/packages/lowcoder-comps/src/comps/chartComp/chartConfigs/chartUrls.tsx index 320bfc0c1..ef8ada4b0 100644 --- a/client/packages/lowcoder-comps/src/comps/chartComp/chartConfigs/chartUrls.tsx +++ b/client/packages/lowcoder-comps/src/comps/chartComp/chartConfigs/chartUrls.tsx @@ -4,6 +4,6 @@ const echartsUrlLocale = language === "zh" ? "zh" : "en"; export const optionUrl = `https://echarts.apache.org/${echartsUrlLocale}/option.html`; export const examplesUrl = `https://echarts.apache.org/examples/${echartsUrlLocale}/index.html`; export const xAxisTypeUrl = `${optionUrl}#xAxis.type`; -export const googleMapsApiUrl = `https://maps.googleapis.com/maps/api/js?v=3.exp`; +export const googleMapsApiUrl = `https://maps.googleapis.com/maps/api/js`; export const mapOptionUrl = `https://github.com/plainheart/echarts-extension-gmap`; export const mapExamplesUrl = `https://codepen.io/plainheart/pen/VweLGbR`; \ No newline at end of file diff --git a/client/packages/lowcoder-comps/src/comps/chartComp/chartUtils.ts b/client/packages/lowcoder-comps/src/comps/chartComp/chartUtils.ts index 2e784b56f..8a1d912fe 100644 --- a/client/packages/lowcoder-comps/src/comps/chartComp/chartUtils.ts +++ b/client/packages/lowcoder-comps/src/comps/chartComp/chartUtils.ts @@ -266,8 +266,8 @@ export function getSelectedPoints(param: any, option: any) { return []; } -export function loadGoogleMapsScript(apiKey?: string) { - const mapsUrl = `${googleMapsApiUrl}&key=${apiKey}`; +export function loadGoogleMapsScript(apiKey: string) { + const mapsUrl = `${googleMapsApiUrl}?key=${apiKey}`; const scripts = document.getElementsByTagName('script'); // is script already loaded let scriptIndex = _.findIndex(scripts, (script) => script.src.endsWith(mapsUrl)); diff --git a/client/packages/lowcoder-design/src/components/Collapase.tsx b/client/packages/lowcoder-design/src/components/Collapase.tsx index 63b849835..72045ca81 100644 --- a/client/packages/lowcoder-design/src/components/Collapase.tsx +++ b/client/packages/lowcoder-design/src/components/Collapase.tsx @@ -5,22 +5,16 @@ import { ReactComponent as Omit } from "icons/icon-omit.svg"; import styled, { css } from "styled-components"; import React, { ReactNode } from "react"; -const Panel = styled(AntdCollapse.Panel)` - .ant-collapse-header-text { - max-width: calc(100% - 14px); - } -`; - -const Container = styled.div<{ optColor?: boolean; simple?: boolean }>` +const Container = styled.div<{ $optColor?: boolean; $simple?: boolean }>` &&& { - background: ${(props) => (props.optColor ? "#f2f7fc" : null)}; + background: ${(props) => (props.$optColor ? "#f2f7fc" : null)}; } cursor: pointer; - padding-left: ${(props) => (props.simple ? 0 : "2px")}; + padding-left: ${(props) => (props.$simple ? 0 : "2px")}; &:hover { - background-color: ${(props) => (props.simple ? "#FFFFFF" : "#f2f7fc80")}; + background-color: ${(props) => (props.$simple ? "#FFFFFF" : "#f2f7fc80")}; } .ant-collapse > .ant-collapse-item > .ant-collapse-header { @@ -39,12 +33,12 @@ const Container = styled.div<{ optColor?: boolean; simple?: boolean }>` font-weight: 500; font-size: 13px; line-height: 13px; - padding-left: ${(props) => (props.simple ? 0 : "6px")}; + padding-left: ${(props) => (props.$simple ? 0 : "6px")}; user-select: none; } .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow { - margin-right: ${(props) => (props.simple ? 0 : "2px")}; + margin-right: ${(props) => (props.$simple ? 0 : "2px")}; } `; @@ -106,7 +100,7 @@ export const Collapse = (props: Iprops) => { return ( // - + ` display: flex; flex-direction: column; - width: ${(props) => (props.width ? props.width : "368px")}; + width: ${(props) => (props.$width ? props.$width : "368px")}; height: fit-content; background: #ffffff; box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); @@ -217,7 +217,7 @@ const DEFAULT_PROPS = { function CustomModalRender(props: CustomModalProps & ModalFuncProps) { return ( - + <> ` +export const DropdownContainer = styled.div<{ $placement: ControlPlacement }>` display: flex; height: 32px; width: ${(props) => - props.placement === "right" + props.$placement === "right" ? "calc(100% - 96px)" : "bottom" ? "calc(100% - 112px)" @@ -35,18 +35,18 @@ export const DropdownContainer = styled.div<{ placement: ControlPlacement }>` } > div { - width: 100%; + width: 100% !important; } ${(props) => - props.placement === "bottom" && + props.$placement === "bottom" && ` > div { width: 184px; flex-grow: 1; } - ::after { + &::after { content: ""; width: 264px; flex-grow: 1; @@ -60,21 +60,21 @@ const DropDownItemLabel = styled.div` line-height: 15px; `; -const SegmentedWrapper = styled.div<{ placement: ControlPlacement }>` +const SegmentedWrapper = styled.div<{ $placement: ControlPlacement }>` display: flex; height: 28px; - width: ${(props) => (props.placement === "right" ? "calc(100% - 96px)" : "100% - 112px")}; + width: ${(props) => (props.$placement === "right" ? "calc(100% - 96px)" : "100% - 112px")}; flex-grow: 1; ${(props) => - props.placement === "bottom" && + props.$placement === "bottom" && ` > div { width: 184px; flex-grow: 1; } - ::after { + &::after { content: ""; width: 264px; flex-grow: 1; @@ -120,9 +120,9 @@ const FlexDiv = styled.div` align-items: center; `; -const LabelWrapper = styled.div<{ placement: ControlPlacement }>` +const LabelWrapper = styled.div<{ $placement: ControlPlacement }>` flex-shrink: 0; - width: ${(props) => (props.placement === "right" ? "96px" : "bottom" ? "112px" : "136px")}; + width: ${(props) => (props.$placement === "right" ? "96px" : "bottom" ? "112px" : "136px")}; `; export type OptionType = { @@ -159,14 +159,14 @@ export function Dropdown(props: DropdownProps) { return ( {props.label && ( - + )} {!props.radioButton && ( - + (props: DropdownProps) { )} {props.radioButton && ( - + props.onChange(value.toString())} diff --git a/client/packages/lowcoder-design/src/components/ExternalLink.tsx b/client/packages/lowcoder-design/src/components/ExternalLink.tsx index d496a497e..51fcb3c8e 100644 --- a/client/packages/lowcoder-design/src/components/ExternalLink.tsx +++ b/client/packages/lowcoder-design/src/components/ExternalLink.tsx @@ -9,7 +9,7 @@ export const ExternalLink = styled.a` display: inline-flex; align-items: center; - :hover { + &:hover { color: ${ActiveTextColor}; } `; diff --git a/client/packages/lowcoder-design/src/components/Label.tsx b/client/packages/lowcoder-design/src/components/Label.tsx index c07eed08a..0ec5cce40 100644 --- a/client/packages/lowcoder-design/src/components/Label.tsx +++ b/client/packages/lowcoder-design/src/components/Label.tsx @@ -7,7 +7,7 @@ export const labelCss: any = css` font-size: 13px; color: #222222; - :hover { + &:hover { cursor: default; } `; @@ -67,21 +67,21 @@ export const BlockLabel = (props: IBlocklabel) => { // Title text in each line of Collapse const LeftTitle = styled.span<{ - color?: string; - line?: number; - hasChild?: boolean; + $color?: string; + $line?: number; + $hasChild?: boolean; }>` word-wrap: break-word; word-break: break-all; white-space: pre-wrap; user-select: none; font-size: 13px; - line-height: ${(props) => (props.line ? props.line : 23)}px; - color: ${(props) => (props.color ? props.color : "#333333")}; + line-height: ${(props) => (props.$line ? props.$line : 23)}px; + color: ${(props) => (props.$color ? props.$color : "#333333")}; margin-right: 8px; - font-weight: ${(props) => (props.hasChild ? "600" : "normal")}; + font-weight: ${(props) => (props.$hasChild ? "600" : "normal")}; - :hover { + &:hover { cursor: pointer; } `; @@ -97,7 +97,7 @@ interface ICollapseTitle { export const CollapseTitle = (props: ICollapseTitle) => { const { color, label, lineHeight, hasChild } = props; return ( - + {label} ); @@ -140,16 +140,16 @@ export const CommonGrayLabel = styled.p` margin: 0; `; -export const CommonErrorLabel = styled.p<{ fontSize?: number }>` - font-size: ${(props) => (props.fontSize ? props.fontSize : 12)}px; - line-height: ${(props) => (props.fontSize ? props.fontSize : 12)}px; +export const CommonErrorLabel = styled.p<{ $fontSize?: number }>` + font-size: ${(props) => (props.$fontSize ? props.$fontSize : 12)}px; + line-height: ${(props) => (props.$fontSize ? props.$fontSize : 12)}px; color: #f73131; margin: 0; `; export const CommonBlueLabel = styled.span` ${labelCss} - :hover { + &:hover { cursor: pointer; } diff --git a/client/packages/lowcoder-design/src/components/Loading.tsx b/client/packages/lowcoder-design/src/components/Loading.tsx index 97adc7232..21718bd07 100644 --- a/client/packages/lowcoder-design/src/components/Loading.tsx +++ b/client/packages/lowcoder-design/src/components/Loading.tsx @@ -2,9 +2,9 @@ import styled, { css } from "styled-components"; import { CSSProperties } from "react"; type LoadingContainerProps = { - backgroundColor: string; - color: string; - size: number; + $backgroundColor: string; + $color: string; + $size: number; }; const LoadingWrapper = styled.div` @@ -16,8 +16,8 @@ const LoadingWrapper = styled.div` // Loading const ContainerX = styled.div` - height: ${(props) => props.size}px; - width: ${(props) => props.size}px; + height: ${(props) => props.$size}px; + width: ${(props) => props.$size}px; animation: circle infinite 1.75s linear; @keyframes circle { 0% { @@ -29,14 +29,14 @@ const ContainerX = styled.div` } `; const Container = styled.div` - height: ${(props) => props.size / 2}px; - width: ${(props) => props.size}px; - background-color: ${(props) => props.backgroundColor}; + height: ${(props) => props.$size / 2}px; + width: ${(props) => props.$size}px; + background-color: ${(props) => props.$backgroundColor}; overflow: hidden; `; const loadcss = css` - width: ${(props) => props.size}px; - height: ${(props) => props.size}px; + width: ${(props) => props.$size}px; + height: ${(props) => props.$size}px; border: solid 2.5px transparent; border-radius: 999px; background-origin: border-box; @@ -46,19 +46,19 @@ const loadcss = css` const Load1 = styled.div` ${loadcss}; background-image: linear-gradient( - ${(props) => props.backgroundColor}, - ${(props) => props.backgroundColor} + ${(props) => props.$backgroundColor}, + ${(props) => props.$backgroundColor} ), - linear-gradient(to left, ${(props) => props.color}, ${(props) => props.color}91); + linear-gradient(to left, ${(props) => props.$color}, ${(props) => props.$color}91); `; const Load2 = styled.div` ${loadcss}; - transform: translateY(-${(props) => props.size / 2}px); + transform: translateY(-${(props) => props.$size / 2}px); background-image: linear-gradient( - ${(props) => props.backgroundColor}, - ${(props) => props.backgroundColor} + ${(props) => props.$backgroundColor}, + ${(props) => props.$backgroundColor} ), - linear-gradient(to right, ${(props) => props.color}a3, ${(props) => props.color}1a); + linear-gradient(to right, ${(props) => props.$color}a3, ${(props) => props.$color}1a); `; type LoadingProps = { @@ -71,9 +71,9 @@ type LoadingProps = { export const Loading = (props: LoadingProps) => { const loadingProps = { - backgroundColor: props.backgroundColor ?? "#315efb", - color: props.color ?? "#ffffff", - size: props.size ?? 14, + $backgroundColor: props.backgroundColor ?? "#315efb", + $color: props.color ?? "#ffffff", + $size: props.size ?? 14, }; return ( diff --git a/client/packages/lowcoder-design/src/components/Menu.tsx b/client/packages/lowcoder-design/src/components/Menu.tsx index 9fdfd7946..365b86e2a 100644 --- a/client/packages/lowcoder-design/src/components/Menu.tsx +++ b/client/packages/lowcoder-design/src/components/Menu.tsx @@ -107,7 +107,7 @@ const StyledCreateBtn = styled.button` cursor: pointer; height: 40px; - :hover { + &:hover { color: #315efb; svg g path { diff --git a/client/packages/lowcoder-design/src/components/MenuItem.tsx b/client/packages/lowcoder-design/src/components/MenuItem.tsx index 077a17635..9510c13d9 100644 --- a/client/packages/lowcoder-design/src/components/MenuItem.tsx +++ b/client/packages/lowcoder-design/src/components/MenuItem.tsx @@ -4,14 +4,14 @@ import { PointIcon, DragIcon, PencilIcon } from "icons"; import { labelCss } from "./Label"; interface IItem { - width?: number; - colorChange?: number; + $width?: number; + $colorChange?: number; } const Item = styled.div` - width: ${(props) => (props.width ? props.width : 280)}px; + width: ${(props) => (props.$width ? props.$width : 280)}px; height: 32px; background: #f5f5f6; - background: ${(props) => (props.colorChange ? "#E1E3EB" : "#f5f5f6")}; + background: ${(props) => (props.$colorChange ? "#E1E3EB" : "#f5f5f6")}; border-radius: 4px; float: right; margin-right: 16px; @@ -22,7 +22,7 @@ const IconCss = css` height: 16px; width: 16px; color: #8b8fa3; - :hover { + &:hover { cursor: pointer; } `; @@ -49,7 +49,7 @@ interface IMenuItem { export const MenuItem = (props: IMenuItem) => { const { label, width, colorChange } = props; return ( - + {label} diff --git a/client/packages/lowcoder-design/src/components/Modal/handler.tsx b/client/packages/lowcoder-design/src/components/Modal/handler.tsx index 8b22b96e3..c5c293ca3 100644 --- a/client/packages/lowcoder-design/src/components/Modal/handler.tsx +++ b/client/packages/lowcoder-design/src/components/Modal/handler.tsx @@ -26,9 +26,9 @@ const EdgeHandle = css` } `; -const HorizontalHandle = css<{ axis: string }>` +const HorizontalHandle = css<{ $axis: string }>` ${EdgeHandle} - ${(props) => (props.axis === "s" ? "bottom: -10px;" : "top: -10px;")} + ${(props) => (props.$axis === "s" ? "bottom: -10px;" : "top: -10px;")} /* left: -4px; */ height: 12px !important; /* width: calc(100% + 8px) !important; */ @@ -42,9 +42,9 @@ const HorizontalHandle = css<{ axis: string }>` } `; -const VerticalHandleStyles = css<{ axis: string }>` +const VerticalHandleStyles = css<{ $axis: string }>` ${EdgeHandle} - ${(props) => (props.axis === "e" ? "right: -10px;" : "left: -10px;")} + ${(props) => (props.$axis === "e" ? "right: -10px;" : "left: -10px;")} width: 12px !important; top: 0px; /* height: calc(100% + 8px) !important; */ @@ -58,7 +58,7 @@ const VerticalHandleStyles = css<{ axis: string }>` } `; -const CornerHandle = css<{ axis: string }>` +const CornerHandle = css<{ $axis: string }>` position: absolute; z-index: 3; width: 10px !important; @@ -68,23 +68,23 @@ const CornerHandle = css<{ axis: string }>` height: 10px !important; border: none !important; } - cursor: ${(props) => props.axis + "-resize"} !important; - ${(props) => (["nw", "ne"].indexOf(props.axis) >= 0 ? "top: -5px;" : "")}; - ${(props) => (["sw", "se"].indexOf(props.axis) >= 0 ? "bottom: -5px;" : "")}; - ${(props) => (["sw", "nw"].indexOf(props.axis) >= 0 ? "left: -5px;" : "")}; - ${(props) => (["se", "ne"].indexOf(props.axis) >= 0 ? "right: -5px;" : "")}; + cursor: ${(props) => props.$axis + "-resize"} !important; + ${(props) => (["nw", "ne"].indexOf(props.$axis) >= 0 ? "top: -5px;" : "")}; + ${(props) => (["sw", "se"].indexOf(props.$axis) >= 0 ? "bottom: -5px;" : "")}; + ${(props) => (["sw", "nw"].indexOf(props.$axis) >= 0 ? "left: -5px;" : "")}; + ${(props) => (["se", "ne"].indexOf(props.$axis) >= 0 ? "right: -5px;" : "")}; `; -const ResizeHandle = styled.div<{ axis: string }>` +const ResizeHandle = styled.div<{ $axis: string }>` position: absolute; background-image: none; - ${(props) => (["s", "n"].indexOf(props.axis) >= 0 ? HorizontalHandle : "")}; - ${(props) => (["w", "e"].indexOf(props.axis) >= 0 ? VerticalHandleStyles : "")}; - ${(props) => (["sw", "nw", "se", "ne"].indexOf(props.axis) >= 0 ? CornerHandle : "")}; + ${(props) => (["s", "n"].indexOf(props.$axis) >= 0 ? HorizontalHandle : "")}; + ${(props) => (["w", "e"].indexOf(props.$axis) >= 0 ? VerticalHandleStyles : "")}; + ${(props) => (["sw", "nw", "se", "ne"].indexOf(props.$axis) >= 0 ? CornerHandle : "")}; `; const Handle = (axis: ResizeHandleAxis, ref: ReactRef) => { - return ; + return ; }; export default Handle; diff --git a/client/packages/lowcoder-design/src/components/Search.tsx b/client/packages/lowcoder-design/src/components/Search.tsx index 2e97e8e98..e72729ff1 100644 --- a/client/packages/lowcoder-design/src/components/Search.tsx +++ b/client/packages/lowcoder-design/src/components/Search.tsx @@ -14,7 +14,7 @@ const SearchInput = styled(Input)` user-select: none; overflow: hidden; - :focus { + &:focus { outline: none; box-shadow: 0 0 0 3px #daecfc; } diff --git a/client/packages/lowcoder-design/src/components/Section.tsx b/client/packages/lowcoder-design/src/components/Section.tsx index e1c019bde..869c0eabf 100644 --- a/client/packages/lowcoder-design/src/components/Section.tsx +++ b/client/packages/lowcoder-design/src/components/Section.tsx @@ -5,8 +5,8 @@ import { ReactComponent as Packup } from "icons/icon-Pack-up.svg"; import { labelCss } from "./Label"; import { controlItem, ControlNode } from "./control"; -const SectionItem = styled.div<{ width?: number }>` - width: ${(props) => (props.width ? props.width : 312)}px; +const SectionItem = styled.div<{ $width?: number }>` + width: ${(props) => (props.$width ? props.$width : 312)}px; border-bottom: 1px solid #e1e3eb; &:last-child { @@ -21,7 +21,7 @@ const SectionLabel = styled.div` line-height: 46px; font-weight: 600; - :hover { + &:hover { cursor: pointer; } `; @@ -39,7 +39,7 @@ const PackupIcon = styled(Packup)` color: #8b8fa3; transform: ${(props) => props.deg}; - :hover { + &:hover { cursor: pointer; } `; @@ -50,7 +50,7 @@ const SectionLabelDiv = styled.div` height: 46px; margin-left: 16px; - :hover { + &:hover { cursor: pointer; } @@ -63,14 +63,14 @@ const SectionLabelDiv = styled.div` } `; -const ShowChildren = styled.div<{ show?: string; noMargin?: boolean }>` - display: ${(props) => props.show || "none"}; +const ShowChildren = styled.div<{ $show?: string; $noMargin?: boolean }>` + display: ${(props) => props.$show || "none"}; flex-direction: column; gap: 8px; transition: all 3s; - margin-left: ${(props) => (props.noMargin ? 0 : 16)}px; + margin-left: ${(props) => (props.$noMargin ? 0 : 16)}px; padding-bottom: 16px; - padding-right: ${(props) => (props.noMargin ? 0 : "16px")}; + padding-right: ${(props) => (props.$noMargin ? 0 : "16px")}; `; interface ISectionConfig { @@ -113,7 +113,7 @@ export const BaseSection = (props: ISectionConfig) => { }; return ( - + {props.name && ( {props.name} @@ -123,7 +123,7 @@ export const BaseSection = (props: ISectionConfig) => { )} - + {props.children} diff --git a/client/packages/lowcoder-design/src/components/SuspensionBox.tsx b/client/packages/lowcoder-design/src/components/SuspensionBox.tsx index d1a666340..d62ed39a4 100644 --- a/client/packages/lowcoder-design/src/components/SuspensionBox.tsx +++ b/client/packages/lowcoder-design/src/components/SuspensionBox.tsx @@ -2,8 +2,8 @@ import styled from "styled-components"; import { ReactComponent as close } from "icons/icon-flokclose.svg"; import { ScrollBar } from "../components/ScrollBar"; -const Container = styled.div<{ width: number }>` - width: ${(props) => props.width}px; +const Container = styled.div<{ $width: number }>` + width: ${(props) => props.$width}px; background: #ffffff; box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); border-radius: 8px; @@ -24,7 +24,7 @@ const CloseIcon = styled(close)` padding: 1px; color: #8b8fa3; - :hover { + &:hover { cursor: pointer; } @@ -75,7 +75,7 @@ export const SuspensionBox = (props: Iprops) => { scrollable, } = props; return ( - + Codestin Search App} {!hideBodyHeader && } - + {uiComp.getView()}
{hookCompViews}
@@ -303,7 +303,7 @@ function EditorView(props: EditorViewProps) { let uiCompView; if (showAppSnapshot) { uiCompView = ( - + {uiComp.getView()} ); diff --git a/client/packages/lowcoder/src/pages/editor/right/styledComponent.tsx b/client/packages/lowcoder/src/pages/editor/right/styledComponent.tsx index ed9d7704e..605df8a9a 100644 --- a/client/packages/lowcoder/src/pages/editor/right/styledComponent.tsx +++ b/client/packages/lowcoder/src/pages/editor/right/styledComponent.tsx @@ -11,25 +11,25 @@ const NoShake = css` transform-style: preserve-3d; `; -export const CompIconDiv = styled.div<{ h: number; w: number }>` +export const CompIconDiv = styled.div<{ $h: number; $w: number }>` ${NoShake}; padding: 3px; background: #ffffff; border: 1px solid #d7d9e0; border-radius: 4px; - height: ${(props) => props.h}px; - width: ${(props) => props.w}px; + height: ${(props) => props.$h}px; + width: ${(props) => props.$w}px; display: flex; justify-content: center; align-items: center; cursor: grab; transition: all 0.2s ease-in-out; - :active { + &:active { background: #f2f4f8; } - :hover { + &:hover { ${NoShake}; padding: 0; transform: scale(1.05); diff --git a/client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx b/client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx index 6bb6dd8da..7ad807670 100644 --- a/client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx +++ b/client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx @@ -66,7 +66,7 @@ const HovDiv = styled.div` const IconContain = (props: { Icon: React.FunctionComponent> }) => { const { Icon } = props; return ( - + ); diff --git a/client/packages/lowcoder/src/pages/editor/styledComponents.tsx b/client/packages/lowcoder/src/pages/editor/styledComponents.tsx index 8ce1bb9f4..c0d68b2f9 100644 --- a/client/packages/lowcoder/src/pages/editor/styledComponents.tsx +++ b/client/packages/lowcoder/src/pages/editor/styledComponents.tsx @@ -105,14 +105,14 @@ export const Node = styled.span` } `; -export const CollapseWrapper = styled.div<{ clientX?: number }>` +export const CollapseWrapper = styled.div<{ $clientX?: number }>` width: 256px; border: 1px solid #E1E3EB; border-radius: 4px; overflow: hidden; background: #fff; padding: 4px 0; - margin: 4px -16px 4px ${(props) => props.clientX && `calc(-${props.clientX}px + 16px)`}; + margin: 4px -16px 4px ${(props) => props.$clientX && `calc(-${props.$clientX}px + 16px)`}; .simplebar-content > div { > .ant-collapse > .ant-collapse-item { > .ant-collapse-header { diff --git a/client/packages/lowcoder/src/pages/queryLibrary/LeftNav.tsx b/client/packages/lowcoder/src/pages/queryLibrary/LeftNav.tsx index a17c2541f..949a41fa0 100644 --- a/client/packages/lowcoder/src/pages/queryLibrary/LeftNav.tsx +++ b/client/packages/lowcoder/src/pages/queryLibrary/LeftNav.tsx @@ -22,14 +22,14 @@ import { DatasourceType } from "@lowcoder-ee/constants/queryConstants"; import { saveAs } from "file-saver"; import DataSourceIcon from "components/DataSourceIcon"; -const Wrapper = styled.div<{ readOnly?: boolean }>` +const Wrapper = styled.div<{ $readOnly?: boolean }>` display: flex; flex-direction: column; width: 264px; height: 100%; border-right: 1px solid #e1e3eb; ${(props) => { - if (props.readOnly) { + if (props.$readOnly) { return css` color: #8b8fa3; `; @@ -50,21 +50,21 @@ const AddIcon = styled(BluePlusIcon)` width: 12px; margin-right: 2px; `; -const CreateBtn = styled(TacoButton)<{ readOnly?: boolean }>` +const CreateBtn = styled(TacoButton)<{ $readOnly?: boolean }>` min-height: 24px; width: 70px; padding: 4px 12px; display: flex; align-items: center; box-shadow: none; - opacity: ${(props) => (props.readOnly ? 0.5 : 1)}; + opacity: ${(props) => (props.$readOnly ? 0.5 : 1)}; &:hover ${AddIcon} g { stroke: #315efb; } - :disabled, - :disabled:hover { + &:disabled, + &:disabled:hover { ${AddIcon} g { stroke: #4965f230; } @@ -89,15 +89,15 @@ const Title = styled.div` const SelectListWrapper = styled.div` height: calc(100% - 19px); `; -const SelectItem = styled.div<{ selected: boolean; readOnly?: boolean }>` +const SelectItem = styled.div<{ $selected: boolean; $readOnly?: boolean }>` height: 80px; padding: 0 16px; background-color: ${(props) => - props.selected ? (props.readOnly ? "#EFEFF1" : "#F2F7FC") : "unset"}; + props.$selected ? (props.$readOnly ? "#EFEFF1" : "#F2F7FC") : "unset"}; cursor: pointer; - :hover { - background-color: ${(props) => !props.selected && "#f2f7fc80"}; + &:hover { + background-color: ${(props) => !props.$selected && "#f2f7fc80"}; } `; @@ -141,7 +141,7 @@ const PopoverIcon = styled(PointIcon)` fill: #8b8fa3; } - :hover { + &:hover { background: #eef0f3; border-radius: 4px; cursor: pointer; @@ -165,7 +165,7 @@ export const LeftNav = (props: { return ( - +
setSearchValue(e.target.value)} style={{ width: "154px", height: "32px", margin: "0" }} /> - + {trans("newItem")} @@ -200,8 +200,8 @@ export const LeftNav = (props: { .map((q) => ( props.onSelect(q.id)} > diff --git a/client/packages/lowcoder/src/pages/queryLibrary/QueryLibraryHistoryView.tsx b/client/packages/lowcoder/src/pages/queryLibrary/QueryLibraryHistoryView.tsx index 34f711a08..b3ea7db35 100644 --- a/client/packages/lowcoder/src/pages/queryLibrary/QueryLibraryHistoryView.tsx +++ b/client/packages/lowcoder/src/pages/queryLibrary/QueryLibraryHistoryView.tsx @@ -23,19 +23,19 @@ const RevertButton = styled(TacoButton)` height: 32px; border: none; - :hover { + &:hover { padding: 0 11px; border: none; box-shadow: none; } - :focus { + &:focus { padding: 0 11px; border: none; box-shadow: none; } - :after { + &:after { content: ""; } `; @@ -45,17 +45,17 @@ const ExitButton = styled(TacoButton)` width: 80px; height: 32px; - :hover { + &:hover { padding: 0; box-shadow: none; } - :focus { + &:focus { padding: 0; box-shadow: none; } - :after { + &:after { content: ""; } `; diff --git a/client/packages/lowcoder/src/pages/queryLibrary/queryLibraryEditorView.tsx b/client/packages/lowcoder/src/pages/queryLibrary/queryLibraryEditorView.tsx index aac1204fe..40c5d0e37 100644 --- a/client/packages/lowcoder/src/pages/queryLibrary/queryLibraryEditorView.tsx +++ b/client/packages/lowcoder/src/pages/queryLibrary/queryLibraryEditorView.tsx @@ -33,7 +33,7 @@ const HeaderLeft = styled.div` font-weight: 500; margin-left: -8px; - :hover { + &:hover { background-color: #f5f5f6; } } @@ -47,7 +47,7 @@ const HeaderLeft = styled.div` border: 1px solid #3377ff; margin-left: -8px; - :focus { + &:focus { border-color: #3377ff; box-shadow: 0 0 0 2px #d6e4ff; } diff --git a/client/packages/lowcoder/src/pages/setting/permission/styledComponents.tsx b/client/packages/lowcoder/src/pages/setting/permission/styledComponents.tsx index 7223016be..f6785c582 100644 --- a/client/packages/lowcoder/src/pages/setting/permission/styledComponents.tsx +++ b/client/packages/lowcoder/src/pages/setting/permission/styledComponents.tsx @@ -48,11 +48,11 @@ export const StyledTable = styled(AntdTable)` } .ant-table-body { - ::-webkit-scrollbar { + &::-webkit-scrollbar { width: 16px; } - ::-webkit-scrollbar-thumb { + &::-webkit-scrollbar-thumb { border: 5px solid transparent; background-clip: content-box; border-radius: 9999px; @@ -172,7 +172,7 @@ export const PermissionHeaderWrapper = styled.div` padding: 7px 12px; white-space: nowrap; - ::-webkit-scrollbar { + &::-webkit-scrollbar { display: none; } } @@ -294,7 +294,7 @@ export const PopoverIcon = styled(PointIcon)` fill: #8b8fa3; } - :hover { + &:hover { background-color: #e1e3eb; border-radius: 4px; cursor: pointer; diff --git a/client/packages/lowcoder/src/pages/setting/profile/profileComponets.tsx b/client/packages/lowcoder/src/pages/setting/profile/profileComponets.tsx index 17e20f8bd..5ee41c413 100644 --- a/client/packages/lowcoder/src/pages/setting/profile/profileComponets.tsx +++ b/client/packages/lowcoder/src/pages/setting/profile/profileComponets.tsx @@ -165,7 +165,7 @@ const ProfileImageMask = styled.div` opacity: 0; cursor: pointer; - :hover { + &:hover { opacity: 1; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(0, 0, 0, 0.1); diff --git a/client/packages/lowcoder/src/pages/setting/theme/createModal.tsx b/client/packages/lowcoder/src/pages/setting/theme/createModal.tsx index d1ca5265b..753f1477a 100644 --- a/client/packages/lowcoder/src/pages/setting/theme/createModal.tsx +++ b/client/packages/lowcoder/src/pages/setting/theme/createModal.tsx @@ -54,7 +54,7 @@ function CreateModal(props: CreateModalProp) { return ( setSelectId(theme.id)} className={selectId === theme.id ? "selected" : ""} > diff --git a/client/packages/lowcoder/src/pages/setting/theme/styledComponents.tsx b/client/packages/lowcoder/src/pages/setting/theme/styledComponents.tsx index a58eebcc0..d13f06e49 100644 --- a/client/packages/lowcoder/src/pages/setting/theme/styledComponents.tsx +++ b/client/packages/lowcoder/src/pages/setting/theme/styledComponents.tsx @@ -150,7 +150,7 @@ export const BackBtn = styled.div` cursor: pointer; height: 24px; - :hover { + &:hover { color: #4965f2; } @@ -161,7 +161,7 @@ export const BackBtn = styled.div` margin-right: 4px; } - :hover svg g path { + &:hover svg g path { fill: #4965f2; } `; @@ -216,19 +216,19 @@ export const TacoInputStyled = styled(TacoInput)` } `; -export const ThemeBtn = styled.div<{ theme: ThemeDetail }>` +export const ThemeBtn = styled.div<{ $theme: ThemeDetail }>` width: 180px; margin-bottom: 4px; height: auto; padding: 7px; - background-color: ${(props) => props.theme.canvas}; + background-color: ${(props) => props.$theme.canvas}; border-radius: 6px; border: 1px solid #efeff1; font-size: 12px; position: relative; cursor: pointer; color: ${(props) => - isDarkColor(props.theme.primarySurface) ? props.theme.textLight : props.theme.textDark}; + isDarkColor(props.$theme.primarySurface) ? props.$theme.textLight : props.$theme.textDark}; .name { font-size: 13px; font-weight: 600; @@ -239,7 +239,7 @@ export const ThemeBtn = styled.div<{ theme: ThemeDetail }>` &:hover, &:focus, &:active { - background-color: ${(props) => props.theme.canvas}; + background-color: ${(props) => props.$theme.canvas}; border-color: #315efb; box-shadow: 0 0 1px 4px #d6e4ff; } @@ -247,8 +247,8 @@ export const ThemeBtn = styled.div<{ theme: ThemeDetail }>` border-radius: 6px; overflow: hidden; display: block; - border: 1px solid ${(props) => darkenColor(props.theme.primarySurface, 0.1)}; - background-color: ${(props) => props.theme.primarySurface}; + border: 1px solid ${(props) => darkenColor(props.$theme.primarySurface, 0.1)}; + background-color: ${(props) => props.$theme.primarySurface}; span { display: inline-flex; align-items: center; @@ -257,7 +257,7 @@ export const ThemeBtn = styled.div<{ theme: ThemeDetail }>` display: flex; align-items: center; padding: 0 6px; - border-bottom: 1px solid ${(props) => darkenColor(props.theme.primarySurface, 0.1)}; + border-bottom: 1px solid ${(props) => darkenColor(props.$theme.primarySurface, 0.1)}; } > div:nth-of-type(1) { height: 28px; @@ -266,7 +266,7 @@ export const ThemeBtn = styled.div<{ theme: ThemeDetail }>` svg { margin-right: 2px; rect { - fill: ${(props) => props.theme.primary}; + fill: ${(props) => props.$theme.primary}; } } } @@ -290,10 +290,10 @@ export const ThemeBtn = styled.div<{ theme: ThemeDetail }>` svg { margin-right: 2px; circle:nth-of-type(1) { - stroke: ${(props) => props.theme.primary}; + stroke: ${(props) => props.$theme.primary}; } circle:nth-of-type(2) { - fill: ${(props) => props.theme.primary}; + fill: ${(props) => props.$theme.primary}; } } span { @@ -327,9 +327,9 @@ export const ThemeBtn = styled.div<{ theme: ThemeDetail }>` display: flex; align-items: center; justify-content: center; - background-color: ${(props) => props.theme.primary}; + background-color: ${(props) => props.$theme.primary}; color: ${(props) => - isDarkColor(props.theme.primary) ? props.theme.textLight : props.theme.textDark}; + isDarkColor(props.$theme.primary) ? props.$theme.textLight : props.$theme.textDark}; } } } @@ -435,7 +435,7 @@ export const ConfigItem = styled.div` } `; -export const Radius = styled.div<{ radius: string }>` +export const Radius = styled.div<{ $radius: string }>` width: 24px; height: 24px; border-radius: 4px 0 0 4px; @@ -449,7 +449,7 @@ export const Radius = styled.div<{ radius: string }>` height: 24px; width: 24px; border: 2px solid #777; - border-radius: ${(props) => props.radius}; + border-radius: ${(props) => props.$radius}; } } `; @@ -576,7 +576,7 @@ export const StyledMoreActionIcon = styled(PopoverIcon)` fill: #8b8fa3; } - :hover { + &:hover { background-color: #e1e3eb; border-radius: 4px; cursor: pointer; @@ -616,14 +616,14 @@ const getTagStyle = (theme: ThemeDetail) => { `; }; -export const TagDesc = styled.span<{ theme: ThemeDetail }>` +export const TagDesc = styled.span<{ $theme: ThemeDetail }>` display: inline-flex; margin-right: 12px; height: 36px; width: 58px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.1); - ${(props) => getTagStyle(props.theme)} + ${(props) => getTagStyle(props.$theme)} `; export const EmptySpan = styled.span` @@ -654,7 +654,7 @@ export const CustomModalStyled = styled(CustomModal)` } `; -export const Margin = styled.div<{ margin: string }>` +export const Margin = styled.div<{ $margin: string }>` > div { margin: 3px; overflow: hidden; @@ -664,7 +664,7 @@ export const Margin = styled.div<{ margin: string }>` } } `; -export const Padding = styled.div<{ padding: string }>` +export const Padding = styled.div<{ $padding: string }>` > div { margin: 3px; overflow: hidden; @@ -674,7 +674,7 @@ export const Padding = styled.div<{ padding: string }>` } }` // Added By Aqib Mirza -export const GridColumns = styled.div<{ gridColumns: string }>` +export const GridColumns = styled.div<{ $gridColumns: string }>` > div { margin: 3px; overflow: hidden; diff --git a/client/packages/lowcoder/src/pages/setting/theme/themeList.tsx b/client/packages/lowcoder/src/pages/setting/theme/themeList.tsx index 5170a1c07..0d5fa3c1c 100644 --- a/client/packages/lowcoder/src/pages/setting/theme/themeList.tsx +++ b/client/packages/lowcoder/src/pages/setting/theme/themeList.tsx @@ -87,7 +87,7 @@ function ThemeList(props: ThemeListProp) { render={(value, theme: ThemeType) => { return ( - +
diff --git a/client/packages/lowcoder/src/pages/userAuth/authComponents.tsx b/client/packages/lowcoder/src/pages/userAuth/authComponents.tsx index 7df9dd684..3b6f6942f 100644 --- a/client/packages/lowcoder/src/pages/userAuth/authComponents.tsx +++ b/client/packages/lowcoder/src/pages/userAuth/authComponents.tsx @@ -32,7 +32,7 @@ const AuthCard = styled.div` } `; -const AuthCardHeading = styled.div<{ type?: string }>` +const AuthCardHeading = styled.div<{ $type?: string }>` font-weight: 600; font-size: 28px; color: #222222; @@ -47,7 +47,7 @@ const AuthCardHeading = styled.div<{ type?: string }>` @media screen and (max-width: 640px) { font-size: 23px; line-height: 23px; - ${(props) => props.type === "large" && "margin-top: 32px"} + ${(props) => props.$type === "large" && "margin-top: 32px"} } `; @@ -70,8 +70,8 @@ const AuthBottom = styled.div` > button:first-child { // over 5 children, hide the button label - :nth-last-child(n + 5), - :nth-last-child(n + 5) ~ button { + &:nth-last-child(n + 5), + &:nth-last-child(n + 5) ~ button { margin-right: 16px; .auth-label { @@ -131,7 +131,7 @@ export const AuthContainer = (props: { return ( {props.heading || ""} @@ -267,7 +267,7 @@ export const StyledRouteLink = styled(Link)` line-height: 16px; margin-left: auto; - :hover { + &:hover { color: #315efb; } `; diff --git a/client/packages/lowcoder/src/util/bottomResUtils.tsx b/client/packages/lowcoder/src/util/bottomResUtils.tsx index 6abceb332..099a00e07 100644 --- a/client/packages/lowcoder/src/util/bottomResUtils.tsx +++ b/client/packages/lowcoder/src/util/bottomResUtils.tsx @@ -40,10 +40,10 @@ const QueryLibrary = styled(QueryLibraryIcon)` } `; -export const IconWrapper = styled.div<{ isRestApi?: boolean }>` +export const IconWrapper = styled.div<{ $isRestApi?: boolean }>` display: flex; - width: ${(props) => (props.isRestApi ? "26px" : "16px")}; - height: ${(props) => (props.isRestApi ? "13px" : "16px")}; + width: ${(props) => (props.$isRestApi ? "26px" : "16px")}; + height: ${(props) => (props.$isRestApi ? "13px" : "16px")}; border-radius: 2px; flex-shrink: 0; margin-right: 4px; @@ -51,13 +51,13 @@ export const IconWrapper = styled.div<{ isRestApi?: boolean }>` `; export const LargeBottomResIconWrapper = styled(IconWrapper)` - width: ${(props) => (props.isRestApi ? "32px" : "20px")}; - height: ${(props) => (props.isRestApi ? "16px" : "20px")}; + width: ${(props) => (props.$isRestApi ? "32px" : "20px")}; + height: ${(props) => (props.$isRestApi ? "16px" : "20px")}; margin-right: 8px; svg { - width: ${(props) => (props.isRestApi ? "32px" : "20px")}; - height: ${(props) => (props.isRestApi ? "16px" : "20px")}; + width: ${(props) => (props.$isRestApi ? "32px" : "20px")}; + height: ${(props) => (props.$isRestApi ? "16px" : "20px")}; } `; @@ -146,8 +146,8 @@ export const getBottomResIcon = ( }; const isRestApi = type === "restApi" && !!httpMethod; return size === "large" ? ( - {getIcon()} + {getIcon()} ) : ( - {getIcon()} + {getIcon()} ); }; diff --git a/client/yarn.lock b/client/yarn.lock index a322d1b06..4711fa3ff 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -82,20 +82,20 @@ __metadata: linkType: hard "@ant-design/cssinjs@npm:^1.18.1": - version: 1.18.1 - resolution: "@ant-design/cssinjs@npm:1.18.1" + version: 1.18.2 + resolution: "@ant-design/cssinjs@npm:1.18.2" dependencies: "@babel/runtime": ^7.11.1 "@emotion/hash": ^0.8.0 "@emotion/unitless": ^0.7.5 classnames: ^2.3.1 - csstype: 3.1.2 + csstype: ^3.1.3 rc-util: ^5.35.0 stylis: ^4.0.13 peerDependencies: react: ">=16.0.0" react-dom: ">=16.0.0" - checksum: 69a46791ef18a66fabe6569e58ad97feff9f4366c6653a2ae1360aca21607c6ce448595dd26c72d2e387352d6bafe5f1ff4339c956798c19a7de69f09c4f2818 + checksum: b3430547a625fae25b0b459fc9055422985fb1855f0296bb0208d51586e7c0c1e1dae2dc59b6af28234f4b3de938434a0b737bde59d8c4f52feb7a14e7fa8202 languageName: node linkType: hard @@ -333,7 +333,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.0.0, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.22.5": +"@babel/helper-module-imports@npm:^7.22.15": version: 7.22.15 resolution: "@babel/helper-module-imports@npm:7.22.15" dependencies: @@ -757,7 +757,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.22.5, @babel/plugin-syntax-jsx@npm:^7.23.3, @babel/plugin-syntax-jsx@npm:^7.7.2": +"@babel/plugin-syntax-jsx@npm:^7.23.3, @babel/plugin-syntax-jsx@npm:^7.7.2": version: 7.23.3 resolution: "@babel/plugin-syntax-jsx@npm:7.23.3" dependencies: @@ -1745,7 +1745,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.23.6, @babel/traverse@npm:^7.4.5": +"@babel/traverse@npm:^7.23.6": version: 7.23.6 resolution: "@babel/traverse@npm:7.23.6" dependencies: @@ -2021,7 +2021,7 @@ __metadata: languageName: node linkType: hard -"@emotion/is-prop-valid@npm:^1.1.0": +"@emotion/is-prop-valid@npm:1.2.1": version: 1.2.1 resolution: "@emotion/is-prop-valid@npm:1.2.1" dependencies: @@ -2037,14 +2037,14 @@ __metadata: languageName: node linkType: hard -"@emotion/stylis@npm:^0.8.4": - version: 0.8.5 - resolution: "@emotion/stylis@npm:0.8.5" - checksum: 67ff5958449b2374b329fb96e83cb9025775ffe1e79153b499537c6c8b2eb64b77f32d7b5d004d646973662356ceb646afd9269001b97c54439fceea3203ce65 +"@emotion/unitless@npm:0.8.0": + version: 0.8.0 + resolution: "@emotion/unitless@npm:0.8.0" + checksum: 176141117ed23c0eb6e53a054a69c63e17ae532ec4210907a20b2208f91771821835f1c63dd2ec63e30e22fcc984026d7f933773ee6526dd038e0850919fae7a languageName: node linkType: hard -"@emotion/unitless@npm:^0.7.4, @emotion/unitless@npm:^0.7.5": +"@emotion/unitless@npm:^0.7.5": version: 0.7.5 resolution: "@emotion/unitless@npm:0.7.5" checksum: f976e5345b53fae9414a7b2e7a949aa6b52f8bdbcc84458b1ddc0729e77ba1d1dfdff9960e0da60183877873d3a631fa24d9695dd714ed94bcd3ba5196586a6b @@ -3675,6 +3675,22 @@ __metadata: languageName: node linkType: hard +"@testing-library/dom@npm:^9.0.0": + version: 9.3.3 + resolution: "@testing-library/dom@npm:9.3.3" + dependencies: + "@babel/code-frame": ^7.10.4 + "@babel/runtime": ^7.12.5 + "@types/aria-query": ^5.0.1 + aria-query: 5.1.3 + chalk: ^4.1.0 + dom-accessibility-api: ^0.5.9 + lz-string: ^1.5.0 + pretty-format: ^27.0.2 + checksum: 34e0a564da7beb92aa9cc44a9080221e2412b1a132eb37be3d513fe6c58027674868deb9f86195756d98d15ba969a30fe00632a4e26e25df2a5a4f6ac0686e37 + languageName: node + linkType: hard + "@testing-library/jest-dom@npm:^5.16.5": version: 5.17.0 resolution: "@testing-library/jest-dom@npm:5.17.0" @@ -3692,6 +3708,29 @@ __metadata: languageName: node linkType: hard +"@testing-library/react@npm:^14.1.2": + version: 14.1.2 + resolution: "@testing-library/react@npm:14.1.2" + dependencies: + "@babel/runtime": ^7.12.5 + "@testing-library/dom": ^9.0.0 + "@types/react-dom": ^18.0.0 + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + checksum: 0269903e53412cf96fddb55c8a97a9987a89c3308d71fa1418fe61c47d275445e7044c5387f57cf39b8cda319a41623dbad2cce7a17016aed3a9e85185aac75a + languageName: node + linkType: hard + +"@testing-library/user-event@npm:^14.5.1": + version: 14.5.1 + resolution: "@testing-library/user-event@npm:14.5.1" + peerDependencies: + "@testing-library/dom": ">=7.21.4" + checksum: 3e6bc9fd53dfe2f3648190193ed2fd4bca2a1bfb47f68810df3b33f05412526e5fd5c4ef9dc5375635e0f4cdf1859916867b597eed22bda1321e04242ea6c519 + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -3706,6 +3745,13 @@ __metadata: languageName: node linkType: hard +"@types/aria-query@npm:^5.0.1": + version: 5.0.4 + resolution: "@types/aria-query@npm:5.0.4" + checksum: ad8b87e4ad64255db5f0a73bc2b4da9b146c38a3a8ab4d9306154334e0fc67ae64e76bfa298eebd1e71830591fb15987e5de7111bdb36a2221bdc379e3415fb0 + languageName: node + linkType: hard + "@types/axios@npm:^0.14.0": version: 0.14.0 resolution: "@types/axios@npm:0.14.0" @@ -4045,7 +4091,7 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:^18.2.18": +"@types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.2.18": version: 18.2.18 resolution: "@types/react-dom@npm:18.2.18" dependencies: @@ -4215,7 +4261,7 @@ __metadata: languageName: node linkType: hard -"@types/styled-components@npm:^5.1.19": +"@types/styled-components@npm:^5.1.34": version: 5.1.34 resolution: "@types/styled-components@npm:5.1.34" dependencies: @@ -4226,6 +4272,13 @@ __metadata: languageName: node linkType: hard +"@types/stylis@npm:4.2.0": + version: 4.2.0 + resolution: "@types/stylis@npm:4.2.0" + checksum: 02a47584acd2fcb664f7d8270a69686c83752bdfb855f804015d33116a2b09c0b2ac535213a4a7b6d3a78b2915b22b4024cce067ae979beee0e4f8f5fdbc26a9 + languageName: node + linkType: hard + "@types/stylis@npm:^4.0.2": version: 4.2.4 resolution: "@types/stylis@npm:4.2.4" @@ -4870,9 +4923,9 @@ __metadata: languageName: node linkType: hard -"antd@npm:^5.12.2": - version: 5.12.2 - resolution: "antd@npm:5.12.2" +"antd@npm:^5.12.5": + version: 5.12.5 + resolution: "antd@npm:5.12.5" dependencies: "@ant-design/colors": ^7.0.0 "@ant-design/cssinjs": ^1.18.1 @@ -4896,7 +4949,7 @@ __metadata: rc-dropdown: ~4.1.0 rc-field-form: ~1.41.0 rc-image: ~7.5.1 - rc-input: ~1.3.6 + rc-input: ~1.3.11 rc-input-number: ~8.4.0 rc-mentions: ~2.9.1 rc-menu: ~9.12.4 @@ -4912,10 +4965,10 @@ __metadata: rc-slider: ~10.5.0 rc-steps: ~6.0.1 rc-switch: ~4.1.0 - rc-table: ~7.36.0 + rc-table: ~7.36.1 rc-tabs: ~12.14.1 rc-textarea: ~1.5.3 - rc-tooltip: ~6.1.2 + rc-tooltip: ~6.1.3 rc-tree: ~5.8.2 rc-tree-select: ~5.15.0 rc-upload: ~4.3.5 @@ -4925,7 +4978,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: de4daf00999b27a9414378c9c2d484ab5e99a0e344735ea45f7f938ba15565c939416308097cfcff19d24a90a7e780de965fa42cfb6258ac34f2f2e3a13161d3 + checksum: 80cc38f245a4a451ccae39a72b87c3c54d38bdde2dae9f4337912118e4a2e62f68069522fe4ece9d3827d5b33f61798421f779b8505dfb4cf32f7f12a9c0c039 languageName: node linkType: hard @@ -4962,6 +5015,15 @@ __metadata: languageName: node linkType: hard +"aria-query@npm:5.1.3": + version: 5.1.3 + resolution: "aria-query@npm:5.1.3" + dependencies: + deep-equal: ^2.0.5 + checksum: 929ff95f02857b650fb4cbcd2f41072eee2f46159a6605ea03bf63aa572e35ffdff43d69e815ddc462e16e07de8faba3978afc2813650b4448ee18c9895d982b + languageName: node + linkType: hard + "aria-query@npm:^5.0.0, aria-query@npm:^5.3.0": version: 5.3.0 resolution: "aria-query@npm:5.3.0" @@ -5299,21 +5361,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-styled-components@npm:>= 1.12.0": - version: 2.1.4 - resolution: "babel-plugin-styled-components@npm:2.1.4" - dependencies: - "@babel/helper-annotate-as-pure": ^7.22.5 - "@babel/helper-module-imports": ^7.22.5 - "@babel/plugin-syntax-jsx": ^7.22.5 - lodash: ^4.17.21 - picomatch: ^2.3.1 - peerDependencies: - styled-components: ">= 2" - checksum: d791aed68d975dae4f73055f86cd47afa99cb402b8113acdaf5678c8b6fba2cbc15543f2debe8ed09becb198aae8be2adfe268ad41f4bca917288e073a622bf8 - languageName: node - linkType: hard - "babel-plugin-transform-react-remove-prop-types@npm:^0.4.24": version: 0.4.24 resolution: "babel-plugin-transform-react-remove-prop-types@npm:0.4.24" @@ -5759,7 +5806,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:4, chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.1": +"chalk@npm:4, chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.1": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -5861,13 +5908,20 @@ __metadata: languageName: node linkType: hard -"classnames@npm:2.x, classnames@npm:^2.2.1, classnames@npm:^2.2.3, classnames@npm:^2.2.5, classnames@npm:^2.2.6, classnames@npm:^2.3.1, classnames@npm:^2.3.2": +"classnames@npm:2.x, classnames@npm:^2.2.1, classnames@npm:^2.2.6, classnames@npm:^2.3.2": version: 2.3.2 resolution: "classnames@npm:2.3.2" checksum: 2c62199789618d95545c872787137262e741f9db13328e216b093eea91c85ef2bfb152c1f9e63027204e2559a006a92eb74147d46c800a9f96297ae1d9f96f4e languageName: node linkType: hard +"classnames@npm:^2.2.3, classnames@npm:^2.2.5, classnames@npm:^2.3.1": + version: 2.5.0 + resolution: "classnames@npm:2.5.0" + checksum: 7805e0ed49790dd11da5da4d8509dbad2d9ed8ec817bfa01d3b69d40dc752ee4df757b9e845371a42547989863db76c463619c446aa24cdbd253d65ef927455e + languageName: node + linkType: hard + "clean-css@npm:^5.2.2": version: 5.3.3 resolution: "clean-css@npm:5.3.3" @@ -6409,7 +6463,7 @@ __metadata: languageName: node linkType: hard -"css-to-react-native@npm:^3.0.0": +"css-to-react-native@npm:3.2.0": version: 3.2.0 resolution: "css-to-react-native@npm:3.2.0" dependencies: @@ -6526,7 +6580,7 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^3.0.2, csstype@npm:^3.1.2": +"csstype@npm:^3.0.2, csstype@npm:^3.1.2, csstype@npm:^3.1.3": version: 3.1.3 resolution: "csstype@npm:3.1.3" checksum: 8db785cc92d259102725b3c694ec0c823f5619a84741b5c7991b8ad135dfaa66093038a1cc63e03361a6cd28d122be48f2106ae72334e067dd619a51f49eddf7 @@ -7059,6 +7113,32 @@ __metadata: languageName: node linkType: hard +"deep-equal@npm:^2.0.5": + version: 2.2.3 + resolution: "deep-equal@npm:2.2.3" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.5 + es-get-iterator: ^1.1.3 + get-intrinsic: ^1.2.2 + is-arguments: ^1.1.1 + is-array-buffer: ^3.0.2 + is-date-object: ^1.0.5 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + isarray: ^2.0.5 + object-is: ^1.1.5 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.1 + side-channel: ^1.0.4 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.13 + checksum: ee8852f23e4d20a5626c13b02f415ba443a1b30b4b3d39eaf366d59c4a85e6545d7ec917db44d476a85ae5a86064f7e5f7af7479f38f113995ba869f3a1ddc53 + languageName: node + linkType: hard + "deep-is@npm:^0.1.3, deep-is@npm:~0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" @@ -7210,7 +7290,7 @@ __metadata: languageName: node linkType: hard -"dom-accessibility-api@npm:^0.5.6": +"dom-accessibility-api@npm:^0.5.6, dom-accessibility-api@npm:^0.5.9": version: 0.5.16 resolution: "dom-accessibility-api@npm:0.5.16" checksum: 005eb283caef57fc1adec4d5df4dd49189b628f2f575af45decb210e04d634459e3f1ee64f18b41e2dcf200c844bc1d9279d80807e686a30d69a4756151ad248 @@ -7581,6 +7661,23 @@ __metadata: languageName: node linkType: hard +"es-get-iterator@npm:^1.1.3": + version: 1.1.3 + resolution: "es-get-iterator@npm:1.1.3" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.3 + has-symbols: ^1.0.3 + is-arguments: ^1.1.1 + is-map: ^2.0.2 + is-set: ^2.0.2 + is-string: ^1.0.7 + isarray: ^2.0.5 + stop-iteration-iterator: ^1.0.0 + checksum: 8fa118da42667a01a7c7529f8a8cca514feeff243feec1ce0bb73baaa3514560bd09d2b3438873cf8a5aaec5d52da248131de153b28e2638a061b6e4df13267d + languageName: node + linkType: hard + "es-iterator-helpers@npm:^1.0.12, es-iterator-helpers@npm:^1.0.15": version: 1.0.15 resolution: "es-iterator-helpers@npm:1.0.15" @@ -9137,7 +9234,7 @@ __metadata: languageName: node linkType: hard -"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.1.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.2": +"hoist-non-react-statics@npm:^3.1.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.2": version: 3.3.2 resolution: "hoist-non-react-statics@npm:3.3.2" dependencies: @@ -9452,7 +9549,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.5": +"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.5": version: 1.0.6 resolution: "internal-slot@npm:1.0.6" dependencies: @@ -9717,7 +9814,7 @@ __metadata: languageName: node linkType: hard -"is-map@npm:^2.0.1": +"is-map@npm:^2.0.1, is-map@npm:^2.0.2": version: 2.0.2 resolution: "is-map@npm:2.0.2" checksum: ace3d0ecd667bbdefdb1852de601268f67f2db725624b1958f279316e13fecb8fa7df91fd60f690d7417b4ec180712f5a7ee967008e27c65cfd475cc84337728 @@ -9817,7 +9914,7 @@ __metadata: languageName: node linkType: hard -"is-set@npm:^2.0.1": +"is-set@npm:^2.0.1, is-set@npm:^2.0.2": version: 2.0.2 resolution: "is-set@npm:2.0.2" checksum: b64343faf45e9387b97a6fd32be632ee7b269bd8183701f3b3f5b71a7cf00d04450ed8669d0bd08753e08b968beda96fca73a10fd0ff56a32603f64deba55a57 @@ -11437,6 +11534,8 @@ __metadata: "@lottiefiles/react-lottie-player": ^3.5.3 "@rollup/plugin-typescript": ^8.5.0 "@testing-library/jest-dom": ^5.16.5 + "@testing-library/react": ^14.1.2 + "@testing-library/user-event": ^14.5.1 "@types/file-saver": ^2.0.5 "@types/jest": ^29.2.2 "@types/mime": ^2.0.3 @@ -11446,7 +11545,7 @@ __metadata: "@types/react-resizable": ^3.0.5 "@types/react-router-dom": ^5.3.2 "@types/shelljs": ^0.8.11 - "@types/styled-components": ^5.1.19 + "@types/styled-components": ^5.1.34 "@types/stylis": ^4.0.2 "@types/tern": 0.23.4 "@types/ua-parser-js": ^0.7.36 @@ -11547,7 +11646,7 @@ __metadata: agora-access-token: ^2.0.4 agora-rtc-sdk-ng: ^4.19.0 agora-rtm-sdk: ^1.5.1 - antd: ^5.12.2 + antd: ^5.12.5 axios: ^1.6.2 buffer: ^6.0.3 clsx: ^2.0.0 @@ -11609,7 +11708,7 @@ __metadata: rollup-plugin-visualizer: ^5.9.2 simplebar-react: 2.3.6 sql-formatter: ^8.2.0 - styled-components: ^5.3.3 + styled-components: ^6.1.6 stylis: ^4.1.1 tern: ^0.24.3 typescript: ^4.8.4 @@ -11674,6 +11773,15 @@ __metadata: languageName: node linkType: hard +"lz-string@npm:^1.5.0": + version: 1.5.0 + resolution: "lz-string@npm:1.5.0" + bin: + lz-string: bin/bin.js + checksum: 1ee98b4580246fd90dd54da6e346fb1caefcf05f677c686d9af237a157fdea3fd7c83a4bc58f858cd5b10a34d27afe0fdcbd0505a47e0590726a873dc8b8f65d + languageName: node + linkType: hard + "magic-string@npm:^0.22.5": version: 0.22.5 resolution: "magic-string@npm:0.22.5" @@ -13376,6 +13484,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:8.4.31": + version: 8.4.31 + resolution: "postcss@npm:8.4.31" + dependencies: + nanoid: ^3.3.6 + picocolors: ^1.0.0 + source-map-js: ^1.0.2 + checksum: 1d8611341b073143ad90486fcdfeab49edd243377b1f51834dc4f6d028e82ce5190e4f11bb2633276864503654fb7cab28e67abdc0fbf9d1f88cad4a0ff0beea + languageName: node + linkType: hard + "postcss@npm:^8.4.27": version: 8.4.32 resolution: "postcss@npm:8.4.32" @@ -13417,6 +13536,17 @@ __metadata: languageName: node linkType: hard +"pretty-format@npm:^27.0.2": + version: 27.5.1 + resolution: "pretty-format@npm:27.5.1" + dependencies: + ansi-regex: ^5.0.1 + ansi-styles: ^5.0.0 + react-is: ^17.0.1 + checksum: cf610cffcb793885d16f184a62162f2dd0df31642d9a18edf4ca298e909a8fe80bdbf556d5c9573992c102ce8bf948691da91bf9739bee0ffb6e79c8a8a6e088 + languageName: node + linkType: hard + "pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": version: 29.7.0 resolution: "pretty-format@npm:29.7.0" @@ -13812,7 +13942,7 @@ __metadata: languageName: node linkType: hard -"rc-input@npm:~1.3.5, rc-input@npm:~1.3.6": +"rc-input@npm:~1.3.11, rc-input@npm:~1.3.5": version: 1.3.11 resolution: "rc-input@npm:1.3.11" dependencies: @@ -13906,8 +14036,8 @@ __metadata: linkType: hard "rc-pagination@npm:~4.0.3": - version: 4.0.3 - resolution: "rc-pagination@npm:4.0.3" + version: 4.0.4 + resolution: "rc-pagination@npm:4.0.4" dependencies: "@babel/runtime": ^7.10.1 classnames: ^2.3.2 @@ -13915,7 +14045,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 7b238f0c9c2d7e3d0d42b54007ca3e60adae67b04455c186a3c9038c52257bdd1ff90690f0ca0087233b35a5132207a0c197e93caeb301ec41085d8162e052a3 + checksum: 2ff6f2dd6ad0b855d1e747d09534f2efe9a124af4ff4cd5d5550a6cae9392879c06f471d4ee29d2a72c2c416f89dac6e43a7788650db5b8e54001affba2b172c languageName: node linkType: hard @@ -14084,9 +14214,9 @@ __metadata: languageName: node linkType: hard -"rc-table@npm:~7.36.0": - version: 7.36.0 - resolution: "rc-table@npm:7.36.0" +"rc-table@npm:~7.36.1": + version: 7.36.1 + resolution: "rc-table@npm:7.36.1" dependencies: "@babel/runtime": ^7.10.1 "@rc-component/context": ^1.4.0 @@ -14097,7 +14227,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 4db1fbd348bd2ebde767f87e047abd07c60a2ddd054f74bf3193a6bf789714512c5aca36e946ee7491d08b202b625a652c7ac9f48d213f034816a6ad6d8dcffe + checksum: b4441944eb0feb011091caeb433d455dbf52c8c16b39b0730a48bce05b28ce8928344053c8b9eb5f3dab60f1590edcfaeca05b5cf6e9c77832cf379e6f1568c7 languageName: node linkType: hard @@ -14135,9 +14265,9 @@ __metadata: languageName: node linkType: hard -"rc-tooltip@npm:~6.1.2": - version: 6.1.2 - resolution: "rc-tooltip@npm:6.1.2" +"rc-tooltip@npm:~6.1.3": + version: 6.1.3 + resolution: "rc-tooltip@npm:6.1.3" dependencies: "@babel/runtime": ^7.11.2 "@rc-component/trigger": ^1.18.0 @@ -14145,7 +14275,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 0450fe0bac954fe13cc1117cef1e632ec65e5fbb7bc9d31069925e7df026ff39211cad95509ec93500541bf55e70efaf0ee99694fdd18deac7e804b1b3f72240 + checksum: f67cf4e409d110f9f4098807303bd4590297f45ffb21d20f3c59a93de45b38c477eeee346e78b9c2e07bffd2ed53e22f435023113a08b553ed10e269754507e2 languageName: node linkType: hard @@ -14198,8 +14328,8 @@ __metadata: linkType: hard "rc-upload@npm:~4.3.5": - version: 4.3.5 - resolution: "rc-upload@npm:4.3.5" + version: 4.3.6 + resolution: "rc-upload@npm:4.3.6" dependencies: "@babel/runtime": ^7.18.3 classnames: ^2.2.5 @@ -14207,7 +14337,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 00758b3f34d5850a37cba8e1b4d7c5e2e60c8bd21e44b42c4ac2fe5f641575464e4209d7b9bdbdab70e46ff55705f5be71b1df7f13bbe15fd5950e895474c0cd + checksum: d82d6067f3d5f7dcca7fb1cab1abf3a5bd92d448803cd249d8c8743cb75ddf9c8fdfc720459ad0aed6ca108fbe895607515f9d4fee2ba27238230c18336fd9f9 languageName: node linkType: hard @@ -14387,7 +14517,7 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^17.0.2": +"react-is@npm:^17.0.1, react-is@npm:^17.0.2": version: 17.0.2 resolution: "react-is@npm:17.0.2" checksum: 9d6d111d8990dc98bc5402c1266a808b0459b5d54830bbea24c12d908b536df7883f268a7868cfaedde3dd9d4e0d574db456f84d2e6df9c4526f99bb4b5344d8 @@ -15715,7 +15845,7 @@ __metadata: languageName: node linkType: hard -"shallowequal@npm:^1.1.0": +"shallowequal@npm:1.1.0, shallowequal@npm:^1.1.0": version: 1.1.0 resolution: "shallowequal@npm:1.1.0" checksum: f4c1de0837f106d2dbbfd5d0720a5d059d1c66b42b580965c8f06bb1db684be8783538b684092648c981294bf817869f743a066538771dbecb293df78f765e00 @@ -16050,6 +16180,15 @@ __metadata: languageName: node linkType: hard +"stop-iteration-iterator@npm:^1.0.0": + version: 1.0.0 + resolution: "stop-iteration-iterator@npm:1.0.0" + dependencies: + internal-slot: ^1.0.4 + checksum: d04173690b2efa40e24ab70e5e51a3ff31d56d699550cfad084104ab3381390daccb36652b25755e420245f3b0737de66c1879eaa2a8d4fc0a78f9bf892fcb42 + languageName: node + linkType: hard + "string-argv@npm:0.3.2": version: 0.3.2 resolution: "string-argv@npm:0.3.2" @@ -16263,29 +16402,34 @@ __metadata: languageName: node linkType: hard -"styled-components@npm:^5.3.3": - version: 5.3.11 - resolution: "styled-components@npm:5.3.11" +"styled-components@npm:^6.1.6": + version: 6.1.6 + resolution: "styled-components@npm:6.1.6" dependencies: - "@babel/helper-module-imports": ^7.0.0 - "@babel/traverse": ^7.4.5 - "@emotion/is-prop-valid": ^1.1.0 - "@emotion/stylis": ^0.8.4 - "@emotion/unitless": ^0.7.4 - babel-plugin-styled-components: ">= 1.12.0" - css-to-react-native: ^3.0.0 - hoist-non-react-statics: ^3.0.0 - shallowequal: ^1.1.0 - supports-color: ^5.5.0 + "@emotion/is-prop-valid": 1.2.1 + "@emotion/unitless": 0.8.0 + "@types/stylis": 4.2.0 + css-to-react-native: 3.2.0 + csstype: 3.1.2 + postcss: 8.4.31 + shallowequal: 1.1.0 + stylis: 4.3.1 + tslib: 2.5.0 peerDependencies: react: ">= 16.8.0" react-dom: ">= 16.8.0" - react-is: ">= 16.8.0" - checksum: 10edd4dae3b0231ec02d86bdd09c88e894eedfa7e9d4f8e562b09fb69c67a27d586cbcf35c785002d59b3bf11e6c0940b0efce40d13ae9ed148b26b1dc8f3284 + checksum: 8bcda3719af222ebde8be358d0db4019e6fb03b6f9b19797ec20acc26aad4b1ede83b3820b25b8dd4aa7a1dfa7bb26d82e69f063b8e1f3b0d8a8e6e095f1b643 + languageName: node + linkType: hard + +"stylis@npm:4.3.1, stylis@npm:^4.0.13": + version: 4.3.1 + resolution: "stylis@npm:4.3.1" + checksum: d365f1b008677b2147e8391e9cf20094a4202a5f9789562e7d9d0a3bd6f0b3067d39e8fd17cce5323903a56f6c45388e3d839e9c0bb5a738c91726992b14966d languageName: node linkType: hard -"stylis@npm:^4.0.13, stylis@npm:^4.1.1, stylis@npm:^4.1.3, stylis@npm:^4.3.0": +"stylis@npm:^4.1.1, stylis@npm:^4.1.3, stylis@npm:^4.3.0": version: 4.3.0 resolution: "stylis@npm:4.3.0" checksum: 6120de3f03eacf3b5adc8e7919c4cca991089156a6badc5248752a3088106afaaf74996211a6817a7760ebeadca09004048eea31875bd8d4df51386365c50025 @@ -16310,7 +16454,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^5.3.0, supports-color@npm:^5.5.0": +"supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" dependencies: @@ -16695,6 +16839,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.5.0": + version: 2.5.0 + resolution: "tslib@npm:2.5.0" + checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1 + languageName: node + linkType: hard + "tslib@npm:^1.8.1, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" From 1e03ad286b5d1895b8e55e43939249b44cadf776 Mon Sep 17 00:00:00 2001 From: RAHEEL Date: Mon, 1 Jan 2024 11:16:52 +0500 Subject: [PATCH 03/41] updates after styled-compoents upgrade + fixing unit tests --- client/config/test/jest.config.js | 15 ++++++++++++ client/config/test/jest.setup-after-env.js | 24 ++++++++++++++++--- client/config/test/jest.setup.js | 6 ++--- client/config/test/mocks/antd.js | 1 + client/config/test/mocks/dnd-kit-core.js | 1 + client/config/test/mocks/dnd-kit-sortable.js | 1 + client/config/test/mocks/history.js | 1 + client/config/test/mocks/react-draggable.js | 1 + client/config/test/mocks/react-redux.js | 3 +++ .../test/mocks/react-resize-detector.js | 1 + client/config/test/mocks/react-virtualized.js | 1 + .../src/comps/calendarComp/calendarComp.tsx | 3 ++- .../comps/calendarComp/calendarConstants.tsx | 2 +- .../imageEditorComp/imageEditorConstants.tsx | 2 +- .../src/components/Collapase.tsx | 2 +- .../src/components/CustomModal.tsx | 4 ++-- .../lowcoder-design/src/components/Drawer.tsx | 2 +- .../src/components/Dropdown.tsx | 3 ++- .../lowcoder-design/src/components/Input.tsx | 2 +- .../lowcoder-design/src/components/Menu.tsx | 2 +- .../src/components/Modal/index.tsx | 2 +- .../lowcoder-design/src/components/Search.tsx | 2 +- .../lowcoder-design/src/components/Table.tsx | 2 +- .../lowcoder-design/src/components/alert.tsx | 2 +- .../lowcoder-design/src/components/button.tsx | 2 +- .../src/components/checkBox.tsx | 2 +- .../src/components/colorSelect/index.tsx | 2 +- .../src/components/customSelect.tsx | 2 +- .../lowcoder-design/src/components/edit.tsx | 2 +- .../lowcoder-design/src/components/form.tsx | 24 +++++++------------ .../src/components/iconSelect/index.tsx | 4 ++-- .../src/components/popover.tsx | 2 +- .../src/components/popupCard.tsx | 3 ++- .../lowcoder-design/src/components/query.tsx | 2 +- .../src/components/tacoInput.tsx | 2 +- .../src/components/tacoPagination.tsx | 5 ++-- .../src/components/toolTip.tsx | 4 ++-- client/packages/lowcoder/src/app.tsx | 3 ++- .../lowcoder/src/components/InputList.tsx | 2 +- .../src/components/JSLibraryModal.tsx | 2 +- .../lowcoder/src/components/JSLibraryTree.tsx | 4 ++-- .../lowcoder/src/components/LazyRoute.tsx | 2 +- .../lowcoder/src/components/ModuleLoading.tsx | 2 +- .../lowcoder/src/components/PageSkeleton.tsx | 3 ++- .../PermissionDialog/Permission.tsx | 2 +- .../src/components/ResCreatePanel.tsx | 2 +- .../lowcoder/src/components/Segmented.tsx | 2 +- .../lowcoder/src/components/Table.tsx | 2 +- .../packages/lowcoder/src/components/Tabs.tsx | 2 +- .../lowcoder/src/components/TextArea.tsx | 5 ++-- .../src/components/TypographyText.tsx | 2 +- .../lowcoder/src/components/layout/Layout.tsx | 2 +- .../src/components/layout/MainContent.tsx | 6 +++-- .../src/components/layout/SideBar.tsx | 4 ++-- .../src/components/resultPanel/index.tsx | 2 +- .../src/comps/comps/appSettingsComp.tsx | 2 +- .../autoCompleteComp/autoCompleteComp.tsx | 9 +++---- .../autoCompleteConstants.tsx | 2 +- .../comps/buttonComp/buttonCompConstants.tsx | 2 +- .../comps/comps/buttonComp/dropdownComp.tsx | 3 ++- .../src/comps/comps/buttonComp/linkComp.tsx | 2 +- .../comps/comps/buttonComp/scannerComp.tsx | 5 +++- .../lowcoder/src/comps/comps/carouselComp.tsx | 2 +- .../comps/comps/commentComp/commentComp.tsx | 6 ++++- .../comps/comps/dateComp/dateRangeUIView.tsx | 2 +- .../src/comps/comps/dateComp/dateUIView.tsx | 2 +- .../src/comps/comps/dateComp/timeComp.tsx | 4 ++-- .../comps/comps/dateComp/timeRangeUIView.tsx | 2 +- .../src/comps/comps/dateComp/timeUIView.tsx | 2 +- .../lowcoder/src/comps/comps/dividerComp.tsx | 2 +- .../src/comps/comps/fileComp/fileComp.tsx | 6 ++--- .../src/comps/comps/formComp/createForm.tsx | 3 ++- .../src/comps/comps/formComp/formComp.tsx | 2 +- .../lowcoder/src/comps/comps/imageComp.tsx | 2 +- .../comps/jsonSchemaFormComp/dateWidget.tsx | 2 +- .../jsonSchemaFormComp/errorBoundary.tsx | 2 +- .../jsonSchemaFormComp/jsonSchemaFormComp.tsx | 2 +- .../comps/comps/layout/mobileTabLayout.tsx | 2 +- .../src/comps/comps/layout/navLayout.tsx | 4 +++- .../src/comps/comps/listViewComp/listView.tsx | 2 +- .../videoMeetingControllerComp.tsx | 2 +- .../meetingComp/videobuttonCompConstants.tsx | 2 +- .../src/comps/comps/navComp/navComp.tsx | 3 ++- .../comps/numberInputComp/numberInputComp.tsx | 2 +- .../numberInputComp/sliderCompConstants.tsx | 2 +- .../src/comps/comps/progressCircleComp.tsx | 2 +- .../lowcoder/src/comps/comps/progressComp.tsx | 2 +- .../lowcoder/src/comps/comps/ratingComp.tsx | 2 +- .../src/comps/comps/remoteComp/remoteComp.tsx | 2 +- .../responsiveLayout/responsiveLayout.tsx | 3 ++- .../src/comps/comps/richTextEditorComp.tsx | 2 +- .../comps/selectInputComp/cascaderComp.tsx | 2 +- .../comps/selectInputComp/checkboxComp.tsx | 2 +- .../comps/comps/selectInputComp/radioComp.tsx | 2 +- .../selectInputComp/segmentedControl.tsx | 2 +- .../selectInputComp/selectCompConstants.tsx | 2 +- .../src/comps/comps/signatureComp.tsx | 2 +- .../lowcoder/src/comps/comps/switchComp.tsx | 2 +- .../columnTypeComps/ColumnNumberComp.tsx | 2 +- .../columnTypeComps/columnBooleanComp.tsx | 2 +- .../column/columnTypeComps/columnDateComp.tsx | 2 +- .../column/columnTypeComps/columnImgComp.tsx | 2 +- .../column/columnTypeComps/columnLinkComp.tsx | 2 +- .../columnTypeComps/columnLinksComp.tsx | 3 ++- .../columnTypeComps/columnMarkdownComp.tsx | 2 +- .../columnTypeComps/columnProgressComp.tsx | 2 +- .../columnTypeComps/columnRatingComp.tsx | 2 +- .../columnTypeComps/columnStatusComp.tsx | 4 ++-- .../column/columnTypeComps/columnTagsComp.tsx | 2 +- .../column/columnTypeComps/simpleTextComp.tsx | 2 +- .../tableComp/column/tableColumnComp.tsx | 3 +-- .../comps/comps/tableComp/tableCompView.tsx | 3 +-- .../comps/tableComp/tableToolbarComp.tsx | 5 ++-- .../comps/comps/tabs/tabbedContainerComp.tsx | 2 +- .../comps/comps/textInputComp/inputComp.tsx | 2 +- .../comps/comps/textInputComp/mentionComp.tsx | 4 ++-- .../comps/textInputComp/passwordComp.tsx | 2 +- .../textInputComp/textInputConstants.tsx | 2 +- .../comps/comps/timelineComp/timelineComp.tsx | 4 ++-- .../src/comps/comps/treeComp/treeComp.tsx | 2 +- .../comps/comps/treeComp/treeSelectComp.tsx | 2 +- .../src/comps/controls/labelControl.tsx | 2 +- .../comps/controls/numberSimpleControl.tsx | 2 +- .../src/comps/controls/slotControl.tsx | 2 +- .../src/comps/controls/styleControl.tsx | 2 +- .../src/comps/generators/withIsLoading.tsx | 2 +- .../lowcoder/src/comps/hooks/drawerComp.tsx | 2 +- .../lowcoder/src/comps/queries/esQuery.tsx | 2 +- .../src/comps/queries/libraryQuery.tsx | 2 +- .../src/comps/queries/resourceDropdown.tsx | 9 ++++--- .../lowcoder/src/comps/utils/useUIView.tsx | 2 +- client/packages/lowcoder/src/debug.tsx | 3 ++- client/packages/lowcoder/src/ide/CompIde.tsx | 2 +- .../lowcoder/src/ide/CompPlayground.tsx | 5 +++- .../pages/ApplicationV2/CreateDropdown.tsx | 5 ++-- .../src/pages/ApplicationV2/HomeLayout.tsx | 4 +++- .../src/pages/ApplicationV2/HomeTableView.tsx | 2 +- .../pages/ApplicationV2/MoveToFolderModal.tsx | 2 +- .../ApplicationV2/components/AppImport.tsx | 2 +- .../pages/ApplicationV2/useCreateFolder.tsx | 4 ++-- .../pages/ComponentDoc/common/Exposing.tsx | 2 +- .../src/pages/common/commonLayout.tsx | 2 +- .../lowcoder/src/pages/common/header.tsx | 4 +++- .../src/pages/common/headerStartDropdown.tsx | 2 +- .../lowcoder/src/pages/common/help.tsx | 4 +++- .../src/pages/common/previewHeader.tsx | 2 +- .../src/pages/common/profileDropdown.tsx | 7 ++++-- .../lowcoder/src/pages/common/videoDialog.tsx | 2 +- .../pages/datasource/datasourceEditPage.tsx | 2 +- .../src/pages/datasource/datasourceModal.tsx | 2 +- .../datasource/form/pluginDataSourceForm.tsx | 4 +++- .../form/snowflakeDatasourceForm.tsx | 2 +- .../datasource/form/useDatasourceForm.ts | 2 +- .../src/pages/datasource/pluginPanel.tsx | 2 +- .../src/pages/editor/appEditorInternal.tsx | 3 ++- .../lowcoder/src/pages/editor/appSnapshot.tsx | 2 +- .../pages/editor/bottom/BottomMetaDrawer.tsx | 4 ++-- .../src/pages/editor/editorSkeletonView.tsx | 3 ++- .../lowcoder/src/pages/editor/editorView.tsx | 5 ++-- .../pages/queryLibrary/QueryLibraryEditor.tsx | 4 ++-- .../queryLibrary/QueryLibrarySkeletonView.tsx | 2 +- .../pages/setting/idSource/createModal.tsx | 5 +++- .../setting/idSource/detail/deleteConfig.tsx | 2 +- .../pages/setting/idSource/detail/index.tsx | 7 ++++-- .../pages/setting/idSource/detail/manual.tsx | 2 +- .../src/pages/setting/idSource/list.tsx | 4 ++-- .../setting/idSource/styledComponents.tsx | 4 +++- .../pages/setting/organization/orgList.tsx | 3 ++- .../setting/permission/permissionList.tsx | 2 +- .../setting/permission/styledComponents.tsx | 3 ++- .../setting/profile/profileComponets.tsx | 3 +-- .../src/pages/setting/theme/detail/index.tsx | 3 ++- .../pages/setting/theme/styledComponents.tsx | 4 +++- .../src/pages/setting/theme/themeList.tsx | 7 +++++- .../userAuth/thirdParty/thirdPartyAuth.tsx | 2 +- 175 files changed, 310 insertions(+), 219 deletions(-) create mode 100644 client/config/test/mocks/antd.js create mode 100644 client/config/test/mocks/dnd-kit-core.js create mode 100644 client/config/test/mocks/dnd-kit-sortable.js create mode 100644 client/config/test/mocks/history.js create mode 100644 client/config/test/mocks/react-draggable.js create mode 100644 client/config/test/mocks/react-redux.js create mode 100644 client/config/test/mocks/react-resize-detector.js create mode 100644 client/config/test/mocks/react-virtualized.js diff --git a/client/config/test/jest.config.js b/client/config/test/jest.config.js index 90fb74572..d6b3a6118 100644 --- a/client/config/test/jest.config.js +++ b/client/config/test/jest.config.js @@ -20,6 +20,14 @@ export default { testEnvironment: "jsdom", moduleNameMapper: { "react-markdown": path.resolve(currentDir, "./mocks/react-markdown.js"), + "react-redux": path.resolve(currentDir, "./mocks/react-redux.js"), + "react-draggable": path.resolve(currentDir, "./mocks/react-draggable.js"), + "react-resize-detector": path.resolve(currentDir, "./mocks/react-resize-detector.js"), + "react-virtualized": path.resolve(currentDir, "./mocks/react-virtualized.js"), + "@dnd-kit/sortable": path.resolve(currentDir, "./mocks/dnd-kit-sortable.js"), + "@dnd-kit/core": path.resolve(currentDir, "./mocks/dnd-kit-core.js"), + "antd": path.resolve(currentDir, "./mocks/antd.js"), + "history": path.resolve(currentDir, "./mocks/history.js"), "\\.md\\?url$": path.resolve(currentDir, "./mocks/markdown-url-module.js"), "^@lowcoder-ee(.*)$": path.resolve( currentDir, @@ -35,6 +43,13 @@ export default { path.resolve(currentDir, "../../packages/lowcoder-comps/src"), path.resolve(currentDir, "../../packages/lowcoder-design/src"), ], + // moduleDirectories: [ + // "/client/node_modules", + // path.resolve(currentDir, "../../node_modules"), + // path.resolve(currentDir, "../../packages/lowcoder/node_modules"), + // path.resolve(currentDir, "../../packages/lowcoder-comps/node_modules"), + // path.resolve(currentDir, "../../packages/lowcoder-design/node_modules"), + // ], setupFiles: [path.resolve(currentDir, "./jest.setup.js")], setupFilesAfterEnv: [path.resolve(currentDir, "./jest.setup-after-env.js"), 'jest-canvas-mock'], transform: { diff --git a/client/config/test/jest.setup-after-env.js b/client/config/test/jest.setup-after-env.js index 6bb739839..6230d9eaf 100644 --- a/client/config/test/jest.setup-after-env.js +++ b/client/config/test/jest.setup-after-env.js @@ -22,9 +22,26 @@ window.ResizeObserver = function () { }; }; -window.ImageData = {} -window.MediaStreamTrack = {} -window.URL.createObjectURL = () => {} +// window.ImageData = {} +// window.MediaStreamTrack = {} +// window.URL.createObjectURL = () => {} +Object.defineProperty(window, 'ImageData', { value: 'yourValue' }); +Object.defineProperty(window, 'MediaStreamTrack', { value: 'yourValue' }); +Object.defineProperty(window, 'URL', { + writable: true, + value: { + createObjectURL: jest.fn(), + } +}); +Object.defineProperty(window, "navigator", { + writable: true, + value: { + mediaDevices: { + enumerateDevices: jest.fn(), + }, + userAgent: '', + }, +}); class Worker { constructor(stringUrl) { @@ -36,4 +53,5 @@ class Worker { this.onmessage(msg); } } + window.Worker = Worker; \ No newline at end of file diff --git a/client/config/test/jest.setup.js b/client/config/test/jest.setup.js index f2650d5ae..e46f91ee8 100644 --- a/client/config/test/jest.setup.js +++ b/client/config/test/jest.setup.js @@ -1,3 +1,3 @@ -if (typeof window !== "undefined") { - require("whatwg-fetch"); -} +// if (typeof window !== "undefined") { +// require("whatwg-fetch"); +// } diff --git a/client/config/test/mocks/antd.js b/client/config/test/mocks/antd.js new file mode 100644 index 000000000..925a99fc8 --- /dev/null +++ b/client/config/test/mocks/antd.js @@ -0,0 +1 @@ +export default jest.mock('antd'); \ No newline at end of file diff --git a/client/config/test/mocks/dnd-kit-core.js b/client/config/test/mocks/dnd-kit-core.js new file mode 100644 index 000000000..feff9e6e0 --- /dev/null +++ b/client/config/test/mocks/dnd-kit-core.js @@ -0,0 +1 @@ +export default jest.mock("@dnd-kit/core"); \ No newline at end of file diff --git a/client/config/test/mocks/dnd-kit-sortable.js b/client/config/test/mocks/dnd-kit-sortable.js new file mode 100644 index 000000000..d048b897c --- /dev/null +++ b/client/config/test/mocks/dnd-kit-sortable.js @@ -0,0 +1 @@ +export default jest.mock("@dnd-kit/sortable"); \ No newline at end of file diff --git a/client/config/test/mocks/history.js b/client/config/test/mocks/history.js new file mode 100644 index 000000000..526d8de7b --- /dev/null +++ b/client/config/test/mocks/history.js @@ -0,0 +1 @@ +export default jest.mock('history'); \ No newline at end of file diff --git a/client/config/test/mocks/react-draggable.js b/client/config/test/mocks/react-draggable.js new file mode 100644 index 000000000..31af24693 --- /dev/null +++ b/client/config/test/mocks/react-draggable.js @@ -0,0 +1 @@ +export default jest.mock('react-draggable'); \ No newline at end of file diff --git a/client/config/test/mocks/react-redux.js b/client/config/test/mocks/react-redux.js new file mode 100644 index 000000000..2d61c9118 --- /dev/null +++ b/client/config/test/mocks/react-redux.js @@ -0,0 +1,3 @@ +export default jest.mock("react-redux", () => ({ + connect: () => (Component) => Component, +})); \ No newline at end of file diff --git a/client/config/test/mocks/react-resize-detector.js b/client/config/test/mocks/react-resize-detector.js new file mode 100644 index 000000000..c3206d9fc --- /dev/null +++ b/client/config/test/mocks/react-resize-detector.js @@ -0,0 +1 @@ +export default jest.mock('react-resize-detector'); \ No newline at end of file diff --git a/client/config/test/mocks/react-virtualized.js b/client/config/test/mocks/react-virtualized.js new file mode 100644 index 000000000..5b8549b87 --- /dev/null +++ b/client/config/test/mocks/react-virtualized.js @@ -0,0 +1 @@ +export default jest.mock('react-virtualized'); \ No newline at end of file diff --git a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx index 0265ab4c8..72f292ece 100644 --- a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx +++ b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx @@ -22,7 +22,8 @@ import { CalendarDeleteIcon, Tooltip, } from "lowcoder-sdk"; -import { Input, Form } from "antd"; +import { default as Form } from "antd/es/form"; +import { default as Input } from "antd/es/input"; import { trans, getCalendarLocale } from "../../i18n/comps"; import { createRef, useContext, useRef, useState } from "react"; import FullCalendar from "@fullcalendar/react"; diff --git a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx index 7a2cdc2b8..93c07c462 100644 --- a/client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx +++ b/client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx @@ -24,7 +24,7 @@ import { SlotLabelContentArg, ViewContentArg, } from "@fullcalendar/core"; -import { Form } from "antd"; +import { default as Form } from "antd/es/form"; export const Wrapper = styled.div<{ $editable: boolean; diff --git a/client/packages/lowcoder-comps/src/comps/imageEditorComp/imageEditorConstants.tsx b/client/packages/lowcoder-comps/src/comps/imageEditorComp/imageEditorConstants.tsx index 968955f63..c5aa552a0 100644 --- a/client/packages/lowcoder-comps/src/comps/imageEditorComp/imageEditorConstants.tsx +++ b/client/packages/lowcoder-comps/src/comps/imageEditorComp/imageEditorConstants.tsx @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; import { EventConfigType } from "lowcoder-sdk"; import { trans } from "i18n/comps"; diff --git a/client/packages/lowcoder-design/src/components/Collapase.tsx b/client/packages/lowcoder-design/src/components/Collapase.tsx index 72045ca81..c445ac474 100644 --- a/client/packages/lowcoder-design/src/components/Collapase.tsx +++ b/client/packages/lowcoder-design/src/components/Collapase.tsx @@ -1,4 +1,4 @@ -import { Collapse as AntdCollapse, CollapseProps } from "antd"; +import { default as AntdCollapse, CollapseProps } from "antd/es/collapse"; import { ReactComponent as UnFold } from "icons/icon-unfold.svg"; import { ReactComponent as Folded } from "icons/icon-folded.svg"; import { ReactComponent as Omit } from "icons/icon-omit.svg"; diff --git a/client/packages/lowcoder-design/src/components/CustomModal.tsx b/client/packages/lowcoder-design/src/components/CustomModal.tsx index 58c7eed1b..ac513ea98 100644 --- a/client/packages/lowcoder-design/src/components/CustomModal.tsx +++ b/client/packages/lowcoder-design/src/components/CustomModal.tsx @@ -1,5 +1,5 @@ -import { ButtonProps, Modal as AntdModal } from "antd"; -import { ModalFuncProps, ModalProps as AntdModalProps } from "antd/lib/modal"; +import { ButtonProps } from "antd/es/button"; +import { default as AntdModal, ModalFuncProps, ModalProps as AntdModalProps } from "antd/es/modal"; import { ReactComponent as PackUpIcon } from "icons/icon-Pack-up.svg"; import React, { ReactNode, useState } from "react"; import styled from "styled-components"; diff --git a/client/packages/lowcoder-design/src/components/Drawer.tsx b/client/packages/lowcoder-design/src/components/Drawer.tsx index 4bd9449b0..89b152a64 100644 --- a/client/packages/lowcoder-design/src/components/Drawer.tsx +++ b/client/packages/lowcoder-design/src/components/Drawer.tsx @@ -1,4 +1,4 @@ -import { Drawer as AntdDrawer, DrawerProps as AntdDrawerProps } from "antd"; +import { default as AntdDrawer, DrawerProps as AntdDrawerProps } from "antd/es/drawer"; import Handle from "./Modal/handler"; import { useEffect, useMemo, useState } from "react"; import { Resizable, ResizeHandle } from "react-resizable"; diff --git a/client/packages/lowcoder-design/src/components/Dropdown.tsx b/client/packages/lowcoder-design/src/components/Dropdown.tsx index 1958aabda..2dc6675a2 100644 --- a/client/packages/lowcoder-design/src/components/Dropdown.tsx +++ b/client/packages/lowcoder-design/src/components/Dropdown.tsx @@ -1,4 +1,5 @@ -import { Segmented as AntdSegmented, SelectProps } from "antd"; +import { default as AntdSegmented } from "antd/es/segmented"; +import { SelectProps } from "antd/es/select"; import { GreyTextColor } from "constants/style"; import _ from "lodash"; import { ReactNode } from "react"; diff --git a/client/packages/lowcoder-design/src/components/Input.tsx b/client/packages/lowcoder-design/src/components/Input.tsx index 68b949e1e..7fb9ced59 100644 --- a/client/packages/lowcoder-design/src/components/Input.tsx +++ b/client/packages/lowcoder-design/src/components/Input.tsx @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { Input as AntdInput, InputProps as AntdInputProps, InputRef } from "antd"; +import { default as AntdInput, InputProps as AntdInputProps, InputRef } from "antd/es/input"; import { BorderActiveColor, BorderColor, BorderRadius, GreyTextColor } from "constants/style"; import { ChangeEvent, useEffect, useRef, useState } from "react"; import _ from "lodash"; diff --git a/client/packages/lowcoder-design/src/components/Menu.tsx b/client/packages/lowcoder-design/src/components/Menu.tsx index 365b86e2a..704c28d6b 100644 --- a/client/packages/lowcoder-design/src/components/Menu.tsx +++ b/client/packages/lowcoder-design/src/components/Menu.tsx @@ -1,4 +1,4 @@ -import { Menu as AntdMenu, MenuProps, SubMenuProps } from "antd"; +import { default as AntdMenu, MenuProps, SubMenuProps } from "antd/es/menu"; import { NormalMenuIconColor, TabActiveColor } from "constants/style"; import { ReactComponent as AddIcon } from "icons/icon-add.svg"; import { ReactComponent as RecycleBinIcon } from "icons/icon-recycle-bin.svg"; diff --git a/client/packages/lowcoder-design/src/components/Modal/index.tsx b/client/packages/lowcoder-design/src/components/Modal/index.tsx index 91f35b88e..1677bcb9b 100644 --- a/client/packages/lowcoder-design/src/components/Modal/index.tsx +++ b/client/packages/lowcoder-design/src/components/Modal/index.tsx @@ -1,4 +1,4 @@ -import { Modal as AntdModal, ModalProps as AntdModalProps } from "antd"; +import { default as AntdModal, ModalProps as AntdModalProps } from "antd/es/modal"; import { useEffect, useState } from "react"; import { Resizable, ResizeHandle } from "react-resizable"; import { useResizeDetector } from "react-resize-detector"; diff --git a/client/packages/lowcoder-design/src/components/Search.tsx b/client/packages/lowcoder-design/src/components/Search.tsx index e72729ff1..05249e3c1 100644 --- a/client/packages/lowcoder-design/src/components/Search.tsx +++ b/client/packages/lowcoder-design/src/components/Search.tsx @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { Input, InputProps } from "antd"; +import { default as Input, InputProps } from "antd/es/input"; import { ReactComponent as Icon } from "icons/icon-Search.svg"; import React, { CSSProperties } from "react"; diff --git a/client/packages/lowcoder-design/src/components/Table.tsx b/client/packages/lowcoder-design/src/components/Table.tsx index f3f9f35c4..82b38bf0b 100644 --- a/client/packages/lowcoder-design/src/components/Table.tsx +++ b/client/packages/lowcoder-design/src/components/Table.tsx @@ -1,4 +1,4 @@ -import { Table } from "antd"; +import { default as Table } from "antd/es/table"; import styled from "styled-components"; const { Column } = Table; diff --git a/client/packages/lowcoder-design/src/components/alert.tsx b/client/packages/lowcoder-design/src/components/alert.tsx index 591f926b2..bbc24b437 100644 --- a/client/packages/lowcoder-design/src/components/alert.tsx +++ b/client/packages/lowcoder-design/src/components/alert.tsx @@ -1,4 +1,4 @@ -import { Alert as AntAlert, AlertProps } from "antd"; +import { default as AntAlert, AlertProps } from "antd/es/alert"; import styled from "styled-components"; const Container = styled.div` diff --git a/client/packages/lowcoder-design/src/components/button.tsx b/client/packages/lowcoder-design/src/components/button.tsx index ac0fff3b2..0001442b6 100644 --- a/client/packages/lowcoder-design/src/components/button.tsx +++ b/client/packages/lowcoder-design/src/components/button.tsx @@ -1,4 +1,4 @@ -import { Button, ButtonProps } from "antd"; +import Button, { ButtonProps } from "antd/es/button"; import styled, { css } from "styled-components"; import { Loading } from "./Loading"; import * as React from "react"; diff --git a/client/packages/lowcoder-design/src/components/checkBox.tsx b/client/packages/lowcoder-design/src/components/checkBox.tsx index 555b8c49c..8c1c8e516 100644 --- a/client/packages/lowcoder-design/src/components/checkBox.tsx +++ b/client/packages/lowcoder-design/src/components/checkBox.tsx @@ -1,4 +1,4 @@ -import { Checkbox as AntdCheckBox } from "antd"; +import { default as AntdCheckBox } from "antd/es/checkbox"; import styled from "styled-components"; const CheckBox = styled(AntdCheckBox)` diff --git a/client/packages/lowcoder-design/src/components/colorSelect/index.tsx b/client/packages/lowcoder-design/src/components/colorSelect/index.tsx index 2e5c7512e..8e4415676 100644 --- a/client/packages/lowcoder-design/src/components/colorSelect/index.tsx +++ b/client/packages/lowcoder-design/src/components/colorSelect/index.tsx @@ -1,5 +1,5 @@ import { RgbaStringColorPicker } from "react-colorful"; -import { Popover } from "antd"; +import { default as Popover } from "antd/es/popover"; import { ActionType } from '@rc-component/trigger/lib/interface'; import { alphaOfRgba, diff --git a/client/packages/lowcoder-design/src/components/customSelect.tsx b/client/packages/lowcoder-design/src/components/customSelect.tsx index acd1309d5..7f7ab99fb 100644 --- a/client/packages/lowcoder-design/src/components/customSelect.tsx +++ b/client/packages/lowcoder-design/src/components/customSelect.tsx @@ -1,4 +1,4 @@ -import { Select as AntdSelect, SelectProps as AntdSelectProps } from "antd"; +import { default as AntdSelect, SelectProps as AntdSelectProps } from "antd/es/select"; import { ReactComponent as PackUpIcon } from "icons/icon-Pack-up.svg"; import styled from "styled-components"; import React from "react"; diff --git a/client/packages/lowcoder-design/src/components/edit.tsx b/client/packages/lowcoder-design/src/components/edit.tsx index 096adfaf5..8c703b878 100644 --- a/client/packages/lowcoder-design/src/components/edit.tsx +++ b/client/packages/lowcoder-design/src/components/edit.tsx @@ -2,7 +2,7 @@ import styled from "styled-components"; import { ReactComponent as Edit } from "icons/icon-text-edit.svg"; import { CSSProperties, ReactNode, useEffect, useRef, useState } from "react"; import { Input } from "../components/Input"; -import { InputProps, InputRef } from "antd"; +import { InputProps, InputRef } from "antd/es/input"; const Wrapper = styled.div` position: relative; diff --git a/client/packages/lowcoder-design/src/components/form.tsx b/client/packages/lowcoder-design/src/components/form.tsx index 624a674b1..ac66238b1 100644 --- a/client/packages/lowcoder-design/src/components/form.tsx +++ b/client/packages/lowcoder-design/src/components/form.tsx @@ -1,13 +1,10 @@ -import { - Form, - Input, - InputNumber, - InputNumberProps, - InputProps, - Radio, - Select, - SelectProps, -} from "antd"; +import { default as Form } from "antd/es/form"; +import { default as AntdFormItem, FormItemProps as AntdFormItemProps } from "antd/es/form/FormItem"; +import { default as Input, InputProps } from "antd/es/input"; +import { default as TextArea, TextAreaProps } from "antd/es/input/TextArea"; +import { default as InputNumber, InputNumberProps } from "antd/es/input-number"; +import { default as Radio, RadioGroupProps } from "antd/es/radio"; +import { default as Select, SelectProps } from "antd/es/select"; import { ReactNode } from "react"; import { CheckBox } from "./checkBox"; import { CustomSelect } from "./customSelect"; @@ -15,16 +12,13 @@ import { EllipsisTextCss, labelCss } from "./Label"; import { ToolTipLabel } from "./toolTip"; import styled from "styled-components"; import { ReactComponent as Star } from "icons/icon-star.svg"; -import { FormItemProps as AntdFormItemProps } from "antd/lib/form/FormItem"; import _ from "lodash"; import { KeyValueList } from "./keyValueList"; import { OptionsType, ValueFromOption } from "./Dropdown"; -import { RadioGroupProps } from "antd/lib/radio/interface"; -import { TextAreaProps } from "antd/lib/input"; export type FormSize = "middle" | "small"; -const FormItem = styled(Form.Item)` +const FormItem = styled(AntdFormItem)` min-width: 0; flex-grow: 1; margin: 0; @@ -69,7 +63,7 @@ const FormInputPassword = styled(Input)` border-radius: 4px; `; -const FormTextArea = styled(Input.TextArea)` +const FormTextArea = styled(TextArea)` background: #ffffff; `; diff --git a/client/packages/lowcoder-design/src/components/iconSelect/index.tsx b/client/packages/lowcoder-design/src/components/iconSelect/index.tsx index 4e9965397..eaae8bfe5 100644 --- a/client/packages/lowcoder-design/src/components/iconSelect/index.tsx +++ b/client/packages/lowcoder-design/src/components/iconSelect/index.tsx @@ -1,6 +1,6 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import type { IconDefinition } from "@fortawesome/free-regular-svg-icons"; -import { Popover } from "antd"; +import { default as Popover } from "antd/es/popover"; import { ActionType } from '@rc-component/trigger/lib/interface'; import { TacoInput } from "components/tacoInput"; import { Tooltip } from "components/toolTip"; @@ -8,7 +8,7 @@ import { trans } from "i18n/design"; import _ from "lodash"; import { ReactNode, useEffect, useCallback, useMemo, useRef, useState } from "react"; import Draggable from "react-draggable"; -import { List, ListRowProps } from "react-virtualized"; +import { default as List, ListRowProps } from "react-virtualized/dist/es/List"; import styled from "styled-components"; import { CloseIcon, SearchIcon } from "icons"; diff --git a/client/packages/lowcoder-design/src/components/popover.tsx b/client/packages/lowcoder-design/src/components/popover.tsx index 89752dd8b..c7e745d06 100644 --- a/client/packages/lowcoder-design/src/components/popover.tsx +++ b/client/packages/lowcoder-design/src/components/popover.tsx @@ -1,5 +1,5 @@ import { SuspensionBox } from "./SuspensionBox"; -import { Popover, PopoverProps } from "antd"; +import { default as Popover, PopoverProps } from "antd/es/popover"; import { Children, cloneElement, MouseEvent, ReactNode, useState } from "react"; import styled from "styled-components"; import { ActiveTextColor, GreyTextColor } from "constants/style"; diff --git a/client/packages/lowcoder-design/src/components/popupCard.tsx b/client/packages/lowcoder-design/src/components/popupCard.tsx index 652560ad6..5307ba9e9 100644 --- a/client/packages/lowcoder-design/src/components/popupCard.tsx +++ b/client/packages/lowcoder-design/src/components/popupCard.tsx @@ -1,4 +1,5 @@ -import { Alert, Card } from "antd"; +import { default as Alert } from "antd/es/alert"; +import { default as Card } from "antd/es/card"; import { CopyTextButton } from "./copyTextButton"; import { CSSProperties, ReactNode, useState } from "react"; import styled from "styled-components"; diff --git a/client/packages/lowcoder-design/src/components/query.tsx b/client/packages/lowcoder-design/src/components/query.tsx index dcba174f1..6ff0ce913 100644 --- a/client/packages/lowcoder-design/src/components/query.tsx +++ b/client/packages/lowcoder-design/src/components/query.tsx @@ -1,5 +1,5 @@ import styled, { css } from "styled-components"; -import { Alert } from "antd"; +import { default as Alert } from "antd/es/alert"; import { ReactNode } from "react"; import { AlertProps } from "antd/lib/alert"; import { ToolTipLabel } from "./toolTip"; diff --git a/client/packages/lowcoder-design/src/components/tacoInput.tsx b/client/packages/lowcoder-design/src/components/tacoInput.tsx index d8b4d88f4..eaf9b1983 100644 --- a/client/packages/lowcoder-design/src/components/tacoInput.tsx +++ b/client/packages/lowcoder-design/src/components/tacoInput.tsx @@ -1,4 +1,4 @@ -import { Input as AntdInput, InputRef } from "antd"; +import { default as AntdInput, InputRef } from "antd/es/input"; import { ReactComponent as MustFillStar } from "icons/icon-must-fill-star.svg"; import { trans } from "i18n/design"; import { CSSProperties, Ref, useEffect, useRef, useState } from "react"; diff --git a/client/packages/lowcoder-design/src/components/tacoPagination.tsx b/client/packages/lowcoder-design/src/components/tacoPagination.tsx index 0164e0b2b..d16b1b9f9 100644 --- a/client/packages/lowcoder-design/src/components/tacoPagination.tsx +++ b/client/packages/lowcoder-design/src/components/tacoPagination.tsx @@ -1,5 +1,4 @@ -import { Pagination } from "antd"; -import { PaginationProps } from "antd/lib/pagination/Pagination"; +import { default as Pagination, PaginationProps } from "antd/es/pagination"; import styled, { css } from "styled-components"; import { ReactComponent as PackUpIcon } from "icons/icon-Pack-up.svg"; @@ -7,7 +6,7 @@ const packUpIconCss = css` height: 24px; width: 24px; - :hover:not([disabled]) { + &:hover:not([disabled]) { g path { fill: #315efb; } diff --git a/client/packages/lowcoder-design/src/components/toolTip.tsx b/client/packages/lowcoder-design/src/components/toolTip.tsx index d4a878387..897cd4a34 100644 --- a/client/packages/lowcoder-design/src/components/toolTip.tsx +++ b/client/packages/lowcoder-design/src/components/toolTip.tsx @@ -1,5 +1,5 @@ -import { Button, Tooltip as AntdTooltip } from "antd"; -import { TooltipProps } from "antd/lib/tooltip"; +import { default as Button } from "antd/es/button"; +import { default as AntdTooltip, TooltipProps } from "antd/es/tooltip"; import { CSSProperties, ReactNode } from "react"; import styled, { css } from "styled-components"; import { labelCss } from "components/Label"; diff --git a/client/packages/lowcoder/src/app.tsx b/client/packages/lowcoder/src/app.tsx index 6cfbb7735..0e25e3a52 100644 --- a/client/packages/lowcoder/src/app.tsx +++ b/client/packages/lowcoder/src/app.tsx @@ -1,4 +1,5 @@ -import { App, ConfigProvider } from "antd"; +import { default as App } from "antd/es/app"; +import { default as ConfigProvider } from "antd/es/config-provider"; import { ALL_APPLICATIONS_URL, APP_EDITOR_URL, diff --git a/client/packages/lowcoder/src/components/InputList.tsx b/client/packages/lowcoder/src/components/InputList.tsx index 03ebecf8c..62729ca77 100644 --- a/client/packages/lowcoder/src/components/InputList.tsx +++ b/client/packages/lowcoder/src/components/InputList.tsx @@ -1,4 +1,4 @@ -import { Form } from "antd"; +import { default as Form } from "antd/es/form"; import { FormListProps, Rule } from "antd/lib/form"; import { TacoButton } from "lowcoder-design"; import { Input } from "lowcoder-design"; diff --git a/client/packages/lowcoder/src/components/JSLibraryModal.tsx b/client/packages/lowcoder/src/components/JSLibraryModal.tsx index a6f6ba351..3d99b0df0 100644 --- a/client/packages/lowcoder/src/components/JSLibraryModal.tsx +++ b/client/packages/lowcoder/src/components/JSLibraryModal.tsx @@ -5,7 +5,7 @@ import { trans } from "i18n"; import { DocLink } from "components/ExternalLink"; import { Input } from "components/Input"; import { TacoButton } from "components/button"; -import { Spin } from "antd"; +import { default as Spin } from "antd/es/spin"; import { useDispatch, useSelector } from "react-redux"; import { recommendJSLibrarySelector } from "redux/selectors/jsLibrarySelector"; import { JSLibraryInfo, JSLibraryLabel } from "components/JSLibraryTree"; diff --git a/client/packages/lowcoder/src/components/JSLibraryTree.tsx b/client/packages/lowcoder/src/components/JSLibraryTree.tsx index 080ffe4df..e7c464c60 100644 --- a/client/packages/lowcoder/src/components/JSLibraryTree.tsx +++ b/client/packages/lowcoder/src/components/JSLibraryTree.tsx @@ -9,7 +9,7 @@ import { useDispatch, useSelector } from "react-redux"; import { parseJSLibraryURL } from "util/jsLibraryUtils"; import { jsLibrarySelector } from "redux/selectors/jsLibrarySelector"; import { fetchJSLibraryMetasAction } from "redux/reduxActions/jsLibraryActions"; -import { Typography } from "antd"; +import { default as TypographyParagraph } from "antd/es/typography/Paragraph"; const InfoWrapper = styled.div` color: #8b8fa3; @@ -30,7 +30,7 @@ const ExportWrapper = styled.div` height: 20px; line-height: 20px; `; -const DescWrapper = styled(Typography.Paragraph)` +const DescWrapper = styled(TypographyParagraph)` line-height: 1.5em; font-size: 13px; color: #8b8fa3; diff --git a/client/packages/lowcoder/src/components/LazyRoute.tsx b/client/packages/lowcoder/src/components/LazyRoute.tsx index 81f2f8733..0b0e27c3d 100644 --- a/client/packages/lowcoder/src/components/LazyRoute.tsx +++ b/client/packages/lowcoder/src/components/LazyRoute.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "antd"; +import { default as Skeleton } from "antd/es/skeleton"; import { ComponentType, lazy, Suspense, useRef } from "react"; import { Route, RouteProps } from "react-router"; import PageSkeleton from "./PageSkeleton"; diff --git a/client/packages/lowcoder/src/components/ModuleLoading.tsx b/client/packages/lowcoder/src/components/ModuleLoading.tsx index 73dcfe054..5d3901c8d 100644 --- a/client/packages/lowcoder/src/components/ModuleLoading.tsx +++ b/client/packages/lowcoder/src/components/ModuleLoading.tsx @@ -1,4 +1,4 @@ -import { Spin } from "antd"; +import { default as Spin } from "antd/es/spin"; import { GreyTextColor } from "constants/style"; import styled from "styled-components"; diff --git a/client/packages/lowcoder/src/components/PageSkeleton.tsx b/client/packages/lowcoder/src/components/PageSkeleton.tsx index d3bf0fcdb..79dcbc21d 100644 --- a/client/packages/lowcoder/src/components/PageSkeleton.tsx +++ b/client/packages/lowcoder/src/components/PageSkeleton.tsx @@ -1,4 +1,5 @@ -import { Layout, Skeleton } from "antd"; +import { default as Layout } from "antd/es/layout"; +import { default as Skeleton } from "antd/es/skeleton"; import MainContent from "components/layout/MainContent"; import SideBar from "components/layout/SideBar"; import Header from "./layout/Header"; diff --git a/client/packages/lowcoder/src/components/PermissionDialog/Permission.tsx b/client/packages/lowcoder/src/components/PermissionDialog/Permission.tsx index f079cc102..74beb77aa 100644 --- a/client/packages/lowcoder/src/components/PermissionDialog/Permission.tsx +++ b/client/packages/lowcoder/src/components/PermissionDialog/Permission.tsx @@ -21,7 +21,7 @@ import { } from "./commonComponents"; import { getInitialsAndColorCode } from "util/stringUtils"; import { CustomTagProps } from "rc-select/lib/BaseSelect"; -import { Tag } from "antd"; +import { default as Tag } from "antd/es/tag"; import { User } from "constants/userConstants"; import { getUser } from "redux/selectors/usersSelectors"; import { EmptyContent } from "pages/common/styledComponent"; diff --git a/client/packages/lowcoder/src/components/ResCreatePanel.tsx b/client/packages/lowcoder/src/components/ResCreatePanel.tsx index a6384ac66..efcbb38f0 100644 --- a/client/packages/lowcoder/src/components/ResCreatePanel.tsx +++ b/client/packages/lowcoder/src/components/ResCreatePanel.tsx @@ -19,7 +19,7 @@ import { QUICK_REST_API_ID, } from "../constants/datasourceConstants"; import { ResourceType } from "@lowcoder-ee/constants/queryConstants"; -import { Upload } from "antd"; +import { default as Upload } from "antd/es/upload"; import { useSelector } from "react-redux"; import { getUser } from "../redux/selectors/usersSelectors"; import DataSourceIcon from "./DataSourceIcon"; diff --git a/client/packages/lowcoder/src/components/Segmented.tsx b/client/packages/lowcoder/src/components/Segmented.tsx index 71246664c..91f8750d4 100644 --- a/client/packages/lowcoder/src/components/Segmented.tsx +++ b/client/packages/lowcoder/src/components/Segmented.tsx @@ -1,4 +1,4 @@ -import { Segmented as AntdSegmented } from "antd"; +import { default as AntdSegmented } from "antd/es/segmented"; import styled from "styled-components"; type PropsType> = diff --git a/client/packages/lowcoder/src/components/Table.tsx b/client/packages/lowcoder/src/components/Table.tsx index 82b5abb5c..5478829ca 100644 --- a/client/packages/lowcoder/src/components/Table.tsx +++ b/client/packages/lowcoder/src/components/Table.tsx @@ -1,4 +1,4 @@ -import { Table as AntdTable } from "antd"; +import { default as AntdTable } from "antd/es/table"; import styled from "styled-components"; export const Table = styled(AntdTable)` diff --git a/client/packages/lowcoder/src/components/Tabs.tsx b/client/packages/lowcoder/src/components/Tabs.tsx index 41e489233..1735a838c 100644 --- a/client/packages/lowcoder/src/components/Tabs.tsx +++ b/client/packages/lowcoder/src/components/Tabs.tsx @@ -1,4 +1,4 @@ -import { Tabs as AntdTabs } from "antd"; +import { default as AntdTabs } from "antd/es/tabs"; import { GreyTextColor, TabActiveColor } from "constants/style"; import { ReactNode } from "react"; import styled from "styled-components"; diff --git a/client/packages/lowcoder/src/components/TextArea.tsx b/client/packages/lowcoder/src/components/TextArea.tsx index b2d933362..f1ce0d34d 100644 --- a/client/packages/lowcoder/src/components/TextArea.tsx +++ b/client/packages/lowcoder/src/components/TextArea.tsx @@ -1,10 +1,9 @@ import styled from "styled-components"; -import { Input as AntdInput } from "antd"; +import { default as AntdInput } from "antd/es/input"; +import { TextAreaRef, TextAreaProps as AntdTextAreaProps } from "antd/es/input/TextArea"; import { ChangeEvent, useEffect, useRef, useState } from "react"; import _ from "lodash"; import React from "react"; -import { TextAreaProps as AntdTextAreaProps } from "antd/lib/input"; -import { TextAreaRef } from "antd/lib/input/TextArea"; import { INPUT_DEFAULT_ONCHANGE_DEBOUNCE } from "constants/perf"; const StyledTextArea = styled(AntdInput.TextArea)``; diff --git a/client/packages/lowcoder/src/components/TypographyText.tsx b/client/packages/lowcoder/src/components/TypographyText.tsx index 2aa9cdbfd..412697d6c 100644 --- a/client/packages/lowcoder/src/components/TypographyText.tsx +++ b/client/packages/lowcoder/src/components/TypographyText.tsx @@ -1,4 +1,4 @@ -import { Typography } from "antd"; +import { default as Typography } from "antd/es/typography"; import React from "react"; import styled from "styled-components"; diff --git a/client/packages/lowcoder/src/components/layout/Layout.tsx b/client/packages/lowcoder/src/components/layout/Layout.tsx index 3291021aa..bb0d04115 100644 --- a/client/packages/lowcoder/src/components/layout/Layout.tsx +++ b/client/packages/lowcoder/src/components/layout/Layout.tsx @@ -1,5 +1,5 @@ import { Route, Switch } from "react-router-dom"; -import { Layout as AntdLayout } from "antd"; +import { default as AntdLayout } from "antd/es/layout"; import { AppHeader } from "pages/common/header"; import * as React from "react"; import { ReactElement } from "react"; diff --git a/client/packages/lowcoder/src/components/layout/MainContent.tsx b/client/packages/lowcoder/src/components/layout/MainContent.tsx index d7cc7666e..c83a0ec92 100644 --- a/client/packages/lowcoder/src/components/layout/MainContent.tsx +++ b/client/packages/lowcoder/src/components/layout/MainContent.tsx @@ -1,8 +1,10 @@ -import { Layout } from "antd"; +import { default as Layout } from "antd/es/layout"; import { TopHeaderHeight } from "constants/style"; import styled from "styled-components"; -const MainContent = styled(Layout.Content)` +const { Content } = Layout; + +const MainContent = styled((props: any) => )` height: calc(100vh - ${TopHeaderHeight}); /* display: flex; */ overflow: auto; diff --git a/client/packages/lowcoder/src/components/layout/SideBar.tsx b/client/packages/lowcoder/src/components/layout/SideBar.tsx index 84f4d346e..492df7d28 100644 --- a/client/packages/lowcoder/src/components/layout/SideBar.tsx +++ b/client/packages/lowcoder/src/components/layout/SideBar.tsx @@ -1,8 +1,8 @@ -import { Layout, SiderProps } from "antd"; +import { default as LayoutSider, SiderProps } from "antd/es/layout/Sider"; import { TopHeaderHeight } from "constants/style"; import styled from "styled-components"; -const Sider = styled(Layout.Sider)` +const Sider = styled(LayoutSider)` height: calc(100vh - ${TopHeaderHeight}); background: #f9f9fa; padding: 0 24px 0 24px; diff --git a/client/packages/lowcoder/src/components/resultPanel/index.tsx b/client/packages/lowcoder/src/components/resultPanel/index.tsx index b247f72cd..69c405228 100644 --- a/client/packages/lowcoder/src/components/resultPanel/index.tsx +++ b/client/packages/lowcoder/src/components/resultPanel/index.tsx @@ -6,7 +6,7 @@ import { isArray, isObject, isObjectLike, isPlainObject } from "lodash"; import ReactJson from "react-json-view"; import { trans } from "../../i18n"; import { DarkActiveTextColor, GreyTextColor } from "../../constants/style"; -import { Table as AntdTable } from "antd"; +import { default as AntdTable } from "antd/es/table"; import { Switch } from "components/Switch"; import { CloseIcon, ErrorIcon, SuccessIcon } from "icons"; diff --git a/client/packages/lowcoder/src/comps/comps/appSettingsComp.tsx b/client/packages/lowcoder/src/comps/comps/appSettingsComp.tsx index fa4bf0f56..f984860ba 100644 --- a/client/packages/lowcoder/src/comps/comps/appSettingsComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/appSettingsComp.tsx @@ -10,7 +10,7 @@ import { getDefaultTheme, getThemeList } from "redux/selectors/commonSettingSele import styled, { css } from "styled-components"; import { trans } from "i18n"; import { GreyTextColor } from "constants/style"; -import { Divider } from "antd"; +import { default as Divider } from "antd/es/divider"; import { THEME_SETTING } from "constants/routesURL"; import { CustomShortcutsComp } from "./customShortcutsComp"; import { DEFAULT_THEMEID } from "comps/utils/themeUtil"; diff --git a/client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx b/client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx index a99d5eaee..6809ac333 100644 --- a/client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx @@ -33,12 +33,9 @@ import { import { trans } from "i18n"; import { IconControl } from "comps/controls/iconControl"; import { hasIcon } from "comps/utils"; -import { - ConfigProvider, - InputRef, - AutoComplete, - Input as AntInput, -} from "antd"; +import { default as AntInput, InputRef } from "antd/es/input"; +import { default as ConfigProvider } from "antd/es/config-provider"; +import { default as AutoComplete } from "antd/es/auto-complete"; import { RefControl } from "comps/controls/refControl"; import { booleanExposingStateControl, diff --git a/client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteConstants.tsx b/client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteConstants.tsx index eb375a170..ce554cebf 100644 --- a/client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteConstants.tsx +++ b/client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteConstants.tsx @@ -1,7 +1,7 @@ import { trans } from "i18n"; import { check } from "util/convertUtils"; import { refMethods } from "comps/generators/withMethodExposing"; -import { InputRef } from "antd"; +import { InputRef } from "antd/es/input"; import { diff --git a/client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx b/client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx index 9d37ab6f1..86fa9cb2f 100644 --- a/client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx +++ b/client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx @@ -1,4 +1,4 @@ -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; import { styleControl } from "comps/controls/styleControl"; import { ButtonStyleType, ButtonStyle } from "comps/controls/styleControlConstants"; import { migrateOldData } from "comps/generators/simpleGenerators"; diff --git a/client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx b/client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx index 9b153b83f..e75288d93 100644 --- a/client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx @@ -1,4 +1,5 @@ -import { Dropdown, Menu } from "antd"; +import { default as Menu } from "antd/es/menu"; +import { default as Dropdown } from "antd/es/dropdown"; import { BoolControl } from "comps/controls/boolControl"; import { BoolCodeControl, StringControl } from "comps/controls/codeControl"; import { ButtonStyleType } from "comps/controls/styleControlConstants"; diff --git a/client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx b/client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx index d9dceec3b..275b125b3 100644 --- a/client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx @@ -1,4 +1,4 @@ -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; import { ButtonCompWrapper, buttonRefMethods } from "comps/comps/buttonComp/buttonCompConstants"; import { BoolCodeControl, StringControl } from "comps/controls/codeControl"; import { ButtonEventHandlerControl } from "comps/controls/eventHandlerControl"; diff --git a/client/packages/lowcoder/src/comps/comps/buttonComp/scannerComp.tsx b/client/packages/lowcoder/src/comps/comps/buttonComp/scannerComp.tsx index 991bf807f..a4b075f57 100644 --- a/client/packages/lowcoder/src/comps/comps/buttonComp/scannerComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/buttonComp/scannerComp.tsx @@ -1,4 +1,7 @@ -import { Button, Dropdown, Menu, Skeleton } from "antd"; +import { default as Button } from "antd/es/button"; +import { default as Dropdown } from "antd/es/dropdown"; +import { default as Menu } from "antd/es/menu"; +import { default as Skeleton } from "antd/es/skeleton"; import { Button100, ButtonCompWrapper, diff --git a/client/packages/lowcoder/src/comps/comps/carouselComp.tsx b/client/packages/lowcoder/src/comps/comps/carouselComp.tsx index 943fd4044..8e9c776d4 100644 --- a/client/packages/lowcoder/src/comps/comps/carouselComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/carouselComp.tsx @@ -1,4 +1,4 @@ -import { Carousel } from "antd"; +import { default as Carousel } from "antd/es/carousel"; import { Section, sectionNames } from "lowcoder-design"; import { BoolControl } from "../controls/boolControl"; import { UICompBuilder, withDefault } from "../generators"; diff --git a/client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx b/client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx index 609b8f70d..e6721cebb 100644 --- a/client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx @@ -53,7 +53,11 @@ import { checkUserInfoData, checkMentionListData, } from "./commentConstants"; -import { Avatar, List, Button, Mentions, Tooltip } from "antd"; +import { default as Avatar } from "antd/es/avatar"; +import { default as List } from "antd/es/list"; +import { default as Button } from "antd/es/button"; +import { default as Mentions } from "antd/es/mentions"; +import { default as Tooltip } from "antd/es/tooltip"; import VirtualList, { ListRef } from "rc-virtual-list"; import _ from "lodash"; import relativeTime from "dayjs/plugin/relativeTime"; diff --git a/client/packages/lowcoder/src/comps/comps/dateComp/dateRangeUIView.tsx b/client/packages/lowcoder/src/comps/comps/dateComp/dateRangeUIView.tsx index b07a1af2c..5c838c31e 100644 --- a/client/packages/lowcoder/src/comps/comps/dateComp/dateRangeUIView.tsx +++ b/client/packages/lowcoder/src/comps/comps/dateComp/dateRangeUIView.tsx @@ -7,7 +7,7 @@ import React, { useContext } from "react"; import styled from "styled-components"; import type { DateTimeStyleType } from "../../controls/styleControlConstants"; import { EditorContext } from "../../editorState"; -import { DatePicker } from "antd"; +import { default as DatePicker } from "antd/es/date-picker"; import { hasIcon } from "comps/utils"; import { omit } from "lodash"; diff --git a/client/packages/lowcoder/src/comps/comps/dateComp/dateUIView.tsx b/client/packages/lowcoder/src/comps/comps/dateComp/dateUIView.tsx index ef8ef0840..c00c05d61 100644 --- a/client/packages/lowcoder/src/comps/comps/dateComp/dateUIView.tsx +++ b/client/packages/lowcoder/src/comps/comps/dateComp/dateUIView.tsx @@ -7,7 +7,7 @@ import React, { useContext } from "react"; import styled from "styled-components"; import type { DateTimeStyleType } from "../../controls/styleControlConstants"; import { EditorContext } from "../../editorState"; -import { DatePicker } from "antd"; +import { default as DatePicker } from "antd/es/date-picker"; const DatePickerStyled = styled(DatePicker)<{ $style: DateTimeStyleType }>` width: 100%; diff --git a/client/packages/lowcoder/src/comps/comps/dateComp/timeComp.tsx b/client/packages/lowcoder/src/comps/comps/dateComp/timeComp.tsx index 382d3733f..219766f5a 100644 --- a/client/packages/lowcoder/src/comps/comps/dateComp/timeComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/dateComp/timeComp.tsx @@ -48,8 +48,8 @@ import { dateRefMethods, disabledTime, handleDateChange } from "comps/comps/date import { TimeUIView } from "./timeUIView"; import { TimeRangeUIView } from "comps/comps/dateComp/timeRangeUIView"; import { RefControl } from "comps/controls/refControl"; -import { CommonPickerMethods } from "antd/lib/date-picker/generatePicker/interface"; -import { TimePickerProps } from "antd"; +import { CommonPickerMethods } from "antd/es/date-picker/generatePicker/interface"; +import { TimePickerProps } from "antd/es/time-picker"; import { EditorContext } from "comps/editorState"; diff --git a/client/packages/lowcoder/src/comps/comps/dateComp/timeRangeUIView.tsx b/client/packages/lowcoder/src/comps/comps/dateComp/timeRangeUIView.tsx index 1a34ecf4e..141014da3 100644 --- a/client/packages/lowcoder/src/comps/comps/dateComp/timeRangeUIView.tsx +++ b/client/packages/lowcoder/src/comps/comps/dateComp/timeRangeUIView.tsx @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { TimePicker } from "antd"; +import { default as TimePicker } from "antd/es/time-picker"; import { DateTimeStyleType } from "../../controls/styleControlConstants"; import { getStyle } from "comps/comps/dateComp/dateCompUtil"; import { useUIView } from "../../utils/useUIView"; diff --git a/client/packages/lowcoder/src/comps/comps/dateComp/timeUIView.tsx b/client/packages/lowcoder/src/comps/comps/dateComp/timeUIView.tsx index e7933da91..5c51d12ab 100644 --- a/client/packages/lowcoder/src/comps/comps/dateComp/timeUIView.tsx +++ b/client/packages/lowcoder/src/comps/comps/dateComp/timeUIView.tsx @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { TimePicker } from "antd"; +import { default as TimePicker } from "antd/es/time-picker"; import { DateTimeStyleType } from "../../controls/styleControlConstants"; import { getStyle } from "comps/comps/dateComp/dateCompUtil"; import { useUIView } from "../../utils/useUIView"; diff --git a/client/packages/lowcoder/src/comps/comps/dividerComp.tsx b/client/packages/lowcoder/src/comps/comps/dividerComp.tsx index 5d5517be2..5df573c18 100644 --- a/client/packages/lowcoder/src/comps/comps/dividerComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/dividerComp.tsx @@ -1,4 +1,4 @@ -import { Divider, DividerProps } from "antd"; +import { default as Divider, DividerProps } from "antd/es/divider"; import { StringControl } from "comps/controls/codeControl"; import { BoolControl } from "comps/controls/boolControl"; import { alignControl } from "comps/controls/alignControl"; diff --git a/client/packages/lowcoder/src/comps/comps/fileComp/fileComp.tsx b/client/packages/lowcoder/src/comps/comps/fileComp/fileComp.tsx index e801a3a29..52dbe74d0 100644 --- a/client/packages/lowcoder/src/comps/comps/fileComp/fileComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/fileComp/fileComp.tsx @@ -1,6 +1,6 @@ -import { Button, Upload as AntdUpload } from "antd"; -import { UploadChangeParam } from "antd/lib/upload"; -import { UploadFile, UploadProps } from "antd/lib/upload/interface"; +import { default as Button } from "antd/es/button"; +import { default as AntdUpload } from "antd/es/upload"; +import { UploadFile, UploadProps, UploadChangeParam } from "antd/es/upload/interface"; import { Buffer } from "buffer"; import { darkenColor } from "components/colorSelect/colorUtils"; import { Section, sectionNames } from "components/Section"; diff --git a/client/packages/lowcoder/src/comps/comps/formComp/createForm.tsx b/client/packages/lowcoder/src/comps/comps/formComp/createForm.tsx index c192a708a..2d60cb833 100644 --- a/client/packages/lowcoder/src/comps/comps/formComp/createForm.tsx +++ b/client/packages/lowcoder/src/comps/comps/formComp/createForm.tsx @@ -1,4 +1,5 @@ -import { Form, FormInstance, Select } from "antd"; +import { default as Form, FormInstance } from "antd/es/form"; +import { default as Select } from "antd/es/select"; import { CheckBox, CustomModal, diff --git a/client/packages/lowcoder/src/comps/comps/formComp/formComp.tsx b/client/packages/lowcoder/src/comps/comps/formComp/formComp.tsx index 28f0af0f4..61a02edeb 100644 --- a/client/packages/lowcoder/src/comps/comps/formComp/formComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/formComp/formComp.tsx @@ -40,7 +40,7 @@ import { import { TriContainer } from "../triContainerComp/triContainer"; import { traverseCompTree } from "../containerBase/utils"; import { IForm } from "./formDataConstants"; -import { Spin } from "antd"; +import { default as Spin } from "antd/es/spin"; import { BoolControl } from "comps/controls/boolControl"; import { BottomResTypeEnum } from "types/bottomRes"; import { BoolCodeControl, JSONObjectControl } from "comps/controls/codeControl"; diff --git a/client/packages/lowcoder/src/comps/comps/imageComp.tsx b/client/packages/lowcoder/src/comps/comps/imageComp.tsx index 3c9da34e1..81d682342 100644 --- a/client/packages/lowcoder/src/comps/comps/imageComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/imageComp.tsx @@ -26,7 +26,7 @@ import { hiddenPropertyView } from "comps/utils/propertyUtils"; import { trans } from "i18n"; import { AutoHeightControl } from "comps/controls/autoHeightControl"; import { BoolControl } from "comps/controls/boolControl"; -import { Image as AntImage } from "antd"; +import { default as AntImage } from "antd/es/image"; import { DEFAULT_IMG_URL } from "util/stringUtils"; import { useContext } from "react"; diff --git a/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/dateWidget.tsx b/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/dateWidget.tsx index 954e6a94f..94887ffa6 100644 --- a/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/dateWidget.tsx +++ b/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/dateWidget.tsx @@ -1,5 +1,5 @@ import { WidgetProps } from "@rjsf/utils"; -import { DatePicker } from "antd"; +import { default as DatePicker } from "antd/es/date-picker"; import dayjs from "dayjs"; const DATE_PICKER_STYLE = { diff --git a/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/errorBoundary.tsx b/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/errorBoundary.tsx index db744eb7b..fc20df2c5 100644 --- a/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/errorBoundary.tsx +++ b/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/errorBoundary.tsx @@ -1,4 +1,4 @@ -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; import { trans } from "i18n"; import React from "react"; diff --git a/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/jsonSchemaFormComp.tsx b/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/jsonSchemaFormComp.tsx index a3d46fe2a..1c9200c19 100644 --- a/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/jsonSchemaFormComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/jsonSchemaFormComp/jsonSchemaFormComp.tsx @@ -2,7 +2,7 @@ import { withTheme } from '@rjsf/core'; import { RJSFValidationError, ErrorListProps, UISchemaSubmitButtonOptions } from "@rjsf/utils"; import validator from "@rjsf/validator-ajv8"; // import Ajv from "@rjsf/validator-ajv8"; -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; import { BoolControl } from "comps/controls/boolControl"; import { jsonObjectExposingStateControl } from "comps/controls/codeStateControl"; import { styleControl } from "comps/controls/styleControl"; diff --git a/client/packages/lowcoder/src/comps/comps/layout/mobileTabLayout.tsx b/client/packages/lowcoder/src/comps/comps/layout/mobileTabLayout.tsx index 6a2818375..9e6522281 100644 --- a/client/packages/lowcoder/src/comps/comps/layout/mobileTabLayout.tsx +++ b/client/packages/lowcoder/src/comps/comps/layout/mobileTabLayout.tsx @@ -15,7 +15,7 @@ import { CanvasContainerID } from "constants/domLocators"; import { EditorContainer, EmptyContent } from "pages/common/styledComponent"; import { Layers } from "constants/Layers"; import { ExternalEditorContext } from "util/context/ExternalEditorContext"; -import { Skeleton } from "antd"; +import { default as Skeleton } from "antd/es/skeleton"; import { hiddenPropertyView } from "comps/utils/propertyUtils"; const TabBar = React.lazy(() => import("antd-mobile/es/components/tab-bar")); diff --git a/client/packages/lowcoder/src/comps/comps/layout/navLayout.tsx b/client/packages/lowcoder/src/comps/comps/layout/navLayout.tsx index 368e459a9..bad1c2dc3 100644 --- a/client/packages/lowcoder/src/comps/comps/layout/navLayout.tsx +++ b/client/packages/lowcoder/src/comps/comps/layout/navLayout.tsx @@ -1,4 +1,6 @@ -import { Layout, Menu as AntdMenu, MenuProps, Segmented } from "antd"; +import { default as Layout } from "antd/es/layout"; +import { default as AntdMenu, MenuProps } from "antd/es/menu"; +import { default as Segmented } from "antd/es/segmented"; import MainContent from "components/layout/MainContent"; import { LayoutMenuItemComp, LayoutMenuItemListComp } from "comps/comps/layout/layoutMenuItemComp"; import { menuPropertyView } from "comps/comps/navComp/components/MenuItemList"; diff --git a/client/packages/lowcoder/src/comps/comps/listViewComp/listView.tsx b/client/packages/lowcoder/src/comps/comps/listViewComp/listView.tsx index 10bcefa55..97319c64e 100644 --- a/client/packages/lowcoder/src/comps/comps/listViewComp/listView.tsx +++ b/client/packages/lowcoder/src/comps/comps/listViewComp/listView.tsx @@ -1,4 +1,4 @@ -import { Pagination } from "antd"; +import { default as Pagination } from "antd/es/pagination"; import { EditorContext } from "comps/editorState"; import { BackgroundColorContext } from "comps/utils/backgroundColorContext"; import _ from "lodash"; diff --git a/client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx b/client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx index 5b36f4721..4ab476eac 100644 --- a/client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx @@ -1,5 +1,5 @@ import { CloseOutlined } from "@ant-design/icons"; -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; import { ContainerCompBuilder } from "comps/comps/containerBase/containerCompBuilder"; import { gridItemCompToGridItems, diff --git a/client/packages/lowcoder/src/comps/comps/meetingComp/videobuttonCompConstants.tsx b/client/packages/lowcoder/src/comps/comps/meetingComp/videobuttonCompConstants.tsx index 26da52f34..b94010c17 100644 --- a/client/packages/lowcoder/src/comps/comps/meetingComp/videobuttonCompConstants.tsx +++ b/client/packages/lowcoder/src/comps/comps/meetingComp/videobuttonCompConstants.tsx @@ -1,4 +1,4 @@ -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; import { styleControl } from "comps/controls/styleControl"; import { ButtonStyleType, diff --git a/client/packages/lowcoder/src/comps/comps/navComp/navComp.tsx b/client/packages/lowcoder/src/comps/comps/navComp/navComp.tsx index 1c3c40cab..fb6d4609b 100644 --- a/client/packages/lowcoder/src/comps/comps/navComp/navComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/navComp/navComp.tsx @@ -8,7 +8,8 @@ import { alignWithJustifyControl } from "comps/controls/alignControl"; import { navListComp } from "./navItemComp"; import { menuPropertyView } from "./components/MenuItemList"; import { DownOutlined } from "@ant-design/icons"; -import { Dropdown, Menu, MenuProps } from "antd"; +import { default as Dropdown } from "antd/es/dropdown"; +import { default as Menu, MenuProps } from "antd/es/menu"; import { migrateOldData } from "comps/generators/simpleGenerators"; import { styleControl } from "comps/controls/styleControl"; import { NavigationStyle } from "comps/controls/styleControlConstants"; diff --git a/client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx b/client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx index 03d66d4df..f1c917521 100644 --- a/client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx @@ -1,4 +1,4 @@ -import { InputNumber as AntdInputNumber } from "antd"; +import { default as AntdInputNumber } from "antd/es/input-number"; import { BoolCodeControl, codeControl, diff --git a/client/packages/lowcoder/src/comps/comps/numberInputComp/sliderCompConstants.tsx b/client/packages/lowcoder/src/comps/comps/numberInputComp/sliderCompConstants.tsx index dddfe0ccc..5e7760acb 100644 --- a/client/packages/lowcoder/src/comps/comps/numberInputComp/sliderCompConstants.tsx +++ b/client/packages/lowcoder/src/comps/comps/numberInputComp/sliderCompConstants.tsx @@ -7,7 +7,7 @@ import { RecordConstructorToComp } from "lowcoder-core"; import { styleControl } from "comps/controls/styleControl"; import { SliderStyle, SliderStyleType } from "comps/controls/styleControlConstants"; import styled, { css } from "styled-components"; -import { Slider } from "antd"; +import { default as Slider } from "antd/es/slider"; import { darkenColor, fadeColor } from "lowcoder-design"; import { disabledPropertyView, hiddenPropertyView } from "comps/utils/propertyUtils"; import { IconControl } from "comps/controls/iconControl"; diff --git a/client/packages/lowcoder/src/comps/comps/progressCircleComp.tsx b/client/packages/lowcoder/src/comps/comps/progressCircleComp.tsx index a62cedc65..d7b29f633 100644 --- a/client/packages/lowcoder/src/comps/comps/progressCircleComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/progressCircleComp.tsx @@ -1,4 +1,4 @@ -import { Progress } from "antd"; +import { default as Progress } from "antd/es/progress"; import { styleControl } from "comps/controls/styleControl"; import { ProgressStyle, ProgressStyleType, heightCalculator, widthCalculator } from "comps/controls/styleControlConstants"; import styled, { css } from "styled-components"; diff --git a/client/packages/lowcoder/src/comps/comps/progressComp.tsx b/client/packages/lowcoder/src/comps/comps/progressComp.tsx index c4df44ae2..1acf7f2d6 100644 --- a/client/packages/lowcoder/src/comps/comps/progressComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/progressComp.tsx @@ -1,4 +1,4 @@ -import { Progress } from "antd"; +import { default as Progress } from "antd/es/progress"; import { Section, sectionNames } from "lowcoder-design"; import { numberExposingStateControl } from "../controls/codeStateControl"; import { BoolControl } from "../controls/boolControl"; diff --git a/client/packages/lowcoder/src/comps/comps/ratingComp.tsx b/client/packages/lowcoder/src/comps/comps/ratingComp.tsx index c003746ae..992c45f74 100644 --- a/client/packages/lowcoder/src/comps/comps/ratingComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/ratingComp.tsx @@ -1,4 +1,4 @@ -import { Rate } from "antd"; +import { default as Rate } from "antd/es/rate"; import styled, { css } from "styled-components"; import { Section, sectionNames } from "lowcoder-design"; import { NumberControl, BoolCodeControl } from "../controls/codeControl"; diff --git a/client/packages/lowcoder/src/comps/comps/remoteComp/remoteComp.tsx b/client/packages/lowcoder/src/comps/comps/remoteComp/remoteComp.tsx index 0abcde27f..be0f9aae2 100644 --- a/client/packages/lowcoder/src/comps/comps/remoteComp/remoteComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/remoteComp/remoteComp.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "antd"; +import { default as Skeleton } from "antd/es/skeleton"; import { simpleMultiComp } from "comps/generators"; import { withExposingConfigs } from "comps/generators/withExposing"; import { GreyTextColor } from "constants/style"; diff --git a/client/packages/lowcoder/src/comps/comps/responsiveLayout/responsiveLayout.tsx b/client/packages/lowcoder/src/comps/comps/responsiveLayout/responsiveLayout.tsx index 324aa823f..8a9ce6312 100644 --- a/client/packages/lowcoder/src/comps/comps/responsiveLayout/responsiveLayout.tsx +++ b/client/packages/lowcoder/src/comps/comps/responsiveLayout/responsiveLayout.tsx @@ -1,4 +1,5 @@ -import { Row, Col } from "antd"; +import { default as Row } from "antd/es/row"; +import { default as Col } from "antd/es/col"; import { JSONObject, JSONValue } from "util/jsonTypes"; import { CompAction, CompActionTypes, deleteCompAction, wrapChildAction } from "lowcoder-core"; import { DispatchType, RecordConstructorToView, wrapDispatch } from "lowcoder-core"; diff --git a/client/packages/lowcoder/src/comps/comps/richTextEditorComp.tsx b/client/packages/lowcoder/src/comps/comps/richTextEditorComp.tsx index 4c5e6ee0d..f6e040314 100644 --- a/client/packages/lowcoder/src/comps/comps/richTextEditorComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/richTextEditorComp.tsx @@ -20,7 +20,7 @@ import { } from "comps/utils/propertyUtils"; import _ from "lodash"; import { trans } from "i18n"; -import { Skeleton } from "antd"; +import { default as Skeleton } from "antd/es/skeleton"; import { styleControl } from "comps/controls/styleControl"; import { RichTextEditorStyle, RichTextEditorStyleType } from "comps/controls/styleControlConstants"; diff --git a/client/packages/lowcoder/src/comps/comps/selectInputComp/cascaderComp.tsx b/client/packages/lowcoder/src/comps/comps/selectInputComp/cascaderComp.tsx index 26da1703e..4c992874a 100644 --- a/client/packages/lowcoder/src/comps/comps/selectInputComp/cascaderComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/selectInputComp/cascaderComp.tsx @@ -1,4 +1,4 @@ -import { Cascader } from "antd"; +import { default as Cascader } from "antd/es/cascader"; import { CascaderStyleType } from "comps/controls/styleControlConstants"; import { blurMethod, focusMethod } from "comps/utils/methodUtils"; import { trans } from "i18n"; diff --git a/client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx b/client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx index 97bbab078..462c7cfe4 100644 --- a/client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx @@ -1,4 +1,4 @@ -import { Checkbox } from "antd"; +import { default as Checkbox } from "antd/es/checkbox"; import { SelectInputOptionControl } from "comps/controls/optionsControl"; import { BoolCodeControl } from "../../controls/codeControl"; import { arrayStringExposingStateControl } from "../../controls/codeStateControl"; diff --git a/client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx b/client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx index 473d9c9f7..340b482ef 100644 --- a/client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx @@ -1,4 +1,4 @@ -import { Radio as AntdRadio } from "antd"; +import { default as AntdRadio } from "antd/es/radio"; import { RadioStyleType } from "comps/controls/styleControlConstants"; import styled, { css } from "styled-components"; import { UICompBuilder } from "../../generators"; diff --git a/client/packages/lowcoder/src/comps/comps/selectInputComp/segmentedControl.tsx b/client/packages/lowcoder/src/comps/comps/selectInputComp/segmentedControl.tsx index b1ee2e2bb..bf105982a 100644 --- a/client/packages/lowcoder/src/comps/comps/selectInputComp/segmentedControl.tsx +++ b/client/packages/lowcoder/src/comps/comps/selectInputComp/segmentedControl.tsx @@ -1,4 +1,4 @@ -import { Segmented as AntdSegmented } from "antd"; +import { default as AntdSegmented } from "antd/es/segmented"; import { BoolCodeControl } from "comps/controls/codeControl"; import { stringExposingStateControl } from "comps/controls/codeStateControl"; import { ChangeEventHandlerControl } from "comps/controls/eventHandlerControl"; diff --git a/client/packages/lowcoder/src/comps/comps/selectInputComp/selectCompConstants.tsx b/client/packages/lowcoder/src/comps/comps/selectInputComp/selectCompConstants.tsx index 2a94a5aeb..86493bf76 100644 --- a/client/packages/lowcoder/src/comps/comps/selectInputComp/selectCompConstants.tsx +++ b/client/packages/lowcoder/src/comps/comps/selectInputComp/selectCompConstants.tsx @@ -19,7 +19,7 @@ import { } from "lowcoder-design"; import { SelectOptionControl } from "../../controls/optionsControl"; import { SelectEventHandlerControl } from "../../controls/eventHandlerControl"; -import { Select as AntdSelect } from "antd"; +import { default as AntdSelect } from "antd/es/select"; import { ControlParams } from "../../controls/controlParams"; import { ReactNode } from "react"; import styled, { css } from "styled-components"; diff --git a/client/packages/lowcoder/src/comps/comps/signatureComp.tsx b/client/packages/lowcoder/src/comps/comps/signatureComp.tsx index 91ec9b5ad..8db397915 100644 --- a/client/packages/lowcoder/src/comps/comps/signatureComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/signatureComp.tsx @@ -1,5 +1,5 @@ import { DeleteOutlined } from "@ant-design/icons"; -import { Skeleton } from "antd"; +import { default as Skeleton } from "antd/es/skeleton"; import { BoolControl } from "comps/controls/boolControl"; import { StringControl } from "comps/controls/codeControl"; import { ChangeEventHandlerControl } from "comps/controls/eventHandlerControl"; diff --git a/client/packages/lowcoder/src/comps/comps/switchComp.tsx b/client/packages/lowcoder/src/comps/comps/switchComp.tsx index e1f7e2998..3a3ecf955 100644 --- a/client/packages/lowcoder/src/comps/comps/switchComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/switchComp.tsx @@ -1,4 +1,4 @@ -import { Switch } from "antd"; +import { default as Switch } from "antd/es/switch"; import { BoolCodeControl } from "comps/controls/codeControl"; import { booleanExposingStateControl } from "comps/controls/codeStateControl"; import { changeEvent, eventHandlerControl } from "comps/controls/eventHandlerControl"; diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/ColumnNumberComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/ColumnNumberComp.tsx index a775a1887..20a390294 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/ColumnNumberComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/ColumnNumberComp.tsx @@ -1,4 +1,4 @@ - import { Input } from "antd"; + import { default as Input } from "antd/es/input"; import { NumberControl, StringControl } from "comps/controls/codeControl"; import { BoolControl } from "comps/controls/boolControl"; import { trans } from "i18n"; diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnBooleanComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnBooleanComp.tsx index b48e626c0..3a1e91f8a 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnBooleanComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnBooleanComp.tsx @@ -1,6 +1,6 @@ import { BoolCodeControl } from "comps/controls/codeControl"; import { trans } from "i18n"; -import { Checkbox } from "antd"; +import { default as Checkbox } from "antd/es/checkbox"; import { ColumnTypeCompBuilder, ColumnTypeViewFn } from "../columnTypeCompBuilder"; import { ColumnValueTooltip } from "../simpleColumnTypeComps"; import { getStyle } from "comps/comps/selectInputComp/checkboxComp"; diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnDateComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnDateComp.tsx index 76c6abe87..af5070300 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnDateComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnDateComp.tsx @@ -1,4 +1,4 @@ -import { DatePicker } from "antd"; +import { default as DatePicker } from "antd/es/date-picker"; import { ColumnTypeCompBuilder, ColumnTypeViewFn, diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnImgComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnImgComp.tsx index 4eda27432..25fd9e1d3 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnImgComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnImgComp.tsx @@ -1,4 +1,4 @@ -import { Input } from "antd"; +import { default as Input } from "antd/es/input"; import { ColumnTypeCompBuilder, ColumnTypeViewFn, diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnLinkComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnLinkComp.tsx index a52206bf8..4ed3b40da 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnLinkComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnLinkComp.tsx @@ -1,4 +1,4 @@ -import { Input } from "antd"; +import { default as Input } from "antd/es/input"; import { ColumnTypeCompBuilder, ColumnTypeViewFn, diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnLinksComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnLinksComp.tsx index 488607b28..7329db720 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnLinksComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnLinksComp.tsx @@ -1,5 +1,6 @@ import { EllipsisOutlined } from "@ant-design/icons"; -import { Dropdown, Menu } from "antd"; +import { default as Dropdown} from "antd/es/dropdown"; +import { default as Menu } from "antd/es/menu"; import { ColumnTypeCompBuilder } from "comps/comps/tableComp/column/columnTypeCompBuilder"; import { ActionSelectorControlInContext } from "comps/controls/actionSelector/actionSelectorControl"; import { BoolCodeControl, StringControl } from "comps/controls/codeControl"; diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnMarkdownComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnMarkdownComp.tsx index efcdd436c..748308f86 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnMarkdownComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnMarkdownComp.tsx @@ -1,4 +1,4 @@ -import { Input } from "antd"; +import { default as Input } from "antd/es/input"; import { ColumnTypeCompBuilder, ColumnTypeViewFn, diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnProgressComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnProgressComp.tsx index 264d484fa..60f302ce5 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnProgressComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnProgressComp.tsx @@ -1,6 +1,6 @@ import { NumberControl } from "comps/controls/codeControl"; import { trans } from "i18n"; -import { InputNumber } from "antd"; +import { default as InputNumber } from "antd/es/input-number"; import { ColumnTypeCompBuilder, ColumnTypeViewFn } from "../columnTypeCompBuilder"; import { ColumnValueTooltip } from "../simpleColumnTypeComps"; import { ProgressStyle } from "comps/controls/styleControlConstants"; diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnRatingComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnRatingComp.tsx index a629dff3e..8aca4df27 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnRatingComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnRatingComp.tsx @@ -3,7 +3,7 @@ import { trans } from "i18n"; import { ColumnTypeCompBuilder, ColumnTypeViewFn } from "../columnTypeCompBuilder"; import { ColumnValueTooltip } from "../simpleColumnTypeComps"; import styled from "styled-components"; -import { Rate } from "antd"; +import { default as Rate } from "antd/es/rate"; const RateStyled = styled(Rate)<{ isEdit?: boolean }>` display: inline-flex; diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnStatusComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnStatusComp.tsx index 3cdf9e84b..28a2db083 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnStatusComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnStatusComp.tsx @@ -1,4 +1,4 @@ -import { Badge } from "antd"; +import { default as Badge } from "antd/es/badge"; import { ColumnTypeCompBuilder, ColumnTypeViewFn, @@ -9,7 +9,7 @@ import { DropdownStyled, Wrapper } from "./columnTagsComp"; import { ReactNode, useContext, useState } from "react"; import { StatusContext } from "components/table/EditableCell"; import { CustomSelect, PackUpIcon, ScrollBar } from "lowcoder-design"; -import { PresetStatusColorType } from "antd/lib/_util/colors"; +import { PresetStatusColorType } from "antd/es/_util/colors"; export const ColumnValueTooltip = trans("table.columnValueTooltip"); diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnTagsComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnTagsComp.tsx index 54930a7d1..4124d67ee 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnTagsComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnTagsComp.tsx @@ -1,4 +1,4 @@ -import { Tag } from "antd"; +import { default as Tag } from "antd/es/tag"; import { PresetStatusColorTypes } from "antd/lib/_util/colors"; import { TagsContext } from "components/table/EditableCell"; import { diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/simpleTextComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/simpleTextComp.tsx index 3311c01dc..a0da677ae 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/simpleTextComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/simpleTextComp.tsx @@ -1,4 +1,4 @@ -import { Input } from "antd"; +import { default as Input } from "antd/es/input"; import { StringOrNumberControl } from "comps/controls/codeControl"; import { trans } from "i18n"; import { ColumnTypeCompBuilder, ColumnTypeViewFn } from "../columnTypeCompBuilder"; diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx index 7c462d8ee..348ce73fa 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx @@ -28,8 +28,7 @@ import { JSONValue } from "util/jsonTypes"; import styled from "styled-components"; import { TextOverflowControl } from "comps/controls/textOverflowControl"; import { TableColumnLinkStyle, styleControl } from "@lowcoder-ee/index.sdk"; -import { Divider } from "antd"; - +import { default as Divider } from "antd/es/divider"; export type Render = ReturnType["getOriginalComp"]>; export const RenderComp = withSelectedMultiContext(ColumnTypeComp); diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx index b4afcea13..a523e7c58 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx @@ -1,5 +1,4 @@ -import { Table } from "antd"; -import { TableProps } from "antd/es/table"; +import { default as Table, TableProps } from "antd/es/table"; import { TableCellContext, TableRowContext } from "comps/comps/tableComp/tableContext"; import { TableToolbar } from "comps/comps/tableComp/tableToolbarComp"; import { RowColorViewType, RowHeightViewType, TableEventOptionValues } from "comps/comps/tableComp/tableTypes"; diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx index b1259e626..f7e8829e0 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx @@ -1,5 +1,6 @@ -import { Button, Pagination, Popover } from "antd"; -import { PaginationProps } from "antd/lib/pagination/Pagination"; +import { default as Button } from "antd/es/button"; +import { default as Pagination, PaginationProps } from "antd/es/pagination"; +import { default as Popover } from "antd/es/popover"; import { ThemeDetail } from "api/commonSettingApi"; import { ColumnCompType } from "comps/comps/tableComp/column/tableColumnComp"; import { TableOnEventView } from "comps/comps/tableComp/tableTypes"; diff --git a/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx b/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx index 991cd2d90..125599b0b 100644 --- a/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx @@ -1,4 +1,4 @@ -import { Tabs } from "antd"; +import { default as Tabs } from "antd/es/tabs"; import { JSONObject, JSONValue } from "util/jsonTypes"; import { CompAction, CompActionTypes, deleteCompAction, wrapChildAction } from "lowcoder-core"; import { DispatchType, RecordConstructorToView, wrapDispatch } from "lowcoder-core"; diff --git a/client/packages/lowcoder/src/comps/comps/textInputComp/inputComp.tsx b/client/packages/lowcoder/src/comps/comps/textInputComp/inputComp.tsx index 04e52ef8a..fc34bc723 100644 --- a/client/packages/lowcoder/src/comps/comps/textInputComp/inputComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/textInputComp/inputComp.tsx @@ -28,7 +28,7 @@ import { import { trans } from "i18n"; import { IconControl } from "comps/controls/iconControl"; import { hasIcon } from "comps/utils"; -import { InputRef } from "antd"; +import { InputRef } from "antd/es/input"; import { RefControl } from "comps/controls/refControl"; import React, { useContext } from "react"; diff --git a/client/packages/lowcoder/src/comps/comps/textInputComp/mentionComp.tsx b/client/packages/lowcoder/src/comps/comps/textInputComp/mentionComp.tsx index 89c75bd8e..630f7e376 100644 --- a/client/packages/lowcoder/src/comps/comps/textInputComp/mentionComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/textInputComp/mentionComp.tsx @@ -36,9 +36,9 @@ import { booleanExposingStateControl } from "comps/controls/codeStateControl"; import { trans } from "i18n"; import { RefControl } from "comps/controls/refControl"; import { TextAreaRef } from "antd/lib/input/TextArea"; -import { Mentions, ConfigProvider } from "antd"; +import { default as ConfigProvider } from "antd/es/config-provider"; +import { default as Mentions, MentionsOptionProps } from "antd/es/mentions"; import { blurMethod, focusWithOptions } from "comps/utils/methodUtils"; -import type { MentionsOptionProps } from "antd/es/mentions"; import { textInputValidate, } from "../textInputComp/textInputConstants"; diff --git a/client/packages/lowcoder/src/comps/comps/textInputComp/passwordComp.tsx b/client/packages/lowcoder/src/comps/comps/textInputComp/passwordComp.tsx index 0437e87b6..3d2d68bcc 100644 --- a/client/packages/lowcoder/src/comps/comps/textInputComp/passwordComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/textInputComp/passwordComp.tsx @@ -1,4 +1,4 @@ -import { Input, InputRef } from "antd"; +import { default as Input, InputRef } from "antd/es/input"; import { NameConfig, NameConfigPlaceHolder, diff --git a/client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx b/client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx index 785964593..23b99b319 100644 --- a/client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx +++ b/client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx @@ -34,7 +34,7 @@ import { import { trans } from "i18n"; import { ChangeEvent, useRef, useState } from "react"; import { refMethods } from "comps/generators/withMethodExposing"; -import { InputRef } from "antd"; +import { InputRef } from "antd/es/input"; import { blurMethod, clickMethod, diff --git a/client/packages/lowcoder/src/comps/comps/timelineComp/timelineComp.tsx b/client/packages/lowcoder/src/comps/comps/timelineComp/timelineComp.tsx index 8591378ed..78a2787af 100644 --- a/client/packages/lowcoder/src/comps/comps/timelineComp/timelineComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/timelineComp/timelineComp.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; // 渲染组件到编辑器 import { changeChildAction, @@ -58,7 +58,7 @@ import { import { timelineDate, timelineNode, TimelineDataTooltip } from "./timelineConstants"; import { convertTimeLineData } from "./timelineUtils"; -import { Timeline } from "antd"; +import { default as Timeline } from "antd/es/timeline"; import { ANTDICON } from "./antIcon"; // todo: select icons to not import all icons diff --git a/client/packages/lowcoder/src/comps/comps/treeComp/treeComp.tsx b/client/packages/lowcoder/src/comps/comps/treeComp/treeComp.tsx index ccd5b4671..6474efa9b 100644 --- a/client/packages/lowcoder/src/comps/comps/treeComp/treeComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/treeComp/treeComp.tsx @@ -2,7 +2,7 @@ import { RecordConstructorToView } from "lowcoder-core"; import { UICompBuilder } from "comps/generators/uiCompBuilder"; import { withExposingConfigs } from "comps/generators/withExposing"; import { Section, sectionNames } from "lowcoder-design"; -import { Tree } from "antd"; +import { default as Tree } from "antd/es/tree"; import { useEffect, useState } from "react"; import styled from "styled-components"; import ReactResizeDetector from "react-resize-detector"; diff --git a/client/packages/lowcoder/src/comps/comps/treeComp/treeSelectComp.tsx b/client/packages/lowcoder/src/comps/comps/treeComp/treeSelectComp.tsx index e154131bb..993113e97 100644 --- a/client/packages/lowcoder/src/comps/comps/treeComp/treeSelectComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/treeComp/treeSelectComp.tsx @@ -2,7 +2,7 @@ import { changeChildAction, DispatchType, RecordConstructorToView } from "lowcod import { UICompBuilder } from "comps/generators/uiCompBuilder"; import { NameConfig, withExposingConfigs } from "comps/generators/withExposing"; import { Section, sectionNames, ValueFromOption } from "lowcoder-design"; -import { TreeSelect } from "antd"; +import { default as TreeSelect } from "antd/es/tree-select"; import { useEffect } from "react"; import styled from "styled-components"; import { styleControl } from "comps/controls/styleControl"; diff --git a/client/packages/lowcoder/src/comps/controls/labelControl.tsx b/client/packages/lowcoder/src/comps/controls/labelControl.tsx index 4830e0c49..92a1828b3 100644 --- a/client/packages/lowcoder/src/comps/controls/labelControl.tsx +++ b/client/packages/lowcoder/src/comps/controls/labelControl.tsx @@ -1,6 +1,6 @@ import { trans } from "i18n"; import { green, red, yellow } from "@ant-design/colors"; -import { FormItemProps } from "antd"; +import { FormItemProps } from "antd/es/form/FormItem"; import { BoolControl } from "comps/controls/boolControl"; import { NumberControl, StringControl } from "comps/controls/codeControl"; import { dropdownControl } from "comps/controls/dropdownControl"; diff --git a/client/packages/lowcoder/src/comps/controls/numberSimpleControl.tsx b/client/packages/lowcoder/src/comps/controls/numberSimpleControl.tsx index 9dd89a7c3..e706dcef4 100644 --- a/client/packages/lowcoder/src/comps/controls/numberSimpleControl.tsx +++ b/client/packages/lowcoder/src/comps/controls/numberSimpleControl.tsx @@ -1,4 +1,4 @@ -import { InputNumber } from "antd"; +import { default as InputNumber } from "antd/es/input-number"; import { SimpleComp } from "lowcoder-core"; import { ControlPropertyViewWrapper } from "lowcoder-design"; import React, { ReactNode } from "react"; diff --git a/client/packages/lowcoder/src/comps/controls/slotControl.tsx b/client/packages/lowcoder/src/comps/controls/slotControl.tsx index 8248e98f2..0c798c5aa 100644 --- a/client/packages/lowcoder/src/comps/controls/slotControl.tsx +++ b/client/packages/lowcoder/src/comps/controls/slotControl.tsx @@ -1,4 +1,4 @@ -import { Modal } from "antd"; +import { default as Modal } from "antd/es/modal"; import { SimpleContainerComp } from "comps/comps/containerBase/simpleContainerComp"; import { ContainerBaseProps, diff --git a/client/packages/lowcoder/src/comps/controls/styleControl.tsx b/client/packages/lowcoder/src/comps/controls/styleControl.tsx index fe0f1b227..a91429492 100644 --- a/client/packages/lowcoder/src/comps/controls/styleControl.tsx +++ b/client/packages/lowcoder/src/comps/controls/styleControl.tsx @@ -1,4 +1,4 @@ -import { Tooltip } from "antd"; +import { default as Tooltip } from "antd/es/tooltip"; import { getThemeDetailName, isThemeColorKey, ThemeDetail } from "api/commonSettingApi"; import { ControlItemCompBuilder } from "comps/generators/controlCompBuilder"; import { childrenToProps, ToConstructor } from "comps/generators/multi"; diff --git a/client/packages/lowcoder/src/comps/generators/withIsLoading.tsx b/client/packages/lowcoder/src/comps/generators/withIsLoading.tsx index 5331d251b..26914c1df 100644 --- a/client/packages/lowcoder/src/comps/generators/withIsLoading.tsx +++ b/client/packages/lowcoder/src/comps/generators/withIsLoading.tsx @@ -1,4 +1,4 @@ -import { Spin } from "antd"; +import { default as Spin } from "antd/es/spin"; import { FetchCheckNode, FetchInfo, diff --git a/client/packages/lowcoder/src/comps/hooks/drawerComp.tsx b/client/packages/lowcoder/src/comps/hooks/drawerComp.tsx index 134b0e229..1ae4b9673 100644 --- a/client/packages/lowcoder/src/comps/hooks/drawerComp.tsx +++ b/client/packages/lowcoder/src/comps/hooks/drawerComp.tsx @@ -1,5 +1,5 @@ import { CloseOutlined } from "@ant-design/icons"; -import { Button } from "antd"; +import { default as Button } from "antd/es/button"; import { ContainerCompBuilder } from "comps/comps/containerBase/containerCompBuilder"; import { gridItemCompToGridItems, InnerGrid } from "comps/comps/containerComp/containerView"; import { AutoHeightControl } from "comps/controls/autoHeightControl"; diff --git a/client/packages/lowcoder/src/comps/queries/esQuery.tsx b/client/packages/lowcoder/src/comps/queries/esQuery.tsx index de933e46d..902332bbd 100644 --- a/client/packages/lowcoder/src/comps/queries/esQuery.tsx +++ b/client/packages/lowcoder/src/comps/queries/esQuery.tsx @@ -1,4 +1,4 @@ -import { Tag } from "antd"; +import { default as Tag } from "antd/es/tag"; import { trans } from "i18n"; import _, { includes, isEmpty, pick } from "lodash"; import { diff --git a/client/packages/lowcoder/src/comps/queries/libraryQuery.tsx b/client/packages/lowcoder/src/comps/queries/libraryQuery.tsx index bc30e137e..26d0bc59b 100644 --- a/client/packages/lowcoder/src/comps/queries/libraryQuery.tsx +++ b/client/packages/lowcoder/src/comps/queries/libraryQuery.tsx @@ -1,5 +1,5 @@ import { LoadingOutlined } from "@ant-design/icons"; -import { Spin } from "antd"; +import { default as Spin } from "antd/es/spin"; import DataSourceIcon from "components/DataSourceIcon"; import { ContextControlType, ContextJsonControl } from "comps/controls/contextCodeControl"; import { trans } from "i18n"; diff --git a/client/packages/lowcoder/src/comps/queries/resourceDropdown.tsx b/client/packages/lowcoder/src/comps/queries/resourceDropdown.tsx index d4b60a063..037b50f49 100644 --- a/client/packages/lowcoder/src/comps/queries/resourceDropdown.tsx +++ b/client/packages/lowcoder/src/comps/queries/resourceDropdown.tsx @@ -1,11 +1,12 @@ -import { Divider, Select } from "antd"; +import { default as Divider } from "antd/es/divider"; +import { OptionProps, default as Select } from "antd/es/select"; import { useSelector } from "react-redux"; import React, { useContext, useMemo, useState } from "react"; import { DataSourceTypeInfo } from "api/datasourceApi"; import styled from "styled-components"; import { CustomSelect, EllipsisTextCss } from "lowcoder-design"; import { DatasourceModal } from "pages/datasource/datasourceModal"; -import { InputStatus } from "antd/lib/_util/statusUtils"; +import { InputStatus } from "antd/es/_util/statusUtils"; import { getDataSource, getDataSourceTypes } from "redux/selectors/datasourceSelectors"; import { getUser } from "redux/selectors/usersSelectors"; import { getBottomResIcon } from "@lowcoder-ee/util/bottomResUtils"; @@ -24,6 +25,8 @@ import { import { QueryContext } from "util/context/QueryContext"; import { messageInstance } from "lowcoder-design"; +const { Option } = Select; + const SelectOptionLabel = styled.div` font-size: 13px; display: inline-block; @@ -36,7 +39,7 @@ const SelectOptionContains = styled.div` align-items: center; width: 99%; `; -const SelectOption = styled(Select.Option)` +const SelectOption = styled((props: OptionProps) =>