mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +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:
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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: [
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user