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:
Jesse Yang 2020-09-09 13:18:55 -07:00 committed by GitHub
parent 3b4a992861
commit 9a59bdda48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
256 changed files with 830 additions and 1594 deletions

View File

@ -1,5 +0,0 @@
{
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid"
}

View File

@ -22,7 +22,7 @@ import { jsxDecorator } from 'storybook-addon-jsx';
import { addParameters } from '@storybook/react';
import { withPaddings } from 'storybook-addon-paddings';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import '../src/theme.ts';
import './storybook.css';

View File

@ -30,12 +30,12 @@ describe('AdhocFilters', () => {
cy.get('[data-test=adhoc_filters]').within(() => {
cy.get('.Select__control').click();
cy.get('input[type=text]').type('name{enter}');
cy.get('input[type=text]').focus().type('name{enter}');
});
cy.get('#filter-edit-popover').within(() => {
cy.get('[data-test=adhoc-filter-simple-value]').within(() => {
cy.get('.Select__control').click();
cy.get('input[type=text]').type('Any{enter}');
cy.get('input[type=text]').focus().type('Any{enter}');
});
cy.get('button').contains('Save').click();
});
@ -53,7 +53,7 @@ describe('AdhocFilters', () => {
cy.get('[data-test=adhoc_filters]').within(() => {
cy.get('.Select__control').click();
cy.get('input[type=text]').type('name{enter}');
cy.get('input[type=text]').focus().type('name{enter}');
});
cy.get('#filter-edit-popover').within(() => {

View File

@ -43,7 +43,7 @@ describe('Visualization > Big Number with Trendline', () => {
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({
waitAlias: '@getJson',
chartSelector: '.big_number',
chartSelector: '.superset-legacy-chart-big-number',
});
}

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,8 @@
"prettier-check": "prettier --check '{src,stylesheets}/**/*.{css,less,sass,scss}'",
"lint-fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx . && npm run clean-css && npm run type",
"clean-css": "prettier --write '{src,stylesheets}/**/*.{css,less,sass,scss}'",
"format": "prettier --write './{src,spec,stylesheets,cypress-base}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}'",
"prettier": "npm run format",
"check-translation": "prettier --check ../superset/translations/**/LC_MESSAGES/*.json",
"clean-translation": "prettier --write ../superset/translations/**/LC_MESSAGES/*.json",
"storybook": "NODE_ENV=development BABEL_ENV=development start-storybook -p 6006",
@ -61,46 +63,34 @@
"@babel/runtime-corejs3": "^7.8.4",
"@data-ui/sparkline": "^0.0.54",
"@emotion/core": "^10.0.28",
"@superset-ui/chart": "^0.14.23",
"@superset-ui/chart-composition": "^0.14.23",
"@superset-ui/chart-controls": "^0.14.23",
"@superset-ui/color": "^0.14.23",
"@superset-ui/connection": "^0.14.23",
"@superset-ui/core": "^0.14.23",
"@superset-ui/dimension": "^0.14.23",
"@superset-ui/legacy-plugin-chart-calendar": "^0.14.23",
"@superset-ui/legacy-plugin-chart-chord": "^0.14.23",
"@superset-ui/legacy-plugin-chart-country-map": "^0.14.23",
"@superset-ui/legacy-plugin-chart-event-flow": "^0.14.23",
"@superset-ui/legacy-plugin-chart-force-directed": "^0.14.23",
"@superset-ui/legacy-plugin-chart-heatmap": "^0.14.23",
"@superset-ui/legacy-plugin-chart-histogram": "^0.14.23",
"@superset-ui/legacy-plugin-chart-horizon": "^0.14.23",
"@superset-ui/legacy-plugin-chart-map-box": "^0.14.23",
"@superset-ui/legacy-plugin-chart-paired-t-test": "^0.14.23",
"@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.14.23",
"@superset-ui/legacy-plugin-chart-partition": "^0.14.23",
"@superset-ui/legacy-plugin-chart-pivot-table": "^0.14.23",
"@superset-ui/legacy-plugin-chart-rose": "^0.14.23",
"@superset-ui/legacy-plugin-chart-sankey": "^0.14.23",
"@superset-ui/legacy-plugin-chart-sankey-loop": "^0.14.23",
"@superset-ui/legacy-plugin-chart-sunburst": "^0.14.23",
"@superset-ui/legacy-plugin-chart-treemap": "^0.14.23",
"@superset-ui/legacy-plugin-chart-world-map": "^0.14.23",
"@superset-ui/legacy-preset-chart-big-number": "^0.14.23",
"@superset-ui/legacy-preset-chart-deckgl": "^0.2.4",
"@superset-ui/legacy-preset-chart-nvd3": "^0.14.23",
"@superset-ui/number-format": "^0.14.23",
"@superset-ui/plugin-chart-echarts": "^0.14.23",
"@superset-ui/plugin-chart-table": "^0.14.23",
"@superset-ui/plugin-chart-word-cloud": "^0.14.23",
"@superset-ui/preset-chart-xy": "^0.14.23",
"@superset-ui/query": "^0.14.23",
"@superset-ui/style": "^0.14.23",
"@superset-ui/superset-ui": "^0.14.23",
"@superset-ui/time-format": "^0.14.23",
"@superset-ui/translation": "^0.14.23",
"@superset-ui/validator": "^0.14.23",
"@superset-ui/chart-controls": "^0.15.1",
"@superset-ui/core": "^0.15.1",
"@superset-ui/legacy-plugin-chart-calendar": "^0.15.1",
"@superset-ui/legacy-plugin-chart-chord": "^0.15.1",
"@superset-ui/legacy-plugin-chart-country-map": "^0.15.1",
"@superset-ui/legacy-plugin-chart-event-flow": "^0.15.1",
"@superset-ui/legacy-plugin-chart-force-directed": "^0.15.1",
"@superset-ui/legacy-plugin-chart-heatmap": "^0.15.1",
"@superset-ui/legacy-plugin-chart-histogram": "^0.15.1",
"@superset-ui/legacy-plugin-chart-horizon": "^0.15.1",
"@superset-ui/legacy-plugin-chart-map-box": "^0.15.1",
"@superset-ui/legacy-plugin-chart-paired-t-test": "^0.15.1",
"@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.15.1",
"@superset-ui/legacy-plugin-chart-partition": "^0.15.1",
"@superset-ui/legacy-plugin-chart-pivot-table": "^0.15.1",
"@superset-ui/legacy-plugin-chart-rose": "^0.15.1",
"@superset-ui/legacy-plugin-chart-sankey": "^0.15.1",
"@superset-ui/legacy-plugin-chart-sankey-loop": "^0.15.1",
"@superset-ui/legacy-plugin-chart-sunburst": "^0.15.1",
"@superset-ui/legacy-plugin-chart-treemap": "^0.15.1",
"@superset-ui/legacy-plugin-chart-world-map": "^0.15.1",
"@superset-ui/legacy-preset-chart-big-number": "^0.15.1",
"@superset-ui/legacy-preset-chart-deckgl": "^0.3.1",
"@superset-ui/legacy-preset-chart-nvd3": "^0.15.1",
"@superset-ui/plugin-chart-echarts": "^0.15.1",
"@superset-ui/plugin-chart-table": "^0.15.1",
"@superset-ui/plugin-chart-word-cloud": "^0.15.1",
"@superset-ui/preset-chart-xy": "^0.15.1",
"@vx/responsive": "^0.0.195",
"abortcontroller-polyfill": "^1.1.9",
"antd": "^4.5.2",
@ -118,6 +108,7 @@
"dnd-core": "^2.6.0",
"dom-to-image": "^2.6.0",
"geolib": "^2.0.24",
"global-box": "^1.2.0",
"immutable": "^3.8.2",
"interweave": "^11.2.0",
"jquery": "^3.5.1",
@ -149,6 +140,7 @@
"react-hot-loader": "^4.12.20",
"react-json-tree": "^0.11.2",
"react-jsonschema-form": "^1.2.0",
"react-loadable": "^5.5.0",
"react-markdown": "^4.3.1",
"react-redux": "^5.1.2",
"react-router-dom": "^5.1.2",
@ -268,7 +260,7 @@
"node-fetch": "^2.6.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"po2json": "^0.4.5",
"prettier": "^2.0.5",
"prettier": "^2.1.1",
"react-test-renderer": "^16.9.0",
"redux-mock-store": "^1.2.3",
"sinon": "^9.0.2",

View File

@ -0,0 +1,23 @@
/**
* 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.
*/
module.exports = {
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
};

View File

@ -17,7 +17,7 @@
* under the License.
*/
import fetchMock from 'fetch-mock';
import { SupersetClient } from '@superset-ui/connection';
import { SupersetClient } from '@superset-ui/core';
export default function setupSupersetClient() {
// The following is needed to mock out SupersetClient requests

View File

@ -23,7 +23,7 @@ import 'jest-enzyme';
import jQuery from 'jquery';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import { configure as configureTranslation } from '@superset-ui/translation';
import { configure as configureTranslation } from '@superset-ui/core';
import setupSupersetClient from './setupSupersetClient';

View File

@ -17,7 +17,7 @@
* under the License.
*/
import { shallow as enzymeShallow, mount as enzymeMount } from 'enzyme';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import { ReactElement } from 'react';
type optionsType = {

View File

@ -18,7 +18,7 @@
*/
import React from 'react';
import { shallow } from 'enzyme';
import { SuperChart } from '@superset-ui/chart';
import { SuperChart } from '@superset-ui/core';
import ChartRenderer from 'src/chart/ChartRenderer';

View File

@ -20,7 +20,7 @@ import URI from 'urijs';
import fetchMock from 'fetch-mock';
import sinon from 'sinon';
import * as chartlib from '@superset-ui/chart';
import * as chartlib from '@superset-ui/core';
import { LOG_EVENT } from 'src/logger/actions';
import * as exploreUtils from 'src/explore/exploreUtils';
import * as actions from 'src/chart/chartAction';

View File

@ -19,7 +19,7 @@
import React from 'react';
import { shallow } from 'enzyme';
import { Table, Thead, Td, Th, Tr } from 'reactable-arc';
import { getChartControlPanelRegistry } from '@superset-ui/chart';
import { getChartControlPanelRegistry } from '@superset-ui/core';
import AlteredSliceTag from 'src/components/AlteredSliceTag';
import ModalTrigger from 'src/components/ModalTrigger';

View File

@ -19,7 +19,7 @@
import React from 'react';
import { mount } from 'enzyme';
import Button from 'src/components/Button';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
import Modal from 'src/components/Modal';

View File

@ -20,7 +20,7 @@ import React from 'react';
import { mount, shallow } from 'enzyme';
import { act } from 'react-dom/test-utils';
import { QueryParamProvider } from 'use-query-params';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import Button from 'src/components/Button';
import { Empty } from 'src/common/components';

View File

@ -20,7 +20,7 @@ import React from 'react';
import { shallow, mount } from 'enzyme';
import { Nav, MenuItem } from 'react-bootstrap';
import NavDropdown from 'src/components/NavDropdown';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import { Menu } from 'src/components/Menu/Menu';

View File

@ -17,7 +17,7 @@
* under the License.
*/
import sinon from 'sinon';
import { SupersetClient } from '@superset-ui/connection';
import { SupersetClient } from '@superset-ui/core';
import {
removeSliceFromDashboard,

View File

@ -18,7 +18,7 @@
*/
import React from 'react';
import { mount } from 'enzyme';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import CodeModal from 'src/dashboard/components/CodeModal';

View File

@ -22,7 +22,7 @@ import { shallow, mount } from 'enzyme';
import sinon from 'sinon';
import { ParentSize } from '@vx/responsive';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import { Sticky, StickyContainer } from 'react-sticky';
import { TabContainer, TabContent, TabPane } from 'react-bootstrap';

View File

@ -23,7 +23,7 @@ import configureStore from 'redux-mock-store';
import fetchMock from 'fetch-mock';
import thunk from 'redux-thunk';
import sinon from 'sinon';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import { act } from 'react-dom/test-utils';
import ChangeDatasourceModal from 'src/datasource/ChangeDatasourceModal';

View File

@ -24,7 +24,7 @@ import { mount } from 'enzyme';
import fetchMock from 'fetch-mock';
import thunk from 'redux-thunk';
import sinon from 'sinon';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
import DatasourceModal from 'src/datasource/DatasourceModal';

View File

@ -24,7 +24,7 @@ import { SketchPicker } from 'react-color';
import {
CategoricalScheme,
getCategoricalSchemeRegistry,
} from '@superset-ui/color';
} from '@superset-ui/core';
import ColorPickerControl from 'src/explore/components/controls/ColorPickerControl';
import ControlHeader from 'src/explore/components/ControlHeader';

View File

@ -20,7 +20,7 @@
import React from 'react';
import { mount } from 'enzyme';
import { Select } from 'src/components/Select';
import { getCategoricalSchemeRegistry } from '@superset-ui/color';
import { getCategoricalSchemeRegistry } from '@superset-ui/core';
import ColorSchemeControl from 'src/explore/components/controls/ColorSchemeControl';

View File

@ -18,8 +18,7 @@
*/
import React from 'react';
import { shallow } from 'enzyme';
import { getChartControlPanelRegistry } from '@superset-ui/chart';
import { t } from '@superset-ui/translation';
import { getChartControlPanelRegistry, t } from '@superset-ui/core';
import { defaultControls } from 'src/explore/store';
import { getFormDataFromControls } from 'src/explore/controlUtils';
import { ControlPanelsContainer } from 'src/explore/components/ControlPanelsContainer';

View File

@ -20,7 +20,7 @@ import React from 'react';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import { Modal } from 'react-bootstrap';
import { getChartMetadataRegistry, ChartMetadata } from '@superset-ui/chart';
import { getChartMetadataRegistry, ChartMetadata } from '@superset-ui/core';
import VizTypeControl from 'src/explore/components/controls/VizTypeControl';
const defaultProps = {

View File

@ -18,9 +18,11 @@
*/
import React from 'react';
import { getChartControlPanelRegistry } from '@superset-ui/chart';
import { t } from '@superset-ui/translation';
import { ColumnOption } from '@superset-ui/chart-controls';
import {
getChartControlPanelRegistry,
ColumnOption,
t,
} from '@superset-ui/core';
import {
getControlConfig,
getControlState,

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { getChartControlPanelRegistry } from '@superset-ui/chart';
import { getChartControlPanelRegistry } from '@superset-ui/core';
import { applyDefaultFormData } from 'src/explore/store';
describe('store', () => {

View File

@ -30,7 +30,7 @@ import {
formatTimeRange,
} from 'src/explore/dateFilterUtils';
import * as hostNamesConfig from 'src/utils/hostNamesConfig';
import { getChartMetadataRegistry } from '@superset-ui/chart';
import { getChartMetadataRegistry } from '@superset-ui/core';
describe('exploreUtils', () => {
const location = window.location;

View File

@ -17,7 +17,7 @@
* under the License.
*/
import sinon from 'sinon';
import { SupersetClient } from '@superset-ui/connection';
import { SupersetClient } from '@superset-ui/core';
import logger from 'src/middleware/loggerMiddleware';
import { LOG_EVENT } from 'src/logger/actions';
import { LOG_ACTIONS_LOAD_CHART } from 'src/logger/LogUtils';

View File

@ -23,7 +23,7 @@ import URI from 'urijs';
import { Tab } from 'react-bootstrap';
import { shallow, mount } from 'enzyme';
import sinon from 'sinon';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import TabbedSqlEditors from 'src/SqlLab/components/TabbedSqlEditors';
import SqlEditor from 'src/SqlLab/components/SqlEditor';

View File

@ -17,9 +17,8 @@
* under the License.
*/
import { getChartControlPanelRegistry } from '@superset-ui/chart';
import { getChartControlPanelRegistry, t } from '@superset-ui/core';
import getControlsForVizType from 'src/utils/getControlsForVizType';
import { t } from '@superset-ui/translation';
const fakePluginControls = {
controlPanelSections: [

View File

@ -21,7 +21,7 @@ import { mount } from 'enzyme';
import thunk from 'redux-thunk';
import configureStore from 'redux-mock-store';
import fetchMock from 'fetch-mock';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import ListView from 'src/components/ListView';
import DashboardTable from 'src/views/CRUD/welcome/DashboardTable';

View File

@ -18,7 +18,7 @@
*/
import React, { ReactNode } from 'react';
import shortid from 'shortid';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import Button from 'src/components/Button';
import Fieldset from './Fieldset';
import { recurseReactClone } from './utils';

View File

@ -21,7 +21,7 @@ import { createStore, compose, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import thunkMiddleware from 'redux-thunk';
import { hot } from 'react-hot-loader/root';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import {
initFeatureFlags,
isFeatureEnabled,

View File

@ -18,8 +18,7 @@
*/
import shortid from 'shortid';
import JSONbig from 'json-bigint';
import { t } from '@superset-ui/translation';
import { SupersetClient } from '@superset-ui/connection';
import { t, SupersetClient } from '@superset-ui/core';
import invert from 'lodash/invert';
import mapKeys from 'lodash/mapKeys';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';

View File

@ -21,9 +21,8 @@ import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import $ from 'jquery';
import { t } from '@superset-ui/translation';
import { t, supersetTheme, ThemeProvider } from '@superset-ui/core';
import throttle from 'lodash/throttle';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import TabbedSqlEditors from './TabbedSqlEditors';
import QueryAutoRefresh from './QueryAutoRefresh';
import QuerySearch from './QuerySearch';

View File

@ -20,7 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Table } from 'reactable-arc';
import { Alert } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import Button from 'src/components/Button';
import Loading from '../../components/Loading';

View File

@ -21,7 +21,7 @@ import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Dialog from 'react-bootstrap-dialog';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
import Button from 'src/components/Button';

View File

@ -23,7 +23,7 @@ import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Alert } from 'react-bootstrap';
import Dialog from 'react-bootstrap-dialog';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
import shortid from 'shortid';

View File

@ -23,7 +23,7 @@ import SyntaxHighlighter, {
} from 'react-syntax-highlighter/dist/light';
import sql from 'react-syntax-highlighter/dist/languages/hljs/sql';
import github from 'react-syntax-highlighter/dist/styles/hljs/github';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import ModalTrigger from '../../components/ModalTrigger';

View File

@ -19,8 +19,7 @@
import React from 'react';
import { FormGroup, FormControl, Overlay, Popover } from 'react-bootstrap';
import Button from 'src/components/Button';
import { t } from '@superset-ui/translation';
import styled from '@superset-ui/style';
import { t, styled } from '@superset-ui/core';
import Label from 'src/components/Label';
import ControlHeader from '../../explore/components/ControlHeader';

View File

@ -20,7 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { SupersetClient } from '@superset-ui/connection';
import { SupersetClient } from '@superset-ui/core';
import * as Actions from '../actions/sqlLab';

View File

@ -19,7 +19,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Alert } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import QueryTable from './QueryTable';

View File

@ -20,8 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import Button from 'src/components/Button';
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 Loading from '../../components/Loading';
import QueryTable from './QueryTable';

View File

@ -22,7 +22,7 @@ import moment from 'moment';
import { Table } from 'reactable-arc';
import { ProgressBar, Well } from 'react-bootstrap';
import Label from 'src/components/Label';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import Button from 'src/components/Button';
import Link from '../../components/Link';

View File

@ -20,7 +20,7 @@ import React, { CSSProperties } from 'react';
import { Alert, ButtonGroup, ProgressBar } from 'react-bootstrap';
import Button from 'src/components/Button';
import shortid from 'shortid';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace';
import Loading from '../../components/Loading';

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import Button, { ButtonProps } from 'src/components/Button';

View File

@ -19,7 +19,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormControl, FormGroup, Row, Col } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import Button from 'src/components/Button';
import FormLabel from 'src/components/FormLabel';

View File

@ -21,7 +21,7 @@ import PropTypes from 'prop-types';
import Form from 'react-jsonschema-form';
import chrono from 'chrono-node';
import { Col, FormControl, FormGroup, Row } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import Button from 'src/components/Button';
import ModalTrigger from 'src/components/ModalTrigger';

View File

@ -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 { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import Button from 'src/components/Button';

View File

@ -22,7 +22,7 @@ import shortid from 'shortid';
import { Alert, Tab, Tabs } from 'react-bootstrap';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import Label from 'src/components/Label';

View File

@ -28,7 +28,7 @@ import {
Tooltip,
} from 'react-bootstrap';
import Split from 'react-split';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import debounce from 'lodash/debounce';
import throttle from 'lodash/throttle';

View File

@ -19,7 +19,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import Button from 'src/components/Button';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import TableElement from './TableElement';
import TableSelector from '../../components/TableSelector';

View File

@ -22,7 +22,7 @@ import { MenuItem, DropdownButton, Tab, Tabs } from 'react-bootstrap';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import URI from 'urijs';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import * as Actions from '../actions/sqlLab';

View File

@ -20,7 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { ButtonGroup, Collapse, Fade, Well } from 'react-bootstrap';
import shortid from 'shortid';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import CopyToClipboard from '../../components/CopyToClipboard';
import Link from '../../components/Link';

View File

@ -26,7 +26,7 @@ import 'brace/mode/html';
import 'brace/mode/markdown';
import 'brace/theme/textmate';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
import Button from 'src/components/Button';

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import getToastsFromPyFlashMessages from '../../messageToasts/utils/getToastsFromPyFlashMessages';
export default function getInitialState({

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import getInitialState from './getInitialState';
import * as actions from '../actions/sqlLab';

View File

@ -20,7 +20,7 @@ import React from 'react';
import { Panel } from 'react-bootstrap';
import Button from 'src/components/Button';
import Select from 'src/components/Select';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import VizTypeControl from '../explore/components/controls/VizTypeControl';

View File

@ -18,7 +18,7 @@
*/
import React from 'react';
import { hot } from 'react-hot-loader/root';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import setupApp from '../setup/setupApp';
import setupPlugins from '../setup/setupPlugins';
import AddSliceContainer from './AddSliceContainer';

View File

@ -19,8 +19,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Alert } from 'react-bootstrap';
import styled from '@superset-ui/style';
import { logging } from '@superset-ui/core';
import { styled, logging } from '@superset-ui/core';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import { Logger, LOG_ACTIONS_RENDER_CHART } from '../logger/LogUtils';

View File

@ -19,8 +19,7 @@
import { snakeCase } from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import { SuperChart } from '@superset-ui/chart';
import { logging } from '@superset-ui/core';
import { SuperChart, logging } from '@superset-ui/core';
import { Logger, LOG_ACTIONS_RENDER_CHART } from '../logger/LogUtils';
const propTypes = {

View File

@ -19,8 +19,7 @@
/* eslint no-undef: 'error' */
/* eslint no-param-reassign: ["error", { "props": false }] */
import moment from 'moment';
import { t } from '@superset-ui/translation';
import { SupersetClient } from '@superset-ui/connection';
import { t, SupersetClient } from '@superset-ui/core';
import { isFeatureEnabled, FeatureFlag } from '../featureFlags';
import {
getAnnotationJsonUrl,

View File

@ -17,7 +17,7 @@
* under the License.
*/
/* eslint camelcase: 0 */
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import { now } from '../modules/dates';
import * as actions from './chartAction';

View File

@ -17,9 +17,8 @@
* under the License.
*/
import React from 'react';
import styled from '@superset-ui/style';
import { styled, t } from '@superset-ui/core';
import { Modal as BaseModal } from 'src/common/components';
import { t } from '@superset-ui/translation';
import Button from 'src/components/Button';
interface ModalProps {

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
import { Tabs as AntdTabs } from 'src/common/components';
const StyledTabs = styled(AntdTabs)`

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
import { Skeleton } from 'antd';
/*

View File

@ -21,7 +21,7 @@ import PropTypes from 'prop-types';
import { Table, Tr, Td, Thead, Th } from 'reactable-arc';
import { isEqual, isEmpty } from 'lodash';
import getControlsForVizType from 'src/utils/getControlsForVizType';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import TooltipWrapper from './TooltipWrapper';
import ModalTrigger from './ModalTrigger';
import { safeStringify } from '../utils/safeStringify';

View File

@ -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 URLShortLinkButton from './URLShortLinkButton';
import getDashboardUrl from '../dashboard/util/getDashboardUrl';

View File

@ -20,8 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
// TODO: refactor this with `import { AsyncSelect } from src/components/Select`
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 getClientErrorObject from '../utils/getClientErrorObject';
const propTypes = {

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { getCategoricalSchemeRegistry } from '@superset-ui/color';
import { getCategoricalSchemeRegistry } from '@superset-ui/core';
import Avatar, { ConfigProvider } from 'react-avatar';
import TooltipWrapper from 'src/components/TooltipWrapper';

View File

@ -26,7 +26,7 @@ import {
OverlayTrigger,
MenuItem,
} from 'react-bootstrap';
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
export type OnClickHandler = React.MouseEventHandler<BootstrapButton>;

View File

@ -19,7 +19,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import Label from 'src/components/Label';
import TooltipWrapper from './TooltipWrapper';

View File

@ -17,8 +17,7 @@
* under the License.
*/
import React from 'react';
import { t } from '@superset-ui/translation';
import { supersetTheme } from '@superset-ui/style';
import { t, supersetTheme } from '@superset-ui/core';
import Icon from 'src/components/Icon';
import TooltipWrapper from 'src/components/TooltipWrapper';

View File

@ -19,7 +19,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Tooltip, OverlayTrigger, MenuItem } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import withToasts from 'src/messageToasts/enhancers/withToasts';
const propTypes = {

View File

@ -16,9 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/translation';
import { t, styled } from '@superset-ui/core';
import React, { useState } from 'react';
import styled from '@superset-ui/style';
import { FormGroup, FormControl } from 'react-bootstrap';
import Modal from 'src/components/Modal';
import FormLabel from 'src/components/FormLabel';

View File

@ -18,7 +18,7 @@
*/
import React, { useEffect, useState, useRef } from 'react';
import cx from 'classnames';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import TooltipWrapper from './TooltipWrapper';
interface EditableTitleProps {

View File

@ -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 ErrorMessageWithStackTrace from './ErrorMessage/ErrorMessageWithStackTrace';
const propTypes = {

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t, tn } from '@superset-ui/translation';
import { t, tn } from '@superset-ui/core';
import { ErrorMessageComponentProps } from './types';
import IssueCode from './IssueCode';

View File

@ -18,8 +18,7 @@
*/
import React, { useState, ReactNode } from 'react';
import { Modal } from 'react-bootstrap';
import { styled, supersetTheme } from '@superset-ui/style';
import { t } from '@superset-ui/translation';
import { styled, supersetTheme, t } from '@superset-ui/core';
import { noOp } from 'src/utils/common';
import Button from 'src/components/Button';

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import getErrorMessageComponentRegistry from './getErrorMessageComponentRegistry';
import { SupersetError, ErrorSource } from './types';

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t, tn } from '@superset-ui/translation';
import { t, tn } from '@superset-ui/core';
import { ErrorMessageComponentProps } from './types';
import IssueCode from './IssueCode';

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import TooltipWrapper from './TooltipWrapper';
import Icon from './Icon';

View File

@ -30,8 +30,7 @@ import {
Table,
SortDirectionType,
} from 'react-virtualized';
import { getMultipleTextDimensions } from '@superset-ui/dimension';
import { t } from '@superset-ui/translation';
import { t, getMultipleTextDimensions } from '@superset-ui/core';
import Button from '../Button';
import CopyToClipboard from '../CopyToClipboard';

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
// import styled from '@superset-ui/style';
// import { styled } from '@superset-ui/core';
import React, { ReactNode } from 'react';
import { ControlLabel } from 'react-bootstrap';

View File

@ -18,7 +18,7 @@
*/
import React from 'react';
import { withKnobs, select } from '@storybook/addon-knobs';
import { styled, supersetTheme } from '@superset-ui/style';
import { styled, supersetTheme } from '@superset-ui/core';
import Icon, { iconsRegistry } from './';
export default {

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
import Icon from 'src/components/Icon';
interface IndeterminateCheckboxProps {

View File

@ -18,7 +18,7 @@
*/
import React from 'react';
import { Label as BootstrapLabel } from 'react-bootstrap';
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
import cx from 'classnames';
export type OnClickHandler = React.MouseEventHandler<BootstrapLabel>;

View File

@ -18,7 +18,7 @@
*/
import React from 'react';
import { TableInstance, Row } from 'react-table';
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
import cx from 'classnames';
interface CardCollectionProps {

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React, { useState } from 'react';
import { styled, withTheme, SupersetThemeProps } from '@superset-ui/style';
import { styled, withTheme, SupersetThemeProps } from '@superset-ui/core';
import { PartialThemeConfig, Select } from 'src/components/Select';
import { CardSortSelectOption, FetchDataConfig, SortColumn } from './types';
import { filterSelectStyles } from './utils';

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React, { useState, ReactNode } from 'react';
import { styled, withTheme, SupersetThemeProps } from '@superset-ui/style';
import { styled, withTheme, SupersetThemeProps } from '@superset-ui/core';
import {
Select,

View File

@ -16,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, styled } from '@superset-ui/core';
import React, { useState } from 'react';
import { t } from '@superset-ui/translation';
import { Alert } from 'react-bootstrap';
import { Empty } from 'src/common/components';
import styled from '@superset-ui/style';
import cx from 'classnames';
import Button from 'src/components/Button';
import Icon from 'src/components/Icon';

View File

@ -19,7 +19,7 @@
import React from 'react';
import cx from 'classnames';
import { TableInstance } from 'react-table';
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
import Icon from 'src/components/Icon';
interface TableCollectionProps {

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
import Icon from 'src/components/Icon';
import { Card, Skeleton, ThinSkeleton } from 'src/common/components';
import ImageLoader from './ImageLoader';

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
interface Props {
position?: string;

View File

@ -17,10 +17,9 @@
* under the License.
*/
import React from 'react';
import { t } from '@superset-ui/translation';
import { t, styled } from '@superset-ui/core';
import { Nav, Navbar, NavItem, MenuItem } from 'react-bootstrap';
import NavDropdown from 'src/components/NavDropdown';
import styled from '@superset-ui/style';
import MenuObject, {
MenuObjectProps,
MenuObjectChildProps,

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
import Button, { DropdownItemProps } from '../Button';
const dropdownItems: DropdownItemProps[] = [

View File

@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import styled from '@superset-ui/style';
import { styled } from '@superset-ui/core';
import { Nav, Navbar, MenuItem } from 'react-bootstrap';
import Button, { OnClickHandler } from 'src/components/Button';

View File

@ -19,7 +19,7 @@
import React from 'react';
import { MenuItem } from 'react-bootstrap';
import NavDropdown from 'src/components/NavDropdown';
import { t } from '@superset-ui/translation';
import { t } from '@superset-ui/core';
interface UserMenuProps {
userInfoUrl: string;

View File

@ -17,9 +17,8 @@
* under the License.
*/
import React from 'react';
import styled from '@superset-ui/style';
import { styled, t } from '@superset-ui/core';
import { Modal as BaseModal } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
import Button from 'src/components/Button';
interface ModalProps {

Some files were not shown because too many files have changed in this diff Show More