refactor: Deletes the common/components folder (#18999)
This commit is contained in:
parent
9f834e8317
commit
329855170e
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
<Menu.Item style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
{' '}
|
||||
<span>{t('Autocomplete')}</span>{' '}
|
||||
<Switch
|
||||
<AntdSwitch
|
||||
checked={this.state.autocompleteEnabled}
|
||||
onChange={this.handleToggleAutocompleteEnabled}
|
||||
name="autocomplete-switch"
|
||||
|
|
@ -667,7 +667,7 @@ class SqlEditor extends React.PureComponent {
|
|||
)}
|
||||
<span>
|
||||
<LimitSelectStyled>
|
||||
<Dropdown overlay={this.renderQueryLimit()} trigger="click">
|
||||
<AntdDropdown overlay={this.renderQueryLimit()} trigger="click">
|
||||
<a onClick={e => e.preventDefault()}>
|
||||
<span>LIMIT:</span>
|
||||
<span className="limitDropdown">
|
||||
|
|
@ -678,7 +678,7 @@ class SqlEditor extends React.PureComponent {
|
|||
</span>
|
||||
<Icons.TriangleDown iconColor={theme.colors.grayscale.base} />
|
||||
</a>
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
</LimitSelectStyled>
|
||||
</span>
|
||||
{this.props.latestQuery && (
|
||||
|
|
@ -703,9 +703,9 @@ class SqlEditor extends React.PureComponent {
|
|||
<span>
|
||||
<ShareSqlLabQuery queryEditor={qe} />
|
||||
</span>
|
||||
<Dropdown overlay={this.renderDropdown()} trigger="click">
|
||||
<AntdDropdown overlay={this.renderDropdown()} trigger="click">
|
||||
<Icons.MoreHoriz iconColor={theme.colors.grayscale.base} />
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
</div>
|
||||
</StyledToolbar>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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 '.';
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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]) => [
|
||||
<Tooltip
|
||||
<AntdTooltip
|
||||
placement={placement}
|
||||
id={`${kebabCase(tooltip)}-tooltip`}
|
||||
title={tooltip}
|
||||
>
|
||||
{leftButton}
|
||||
</Tooltip>,
|
||||
</AntdTooltip>,
|
||||
rightButton,
|
||||
],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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<HTMLElement>;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
`;
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
/>
|
||||
<Dropdown
|
||||
<AntdDropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item role="button" tabIndex={0} onClick={action('Delete')}>
|
||||
|
|
@ -77,7 +77,7 @@ export const SupersetListViewCard = () => (
|
|||
}
|
||||
>
|
||||
<Icons.MoreHoriz />
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
</ListViewCard.Actions>
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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, {
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<Dropdown
|
||||
<AntdDropdown
|
||||
trigger={['click']}
|
||||
overlayStyle={{ zIndex: theme.zIndex.max }}
|
||||
overlay={
|
||||
|
|
@ -115,7 +115,7 @@ const PopoverDropdown = (props: PopoverDropdownProps) => {
|
|||
css={{ marginTop: theme.gridUnit * 0.5 }}
|
||||
/>
|
||||
</div>
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 <AntDSlider {...props} css={{ marginLeft: 0, marginRight: 0 }} />;
|
||||
return <AntdSlider {...props} css={{ marginLeft: 0, marginRight: 0 }} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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) => (
|
||||
<AntDTabs
|
||||
<AntdTabs
|
||||
animated={animated}
|
||||
{...props}
|
||||
css={theme => css`
|
||||
|
|
@ -89,7 +89,7 @@ const StyledTabs = ({
|
|||
/>
|
||||
);
|
||||
|
||||
const StyledTabPane = styled(AntDTabs.TabPane)``;
|
||||
const StyledTabPane = styled(AntdTabs.TabPane)``;
|
||||
|
||||
const Tabs = Object.assign(StyledTabs, {
|
||||
TabPane: StyledTabPane,
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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<CrossFilterScopingModalProps> = ({
|
|||
onClose,
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
const [form] = Form.useForm<CrossFilterScopingFormType>();
|
||||
const [form] = AntdForm.useForm<CrossFilterScopingFormType>();
|
||||
const chartConfig = useSelector<any, ChartConfiguration>(
|
||||
({ dashboardInfo }) => dashboardInfo?.metadata?.chart_configuration,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 = (
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<Dropdown overlay={menu} placement="bottomRight">
|
||||
<AntdDropdown overlay={menu} placement="bottomRight">
|
||||
<Button>{t('Load a CSS template')}</Button>
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
>
|
||||
<Form
|
||||
<AntdForm
|
||||
form={form}
|
||||
onFinish={onFinish}
|
||||
data-test="dashboard-edit-properties-form"
|
||||
|
|
@ -602,7 +601,7 @@ const PropertiesModal = ({
|
|||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
</Form>
|
||||
</AntdForm>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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: (
|
||||
<span>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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<FilterControlsProps> = ({
|
|||
return <OutPortal node={portalNodes[index]} inView />;
|
||||
})}
|
||||
{showCollapsePanel && (
|
||||
<Collapse
|
||||
<AntdCollapse
|
||||
ghost
|
||||
bordered
|
||||
expandIconPosition="right"
|
||||
|
|
@ -148,7 +148,7 @@ const FilterControls: FC<FilterControlsProps> = ({
|
|||
}
|
||||
`}
|
||||
>
|
||||
<Collapse.Panel
|
||||
<AntdCollapse.Panel
|
||||
header={t('Filters out of scope (%d)', filtersOutOfScope.length)}
|
||||
key="1"
|
||||
>
|
||||
|
|
@ -158,8 +158,8 @@ const FilterControls: FC<FilterControlsProps> = ({
|
|||
);
|
||||
return <OutPortal node={portalNodes[index]} inView />;
|
||||
})}
|
||||
</Collapse.Panel>
|
||||
</Collapse>
|
||||
</AntdCollapse.Panel>
|
||||
</AntdCollapse>
|
||||
)}
|
||||
</Wrapper>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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<EditSectionProps> = ({
|
|||
>
|
||||
{t('Cancel')}
|
||||
</Button>
|
||||
<Tooltip
|
||||
<AntdTooltip
|
||||
placement="right"
|
||||
title={
|
||||
(isFilterSetNameDuplicated &&
|
||||
|
|
@ -156,7 +156,7 @@ const EditSection: FC<EditSectionProps> = ({
|
|||
{t('Save')}
|
||||
</Button>
|
||||
</ActionButton>
|
||||
</Tooltip>
|
||||
</AntdTooltip>
|
||||
</ActionButtons>
|
||||
{isDuplicateFilterSet && (
|
||||
<Warning mark>
|
||||
|
|
|
|||
|
|
@ -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<FilterSetUnitProps> = ({
|
|||
/>
|
||||
)}
|
||||
{onDelete && (
|
||||
<Dropdown
|
||||
<AntdDropdown
|
||||
overlay={menu}
|
||||
placement="bottomRight"
|
||||
trigger={['click']}
|
||||
|
|
@ -126,7 +126,7 @@ const FilterSetUnit: FC<FilterSetUnitProps> = ({
|
|||
>
|
||||
<EllipsisOutlined />
|
||||
</HeaderButton>
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
)}
|
||||
</IconsBlock>
|
||||
</TitleText>
|
||||
|
|
|
|||
|
|
@ -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<FiltersHeaderProps> = ({ dataMask, filterSet }) => {
|
|||
const removedFilter = !Object.keys(filters).includes(id);
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
<AntdTooltip
|
||||
title={
|
||||
(removedFilter &&
|
||||
t(
|
||||
|
|
@ -125,7 +125,7 @@ const FiltersHeader: FC<FiltersHeaderProps> = ({ dataMask, filterSet }) => {
|
|||
)}
|
||||
</Typography.Text>
|
||||
</StyledFilterRow>
|
||||
</Tooltip>
|
||||
</AntdTooltip>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -142,13 +142,13 @@ const FiltersHeader: FC<FiltersHeaderProps> = ({ dataMask, filterSet }) => {
|
|||
defaultActiveKey={!filterSet ? ['filters'] : undefined}
|
||||
expandIcon={getExpandIcon}
|
||||
>
|
||||
<Collapse.Panel
|
||||
<AntdCollapse.Panel
|
||||
{...getFilterBarTestId('collapse-filter-set-description')}
|
||||
header={getFiltersHeader()}
|
||||
key="filters"
|
||||
>
|
||||
{resultFilters.map(getFilterRow)}
|
||||
</Collapse.Panel>
|
||||
</AntdCollapse.Panel>
|
||||
</StyledCollapse>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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<FiltersBarProps> = ({
|
|||
defaultActiveKey={TabIds.AllFilters}
|
||||
activeKey={editFilterSetId ? TabIds.AllFilters : undefined}
|
||||
>
|
||||
<Tabs.TabPane
|
||||
<AntdTabs.TabPane
|
||||
tab={t('All filters (%(filterCount)d)', {
|
||||
filterCount: numberOfFilters,
|
||||
})}
|
||||
|
|
@ -443,8 +443,8 @@ const FilterBar: React.FC<FiltersBarProps> = ({
|
|||
onFilterSelectionChange={handleFilterSelectionChange}
|
||||
/>
|
||||
)}
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
</AntdTabs.TabPane>
|
||||
<AntdTabs.TabPane
|
||||
disabled={!!editFilterSetId}
|
||||
tab={t('Filter sets (%(filterSetCount)d)', {
|
||||
filterSetCount: filterSetFilterValues.length,
|
||||
|
|
@ -459,7 +459,7 @@ const FilterBar: React.FC<FiltersBarProps> = ({
|
|||
tab={tab}
|
||||
onFilterSelectionChange={handleFilterSelectionChange}
|
||||
/>
|
||||
</Tabs.TabPane>
|
||||
</AntdTabs.TabPane>
|
||||
</StyledTabs>
|
||||
) : (
|
||||
<div css={tabPaneStyle} onScroll={onScroll}>
|
||||
|
|
|
|||
|
|
@ -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<Props> = ({
|
|||
);
|
||||
return (
|
||||
<TabsContainer>
|
||||
<Dropdown overlay={menu} arrow placement="topLeft" trigger={['hover']}>
|
||||
<AntdDropdown
|
||||
overlay={menu}
|
||||
arrow
|
||||
placement="topLeft"
|
||||
trigger={['hover']}
|
||||
>
|
||||
<StyledAddBox>
|
||||
<div data-test="new-dropdown-icon" className="fa fa-plus" />{' '}
|
||||
<span>{t('Add filters and dividers')}</span>
|
||||
</StyledAddBox>
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
<div
|
||||
css={{
|
||||
height: '100%',
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
import React, { ReactNode, useEffect, useState } from 'react';
|
||||
import { styled } from '@superset-ui/core';
|
||||
import { Checkbox } from 'src/common/components';
|
||||
import { AntdCheckbox } from 'src/components';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
|
||||
interface CollapsibleControlProps {
|
||||
|
|
@ -74,7 +74,7 @@ const CollapsibleControl = (props: CollapsibleControlProps) => {
|
|||
|
||||
return (
|
||||
<StyledContainer checked={isChecked}>
|
||||
<Checkbox
|
||||
<AntdCheckbox
|
||||
className="checkbox"
|
||||
checked={isChecked}
|
||||
disabled={disabled}
|
||||
|
|
@ -94,7 +94,7 @@ const CollapsibleControl = (props: CollapsibleControlProps) => {
|
|||
<InfoTooltipWithTrigger placement="top" tooltip={tooltip} />
|
||||
)}
|
||||
</>
|
||||
</Checkbox>
|
||||
</AntdCheckbox>
|
||||
{isChecked && <ChildrenContainer>{children}</ChildrenContainer>}
|
||||
</StyledContainer>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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<NativeFiltersForm>();
|
||||
const [newForm] = AntdForm.useForm<NativeFiltersForm>();
|
||||
form = newForm;
|
||||
if (scope) {
|
||||
form.setFieldsValue({
|
||||
|
|
@ -63,9 +63,9 @@ describe('FilterScope', () => {
|
|||
}
|
||||
return (
|
||||
<Provider store={mockStoreWithChartsInTabsAndRoot}>
|
||||
<Form form={form}>
|
||||
<AntdForm form={form}>
|
||||
<FiltersConfigForm form={form} {...mockedProps} />
|
||||
</Form>
|
||||
</AntdForm>
|
||||
</Provider>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
`;
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
>
|
||||
<Checkbox
|
||||
<AntdCheckbox
|
||||
disabled={controlItem.config.affectsDataMask && disabled}
|
||||
onChange={({ target: { checked } }) => {
|
||||
if (controlItem.config.requiredFirst) {
|
||||
|
|
@ -208,7 +207,7 @@ export default function getControlItemsMap({
|
|||
tooltip={controlItem.config.description}
|
||||
/>
|
||||
)}
|
||||
</Checkbox>
|
||||
</AntdCheckbox>
|
||||
</StyledRowFormItem>
|
||||
</Tooltip>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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<NativeFiltersForm>();
|
||||
const [form] = AntdForm.useForm<NativeFiltersForm>();
|
||||
|
||||
const configFormRef = useRef<any>();
|
||||
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
<ExploreAdditionalActionsMenu store={store} {...defaultProps} />,
|
||||
);
|
||||
const dropdown = wrapper.find(Dropdown);
|
||||
const dropdown = wrapper.find(AntdDropdown);
|
||||
const menu = shallow(<div>{dropdown.prop('overlay')}</div>);
|
||||
const menuItems = menu.find(Menu.Item);
|
||||
expect(menuItems).toHaveLength(3);
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<Dropdown
|
||||
<AntdDropdown
|
||||
trigger="click"
|
||||
data-test="query-dropdown"
|
||||
overlay={
|
||||
|
|
@ -116,7 +116,7 @@ const ExploreAdditionalActionsMenu = props => {
|
|||
>
|
||||
<i role="img" className="fa fa-bars" />
|
||||
</div>
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<Dropdown
|
||||
<AntdDropdown
|
||||
trigger={['click']}
|
||||
overlay={
|
||||
<Menu onClick={handleMenuClick} selectable={false}>
|
||||
|
|
@ -86,6 +86,6 @@ export const ExportToCSVDropdown = ({
|
|||
}
|
||||
>
|
||||
{children}
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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<SelectValue | null>(
|
||||
|
|
@ -215,7 +214,7 @@ function PropertiesModal({
|
|||
responsive
|
||||
wrapProps={{ 'data-test': 'properties-edit-modal' }}
|
||||
>
|
||||
<Form
|
||||
<AntdForm
|
||||
form={form}
|
||||
onFinish={onSubmit}
|
||||
layout="vertical"
|
||||
|
|
@ -310,7 +309,7 @@ function PropertiesModal({
|
|||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
</Form>
|
||||
</AntdForm>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 && (
|
||||
<WarningIconWithTooltip warningMarkdown={extra.warning_markdown} />
|
||||
)}
|
||||
<Dropdown
|
||||
<AntdDropdown
|
||||
overlay={datasourceMenu}
|
||||
trigger={['click']}
|
||||
data-test="datasource-menu"
|
||||
|
|
@ -252,7 +252,7 @@ class DatasourceControl extends React.PureComponent {
|
|||
data-test="datasource-menu-trigger"
|
||||
/>
|
||||
</Tooltip>
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
</div>
|
||||
{/* missing dataset */}
|
||||
{isMissingDatasource && isMissingParams && (
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
<Collapse
|
||||
<AntdCollapse
|
||||
expandIconPosition="right"
|
||||
ghost
|
||||
defaultActiveKey={Object.keys(sectionMap)}
|
||||
|
|
@ -672,7 +672,7 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
|
|||
const section = sectionMap[sectionId];
|
||||
|
||||
return (
|
||||
<Collapse.Panel
|
||||
<AntdCollapse.Panel
|
||||
header={<span className="header">{section.title}</span>}
|
||||
key={sectionId}
|
||||
>
|
||||
|
|
@ -690,10 +690,10 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
|
|||
onClick={clickSelector}
|
||||
/>
|
||||
))}
|
||||
</Collapse.Panel>
|
||||
</AntdCollapse.Panel>
|
||||
);
|
||||
})}
|
||||
</Collapse>
|
||||
</AntdCollapse>
|
||||
</LeftPane>
|
||||
|
||||
<SearchWrapper>
|
||||
|
|
|
|||
|
|
@ -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 && (
|
||||
<Slider
|
||||
<AntdSlider
|
||||
min={min}
|
||||
max={max}
|
||||
value={minMax[maxIndex]}
|
||||
|
|
@ -318,7 +318,7 @@ export default function RangeFilterPlugin(props: PluginFilterRangeProps) {
|
|||
/>
|
||||
)}
|
||||
{enableSingleExactValue && (
|
||||
<Slider
|
||||
<AntdSlider
|
||||
min={min}
|
||||
max={max}
|
||||
included={false}
|
||||
|
|
@ -330,7 +330,7 @@ export default function RangeFilterPlugin(props: PluginFilterRangeProps) {
|
|||
/>
|
||||
)}
|
||||
{rangeValue && (
|
||||
<Slider
|
||||
<AntdSlider
|
||||
range
|
||||
min={min}
|
||||
max={max}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Row, Col } from 'src/common/components';
|
||||
import { Row, Col } from 'src/components';
|
||||
import { shallow } from 'enzyme';
|
||||
import App from 'src/profile/components/App';
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
import React from 'react';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { Row, Col } from 'src/common/components';
|
||||
import { Row, Col } from 'src/components';
|
||||
import Tabs from 'src/components/Tabs';
|
||||
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
|
||||
import Favorites from './Favorites';
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import Select, { propertyComparator } from 'src/components/Select/Select';
|
|||
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||
import Owner from 'src/types/Owner';
|
||||
import { Checkbox } from 'src/common/components';
|
||||
import { AntdCheckbox } from 'src/components';
|
||||
import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
|
||||
import { useCommonConf } from 'src/views/CRUD/data/database/state';
|
||||
import {
|
||||
|
|
@ -342,7 +342,7 @@ const StyledRadioGroup = styled(Radio.Group)`
|
|||
margin-left: ${({ theme }) => theme.gridUnit * 5.5}px;
|
||||
`;
|
||||
|
||||
const StyledCheckbox = styled(Checkbox)`
|
||||
const StyledCheckbox = styled(AntdCheckbox)`
|
||||
margin-left: ${({ theme }) => theme.gridUnit * 5.5}px;
|
||||
`;
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
<Dropdown overlay={menu}>
|
||||
<AntdDropdown overlay={menu}>
|
||||
<Icons.MoreVert iconColor={theme.colors.grayscale.base} />
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
</ListViewCard.Actions>
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
<Dropdown overlay={menu}>
|
||||
<AntdDropdown overlay={menu}>
|
||||
<Icons.MoreVert iconColor={theme.colors.grayscale.base} />
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
</ListViewCard.Actions>
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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) => (
|
||||
<div css={(theme: SupersetTheme) => infoTooltip(theme)}>
|
||||
<Switch
|
||||
<AntdSwitch
|
||||
disabled={sslForced && !isEditMode}
|
||||
checked={db?.parameters?.encryption || sslForced}
|
||||
onChange={changed => {
|
||||
|
|
|
|||
|
|
@ -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')}
|
||||
</FormLabel>
|
||||
<Select
|
||||
<AntdSelect
|
||||
style={{ width: '100%' }}
|
||||
defaultValue={isEncrypted ? 'false' : 'true'}
|
||||
onChange={(value: string) =>
|
||||
setIsPublic(castStringToBoolean(value))
|
||||
}
|
||||
>
|
||||
<Select.Option value="true" key={1}>
|
||||
<AntdSelect.Option value="true" key={1}>
|
||||
{t('Publicly shared sheets only')}
|
||||
</Select.Option>
|
||||
<Select.Option value="false" key={2}>
|
||||
</AntdSelect.Option>
|
||||
<AntdSelect.Option value="false" key={2}>
|
||||
{t('Public and privately shared sheets')}
|
||||
</Select.Option>
|
||||
</Select>
|
||||
</AntdSelect.Option>
|
||||
</AntdSelect>
|
||||
</div>
|
||||
)}
|
||||
{showCredentialsInfo && (
|
||||
|
|
@ -93,19 +93,19 @@ export const EncryptedField = ({
|
|||
<FormLabel required>
|
||||
{t('How do you want to enter service account credentials?')}
|
||||
</FormLabel>
|
||||
<Select
|
||||
<AntdSelect
|
||||
defaultValue={uploadOption}
|
||||
style={{ width: '100%' }}
|
||||
onChange={option => setUploadOption(option)}
|
||||
>
|
||||
<Select.Option value={CredentialInfoOptions.jsonUpload}>
|
||||
<AntdSelect.Option value={CredentialInfoOptions.jsonUpload}>
|
||||
{t('Upload JSON file')}
|
||||
</Select.Option>
|
||||
</AntdSelect.Option>
|
||||
|
||||
<Select.Option value={CredentialInfoOptions.copyPaste}>
|
||||
<AntdSelect.Option value={CredentialInfoOptions.copyPaste}>
|
||||
{t('Copy and Paste JSON credentials')}
|
||||
</Select.Option>
|
||||
</Select>
|
||||
</AntdSelect.Option>
|
||||
</AntdSelect>
|
||||
</>
|
||||
)}
|
||||
{uploadOption === CredentialInfoOptions.copyPaste ||
|
||||
|
|
@ -141,14 +141,14 @@ export const EncryptedField = ({
|
|||
</div>
|
||||
|
||||
{!fileToUpload && (
|
||||
<Button
|
||||
<AntdButton
|
||||
className="input-upload-btn"
|
||||
onClick={() =>
|
||||
document?.getElementById('selectedFile')?.click()
|
||||
}
|
||||
>
|
||||
{t('Choose File')}
|
||||
</Button>
|
||||
</AntdButton>
|
||||
)}
|
||||
{fileToUpload && (
|
||||
<div className="input-upload-current">
|
||||
|
|
|
|||
|
|
@ -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<DatabaseModalProps> = ({
|
|||
{t('Or choose from a list of other databases we support:')}
|
||||
</h4>
|
||||
<div className="control-label">{t('Supported databases')}</div>
|
||||
<Select
|
||||
<AntdSelect
|
||||
className="available-select"
|
||||
onChange={setDatabaseModel}
|
||||
placeholder={t('Choose a database...')}
|
||||
|
|
@ -694,15 +694,15 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
|||
a.name.localeCompare(b.name),
|
||||
)
|
||||
.map((database: DatabaseForm) => (
|
||||
<Select.Option value={database.name} key={database.name}>
|
||||
<AntdSelect.Option value={database.name} key={database.name}>
|
||||
{database.name}
|
||||
</Select.Option>
|
||||
</AntdSelect.Option>
|
||||
))}
|
||||
{/* Allow users to connect to DB via legacy SQLA form */}
|
||||
<Select.Option value="Other" key="Other">
|
||||
<AntdSelect.Option value="Other" key="Other">
|
||||
{t('Other')}
|
||||
</Select.Option>
|
||||
</Select>
|
||||
</AntdSelect.Option>
|
||||
</AntdSelect>
|
||||
<Alert
|
||||
showIcon
|
||||
closable={false}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
import React from 'react';
|
||||
import Button from 'src/components/Button';
|
||||
import { Empty } from 'src/common/components';
|
||||
import { Empty } from 'src/components';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { WelcomeTable } from './types';
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql';
|
|||
import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
|
||||
import { LoadingCards } from 'src/views/CRUD/welcome/Welcome';
|
||||
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||
import { Dropdown } from 'src/common/components';
|
||||
import { AntdDropdown } from 'src/components';
|
||||
import { Menu } from 'src/components/Menu';
|
||||
import { copyQueryLink, useListViewResource } from 'src/views/CRUD/hooks';
|
||||
import ListViewCard from 'src/components/ListViewCard';
|
||||
|
|
@ -353,11 +353,11 @@ const SavedQueries = ({
|
|||
e.preventDefault();
|
||||
}}
|
||||
>
|
||||
<Dropdown overlay={renderMenu(q)}>
|
||||
<AntdDropdown overlay={renderMenu(q)}>
|
||||
<Icons.MoreVert
|
||||
iconColor={theme.colors.grayscale.base}
|
||||
/>
|
||||
</Dropdown>
|
||||
</AntdDropdown>
|
||||
</ListViewCard.Actions>
|
||||
</QueryData>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
|||
<span className="navbar-brand">Home</span>
|
||||
{isFeatureEnabled(FeatureFlag.THUMBNAILS) ? (
|
||||
<div className="switch">
|
||||
<Switch checked={checked} onChange={handleToggle} />
|
||||
<AntdSwitch checked={checked} onChange={handleToggle} />
|
||||
<span>Thumbnails</span>
|
||||
</div>
|
||||
) : null}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue