diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
index c052a6f89c144..6f6642d840e10 100644
--- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
+++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
@@ -20,7 +20,7 @@ import React, { CSSProperties } from 'react';
import ButtonGroup from 'src/components/ButtonGroup';
import Alert from 'src/components/Alert';
import moment from 'moment';
-import { RadioChangeEvent } from 'antd/lib/radio';
+import { RadioChangeEvent } from 'src/components';
import Button from 'src/components/Button';
import shortid from 'shortid';
import rison from 'rison';
diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetModal/SaveDatasetModal.test.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetModal/SaveDatasetModal.test.tsx
index 2bd376e126b54..cab55599941a4 100644
--- a/superset-frontend/src/SqlLab/components/SaveDatasetModal/SaveDatasetModal.test.tsx
+++ b/superset-frontend/src/SqlLab/components/SaveDatasetModal/SaveDatasetModal.test.tsx
@@ -19,7 +19,7 @@
import React from 'react';
import { shallow } from 'enzyme';
import { Radio } from 'src/components/Radio';
-import { AutoComplete } from 'src/common/components';
+import { AutoComplete } from 'src/components';
import { Input } from 'src/components/Input';
import { SaveDatasetModal } from 'src/SqlLab/components/SaveDatasetModal';
diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
index 76d272a6586da..21884dbe8f13b 100644
--- a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
@@ -20,12 +20,11 @@
import React, { FunctionComponent } from 'react';
import { AutoCompleteProps } from 'antd/lib/auto-complete';
import { Radio } from 'src/components/Radio';
-import { AutoComplete } from 'src/common/components';
+import { AutoComplete, RadioChangeEvent } from 'src/components';
import { Input } from 'src/components/Input';
import StyledModal from 'src/components/Modal';
import Button from 'src/components/Button';
import { styled, t } from '@superset-ui/core';
-import { RadioChangeEvent } from 'antd/lib/radio';
interface SaveDatasetModalProps {
visible: boolean;
diff --git a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx
index cc00fc5aeacf2..2b57ce0cdcc59 100644
--- a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import React, { useState, useEffect } from 'react';
-import { Row, Col } from 'src/common/components';
+import { Row, Col } from 'src/components';
import { Input, TextArea } from 'src/components/Input';
import { t, styled } from '@superset-ui/core';
import Button from 'src/components/Button';
diff --git a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx
index 6ad168030fb92..900e34d05a594 100644
--- a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx
+++ b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx
@@ -18,7 +18,7 @@
*/
import React, { FunctionComponent, useState } from 'react';
import SchemaForm, { FormProps, FormValidation } from 'react-jsonschema-form';
-import { Row, Col } from 'src/common/components';
+import { Row, Col } from 'src/components';
import { Input, TextArea } from 'src/components/Input';
import { t, styled } from '@superset-ui/core';
import * as chrono from 'chrono-node';
diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.jsx b/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.jsx
index 986862e2a6d12..f3549b547f8b1 100644
--- a/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.jsx
+++ b/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.jsx
@@ -32,7 +32,7 @@ import AceEditorWrapper from 'src/SqlLab/components/AceEditorWrapper';
import ConnectedSouthPane from 'src/SqlLab/components/SouthPane/state';
import SqlEditor from 'src/SqlLab/components/SqlEditor';
import SqlEditorLeftBar from 'src/SqlLab/components/SqlEditorLeftBar';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import {
queryEditorSetFunctionNames,
queryEditorSetSelectedText,
@@ -126,6 +126,6 @@ describe('SqlEditor', () => {
const updatedProps = { ...mockedProps, defaultQueryLimit };
const wrapper = buildWrapper(updatedProps);
await waitForComponentToPaint(wrapper);
- expect(wrapper.find(Dropdown)).toExist();
+ expect(wrapper.find(AntdDropdown)).toExist();
});
});
diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx
index cbfbb41968c80..0a3008d2f3e2a 100644
--- a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx
+++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx
@@ -31,7 +31,7 @@ import StyledModal from 'src/components/Modal';
import Mousetrap from 'mousetrap';
import Button from 'src/components/Button';
import Timer from 'src/components/Timer';
-import { Dropdown, Switch } from 'src/common/components';
+import { AntdDropdown, AntdSwitch } from 'src/components';
import { Input } from 'src/components/Input';
import { Menu } from 'src/components/Menu';
import Icons from 'src/components/Icons';
@@ -533,7 +533,7 @@ class SqlEditor extends React.PureComponent {
{' '}
{t('Autocomplete')}{' '}
-
-
+ e.preventDefault()}>
LIMIT:
@@ -678,7 +678,7 @@ class SqlEditor extends React.PureComponent {
-
+
{this.props.latestQuery && (
@@ -703,9 +703,9 @@ class SqlEditor extends React.PureComponent {
-
+
-
+
);
diff --git a/superset-frontend/src/addSlice/AddSliceContainer.tsx b/superset-frontend/src/addSlice/AddSliceContainer.tsx
index ee3bb16820294..85f72d124b0e8 100644
--- a/superset-frontend/src/addSlice/AddSliceContainer.tsx
+++ b/superset-frontend/src/addSlice/AddSliceContainer.tsx
@@ -19,9 +19,8 @@
import React, { ReactNode } from 'react';
import rison from 'rison';
import { styled, t, SupersetClient, JsonResponse } from '@superset-ui/core';
-import { Steps } from 'src/common/components';
import Button from 'src/components/Button';
-import { Select } from 'src/components';
+import { Select, Steps } from 'src/components';
import { FormLabel } from 'src/components/Form';
import { Tooltip } from 'src/components/Tooltip';
diff --git a/superset-frontend/src/common/components/index.tsx b/superset-frontend/src/common/components/index.tsx
deleted file mode 100644
index 7e5e4fdef13e4..0000000000000
--- a/superset-frontend/src/common/components/index.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- Antd is re-exported from here so we can override components with Emotion as needed.
-
- For documentation, see https://ant.design/components/overview/
- */
-export {
- AutoComplete,
- Avatar,
- Button,
- Checkbox,
- Col,
- DatePicker,
- Divider,
- Dropdown,
- Form,
- Grid,
- Empty,
- Typography,
- Tree,
- Popover,
- Slider,
- Row,
- Space,
- Skeleton,
- Steps,
- Switch,
- Tag,
- Tabs,
- Tooltip,
- Upload,
- Input as AntdInput,
-} from 'antd';
-export { Card as AntdCard } from 'antd';
-export { default as Modal } from 'antd/lib/modal';
-export type { ModalProps } from 'antd/lib/modal';
-export type { FormInstance } from 'antd/lib/form';
-export type { RadioChangeEvent } from 'antd/lib/radio';
-export type { TreeProps } from 'antd/lib/tree';
-export { default as Alert } from 'antd/lib/alert';
-export { default as Select } from 'antd/lib/select';
-export { default as List } from 'antd/lib/list';
-export type { AlertProps } from 'antd/lib/alert';
-export type { SelectProps } from 'antd/lib/select';
-export type { ListItemProps } from 'antd/lib/list';
-export { default as Collapse } from 'src/components/Collapse';
-export { default as Badge } from 'src/components/Badge';
-export { default as Card } from 'src/components/Card';
-export { default as Progress } from 'src/components/ProgressBar';
-export { default as Icon } from '@ant-design/icons';
diff --git a/superset-frontend/src/components/Alert/index.tsx b/superset-frontend/src/components/Alert/index.tsx
index 6ed9003cef452..b8d7abcf66fa3 100644
--- a/superset-frontend/src/components/Alert/index.tsx
+++ b/superset-frontend/src/components/Alert/index.tsx
@@ -17,10 +17,7 @@
* under the License.
*/
import React, { PropsWithChildren } from 'react';
-import {
- Alert as AntdAlert,
- AlertProps as AntdAlertProps,
-} from 'src/common/components';
+import AntdAlert, { AlertProps as AntdAlertProps } from 'antd/lib/alert';
import { useTheme } from '@superset-ui/core';
import Icons from 'src/components/Icons';
diff --git a/superset-frontend/src/components/Button/index.tsx b/superset-frontend/src/components/Button/index.tsx
index 63a017836a1f7..bfe8bdb6597a3 100644
--- a/superset-frontend/src/components/Button/index.tsx
+++ b/superset-frontend/src/components/Button/index.tsx
@@ -20,7 +20,7 @@ import React, { CSSProperties, Children, ReactElement } from 'react';
import { kebabCase } from 'lodash';
import { mix } from 'polished';
import cx from 'classnames';
-import { Button as AntdButton } from 'antd';
+import { AntdButton } from 'src/components';
import { useTheme } from '@superset-ui/core';
import { Tooltip } from 'src/components/Tooltip';
diff --git a/superset-frontend/src/components/CronPicker/CronPicker.stories.tsx b/superset-frontend/src/components/CronPicker/CronPicker.stories.tsx
index d7abdf9585699..99d692952b822 100644
--- a/superset-frontend/src/components/CronPicker/CronPicker.stories.tsx
+++ b/superset-frontend/src/components/CronPicker/CronPicker.stories.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import React, { useState, useRef, useCallback } from 'react';
-import { Divider } from 'src/common/components';
+import { Divider } from 'src/components';
import { Input } from 'src/components/Input';
import { CronPicker, CronError, CronProps } from '.';
diff --git a/superset-frontend/src/components/Datasource/ChangeDatasourceModal.tsx b/superset-frontend/src/components/Datasource/ChangeDatasourceModal.tsx
index 5aec5cc3a4577..a7c29c51d91f1 100644
--- a/superset-frontend/src/components/Datasource/ChangeDatasourceModal.tsx
+++ b/superset-frontend/src/components/Datasource/ChangeDatasourceModal.tsx
@@ -35,7 +35,7 @@ import { useDebouncedEffect } from 'src/explore/exploreUtils';
import { SLOW_DEBOUNCE } from 'src/constants';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import Loading from 'src/components/Loading';
-import { AntdInput } from 'src/common/components';
+import { AntdInput } from 'src/components';
import { Input } from 'src/components/Input';
import {
PAGE_SIZE as DATASET_PAGE_SIZE,
diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
index e821ddb276e51..723d4971de28f 100644
--- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
+++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
@@ -19,14 +19,13 @@
import rison from 'rison';
import React, { useCallback } from 'react';
import PropTypes from 'prop-types';
-import { Row, Col } from 'src/common/components';
import { Radio } from 'src/components/Radio';
import Card from 'src/components/Card';
import Alert from 'src/components/Alert';
import Badge from 'src/components/Badge';
import shortid from 'shortid';
import { styled, SupersetClient, t, withTheme } from '@superset-ui/core';
-import { Select } from 'src/components';
+import { Select, Row, Col } from 'src/components';
import { FormLabel } from 'src/components/Form';
import Button from 'src/components/Button';
import Tabs from 'src/components/Tabs';
diff --git a/superset-frontend/src/components/Dropdown/index.tsx b/superset-frontend/src/components/Dropdown/index.tsx
index d59d4e630912c..fdfa9f945c6c2 100644
--- a/superset-frontend/src/components/Dropdown/index.tsx
+++ b/superset-frontend/src/components/Dropdown/index.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import React, { RefObject } from 'react';
-import { Dropdown as AntdDropdown } from 'antd';
+import { AntdDropdown } from 'src/components';
import { DropDownProps } from 'antd/lib/dropdown';
import { styled } from '@superset-ui/core';
diff --git a/superset-frontend/src/components/DropdownButton/index.tsx b/superset-frontend/src/components/DropdownButton/index.tsx
index fead7581181a7..f2a223a49fd8d 100644
--- a/superset-frontend/src/components/DropdownButton/index.tsx
+++ b/superset-frontend/src/components/DropdownButton/index.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import React, { ReactNode } from 'react';
-import { Dropdown as AntdDropdown, Tooltip } from 'src/common/components';
+import { AntdDropdown, AntdTooltip } from 'src/components';
import { styled } from '@superset-ui/core';
import kebabCase from 'lodash/kebabCase';
@@ -92,13 +92,13 @@ export const DropdownButton = ({
if (tooltip) {
return buildButton({
buttonsRender: ([leftButton, rightButton]) => [
-
{leftButton}
- ,
+ ,
rightButton,
],
});
diff --git a/superset-frontend/src/components/EmptyState/index.tsx b/superset-frontend/src/components/EmptyState/index.tsx
index e27c72894c15e..d3e0c5701a1eb 100644
--- a/superset-frontend/src/components/EmptyState/index.tsx
+++ b/superset-frontend/src/components/EmptyState/index.tsx
@@ -19,7 +19,7 @@
import React, { ReactNode } from 'react';
import { styled, css, SupersetTheme } from '@superset-ui/core';
-import { Empty } from 'src/common/components';
+import { Empty } from 'src/components';
import Button from 'src/components/Button';
export enum EmptyStateSize {
diff --git a/superset-frontend/src/components/FacePile/FacePile.test.tsx b/superset-frontend/src/components/FacePile/FacePile.test.tsx
index 9d202061b7b4c..5ccc4991eab9b 100644
--- a/superset-frontend/src/components/FacePile/FacePile.test.tsx
+++ b/superset-frontend/src/components/FacePile/FacePile.test.tsx
@@ -19,7 +19,7 @@
import React from 'react';
import { styledMount as mount } from 'spec/helpers/theming';
-import { Avatar } from 'src/common/components';
+import { Avatar } from 'src/components';
import FacePile from '.';
import { getRandomColor } from './utils';
diff --git a/superset-frontend/src/components/FacePile/index.tsx b/superset-frontend/src/components/FacePile/index.tsx
index 45daae643528c..730d162e2d14e 100644
--- a/superset-frontend/src/components/FacePile/index.tsx
+++ b/superset-frontend/src/components/FacePile/index.tsx
@@ -23,7 +23,7 @@ import {
SupersetTheme,
} from '@superset-ui/core';
import { Tooltip } from 'src/components/Tooltip';
-import { Avatar } from 'src/common/components';
+import { Avatar } from 'src/components';
import { getRandomColor } from './utils';
interface FacePileProps {
diff --git a/superset-frontend/src/components/Form/Form.tsx b/superset-frontend/src/components/Form/Form.tsx
index ee40a8cb2c4b6..bdcc200d4e9de 100644
--- a/superset-frontend/src/components/Form/Form.tsx
+++ b/superset-frontend/src/components/Form/Form.tsx
@@ -17,10 +17,10 @@
* under the License.
*/
import React from 'react';
-import AntDForm, { FormProps } from 'antd/lib/form';
+import AntdForm, { FormProps } from 'antd/lib/form';
import { styled } from '@superset-ui/core';
-const StyledForm = styled(AntDForm)`
+const StyledForm = styled(AntdForm)`
&.ant-form label {
font-size: ${({ theme }) => theme.typography.sizes.s}px;
}
diff --git a/superset-frontend/src/components/FormRow/FormRow.test.jsx b/superset-frontend/src/components/FormRow/FormRow.test.jsx
index 57f1d6500a093..d9b5308f19944 100644
--- a/superset-frontend/src/components/FormRow/FormRow.test.jsx
+++ b/superset-frontend/src/components/FormRow/FormRow.test.jsx
@@ -20,7 +20,7 @@ import React from 'react';
import { shallow } from 'enzyme';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
-import { Row, Col } from 'src/common/components';
+import { Row, Col } from 'src/components';
import TextControl from 'src/explore/components/controls/TextControl';
import FormRow from 'src/components/FormRow';
diff --git a/superset-frontend/src/components/FormRow/index.jsx b/superset-frontend/src/components/FormRow/index.jsx
index 6dd5027b08cd4..fabc7d610deee 100644
--- a/superset-frontend/src/components/FormRow/index.jsx
+++ b/superset-frontend/src/components/FormRow/index.jsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
-import { Row, Col } from 'src/common/components';
+import { Row, Col } from 'src/components';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
diff --git a/superset-frontend/src/components/ImportModal/ImportModal.test.tsx b/superset-frontend/src/components/ImportModal/ImportModal.test.tsx
index 7ca93e1fa7552..f86f0bff8ef8b 100644
--- a/superset-frontend/src/components/ImportModal/ImportModal.test.tsx
+++ b/superset-frontend/src/components/ImportModal/ImportModal.test.tsx
@@ -24,7 +24,7 @@ import { styledMount as mount } from 'spec/helpers/theming';
import { ReactWrapper } from 'enzyme';
import fetchMock from 'fetch-mock';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
-import { Upload } from 'src/common/components';
+import { Upload } from 'src/components';
import Button from 'src/components/Button';
import { ImportResourceName } from 'src/views/CRUD/types';
import ImportModelsModal from 'src/components/ImportModal';
diff --git a/superset-frontend/src/components/ImportModal/index.tsx b/superset-frontend/src/components/ImportModal/index.tsx
index 7d0067257d3ed..da32756df1458 100644
--- a/superset-frontend/src/components/ImportModal/index.tsx
+++ b/superset-frontend/src/components/ImportModal/index.tsx
@@ -22,7 +22,7 @@ import { styled, t } from '@superset-ui/core';
import Button from 'src/components/Button';
import Modal from 'src/components/Modal';
-import { Upload } from 'src/common/components';
+import { Upload } from 'src/components';
import { useImportResource } from 'src/views/CRUD/hooks';
import { ImportResourceName } from 'src/views/CRUD/types';
diff --git a/superset-frontend/src/components/Label/index.tsx b/superset-frontend/src/components/Label/index.tsx
index 0bf4f2a058bf1..e66437da7d8a5 100644
--- a/superset-frontend/src/components/Label/index.tsx
+++ b/superset-frontend/src/components/Label/index.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import React, { CSSProperties } from 'react';
-import { Tag } from 'src/common/components';
+import { Tag } from 'src/components';
import { useTheme } from '@superset-ui/core';
export type OnClickHandler = React.MouseEventHandler;
diff --git a/superset-frontend/src/components/ListView/Filters/Search.tsx b/superset-frontend/src/components/ListView/Filters/Search.tsx
index fd61cba5cc79f..f327ac4b39ebb 100644
--- a/superset-frontend/src/components/ListView/Filters/Search.tsx
+++ b/superset-frontend/src/components/ListView/Filters/Search.tsx
@@ -19,7 +19,7 @@
import React, { useState } from 'react';
import { t, styled } from '@superset-ui/core';
import Icons from 'src/components/Icons';
-import { AntdInput as Input } from 'src/common/components';
+import { AntdInput } from 'src/components';
import { SELECT_WIDTH } from 'src/components/ListView/utils';
import { FormLabel } from 'src/components/Form';
import { BaseFilter } from './Base';
@@ -38,7 +38,7 @@ const SearchIcon = styled(Icons.Search)`
color: ${({ theme }) => theme.colors.grayscale.light1};
`;
-const StyledInput = styled(Input)`
+const StyledInput = styled(AntdInput)`
border-radius: ${({ theme }) => theme.gridUnit}px;
`;
diff --git a/superset-frontend/src/components/ListView/ListView.test.jsx b/superset-frontend/src/components/ListView/ListView.test.jsx
index ee8194f854ef1..25ab1b63aea6b 100644
--- a/superset-frontend/src/components/ListView/ListView.test.jsx
+++ b/superset-frontend/src/components/ListView/ListView.test.jsx
@@ -23,7 +23,7 @@ import { QueryParamProvider } from 'use-query-params';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import Button from 'src/components/Button';
-import { Empty } from 'src/common/components';
+import { Empty } from 'src/components';
import CardCollection from 'src/components/ListView/CardCollection';
import { CardSortSelect } from 'src/components/ListView/CardSortSelect';
import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox';
diff --git a/superset-frontend/src/components/ListView/ListView.tsx b/superset-frontend/src/components/ListView/ListView.tsx
index 401cbb8986fe4..4b979cbf56afa 100644
--- a/superset-frontend/src/components/ListView/ListView.tsx
+++ b/superset-frontend/src/components/ListView/ListView.tsx
@@ -18,7 +18,7 @@
*/
import { t, styled } from '@superset-ui/core';
import React, { useEffect } from 'react';
-import { Empty } from 'src/common/components';
+import { Empty } from 'src/components';
import Alert from 'src/components/Alert';
import EmptyImage from 'src/assets/images/empty.svg';
import cx from 'classnames';
diff --git a/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx b/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
index 3e8a63879e990..9f91193ee9327 100644
--- a/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
+++ b/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
@@ -21,7 +21,7 @@ import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, select, text } from '@storybook/addon-knobs';
import DashboardImg from 'src/assets/images/dashboard-card-fallback.svg';
import ChartImg from 'src/assets/images/chart-card-fallback.svg';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import Icons from 'src/components/Icons';
import FaveStar from 'src/components/FaveStar';
@@ -64,7 +64,7 @@ export const SupersetListViewCard = () => (
saveFaveStar={action('saveFaveStar')}
isStarred={boolean('isStarred', false)}
/>
-
@@ -77,7 +77,7 @@ export const SupersetListViewCard = () => (
}
>
-
+
}
/>
diff --git a/superset-frontend/src/components/ListViewCard/index.tsx b/superset-frontend/src/components/ListViewCard/index.tsx
index 0402a484900fe..79616c86aca59 100644
--- a/superset-frontend/src/components/ListViewCard/index.tsx
+++ b/superset-frontend/src/components/ListViewCard/index.tsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import { styled, useTheme } from '@superset-ui/core';
-import { AntdCard, Skeleton } from 'src/common/components';
+import { Skeleton, AntdCard } from 'src/components';
import { Tooltip } from 'src/components/Tooltip';
import ImageLoader, { BackgroundPosition } from './ImageLoader';
import CertifiedBadge from '../CertifiedBadge';
diff --git a/superset-frontend/src/components/Modal/Modal.tsx b/superset-frontend/src/components/Modal/Modal.tsx
index a885538204529..9e53589d8321a 100644
--- a/superset-frontend/src/components/Modal/Modal.tsx
+++ b/superset-frontend/src/components/Modal/Modal.tsx
@@ -20,10 +20,7 @@ import React, { useRef, useState } from 'react';
import { isNil } from 'lodash';
import { styled, t } from '@superset-ui/core';
import { css } from '@emotion/react';
-import {
- Modal as AntdModal,
- ModalProps as AntdModalProps,
-} from 'src/common/components';
+import { AntdModal, AntdModalProps } from 'src/components';
import Button from 'src/components/Button';
import { Resizable, ResizableProps } from 're-resizable';
import Draggable, {
diff --git a/superset-frontend/src/components/PopoverDropdown/index.tsx b/superset-frontend/src/components/PopoverDropdown/index.tsx
index d035da88c5681..c8abd736c40a0 100644
--- a/superset-frontend/src/components/PopoverDropdown/index.tsx
+++ b/superset-frontend/src/components/PopoverDropdown/index.tsx
@@ -19,7 +19,7 @@
import React from 'react';
import cx from 'classnames';
import { styled, useTheme } from '@superset-ui/core';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import Icons from 'src/components/Icons';
@@ -89,7 +89,7 @@ const PopoverDropdown = (props: PopoverDropdownProps) => {
const theme = useTheme();
const selected = options.find(opt => opt.value === value);
return (
- {
css={{ marginTop: theme.gridUnit * 0.5 }}
/>
-
+
);
};
diff --git a/superset-frontend/src/components/ReportModal/index.tsx b/superset-frontend/src/components/ReportModal/index.tsx
index 240d3176ccec9..0963c0fe9f4e7 100644
--- a/superset-frontend/src/components/ReportModal/index.tsx
+++ b/superset-frontend/src/components/ReportModal/index.tsx
@@ -36,7 +36,7 @@ import LabeledErrorBoundInput from 'src/components/Form/LabeledErrorBoundInput';
import Icons from 'src/components/Icons';
import withToasts from 'src/components/MessageToasts/withToasts';
import { CronError } from 'src/components/CronPicker';
-import { RadioChangeEvent } from 'src/common/components';
+import { RadioChangeEvent } from 'src/components';
import {
StyledModal,
StyledTopSection,
diff --git a/superset-frontend/src/components/Slider/index.tsx b/superset-frontend/src/components/Slider/index.tsx
index c513195e9ab8f..6564b3fafe644 100644
--- a/superset-frontend/src/components/Slider/index.tsx
+++ b/superset-frontend/src/components/Slider/index.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
-import AntDSlider, {
+import AntdSlider, {
SliderSingleProps,
SliderRangeProps,
} from 'antd/lib/slider';
@@ -25,5 +25,5 @@ import AntDSlider, {
export type { SliderSingleProps, SliderRangeProps };
export default function Slider(props: SliderSingleProps | SliderRangeProps) {
- return ;
+ return ;
}
diff --git a/superset-frontend/src/components/TableView/TableView.tsx b/superset-frontend/src/components/TableView/TableView.tsx
index 7a69789964b49..2329690c812b7 100644
--- a/superset-frontend/src/components/TableView/TableView.tsx
+++ b/superset-frontend/src/components/TableView/TableView.tsx
@@ -20,7 +20,7 @@ import React, { useEffect } from 'react';
import isEqual from 'lodash/isEqual';
import { styled, t } from '@superset-ui/core';
import { useFilters, usePagination, useSortBy, useTable } from 'react-table';
-import { Empty } from 'src/common/components';
+import { Empty } from 'src/components';
import Pagination from 'src/components/Pagination';
import TableCollection from 'src/components/TableCollection';
import { SortByType, ServerPagination } from './types';
diff --git a/superset-frontend/src/components/Tabs/Tabs.tsx b/superset-frontend/src/components/Tabs/Tabs.tsx
index b55d91707da38..9e539c09bef4f 100644
--- a/superset-frontend/src/components/Tabs/Tabs.tsx
+++ b/superset-frontend/src/components/Tabs/Tabs.tsx
@@ -18,10 +18,10 @@
*/
import React from 'react';
import { css, styled } from '@superset-ui/core';
-import AntDTabs, { TabsProps as AntDTabsProps } from 'antd/lib/tabs';
+import AntdTabs, { TabsProps as AntdTabsProps } from 'antd/lib/tabs';
import Icons from 'src/components/Icons';
-export interface TabsProps extends AntDTabsProps {
+export interface TabsProps extends AntdTabsProps {
fullWidth?: boolean;
allowOverflow?: boolean;
}
@@ -32,7 +32,7 @@ const StyledTabs = ({
allowOverflow = true,
...props
}: TabsProps) => (
- css`
@@ -89,7 +89,7 @@ const StyledTabs = ({
/>
);
-const StyledTabPane = styled(AntDTabs.TabPane)``;
+const StyledTabPane = styled(AntdTabs.TabPane)``;
const Tabs = Object.assign(StyledTabs, {
TabPane: StyledTabPane,
diff --git a/superset-frontend/src/components/index.ts b/superset-frontend/src/components/index.ts
index 596fbb435b0df..8f1fccdbc63e4 100644
--- a/superset-frontend/src/components/index.ts
+++ b/superset-frontend/src/components/index.ts
@@ -17,4 +17,60 @@
* under the License.
*/
+/*
+ * Re-exporting of components in src/components to facilitate
+ * their imports by other components.
+ * E.g. import { Select } from 'src/components'
+ */
export { default as Select } from './Select/Select';
+
+/*
+ * Components that don't conflict with the ones in src/components.
+ * As Superset progresses to support full theming, this list should
+ * decrease in favor of the components defined in src/components.
+ */
+export {
+ AutoComplete,
+ Avatar,
+ Col,
+ Divider,
+ Empty,
+ Grid,
+ List,
+ Row,
+ Skeleton,
+ Space,
+ Steps,
+ Tag,
+ Tree,
+ Typography,
+ Upload,
+} from 'antd';
+
+/*
+ * Components that conflict with the ones in src/components.
+ * We should try to avoid using Ant Design directly. The components
+ * listed bellow may need review. Avoid incrementing this list by using
+ * or extending the components in src/components.
+ */
+export {
+ Button as AntdButton,
+ Card as AntdCard,
+ Checkbox as AntdCheckbox,
+ Collapse as AntdCollapse,
+ Dropdown as AntdDropdown,
+ Form as AntdForm,
+ Input as AntdInput,
+ Modal as AntdModal,
+ Select as AntdSelect,
+ Slider as AntdSlider,
+ Switch as AntdSwitch,
+ Tabs as AntdTabs,
+ Tooltip as AntdTooltip,
+} from 'antd';
+
+// Exported types
+export type { FormInstance } from 'antd/lib/form';
+export type { ListItemProps } from 'antd/lib/list';
+export type { ModalProps as AntdModalProps } from 'antd/lib/modal';
+export type { RadioChangeEvent } from 'antd/lib/radio';
diff --git a/superset-frontend/src/dashboard/components/CrossFilterScopingModal/CrossFilterScopingForm/index.tsx b/superset-frontend/src/dashboard/components/CrossFilterScopingModal/CrossFilterScopingForm/index.tsx
index 7ef5a5e9c2d7c..b0d138cc96901 100644
--- a/superset-frontend/src/dashboard/components/CrossFilterScopingModal/CrossFilterScopingForm/index.tsx
+++ b/superset-frontend/src/dashboard/components/CrossFilterScopingModal/CrossFilterScopingForm/index.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import React, { FC } from 'react';
-import { FormInstance } from 'antd/lib/form';
+import { FormInstance } from 'src/components';
import { NativeFilterScope } from '@superset-ui/core';
import FilterScope from 'src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope';
import { setCrossFilterFieldValues } from 'src/dashboard/components/CrossFilterScopingModal/utils';
diff --git a/superset-frontend/src/dashboard/components/CrossFilterScopingModal/CrossFilterScopingModal.tsx b/superset-frontend/src/dashboard/components/CrossFilterScopingModal/CrossFilterScopingModal.tsx
index c0bca8cdeb050..f860f65b3550b 100644
--- a/superset-frontend/src/dashboard/components/CrossFilterScopingModal/CrossFilterScopingModal.tsx
+++ b/superset-frontend/src/dashboard/components/CrossFilterScopingModal/CrossFilterScopingModal.tsx
@@ -21,7 +21,7 @@ import React, { FC } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { StyledModal } from 'src/components/Modal';
import Button from 'src/components/Button';
-import { Form } from 'src/common/components';
+import { AntdForm } from 'src/components';
import { setChartConfiguration } from 'src/dashboard/actions/dashboardInfo';
import { ChartConfiguration } from 'src/dashboard/reducers/types';
import CrossFilterScopingForm from './CrossFilterScopingForm';
@@ -40,7 +40,7 @@ const CrossFilterScopingModal: FC = ({
onClose,
}) => {
const dispatch = useDispatch();
- const [form] = Form.useForm();
+ const [form] = AntdForm.useForm();
const chartConfig = useSelector(
({ dashboardInfo }) => dashboardInfo?.metadata?.chart_configuration,
);
diff --git a/superset-frontend/src/dashboard/components/CrossFilterScopingModal/utils/index.ts b/superset-frontend/src/dashboard/components/CrossFilterScopingModal/utils/index.ts
index 27e694540c37a..e3eaf3e0c868f 100644
--- a/superset-frontend/src/dashboard/components/CrossFilterScopingModal/utils/index.ts
+++ b/superset-frontend/src/dashboard/components/CrossFilterScopingModal/utils/index.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { FormInstance } from 'antd/lib/form';
+import { FormInstance } from 'src/components';
// eslint-disable-next-line import/prefer-default-export
export const setCrossFilterFieldValues = (
diff --git a/superset-frontend/src/dashboard/components/CssEditor/index.jsx b/superset-frontend/src/dashboard/components/CssEditor/index.jsx
index b18130cb81172..ad12cb6c78a9e 100644
--- a/superset-frontend/src/dashboard/components/CssEditor/index.jsx
+++ b/superset-frontend/src/dashboard/components/CssEditor/index.jsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import Button from 'src/components/Button';
import { t, styled } from '@superset-ui/core';
@@ -90,9 +90,9 @@ class CssEditor extends React.PureComponent {
);
return (
-
+
-
+
);
}
return null;
diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
index 335693c11efd9..a18cb40ead87b 100644
--- a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
+++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
@@ -17,12 +17,11 @@
* under the License.
*/
import React, { useCallback, useEffect, useState } from 'react';
-import { Form, Row, Col } from 'src/common/components';
import { Input } from 'src/components/Input';
import { FormItem } from 'src/components/Form';
import jsonStringify from 'json-stringify-pretty-compact';
import Button from 'src/components/Button';
-import { Select } from 'src/components';
+import { Select, Row, Col, AntdForm } from 'src/components';
import rison from 'rison';
import {
styled,
@@ -88,7 +87,7 @@ const PropertiesModal = ({
onSubmit = () => {},
show = false,
}: PropertiesModalProps) => {
- const [form] = Form.useForm();
+ const [form] = AntdForm.useForm();
const [isLoading, setIsLoading] = useState(false);
const [isAdvancedOpen, setIsAdvancedOpen] = useState(false);
const [colorScheme, setColorScheme] = useState(currentColorScheme);
@@ -505,7 +504,7 @@ const PropertiesModal = ({
}
responsive
>
-
+
);
};
diff --git a/superset-frontend/src/dashboard/components/SaveModal.tsx b/superset-frontend/src/dashboard/components/SaveModal.tsx
index ad30962ac4eac..913125a16800a 100644
--- a/superset-frontend/src/dashboard/components/SaveModal.tsx
+++ b/superset-frontend/src/dashboard/components/SaveModal.tsx
@@ -19,7 +19,7 @@
/* eslint-env browser */
import React from 'react';
import { Radio } from 'src/components/Radio';
-import { RadioChangeEvent } from 'src/common/components';
+import { RadioChangeEvent } from 'src/components';
import { Input } from 'src/components/Input';
import Button from 'src/components/Button';
import { t, JsonResponse } from '@superset-ui/core';
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx b/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx
index d64f6ab7cb634..8f2643533f3e4 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx
@@ -22,7 +22,7 @@ import { styled, t } from '@superset-ui/core';
import { connect } from 'react-redux';
import { LineEditableTabs } from 'src/components/Tabs';
import { LOG_ACTIONS_SELECT_DASHBOARD_TAB } from 'src/logger/LogUtils';
-import { Modal } from 'src/common/components';
+import { AntdModal } from 'src/components';
import { FILTER_BOX_MIGRATION_STATES } from 'src/explore/constants';
import DragDroppable from '../dnd/DragDroppable';
import DragHandle from '../dnd/DragHandle';
@@ -198,7 +198,7 @@ export class Tabs extends React.PureComponent {
showDeleteConfirmModal = key => {
const { component, deleteComponent } = this.props;
- Modal.confirm({
+ AntdModal.confirm({
title: t('Delete dashboard tab?'),
content: (
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx b/superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx
index 1f65732dd197a..0ceb2f47bac81 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Tabs.test.jsx
@@ -24,7 +24,7 @@ import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { LineEditableTabs } from 'src/components/Tabs';
-import { Modal } from 'src/common/components';
+import { AntdModal } from 'src/components';
import fetchMock from 'fetch-mock';
import { styledMount as mount } from 'spec/helpers/theming';
import DashboardComponent from 'src/dashboard/containers/DashboardComponent';
@@ -196,7 +196,7 @@ describe('Tabs', () => {
it('should render Modal when clicked remove tab button', () => {
const deleteComponent = sinon.spy();
- const modalMock = jest.spyOn(Modal, 'confirm');
+ const modalMock = jest.spyOn(AntdModal, 'confirm');
const wrapper = setup({ editMode: true, deleteComponent });
wrapper.find('.ant-tabs-tab-remove').at(0).simulate('click');
expect(modalMock.mock.calls).toHaveLength(1);
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx
index 55a14e06f6a75..79085daee3f48 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx
@@ -31,7 +31,7 @@ import {
InPortal,
OutPortal,
} from 'react-reverse-portal';
-import { Collapse } from 'src/common/components';
+import { AntdCollapse } from 'src/components';
import {
useDashboardHasTabs,
useSelectFiltersInScope,
@@ -121,7 +121,7 @@ const FilterControls: FC = ({
return ;
})}
{showCollapsePanel && (
- = ({
}
`}
>
-
@@ -158,8 +158,8 @@ const FilterControls: FC = ({
);
return ;
})}
-
-
+
+
)}
);
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx
index 8658bcd783a72..689eaa826627d 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx
@@ -18,7 +18,7 @@
*/
import React, { FC, useMemo, useState } from 'react';
import { DataMaskState, HandlerFunction, styled, t } from '@superset-ui/core';
-import { Typography, Tooltip } from 'src/common/components';
+import { Typography, AntdTooltip } from 'src/components';
import { useDispatch } from 'react-redux';
import Button from 'src/components/Button';
import { updateFilterSet } from 'src/dashboard/actions/nativeFilters';
@@ -135,7 +135,7 @@ const EditSection: FC = ({
>
{t('Cancel')}
- = ({
{t('Save')}
-
+
{isDuplicateFilterSet && (
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx
index e9aed5d0d9cd8..2c21dc6afe01f 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { Typography, Dropdown } from 'src/common/components';
+import { AntdDropdown, Typography } from 'src/components';
import { Menu } from 'src/components/Menu';
import React, { FC } from 'react';
import {
@@ -110,7 +110,7 @@ const FilterSetUnit: FC = ({
/>
)}
{onDelete && (
- = ({
>
-
+
)}
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.tsx
index 6185c573f398a..5a7bff6527f37 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FiltersHeader.tsx
@@ -25,7 +25,7 @@ import {
t,
useTheme,
} from '@superset-ui/core';
-import { Collapse, Typography, Tooltip } from 'src/common/components';
+import { Typography, AntdTooltip, AntdCollapse } from 'src/components';
import Icons from 'src/components/Icons';
import { areObjectsEqual } from 'src/reduxUtils';
import { getFilterValueForDisplay } from './utils';
@@ -38,7 +38,7 @@ const FilterHeader = styled.div`
font-size: ${({ theme }) => theme.typography.sizes.s}px;
`;
-const StyledCollapse = styled(Collapse)`
+const StyledCollapse = styled(AntdCollapse)`
&.ant-collapse-ghost > .ant-collapse-item {
& > .ant-collapse-content > .ant-collapse-content-box {
padding: 0;
@@ -103,7 +103,7 @@ const FiltersHeader: FC = ({ dataMask, filterSet }) => {
const removedFilter = !Object.keys(filters).includes(id);
return (
- = ({ dataMask, filterSet }) => {
)}
-
+
);
};
@@ -142,13 +142,13 @@ const FiltersHeader: FC = ({ dataMask, filterSet }) => {
defaultActiveKey={!filterSet ? ['filters'] : undefined}
expandIcon={getExpandIcon}
>
-
{resultFilters.map(getFilterRow)}
-
+
);
};
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
index 867b6752f4f2f..73a589312acc6 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
@@ -41,7 +41,7 @@ import {
isNativeFilter,
} from '@superset-ui/core';
import Icons from 'src/components/Icons';
-import { Tabs } from 'src/common/components';
+import { AntdTabs } from 'src/components';
import { useHistory } from 'react-router-dom';
import { usePrevious } from 'src/hooks/usePrevious';
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
@@ -136,7 +136,7 @@ const StyledFilterIcon = styled(Icons.Filter)`
color: ${({ theme }) => theme.colors.grayscale.base};
`;
-const StyledTabs = styled(Tabs)`
+const StyledTabs = styled(AntdTabs)`
& .ant-tabs-nav-list {
width: 100%;
}
@@ -408,7 +408,7 @@ const FilterBar: React.FC = ({
defaultActiveKey={TabIds.AllFilters}
activeKey={editFilterSetId ? TabIds.AllFilters : undefined}
>
- = ({
onFilterSelectionChange={handleFilterSelectionChange}
/>
)}
-
-
+ = ({
tab={tab}
onFilterSelectionChange={handleFilterSelectionChange}
/>
-
+
) : (
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx
index 0a87035936a03..5681a41717666 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx
@@ -18,7 +18,7 @@
*/
import { NativeFilterType, styled, t, useTheme } from '@superset-ui/core';
import React from 'react';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { MainNav as Menu } from 'src/components/Menu';
import FilterTitleContainer from './FilterTitleContainer';
import { FilterRemoval } from './types';
@@ -90,12 +90,17 @@ const FilterTitlePane: React.FC = ({
);
return (
-
+
{' '}
{t('Add filters and dividers')}
-
+
{
return (
- {
)}
>
-
+
{isChecked && {children}}
);
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx
index cd3c1a55ec3f6..41c591ade3c81 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx
@@ -17,10 +17,9 @@
* under the License.
*/
import React, { useCallback, useState, useMemo, useEffect } from 'react';
-import { FormInstance } from 'antd/lib/form';
import { Column, ensureIsArray, SupersetClient, t } from '@superset-ui/core';
import { useChangeEffect } from 'src/hooks/useChangeEffect';
-import { Select } from 'src/components';
+import { Select, FormInstance } from 'src/components';
import { useToasts } from 'src/components/MessageToasts/withToasts';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import { cacheWrapper } from 'src/utils/cacheWrapper';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx
index c29f1d30abe36..07f785484d52d 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx
@@ -24,7 +24,7 @@ import {
AppSection,
t,
} from '@superset-ui/core';
-import { FormInstance } from 'antd/lib/form';
+import { FormInstance } from 'src/components';
import Loading from 'src/components/Loading';
import { NativeFiltersForm } from '../types';
import { getFormData } from '../../utils';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.test.tsx
index d59686cb3d5f6..10b48b9d9cc87 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.test.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.test.tsx
@@ -25,7 +25,7 @@ import {
waitFor,
} from 'spec/helpers/testing-library';
import { mockStoreWithChartsInTabsAndRoot } from 'spec/fixtures/mockStore';
-import { Form, FormInstance } from 'src/common/components';
+import { AntdForm, FormInstance } from 'src/components';
import { NativeFiltersForm } from 'src/dashboard/components/nativeFilters/FiltersConfigModal/types';
import FiltersConfigForm, {
FilterPanels,
@@ -50,7 +50,7 @@ describe('FilterScope', () => {
};
const MockModal = ({ scope }: { scope?: object }) => {
- const [newForm] = Form.useForm();
+ const [newForm] = AntdForm.useForm();
form = newForm;
if (scope) {
form.setFieldsValue({
@@ -63,9 +63,9 @@ describe('FilterScope', () => {
}
return (
-
+
);
};
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx
index 877e43fdf7502..059e202905523 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx
@@ -20,7 +20,7 @@
import React, { FC, useCallback, useState } from 'react';
import { NativeFilterScope, styled, t } from '@superset-ui/core';
import { Radio } from 'src/components/Radio';
-import { Form, Typography } from 'src/common/components';
+import { AntdForm, Typography } from 'src/components';
import { useComponentDidUpdate } from 'src/hooks/useComponentDidUpdate/useComponentDidUpdate';
import { ScopingType } from './types';
import ScopingTree from './ScopingTree';
@@ -46,7 +46,7 @@ const Wrapper = styled.div`
padding: 0px ${({ theme }) => theme.gridUnit * 4}px;
`;
-const CleanFormItem = styled(Form.Item)`
+const CleanFormItem = styled(AntdForm.Item)`
margin-bottom: 0;
`;
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx
index 713eb95e7a796..32bbd9b6a2f91 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx
@@ -19,7 +19,7 @@
import React, { FC, useMemo, useState } from 'react';
import { NativeFilterScope } from '@superset-ui/core';
-import { Tree } from 'src/common/components';
+import { Tree } from 'src/components';
import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants';
import { Tooltip } from 'src/components/Tooltip';
import Icons from 'src/components/Icons';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
index 1854e11769560..9258594c55c6f 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
@@ -37,7 +37,6 @@ import {
SupersetClient,
t,
} from '@superset-ui/core';
-import { FormInstance } from 'antd/lib/form';
import { isEqual } from 'lodash';
import React, {
forwardRef,
@@ -51,7 +50,7 @@ import { PluginFilterSelectCustomizeProps } from 'src/filters/components/Select/
import { useSelector } from 'react-redux';
import { getChartDataRequest } from 'src/chart/chartAction';
import { Input, TextArea } from 'src/components/Input';
-import { Select } from 'src/components';
+import { Select, FormInstance } from 'src/components';
import Collapse from 'src/components/Collapse';
import BasicErrorAlert from 'src/components/ErrorMessage/BasicErrorAlert';
import { FormItem } from 'src/components/Form';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx
index 87cf5366e5cd2..fca1fb372e4a2 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx
@@ -20,7 +20,7 @@ import userEvent from '@testing-library/user-event';
import React from 'react';
import { Filter, NativeFilterType } from '@superset-ui/core';
import { render, screen } from 'spec/helpers/testing-library';
-import { FormInstance } from 'src/common/components';
+import { FormInstance } from 'src/components';
import getControlItemsMap, { ControlItemsProps } from './getControlItemsMap';
import { getControlItems, setNativeFilterFieldValues } from './utils';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx
index 3fcf9f23e2e3c..22078c26a926b 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx
@@ -21,8 +21,7 @@ import {
InfoTooltipWithTrigger,
} from '@superset-ui/chart-controls';
import React from 'react';
-import { Checkbox } from 'src/common/components';
-import { FormInstance } from 'antd/lib/form';
+import { AntdCheckbox, FormInstance } from 'src/components';
import {
Filter,
getChartControlPanelRegistry,
@@ -181,7 +180,7 @@ export default function getControlItemsMap({
valuePropName="checked"
colon={false}
>
- {
if (controlItem.config.requiredFirst) {
@@ -208,7 +207,7 @@ export default function getControlItemsMap({
tooltip={controlItem.config.description}
/>
)}
-
+
>
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts
index 0b707d82d566d..1e71574429c06 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { useEffect, useState } from 'react';
-import { FormInstance } from 'antd/lib/form';
+import { FormInstance } from 'src/components';
import { Filter, t } from '@superset-ui/core';
import { NativeFiltersForm, NativeFiltersFormItem } from '../types';
import { setNativeFilterFieldValues, useForceUpdate } from './utils';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts
index 51a4a63b5b207..e946cb671405f 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { flatMapDeep } from 'lodash';
-import { FormInstance } from 'antd/lib/form';
+import { FormInstance } from 'src/components';
import React from 'react';
import { CustomControlItem, DatasourceMeta } from '@superset-ui/chart-controls';
import { Column, ensureIsArray, GenericDataType } from '@superset-ui/core';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx
index 67d249c793b29..fd3ac06ea6db9 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx
@@ -33,7 +33,7 @@ import {
SLOW_DEBOUNCE,
t,
} from '@superset-ui/core';
-import { Form } from 'src/common/components';
+import { AntdForm } from 'src/components';
import ErrorBoundary from 'src/components/ErrorBoundary';
import { StyledModal } from 'src/components/Modal';
import { testWithId } from 'src/utils/testUtils';
@@ -73,7 +73,7 @@ export const StyledModalBody = styled.div`
}
`;
-export const StyledForm = styled(Form)`
+export const StyledForm = styled(AntdForm)`
width: 100%;
`;
@@ -106,7 +106,7 @@ export function FiltersConfigModal({
onSave,
onCancel,
}: FiltersConfigModalProps) {
- const [form] = Form.useForm();
+ const [form] = AntdForm.useForm();
const configFormRef = useRef();
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/NativeFiltersModal.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/NativeFiltersModal.test.tsx
index ebe202e081033..7717d1915b114 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/NativeFiltersModal.test.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/NativeFiltersModal.test.tsx
@@ -25,7 +25,7 @@ import { Provider } from 'react-redux';
import { mockStore } from 'spec/fixtures/mockStore';
import { styledMount as mount } from 'spec/helpers/theming';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import Alert from 'src/components/Alert';
import { FiltersConfigModal } from 'src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal';
@@ -116,7 +116,7 @@ describe('FiltersConfigModal', () => {
async function addFilter() {
act(() => {
- wrapper.find(Dropdown).at(0).simulate('mouseEnter');
+ wrapper.find(AntdDropdown).at(0).simulate('mouseEnter');
});
await waitForComponentToPaint(wrapper, 300);
act(() => {
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts
index 5b434bb7c902a..38e3d069e154b 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { FormInstance } from 'antd/lib/form';
+import { FormInstance } from 'src/components';
import shortid from 'shortid';
import { getInitialDataMask } from 'src/dataMask/reducer';
import {
diff --git a/superset-frontend/src/explore/components/DataTableControl/index.tsx b/superset-frontend/src/explore/components/DataTableControl/index.tsx
index b9e11eda950ff..d2befa7b0bae1 100644
--- a/superset-frontend/src/explore/components/DataTableControl/index.tsx
+++ b/superset-frontend/src/explore/components/DataTableControl/index.tsx
@@ -30,7 +30,7 @@ import { Global } from '@emotion/react';
import { Column } from 'react-table';
import debounce from 'lodash/debounce';
import { useDispatch } from 'react-redux';
-import { Space } from 'src/common/components';
+import { Space } from 'src/components';
import { Input } from 'src/components/Input';
import {
BOOL_FALSE_DISPLAY,
diff --git a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx
index b2c03ac032dab..f0fd4a1a89447 100644
--- a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx
+++ b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx
@@ -21,7 +21,7 @@ import { shallow } from 'enzyme';
import { styledMount as mount } from 'spec/helpers/theming';
import thunk from 'redux-thunk';
import configureStore from 'redux-mock-store';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import ExploreAdditionalActionsMenu from 'src/explore/components/ExploreAdditionalActionsMenu';
@@ -52,7 +52,7 @@ describe('ExploreAdditionalActionsMenu', () => {
const wrapper = mount(
,
);
- const dropdown = wrapper.find(Dropdown);
+ const dropdown = wrapper.find(AntdDropdown);
const menu = shallow(
{dropdown.prop('overlay')}
);
const menuItems = menu.find(Menu.Item);
expect(menuItems).toHaveLength(3);
diff --git a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx
index 7e2401abc6d48..b833cabfad5c9 100644
--- a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx
+++ b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx
@@ -21,7 +21,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import PropTypes from 'prop-types';
import { t } from '@superset-ui/core';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import downloadAsImage from 'src/utils/downloadAsImage';
import ModalTrigger from 'src/components/ModalTrigger';
@@ -71,7 +71,7 @@ const ExploreAdditionalActionsMenu = props => {
const { slice } = props;
return (
- {
>
-
+
);
};
diff --git a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx
index 05404b0a68b46..bd6ff4b756272 100644
--- a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx
+++ b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx
@@ -19,7 +19,7 @@
import React, { ReactChild, useCallback } from 'react';
import { t, styled } from '@superset-ui/core';
import Icons from 'src/components/Icons';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
enum MENU_KEYS {
@@ -66,7 +66,7 @@ export const ExportToCSVDropdown = ({
);
return (
-
@@ -86,6 +86,6 @@ export const ExportToCSVDropdown = ({
}
>
{children}
-
+
);
};
diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
index 9ad64704fb06f..484ae7d9abbfc 100644
--- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx
+++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
@@ -18,10 +18,9 @@
*/
import React, { useMemo, useState, useCallback, useEffect } from 'react';
import Modal from 'src/components/Modal';
-import { Form, Row, Col } from 'src/common/components';
import { Input, TextArea } from 'src/components/Input';
import Button from 'src/components/Button';
-import { Select } from 'src/components';
+import { Select, Row, Col, AntdForm } from 'src/components';
import { SelectValue } from 'antd/lib/select';
import rison from 'rison';
import { t, SupersetClient, styled } from '@superset-ui/core';
@@ -39,9 +38,9 @@ export type PropertiesModalProps = {
addSuccessToast: (msg: string) => void;
};
-const FormItem = Form.Item;
+const FormItem = AntdForm.Item;
-const StyledFormItem = styled(Form.Item)`
+const StyledFormItem = styled(AntdForm.Item)`
margin-bottom: 0;
`;
@@ -57,7 +56,7 @@ function PropertiesModal({
addSuccessToast,
}: PropertiesModalProps) {
const [submitting, setSubmitting] = useState(false);
- const [form] = Form.useForm();
+ const [form] = AntdForm.useForm();
// values of form inputs
const [name, setName] = useState(slice.slice_name || '');
const [selectedOwners, setSelectedOwners] = useState(
@@ -215,7 +214,7 @@ function PropertiesModal({
responsive
wrapProps={{ 'data-test': 'properties-edit-modal' }}
>
-
+
);
}
diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.jsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.jsx
index 1fc65365c097d..4078c5d257343 100644
--- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.jsx
+++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.jsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
-import { List } from 'src/common/components';
+import { List } from 'src/components';
import { connect } from 'react-redux';
import { t, withTheme } from '@superset-ui/core';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
diff --git a/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx b/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx
index 384d23ed03a52..c369e1ee9c8ae 100644
--- a/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx
+++ b/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
-import { List } from 'src/common/components';
+import { List } from 'src/components';
import shortid from 'shortid';
import { t, withTheme } from '@superset-ui/core';
import {
diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx
index 76c738aa7a151..1c5f213accac4 100644
--- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx
+++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx
@@ -20,7 +20,7 @@ import React from 'react';
import { styled, t } from '@superset-ui/core';
import { Form, FormItem, FormProps } from 'src/components/Form';
import Select, { propertyComparator } from 'src/components/Select/Select';
-import { Col, Row } from 'src/common/components';
+import { Col, Row } from 'src/components';
import { InputNumber } from 'src/components/Input';
import Button from 'src/components/Button';
import {
diff --git a/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx b/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx
index e83552c9d0b31..3ac0d35e76582 100644
--- a/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx
+++ b/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import { useTheme } from '@superset-ui/core';
-import { List, ListItemProps } from 'src/common/components';
+import { List, ListItemProps } from 'src/components';
export interface CustomListItemProps extends ListItemProps {
selectable: boolean;
diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
index 4b11fe2991df4..35004e43cbf0a 100644
--- a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
+++ b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
@@ -22,7 +22,7 @@ import PropTypes from 'prop-types';
import { t, styled, supersetTheme } from '@superset-ui/core';
import { getUrlParam } from 'src/utils/urlUtils';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import { Tooltip } from 'src/components/Tooltip';
import Icons from 'src/components/Icons';
@@ -241,7 +241,7 @@ class DatasourceControl extends React.PureComponent {
{extra?.warning_markdown && (
)}
-
-
+
{/* missing dataset */}
{isMissingDatasource && isMissingParams && (
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx
index b5eed2e04be92..4d05c3e395720 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx
@@ -32,7 +32,7 @@ import Button from 'src/components/Button';
import ControlHeader from 'src/explore/components/ControlHeader';
import Label, { Type } from 'src/components/Label';
import Popover from 'src/components/Popover';
-import { Divider } from 'src/common/components';
+import { Divider } from 'src/components';
import Icons from 'src/components/Icons';
import Select, { propertyComparator } from 'src/components/Select/Select';
import { Tooltip } from 'src/components/Tooltip';
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
index 513017e2a1b08..2a6d079040e63 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
@@ -20,7 +20,7 @@ import React from 'react';
import { t } from '@superset-ui/core';
import { Moment } from 'moment';
import { isInteger } from 'lodash';
-import { Col, Row } from 'src/common/components';
+import { Col, Row } from 'src/components';
import { InputNumber } from 'src/components/Input';
import { DatePicker } from 'src/components/DatePicker';
import { Radio } from 'src/components/Radio';
diff --git a/superset-frontend/src/explore/components/controls/SpatialControl.jsx b/superset-frontend/src/explore/components/controls/SpatialControl.jsx
index 23456db8b0f54..77c8279de084e 100644
--- a/superset-frontend/src/explore/components/controls/SpatialControl.jsx
+++ b/superset-frontend/src/explore/components/controls/SpatialControl.jsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
-import { Row, Col } from 'src/common/components';
+import { Row, Col } from 'src/components';
import { t } from '@superset-ui/core';
import Label from 'src/components/Label';
diff --git a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx
index 7a72bd93c41ad..29d0d16b646c6 100644
--- a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx
+++ b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.jsx
@@ -18,11 +18,10 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
-import { Row, Col } from 'src/common/components';
import { Input } from 'src/components/Input';
import Button from 'src/components/Button';
import Popover from 'src/components/Popover';
-import { Select } from 'src/components';
+import { Select, Row, Col } from 'src/components';
import { t, styled } from '@superset-ui/core';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
import BoundsControl from '../BoundsControl';
diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx
index bf8b3c8f7b695..7b9ada5d9d8cc 100644
--- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx
+++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx
@@ -34,7 +34,7 @@ import {
SupersetTheme,
useTheme,
} from '@superset-ui/core';
-import { Collapse } from 'src/common/components';
+import { AntdCollapse } from 'src/components';
import { Input } from 'src/components/Input';
import Label from 'src/components/Label';
import { usePluginContext } from 'src/components/DynamicPlugins';
@@ -663,7 +663,7 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
}
onClick={clickSelector}
/>
- {section.title}}
key={sectionId}
>
@@ -690,10 +690,10 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
onClick={clickSelector}
/>
))}
-
+
);
})}
-
+
diff --git a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx
index 05b797a07ab47..d2cc9a4171323 100644
--- a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx
+++ b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx
@@ -25,7 +25,7 @@ import {
t,
} from '@superset-ui/core';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
-import { Slider } from 'src/common/components';
+import { AntdSlider } from 'src/components';
import { rgba } from 'emotion-rgba';
import { PluginFilterRangeProps } from './types';
import { StatusMessage, StyledFormItem, FilterPluginStyle } from '../common';
@@ -37,7 +37,7 @@ const DARK_BLUE = '#6dd3e3';
const LIGHT_GRAY = '#f5f5f5';
const DARK_GRAY = '#e1e1e1';
-const StyledMinSlider = styled(Slider)<{
+const StyledMinSlider = styled(AntdSlider)<{
validateStatus?: 'error' | 'warning' | 'info';
}>`
${({ theme, validateStatus }) => `
@@ -295,7 +295,7 @@ export default function RangeFilterPlugin(props: PluginFilterRangeProps) {
onMouseUp={() => setFilterActive(false)}
>
{enableSingleMaxValue && (
-
)}
{enableSingleExactValue && (
-
)}
{rangeValue && (
- theme.gridUnit * 5.5}px;
`;
-const StyledCheckbox = styled(Checkbox)`
+const StyledCheckbox = styled(AntdCheckbox)`
margin-left: ${({ theme }) => theme.gridUnit * 5.5}px;
`;
diff --git a/superset-frontend/src/views/CRUD/alert/components/AlertReportCronScheduler.tsx b/superset-frontend/src/views/CRUD/alert/components/AlertReportCronScheduler.tsx
index 41beefa4208d9..867ee880d7d73 100644
--- a/superset-frontend/src/views/CRUD/alert/components/AlertReportCronScheduler.tsx
+++ b/superset-frontend/src/views/CRUD/alert/components/AlertReportCronScheduler.tsx
@@ -19,7 +19,7 @@
import React, { useState, useCallback, useRef, FunctionComponent } from 'react';
import { t, useTheme } from '@superset-ui/core';
-import { AntdInput } from 'src/common/components';
+import { AntdInput } from 'src/components';
import { Input } from 'src/components/Input';
import { Radio } from 'src/components/Radio';
import { CronPicker, CronError } from 'src/components/CronPicker';
diff --git a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
index dc44edef91a90..07f9dbf3bfbd8 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
@@ -25,7 +25,7 @@ import Chart from 'src/types/Chart';
import ListViewCard from 'src/components/ListViewCard';
import Label from 'src/components/Label';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import FaveStar from 'src/components/FaveStar';
import FacePile from 'src/components/FacePile';
@@ -170,9 +170,9 @@ export default function ChartCard({
saveFaveStar={saveFavoriteStatus}
isStarred={favoriteStatus}
/>
-
+
-
+
}
/>
diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx b/superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx
index 7c6feb6db24a4..25a012f86b32b 100644
--- a/superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx
+++ b/superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx
@@ -21,7 +21,7 @@ import { Link, useHistory } from 'react-router-dom';
import { t, useTheme } from '@superset-ui/core';
import { handleDashboardDelete, CardStyles } from 'src/views/CRUD/utils';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
-import { Dropdown } from 'src/common/components';
+import { AntdDropdown } from 'src/components';
import { Menu } from 'src/components/Menu';
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
import ListViewCard from 'src/components/ListViewCard';
@@ -176,9 +176,9 @@ function DashboardCard({
saveFaveStar={saveFavoriteStatus}
isStarred={favoriteStatus}
/>
-
+
-
+
}
/>
diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
index c38e0d5bb7aea..a07c9c9498158 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import { SupersetTheme, t } from '@superset-ui/core';
-import { Switch } from 'src/common/components';
+import { AntdSwitch } from 'src/components';
import InfoTooltip from 'src/components/InfoTooltip';
import ValidatedInput from 'src/components/Form/LabeledErrorBoundInput';
import { FieldPropTypes } from '.';
@@ -183,7 +183,7 @@ export const forceSSLField = ({
sslForced,
}: FieldPropTypes) => (
infoTooltip(theme)}>
- {
diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx
index f34e5fdd58aa5..d4817d68b4415 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx
@@ -18,7 +18,7 @@
*/
import React, { useState } from 'react';
import { SupersetTheme, t } from '@superset-ui/core';
-import { Select, Button } from 'src/common/components';
+import { AntdButton, AntdSelect } from 'src/components';
import InfoTooltip from 'src/components/InfoTooltip';
import FormLabel from 'src/components/Form/FormLabel';
import { DeleteFilled } from '@ant-design/icons';
@@ -72,20 +72,20 @@ export const EncryptedField = ({
>
{t('Type of Google Sheets allowed')}
-
+
+
)}
{showCredentialsInfo && (
@@ -93,19 +93,19 @@ export const EncryptedField = ({
{t('How do you want to enter service account credentials?')}
-
+
+
>
)}
{uploadOption === CredentialInfoOptions.copyPaste ||
@@ -141,14 +141,14 @@ export const EncryptedField = ({
{!fileToUpload && (
-
+
)}
{fileToUpload && (
diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
index 990ab4bba95ea..9a28463f1f7e8 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
@@ -30,7 +30,7 @@ import React, {
Reducer,
} from 'react';
import Tabs from 'src/components/Tabs';
-import { Select } from 'src/common/components';
+import { AntdSelect } from 'src/components';
import Alert from 'src/components/Alert';
import Modal from 'src/components/Modal';
import Button from 'src/components/Button';
@@ -684,7 +684,7 @@ const DatabaseModal: FunctionComponent = ({
{t('Or choose from a list of other databases we support:')}
{t('Supported databases')}
-
+
+
-
+
-
+
}
diff --git a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx
index 5b98140f389db..eb9fd6eadb1d3 100644
--- a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx
+++ b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx
@@ -39,7 +39,7 @@ import {
loadingCardCount,
} from 'src/views/CRUD/utils';
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
-import { Switch } from 'src/common/components';
+import { AntdSwitch } from 'src/components';
import ActivityTable from './ActivityTable';
import ChartTable from './ChartTable';
@@ -267,7 +267,7 @@ function Welcome({ user, addDangerToast }: WelcomeProps) {
Home
{isFeatureEnabled(FeatureFlag.THUMBNAILS) ? (
-
+ Thumbnails
) : null}
diff --git a/superset-frontend/src/views/components/Menu.tsx b/superset-frontend/src/views/components/Menu.tsx
index 3c51beef66f49..15b88188a9f6b 100644
--- a/superset-frontend/src/views/components/Menu.tsx
+++ b/superset-frontend/src/views/components/Menu.tsx
@@ -21,7 +21,7 @@ import { styled, css, useTheme, SupersetTheme } from '@superset-ui/core';
import { debounce } from 'lodash';
import { Global } from '@emotion/react';
import { getUrlParam } from 'src/utils/urlUtils';
-import { Row, Col, Grid } from 'src/common/components';
+import { Row, Col, Grid } from 'src/components';
import { MainNav as DropdownMenu, MenuMode } from 'src/components/Menu';
import { Tooltip } from 'src/components/Tooltip';
import { Link } from 'react-router-dom';
diff --git a/superset-frontend/src/views/components/SubMenu.tsx b/superset-frontend/src/views/components/SubMenu.tsx
index 957a2dc4ccffe..d0795307e928e 100644
--- a/superset-frontend/src/views/components/SubMenu.tsx
+++ b/superset-frontend/src/views/components/SubMenu.tsx
@@ -21,7 +21,7 @@ import { Link, useHistory } from 'react-router-dom';
import { styled } from '@superset-ui/core';
import cx from 'classnames';
import { debounce } from 'lodash';
-import { Row } from 'src/common/components';
+import { Row } from 'src/components';
import { Menu, MenuMode } from 'src/components/Menu';
import Button, { OnClickHandler } from 'src/components/Button';