mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
refactor: merge/upgrade superset-ui packages (#10790)
* refactor: merge/upgrade superset-ui packages * Fix flaky big number test * Fix Flaky AdhocFilters test
This commit is contained in:
@@ -20,7 +20,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Popover, Tab, Tabs } from 'react-bootstrap';
|
||||
import Button from 'src/components/Button';
|
||||
import { ThemeProvider } from '@superset-ui/style';
|
||||
import { ThemeProvider } from '@superset-ui/core';
|
||||
|
||||
import columnType from '../propTypes/columnType';
|
||||
import adhocMetricType from '../propTypes/adhocMetricType';
|
||||
|
||||
@@ -20,8 +20,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormGroup } from 'react-bootstrap';
|
||||
import { Select } from 'src/components/Select';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { SupersetClient } from '@superset-ui/connection';
|
||||
import { t, SupersetClient } from '@superset-ui/core';
|
||||
|
||||
import AdhocFilter, { EXPRESSION_TYPES, CLAUSES } from '../AdhocFilter';
|
||||
import adhocMetricType from '../propTypes/adhocMetricType';
|
||||
|
||||
@@ -25,7 +25,7 @@ import 'brace/theme/github';
|
||||
import 'brace/ext/language_tools';
|
||||
import { FormGroup } from 'react-bootstrap';
|
||||
import Select from 'src/components/Select';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
|
||||
import sqlKeywords from '../../SqlLab/utils/sqlKeywords';
|
||||
import AdhocFilter, { EXPRESSION_TYPES, CLAUSES } from '../AdhocFilter';
|
||||
|
||||
@@ -19,9 +19,8 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { OverlayTrigger } from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t, withTheme } from '@superset-ui/core';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
import { withTheme } from '@superset-ui/style';
|
||||
|
||||
import Label from 'src/components/Label';
|
||||
import AdhocFilterEditPopover from './AdhocFilterEditPopover';
|
||||
|
||||
@@ -26,9 +26,8 @@ import AceEditor from 'react-ace';
|
||||
import 'brace/mode/sql';
|
||||
import 'brace/theme/github';
|
||||
import 'brace/ext/language_tools';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t, ThemeProvider } from '@superset-ui/core';
|
||||
import { ColumnOption } from '@superset-ui/chart-controls';
|
||||
import { ThemeProvider } from '@superset-ui/style';
|
||||
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { OverlayTrigger } from 'react-bootstrap';
|
||||
import { withTheme } from '@superset-ui/style';
|
||||
import { withTheme } from '@superset-ui/core';
|
||||
|
||||
import Label from 'src/components/Label';
|
||||
import AdhocMetricEditPopover from './AdhocMetricEditPopover';
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
|
||||
const propTypes = {
|
||||
|
||||
@@ -22,8 +22,7 @@ import PropTypes from 'prop-types';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import { Alert, Tab, Tabs } from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import styled from '@superset-ui/style';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
|
||||
import ControlPanelSection from './ControlPanelSection';
|
||||
import ControlRow from './ControlRow';
|
||||
|
||||
@@ -36,7 +36,7 @@ import {
|
||||
FormControl,
|
||||
} from 'react-bootstrap';
|
||||
import { Table } from 'reactable-arc';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
|
||||
import Button from 'src/components/Button';
|
||||
import getClientErrorObject from '../../utils/getClientErrorObject';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Popover, OverlayTrigger } from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import CopyToClipboard from 'src/components/CopyToClipboard';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import cx from 'classnames';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
|
||||
import URLShortLinkButton from '../../components/URLShortLinkButton';
|
||||
import EmbedCodeButton from './EmbedCodeButton';
|
||||
|
||||
@@ -20,8 +20,7 @@ import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import PropTypes from 'prop-types';
|
||||
import styled from '@superset-ui/style';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { styled, t } from '@superset-ui/core';
|
||||
|
||||
import { chartPropShape } from '../../dashboard/util/propShapes';
|
||||
import ExploreActionButtons from './ExploreActionButtons';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ParentSize } from '@vx/responsive';
|
||||
import styled from '@superset-ui/style';
|
||||
import { styled } from '@superset-ui/core';
|
||||
import { chartPropShape } from '../../dashboard/util/propShapes';
|
||||
import ChartContainer from '../../chart/ChartContainer';
|
||||
import ExploreChartHeader from './ExploreChartHeader';
|
||||
|
||||
@@ -21,9 +21,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import styled from '@superset-ui/style';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { logging } from '@superset-ui/core';
|
||||
import { styled, logging, t } from '@superset-ui/core';
|
||||
|
||||
import ExploreChartPanel from './ExploreChartPanel';
|
||||
import ControlPanelsContainer from './ControlPanelsContainer';
|
||||
|
||||
@@ -31,8 +31,7 @@ import Dialog from 'react-bootstrap-dialog';
|
||||
import { OptionsType } from 'react-select/src/types';
|
||||
import { AsyncSelect } from 'src/components/Select';
|
||||
import rison from 'rison';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { SupersetClient } from '@superset-ui/connection';
|
||||
import { t, SupersetClient } from '@superset-ui/core';
|
||||
import Chart from 'src/types/Chart';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import getClientErrorObject from '../../utils/getClientErrorObject';
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ButtonGroup, OverlayTrigger, Tooltip } from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import styled from '@superset-ui/style';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
|
||||
import Button from 'src/components/Button';
|
||||
import Hotkeys from '../../components/Hotkeys';
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { getNumberFormatter } from '@superset-ui/number-format';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { getNumberFormatter, t } from '@superset-ui/core';
|
||||
|
||||
import Label from 'src/components/Label';
|
||||
import TooltipWrapper from '../../components/TooltipWrapper';
|
||||
|
||||
@@ -24,7 +24,7 @@ import { Alert, FormControl, FormGroup, Modal, Radio } from 'react-bootstrap';
|
||||
import Button from 'src/components/Button';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import { CreatableSelect } from 'src/components/Select/SupersetStyledSelect';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
|
||||
const propTypes = {
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { SupersetClient } from '@superset-ui/connection';
|
||||
import { logging } from '@superset-ui/core';
|
||||
import { t, logging, SupersetClient } from '@superset-ui/core';
|
||||
|
||||
import OnPasteSelect from 'src/components/Select/OnPasteSelect';
|
||||
|
||||
|
||||
@@ -21,12 +21,14 @@ import PropTypes from 'prop-types';
|
||||
import { CompactPicker } from 'react-color';
|
||||
import Button from 'src/components/Button';
|
||||
import mathjs from 'mathjs';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { SupersetClient } from '@superset-ui/connection';
|
||||
import { getCategoricalSchemeRegistry } from '@superset-ui/color';
|
||||
import { getChartMetadataRegistry } from '@superset-ui/chart';
|
||||
import { validateNonEmpty } from '@superset-ui/validator';
|
||||
import { ThemeProvider } from '@superset-ui/style';
|
||||
import {
|
||||
t,
|
||||
SupersetClient,
|
||||
getCategoricalSchemeRegistry,
|
||||
getChartMetadataRegistry,
|
||||
ThemeProvider,
|
||||
validateNonEmpty,
|
||||
} from '@superset-ui/core';
|
||||
|
||||
import SelectControl from './SelectControl';
|
||||
import TextControl from './TextControl';
|
||||
|
||||
@@ -25,8 +25,7 @@ import {
|
||||
ListGroupItem,
|
||||
} from 'react-bootstrap';
|
||||
import { connect } from 'react-redux';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { withTheme } from '@superset-ui/style';
|
||||
import { t, withTheme } from '@superset-ui/core';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
import { getChartKey } from '../../exploreUtils';
|
||||
import { runAnnotationQuery } from '../../../chart/chartAction';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Col, Row, FormGroup, FormControl } from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
|
||||
const propTypes = {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { CategoricalColorNamespace } from '@superset-ui/color';
|
||||
import { CategoricalColorNamespace } from '@superset-ui/core';
|
||||
|
||||
const propTypes = {
|
||||
onChange: PropTypes.func,
|
||||
|
||||
@@ -20,7 +20,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { OverlayTrigger, Popover } from 'react-bootstrap';
|
||||
import { SketchPicker } from 'react-color';
|
||||
import { getCategoricalSchemeRegistry } from '@superset-ui/color';
|
||||
import { getCategoricalSchemeRegistry } from '@superset-ui/core';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
|
||||
const propTypes = {
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
Tooltip,
|
||||
Well,
|
||||
} from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { ColumnOption, MetricOption } from '@superset-ui/chart-controls';
|
||||
|
||||
import Label from 'src/components/Label';
|
||||
|
||||
@@ -35,8 +35,7 @@ import Button from 'src/components/Button';
|
||||
import Datetime from 'react-datetime';
|
||||
import 'react-datetime/css/react-datetime.css';
|
||||
import moment from 'moment';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { styled, withTheme } from '@superset-ui/style';
|
||||
import { t, styled, withTheme } from '@superset-ui/core';
|
||||
|
||||
import {
|
||||
buildTimeRangeString,
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { OverlayTrigger, Popover } from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/translation';
|
||||
|
||||
import { t } from '@superset-ui/core';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
|
||||
import FormRow from '../../../components/FormRow';
|
||||
import SelectControl from './SelectControl';
|
||||
import CheckboxControl from './CheckboxControl';
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
import OnPasteSelect from 'src/components/Select/OnPasteSelect';
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
|
||||
import Select from '../../../components/AsyncSelect';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { Select, CreatableSelect, OnPasteSelect } from 'src/components/Select';
|
||||
import ControlHeader from 'src/explore/components/ControlHeader';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Row, Col, OverlayTrigger, Popover } from 'react-bootstrap';
|
||||
import Button from 'src/components/Button';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
|
||||
import Label from 'src/components/Label';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
|
||||
@@ -29,7 +29,7 @@ import 'brace/mode/markdown';
|
||||
import 'brace/mode/javascript';
|
||||
import 'brace/theme/textmate';
|
||||
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { t } from '@superset-ui/core';
|
||||
|
||||
import ControlHeader from '../ControlHeader';
|
||||
import ModalTrigger from '../../../components/ModalTrigger';
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import { FormGroup, FormControl } from 'react-bootstrap';
|
||||
import {
|
||||
legacyValidateNumber,
|
||||
legacyValidateInteger,
|
||||
} from '@superset-ui/validator';
|
||||
import { legacyValidateNumber, legacyValidateInteger } from '@superset-ui/core';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
|
||||
interface TextControlProps {
|
||||
|
||||
@@ -26,9 +26,9 @@ import {
|
||||
Popover,
|
||||
} from 'react-bootstrap';
|
||||
import Select from 'src/components/Select';
|
||||
import { t } from '@superset-ui/translation';
|
||||
|
||||
import { t } from '@superset-ui/core';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
|
||||
import BoundsControl from './BoundsControl';
|
||||
import CheckboxControl from './CheckboxControl';
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@ import {
|
||||
OverlayTrigger,
|
||||
Tooltip,
|
||||
} from 'react-bootstrap';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { getChartMetadataRegistry } from '@superset-ui/chart';
|
||||
import { t, getChartMetadataRegistry } from '@superset-ui/core';
|
||||
|
||||
import ControlHeader from '../ControlHeader';
|
||||
import './VizTypeControl.less';
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { SupersetClient } from '@superset-ui/connection';
|
||||
import { logging } from '@superset-ui/core';
|
||||
import { SupersetClient, logging } from '@superset-ui/core';
|
||||
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user