mirror of https://github.com/apache/superset.git
chore: Moves Modal to the components folder (#14130)
This commit is contained in:
parent
c7112d1c48
commit
b83ee46d0f
|
@ -27,7 +27,7 @@ import {
|
|||
ThemeProvider,
|
||||
} from '@superset-ui/core';
|
||||
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import PropertiesModal from 'src/dashboard/components/PropertiesModal';
|
||||
import { mockStore } from 'spec/fixtures/mockStore';
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import thunk from 'redux-thunk';
|
|||
import { act } from 'react-dom/test-utils';
|
||||
import sinon from 'sinon';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import ChangeDatasourceModal from 'src/datasource/ChangeDatasourceModal';
|
||||
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
|
||||
import mockDatasource from 'spec/fixtures/mockDatasource';
|
||||
|
|
|
@ -27,7 +27,7 @@ import sinon from 'sinon';
|
|||
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
|
||||
|
||||
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import DatasourceModal from 'src/datasource/DatasourceModal';
|
||||
import DatasourceEditor from 'src/datasource/DatasourceEditor';
|
||||
import * as featureFlags from 'src/featureFlags';
|
||||
|
|
|
@ -21,7 +21,7 @@ import sinon from 'sinon';
|
|||
import { shallow } from 'enzyme';
|
||||
import { getChartMetadataRegistry, ChartMetadata } from '@superset-ui/core';
|
||||
import VizTypeControl from 'src/explore/components/controls/VizTypeControl';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
|
||||
const defaultProps = {
|
||||
name: 'viz_type',
|
||||
|
|
|
@ -21,7 +21,7 @@ import { FormControl } from 'react-bootstrap';
|
|||
import { shallow } from 'enzyme';
|
||||
import * as sinon from 'sinon';
|
||||
import SaveQuery from 'src/SqlLab/components/SaveQuery';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
|
||||
describe('SavedQuery', () => {
|
||||
|
|
|
@ -23,7 +23,7 @@ import configureStore from 'redux-mock-store';
|
|||
import fetchMock from 'fetch-mock';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import AlertReportModal from 'src/views/CRUD/alert/AlertReportModal';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import { AsyncSelect, NativeGraySelect as Select } from 'src/components/Select';
|
||||
import { Radio } from 'src/common/components/Radio';
|
||||
import { Switch } from 'src/components/Switch';
|
||||
|
|
|
@ -22,7 +22,7 @@ import configureStore from 'redux-mock-store';
|
|||
import { Provider } from 'react-redux';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import AnnotationModal from 'src/views/CRUD/annotation/AnnotationModal';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
|
||||
import { JsonEditor } from 'src/components/AsyncAceEditor';
|
||||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
|
|
|
@ -22,7 +22,7 @@ import configureStore from 'redux-mock-store';
|
|||
import { Provider } from 'react-redux';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import AnnotationLayerModal from 'src/views/CRUD/annotationlayers/AnnotationLayerModal';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
|
||||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import { Provider } from 'react-redux';
|
|||
import configureStore from 'redux-mock-store';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import CssTemplateModal from 'src/views/CRUD/csstemplates/CssTemplateModal';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
|
||||
import { CssEditor } from 'src/components/AsyncAceEditor';
|
||||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
|
|
|
@ -26,7 +26,7 @@ import userEvent from '@testing-library/user-event';
|
|||
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
|
||||
import { Provider } from 'react-redux';
|
||||
import DatabaseModal from 'src/views/CRUD/data/database/DatabaseModal';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Tabs from 'src/common/components/Tabs';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
|
||||
|
|
|
@ -23,7 +23,7 @@ import fetchMock from 'fetch-mock';
|
|||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
import SavedQueryPreviewModal from 'src/views/CRUD/data/savedquery/SavedQueryPreviewModal';
|
||||
import Button from 'src/components/Button';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import React, { FunctionComponent } from 'react';
|
|||
import { AutoCompleteProps } from 'antd/lib/auto-complete';
|
||||
import { Radio } from 'src/common/components/Radio';
|
||||
import { AutoComplete, Input } from 'src/common/components';
|
||||
import StyledModal from 'src/common/components/Modal';
|
||||
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';
|
||||
|
|
|
@ -22,7 +22,7 @@ import { t, supersetTheme, styled } from '@superset-ui/core';
|
|||
|
||||
import Button from 'src/components/Button';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Icon from 'src/components/Icon';
|
||||
|
||||
const Styles = styled.span`
|
||||
|
|
|
@ -28,7 +28,7 @@ import Split from 'react-split';
|
|||
import { t, styled, supersetTheme } from '@superset-ui/core';
|
||||
import debounce from 'lodash/debounce';
|
||||
import throttle from 'lodash/throttle';
|
||||
import StyledModal from 'src/common/components/Modal';
|
||||
import StyledModal from 'src/components/Modal';
|
||||
import Mousetrap from 'mousetrap';
|
||||
import Button from 'src/components/Button';
|
||||
import Timer from 'src/components/Timer';
|
||||
|
|
|
@ -21,7 +21,7 @@ import { action } from '@storybook/addon-actions';
|
|||
import { withKnobs, boolean, select } from '@storybook/addon-knobs';
|
||||
import Button from 'src/components/Button';
|
||||
import { CronPicker, CronError } from 'src/components/CronPicker';
|
||||
import Modal from './Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Tabs, { EditableTabs } from './Tabs';
|
||||
import { Tooltip as AntdTooltip } from './Tooltip';
|
||||
import { Menu, Input, Divider } from '.';
|
||||
|
|
|
@ -22,7 +22,7 @@ import Button from 'src/components/Button';
|
|||
import { act } from 'react-dom/test-utils';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
|
||||
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
|
||||
describe('ConfirmStatusChange', () => {
|
||||
const mockedProps = {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import { t, styled } from '@superset-ui/core';
|
||||
import React, { useState } from 'react';
|
||||
import { FormGroup, FormControl, FormControlProps } from 'react-bootstrap';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
|
||||
const StyleFormGroup = styled(FormGroup)`
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import React, { useState, ReactNode } from 'react';
|
||||
import { styled, supersetTheme, t } from '@superset-ui/core';
|
||||
import { noOp } from 'src/utils/common';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
|
||||
import Icon from '../Icon';
|
||||
|
|
|
@ -24,7 +24,7 @@ import { ReactWrapper } from 'enzyme';
|
|||
import Button from 'src/components/Button';
|
||||
import { ImportResourceName } from 'src/views/CRUD/types';
|
||||
import ImportModelsModal from 'src/components/ImportModal';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
|
||||
const mockStore = configureStore([thunk]);
|
||||
const store = mockStore({});
|
||||
|
|
|
@ -20,7 +20,7 @@ import React, { FunctionComponent, useEffect, useRef, useState } from 'react';
|
|||
import { styled, t } from '@superset-ui/core';
|
||||
|
||||
import Icon from 'src//components/Icon';
|
||||
import StyledModal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import { useImportResource } from 'src/views/CRUD/hooks';
|
||||
import { ImportResourceName } from 'src/views/CRUD/types';
|
||||
|
||||
|
@ -255,7 +255,7 @@ const ImportModelsModal: FunctionComponent<ImportModelsModalProps> = ({
|
|||
}
|
||||
|
||||
return (
|
||||
<StyledModal
|
||||
<Modal
|
||||
name="model"
|
||||
className="import-model-modal"
|
||||
disablePrimaryButton={
|
||||
|
@ -288,7 +288,7 @@ const ImportModelsModal: FunctionComponent<ImportModelsModalProps> = ({
|
|||
</StyledInputContainer>
|
||||
{renderPasswordFields()}
|
||||
{renderOverwriteConfirmation()}
|
||||
</StyledModal>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
|
||||
const propTypes = {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import React, { useRef, useState } from 'react';
|
||||
import { styled } from '@superset-ui/core';
|
||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import { useComponentDidMount } from 'src/common/hooks/useComponentDidMount';
|
||||
import { Omnibar } from './Omnibar';
|
||||
import { LOG_ACTIONS_OMNIBAR_TRIGGERED } from '../../logger/LogUtils';
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import { t } from '@superset-ui/core';
|
||||
import React, { FC } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { StyledModal } from 'src/common/components/Modal';
|
||||
import { StyledModal } from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
import { Form } from 'src/common/components';
|
||||
import { setChartConfiguration } from 'src/dashboard/actions/dashboardInfo';
|
||||
|
|
|
@ -31,7 +31,7 @@ import {
|
|||
CategoricalColorNamespace,
|
||||
} from '@superset-ui/core';
|
||||
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import { JsonEditor } from 'src/components/AsyncAceEditor';
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import React, { useCallback, useMemo, useState } from 'react';
|
|||
import { uniq } from 'lodash';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { Form } from 'src/common/components';
|
||||
import { StyledModal } from 'src/common/components/Modal';
|
||||
import { StyledModal } from 'src/components/Modal';
|
||||
import ErrorBoundary from 'src/components/ErrorBoundary';
|
||||
import { useFilterConfigMap, useFilterConfiguration } from '../state';
|
||||
import { FilterRemoval, NativeFiltersForm } from './types';
|
||||
|
|
|
@ -27,7 +27,7 @@ import { FormControl, FormControlProps } from 'react-bootstrap';
|
|||
import Alert from 'src/components/Alert';
|
||||
import { SupersetClient, t, styled } from '@superset-ui/core';
|
||||
import TableView, { EmptyWrapperType } from 'src/components/TableView';
|
||||
import StyledModal from 'src/common/components/Modal';
|
||||
import StyledModal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
import { useListViewResource } from 'src/views/CRUD/hooks';
|
||||
import Dataset from 'src/types/Dataset';
|
||||
|
|
|
@ -21,7 +21,7 @@ import Alert from 'src/components/Alert';
|
|||
import Button from 'src/components/Button';
|
||||
import { styled, t, SupersetClient } from '@superset-ui/core';
|
||||
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import AsyncEsmComponent from 'src/components/AsyncEsmComponent';
|
||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import {
|
|||
FormGroup,
|
||||
FormControlProps,
|
||||
} from 'react-bootstrap';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
import { OptionsType } from 'react-select/src/types';
|
||||
import { AsyncSelect } from 'src/components/Select';
|
||||
|
|
|
@ -23,7 +23,7 @@ import Alert from 'src/components/Alert';
|
|||
import { JsonObject, t, styled } from '@superset-ui/core';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import { Radio } from 'src/common/components/Radio';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import { CreatableSelect } from 'src/components/Select';
|
||||
|
|
|
@ -22,7 +22,7 @@ import { Row, Col, FormControl } from 'react-bootstrap';
|
|||
import { Behavior, t, getChartMetadataRegistry } from '@superset-ui/core';
|
||||
import { useDynamicPluginContext } from 'src/components/DynamicPlugins';
|
||||
import { Tooltip } from 'src/common/components/Tooltip';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Label from 'src/components/Label';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
import './VizTypeControl.less';
|
||||
|
|
|
@ -22,8 +22,8 @@ import rison from 'rison';
|
|||
import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
||||
|
||||
import Icon from 'src/components/Icon';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import { Switch } from 'src/components/Switch';
|
||||
import Modal from 'src/components/Modal';
|
||||
import { Radio } from 'src/common/components/Radio';
|
||||
import { AsyncSelect, NativeGraySelect as Select } from 'src/components/Select';
|
||||
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||
|
|
|
@ -22,7 +22,7 @@ import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
|||
import { RangePicker } from 'src/components/DatePicker';
|
||||
import moment from 'moment';
|
||||
import Icon from 'src/components/Icon';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
||||
import { JsonEditor } from 'src/components/AsyncAceEditor';
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import { styled, t } from '@superset-ui/core';
|
|||
import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
||||
|
||||
import Icon from 'src/components/Icon';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
||||
|
||||
import { AnnotationLayerObject } from './types';
|
||||
|
|
|
@ -21,7 +21,7 @@ import { styled, t } from '@superset-ui/core';
|
|||
import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
||||
|
||||
import Icon from 'src/components/Icon';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
||||
import { CssEditor } from 'src/components/AsyncAceEditor';
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import {
|
|||
} from 'src/views/CRUD/hooks';
|
||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
||||
import Icon from 'src/components/Icon';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Tabs from 'src/common/components/Tabs';
|
||||
import Button from 'src/components/Button';
|
||||
import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox';
|
||||
|
|
|
@ -21,7 +21,7 @@ import { styled, t } from '@superset-ui/core';
|
|||
import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
||||
import { isEmpty, isNil } from 'lodash';
|
||||
import Icon from 'src/components/Icon';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import TableSelector from 'src/components/TableSelector';
|
||||
import withToasts from 'src/messageToasts/enhancers/withToasts';
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
import React, { useState } from 'react';
|
||||
import { styled, t } from '@superset-ui/core';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import cx from 'classnames';
|
||||
import Button from 'src/components/Button';
|
||||
import withToasts, { ToastProps } from 'src/messageToasts/enhancers/withToasts';
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { styled, t } from '@superset-ui/core';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
import SyntaxHighlighterCopy from 'src/views/CRUD/data/components/SyntaxHighlighterCopy';
|
||||
import withToasts, { ToastProps } from 'src/messageToasts/enhancers/withToasts';
|
||||
|
|
Loading…
Reference in New Issue