diff --git a/superset-frontend/spec/helpers/reducerIndex.ts b/superset-frontend/spec/helpers/reducerIndex.ts index 5073d9fd6894a..5599b38ddc2bd 100644 --- a/superset-frontend/spec/helpers/reducerIndex.ts +++ b/superset-frontend/spec/helpers/reducerIndex.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import charts from 'src/chart/chartReducer'; +import charts from 'src/components/Chart/chartReducer'; import dataMask from 'src/dataMask/reducer'; import dashboardInfo from 'src/dashboard/reducers/dashboardInfo'; import dashboardState from 'src/dashboard/reducers/dashboardState'; diff --git a/superset-frontend/src/chart/Chart.jsx b/superset-frontend/src/components/Chart/Chart.jsx similarity index 100% rename from superset-frontend/src/chart/Chart.jsx rename to superset-frontend/src/components/Chart/Chart.jsx diff --git a/superset-frontend/src/chart/ChartContainer.jsx b/superset-frontend/src/components/Chart/ChartContainer.jsx similarity index 91% rename from superset-frontend/src/chart/ChartContainer.jsx rename to superset-frontend/src/components/Chart/ChartContainer.jsx index 9925986ad2f48..50c036c28db3b 100644 --- a/superset-frontend/src/chart/ChartContainer.jsx +++ b/superset-frontend/src/components/Chart/ChartContainer.jsx @@ -20,9 +20,9 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as actions from './chartAction'; -import { logEvent } from '../logger/actions'; +import { logEvent } from '../../logger/actions'; import Chart from './Chart'; -import { updateDataMask } from '../dataMask/actions'; +import { updateDataMask } from '../../dataMask/actions'; function mapDispatchToProps(dispatch) { return { diff --git a/superset-frontend/src/chart/ChartErrorMessage.tsx b/superset-frontend/src/components/Chart/ChartErrorMessage.tsx similarity index 100% rename from superset-frontend/src/chart/ChartErrorMessage.tsx rename to superset-frontend/src/components/Chart/ChartErrorMessage.tsx diff --git a/superset-frontend/src/chart/ChartRenderer.jsx b/superset-frontend/src/components/Chart/ChartRenderer.jsx similarity index 100% rename from superset-frontend/src/chart/ChartRenderer.jsx rename to superset-frontend/src/components/Chart/ChartRenderer.jsx diff --git a/superset-frontend/src/chart/ChartRenderer.test.jsx b/superset-frontend/src/components/Chart/ChartRenderer.test.jsx similarity index 95% rename from superset-frontend/src/chart/ChartRenderer.test.jsx rename to superset-frontend/src/components/Chart/ChartRenderer.test.jsx index 609b54b6d1b7c..7e3a455631ff0 100644 --- a/superset-frontend/src/chart/ChartRenderer.test.jsx +++ b/superset-frontend/src/components/Chart/ChartRenderer.test.jsx @@ -20,7 +20,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import { SuperChart } from '@superset-ui/core'; -import ChartRenderer from 'src/chart/ChartRenderer'; +import ChartRenderer from 'src/components/Chart/ChartRenderer'; const requiredProps = { chartId: 1, diff --git a/superset-frontend/src/chart/chartAction.js b/superset-frontend/src/components/Chart/chartAction.js similarity index 100% rename from superset-frontend/src/chart/chartAction.js rename to superset-frontend/src/components/Chart/chartAction.js diff --git a/superset-frontend/src/chart/chartActions.test.js b/superset-frontend/src/components/Chart/chartActions.test.js similarity index 99% rename from superset-frontend/src/chart/chartActions.test.js rename to superset-frontend/src/components/Chart/chartActions.test.js index 7bca9f7172150..7c7af00a4b2e4 100644 --- a/superset-frontend/src/chart/chartActions.test.js +++ b/superset-frontend/src/components/Chart/chartActions.test.js @@ -23,7 +23,7 @@ import sinon from 'sinon'; 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'; +import * as actions from 'src/components/Chart/chartAction'; describe('chart actions', () => { const MOCK_URL = '/mockURL'; diff --git a/superset-frontend/src/chart/chartReducer.ts b/superset-frontend/src/components/Chart/chartReducer.ts similarity index 100% rename from superset-frontend/src/chart/chartReducer.ts rename to superset-frontend/src/components/Chart/chartReducer.ts diff --git a/superset-frontend/src/chart/chartReducers.test.js b/superset-frontend/src/components/Chart/chartReducers.test.js similarity index 93% rename from superset-frontend/src/chart/chartReducers.test.js rename to superset-frontend/src/components/Chart/chartReducers.test.js index f72ca40b85d9b..16c16502183ad 100644 --- a/superset-frontend/src/chart/chartReducers.test.js +++ b/superset-frontend/src/components/Chart/chartReducers.test.js @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import chartReducer, { chart } from 'src/chart/chartReducer'; -import * as actions from 'src/chart/chartAction'; +import chartReducer, { chart } from 'src/components/Chart/chartReducer'; +import * as actions from 'src/components/Chart/chartAction'; describe('chart reducers', () => { const chartKey = 1; diff --git a/superset-frontend/src/dashboard/actions/dashboardState.js b/superset-frontend/src/dashboard/actions/dashboardState.js index 1073e7f8142a2..afbbe74a0ab80 100644 --- a/superset-frontend/src/dashboard/actions/dashboardState.js +++ b/superset-frontend/src/dashboard/actions/dashboardState.js @@ -19,8 +19,12 @@ /* eslint camelcase: 0 */ import { ActionCreators as UndoActionCreators } from 'redux-undo'; import { ensureIsArray, t, SupersetClient } from '@superset-ui/core'; -import { addChart, removeChart, refreshChart } from 'src/chart/chartAction'; -import { chart as initChart } from 'src/chart/chartReducer'; +import { + addChart, + removeChart, + refreshChart, +} from 'src/components/Chart/chartAction'; +import { chart as initChart } from 'src/components/Chart/chartReducer'; import { applyDefaultFormData } from 'src/explore/store'; import { getClientErrorObject } from 'src/utils/getClientErrorObject'; import { SAVE_TYPE_OVERWRITE } from 'src/dashboard/util/constants'; diff --git a/superset-frontend/src/dashboard/actions/hydrate.js b/superset-frontend/src/dashboard/actions/hydrate.js index 060a9f6426895..8e6ce5d7b4152 100644 --- a/superset-frontend/src/dashboard/actions/hydrate.js +++ b/superset-frontend/src/dashboard/actions/hydrate.js @@ -24,7 +24,7 @@ import { getChartMetadataRegistry, } from '@superset-ui/core'; -import { chart } from 'src/chart/chartReducer'; +import { chart } from 'src/components/Chart/chartReducer'; import { initSliceEntities } from 'src/dashboard/reducers/sliceEntities'; import { getInitialState as getInitialNativeFilterState } from 'src/dashboard/reducers/nativeFilters'; import { applyDefaultFormData } from 'src/explore/store'; diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/FiltersBadge.test.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/FiltersBadge.test.tsx index 539aa67a69913..2a1f7bcfb03bc 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/FiltersBadge.test.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/FiltersBadge.test.tsx @@ -26,7 +26,7 @@ import { styledMount as mount } from 'spec/helpers/theming'; import { CHART_RENDERING_SUCCEEDED, CHART_UPDATE_SUCCEEDED, -} from 'src/chart/chartAction'; +} from 'src/components/Chart/chartAction'; import { buildActiveFilters } from 'src/dashboard/util/activeDashboardFilters'; import { FiltersBadge } from 'src/dashboard/components/FiltersBadge'; import { diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx index 0137349ed9d83..7e7c8c5222980 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx @@ -23,7 +23,7 @@ import { styled, t, logging } from '@superset-ui/core'; import { isEqual } from 'lodash'; import { exportChart, mountExploreUrl } from 'src/explore/exploreUtils'; -import ChartContainer from 'src/chart/ChartContainer'; +import ChartContainer from 'src/components/Chart/ChartContainer'; import { LOG_ACTIONS_CHANGE_DASHBOARD_FILTER, LOG_ACTIONS_EXPLORE_DASHBOARD_CHART, diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.test.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.test.jsx index b2acc42766e1c..153838271ad2e 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart.test.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.test.jsx @@ -22,7 +22,7 @@ import sinon from 'sinon'; import Chart from 'src/dashboard/components/gridComponents/Chart'; import SliceHeader from 'src/dashboard/components/SliceHeader'; -import ChartContainer from 'src/chart/ChartContainer'; +import ChartContainer from 'src/components/Chart/ChartContainer'; import * as exploreUtils from 'src/explore/exploreUtils'; import { sliceEntitiesForChart as sliceEntities } from 'spec/fixtures/mockSliceEntities'; import mockDatasource from 'spec/fixtures/mockDatasource'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx index caf00521a8e1d..0a12d1cd956ff 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx @@ -36,7 +36,7 @@ import { } from '@superset-ui/core'; import { useDispatch, useSelector } from 'react-redux'; import { isEqual, isEqualWith } from 'lodash'; -import { getChartDataRequest } from 'src/chart/chartAction'; +import { getChartDataRequest } from 'src/components/Chart/chartAction'; import Loading from 'src/components/Loading'; import BasicErrorAlert from 'src/components/ErrorMessage/BasicErrorAlert'; import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx index 9258594c55c6f..50fb6e8ffe761 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx @@ -48,7 +48,7 @@ import React, { } from 'react'; import { PluginFilterSelectCustomizeProps } from 'src/filters/components/Select/types'; import { useSelector } from 'react-redux'; -import { getChartDataRequest } from 'src/chart/chartAction'; +import { getChartDataRequest } from 'src/components/Chart/chartAction'; import { Input, TextArea } from 'src/components/Input'; import { Select, FormInstance } from 'src/components'; import Collapse from 'src/components/Collapse'; diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index 8c46d56b252aa..06d3f56e34fae 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -29,7 +29,7 @@ import { addSuccessToast, addDangerToast, } from 'src/components/MessageToasts/actions'; -import { refreshChart } from 'src/chart/chartAction'; +import { refreshChart } from 'src/components/Chart/chartAction'; import { logEvent } from 'src/logger/actions'; import { getActiveFilters, diff --git a/superset-frontend/src/dashboard/containers/Dashboard.ts b/superset-frontend/src/dashboard/containers/Dashboard.ts index f2e6f25dca389..647d774f48357 100644 --- a/superset-frontend/src/dashboard/containers/Dashboard.ts +++ b/superset-frontend/src/dashboard/containers/Dashboard.ts @@ -26,7 +26,7 @@ import { } from 'src/dashboard/actions/dashboardState'; import { setDatasources } from 'src/dashboard/actions/datasources'; -import { triggerQuery } from 'src/chart/chartAction'; +import { triggerQuery } from 'src/components/Chart/chartAction'; import { logEvent } from 'src/logger/actions'; import { getActiveFilters } from 'src/dashboard/util/activeDashboardFilters'; import { diff --git a/superset-frontend/src/dashboard/types.ts b/superset-frontend/src/dashboard/types.ts index 24b7a5b0bd8ea..426fa03d0fe77 100644 --- a/superset-frontend/src/dashboard/types.ts +++ b/superset-frontend/src/dashboard/types.ts @@ -25,7 +25,7 @@ import { NativeFiltersState, } from '@superset-ui/core'; import { DatasourceMeta } from '@superset-ui/chart-controls'; -import { chart } from 'src/chart/chartReducer'; +import { chart } from 'src/components/Chart/chartReducer'; import componentTypes from 'src/dashboard/util/componentTypes'; import { User } from 'src/types/bootstrapTypes'; diff --git a/superset-frontend/src/explore/components/DataTablesPane/index.tsx b/superset-frontend/src/explore/components/DataTablesPane/index.tsx index 99bd404a7e88a..5d935caa63ddd 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/index.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/index.tsx @@ -29,7 +29,7 @@ import Tabs from 'src/components/Tabs'; import Loading from 'src/components/Loading'; import { EmptyStateMedium } from 'src/components/EmptyState'; import TableView, { EmptyWrapperType } from 'src/components/TableView'; -import { getChartDataRequest } from 'src/chart/chartAction'; +import { getChartDataRequest } from 'src/components/Chart/chartAction'; import { getClientErrorObject } from 'src/utils/getClientErrorObject'; import { getItem, diff --git a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx index 54856ff78e42e..1fbb162cfc0f2 100644 --- a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx +++ b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx @@ -20,7 +20,7 @@ import React from 'react'; import { render, screen, waitFor } from 'spec/helpers/testing-library'; import userEvent from '@testing-library/user-event'; -import * as chartAction from 'src/chart/chartAction'; +import * as chartAction from 'src/components/Chart/chartAction'; import * as downloadAsImage from 'src/utils/downloadAsImage'; import fetchMock from 'fetch-mock'; import ExploreAdditionalActionsMenu from '.'; diff --git a/superset-frontend/src/explore/components/ExploreChartPanel.jsx b/superset-frontend/src/explore/components/ExploreChartPanel.jsx index 9df7fdde36309..2067d853c7fdf 100644 --- a/superset-frontend/src/explore/components/ExploreChartPanel.jsx +++ b/superset-frontend/src/explore/components/ExploreChartPanel.jsx @@ -22,7 +22,7 @@ import Split from 'react-split'; import { styled, SupersetClient, useTheme } from '@superset-ui/core'; import { useResizeDetector } from 'react-resize-detector'; import { chartPropShape } from 'src/dashboard/util/propShapes'; -import ChartContainer from 'src/chart/ChartContainer'; +import ChartContainer from 'src/components/Chart/ChartContainer'; import { getItem, setItem, diff --git a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx index 130fa2b2a09ff..b33f0caa1ef02 100644 --- a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx +++ b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx @@ -39,7 +39,7 @@ import { import { URL_PARAMS } from 'src/constants'; import { getUrlParam } from 'src/utils/urlUtils'; import cx from 'classnames'; -import * as chartActions from 'src/chart/chartAction'; +import * as chartActions from 'src/components/Chart/chartAction'; import { fetchDatasourceMetadata } from 'src/dashboard/actions/datasources'; import { chartPropShape } from 'src/dashboard/util/propShapes'; import { mergeExtraFormData } from 'src/dashboard/components/nativeFilters/utils'; diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.jsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.jsx index 4078c5d257343..aa3255374fe24 100644 --- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.jsx +++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.jsx @@ -25,7 +25,7 @@ import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls'; import Popover from 'src/components/Popover'; import AsyncEsmComponent from 'src/components/AsyncEsmComponent'; import { getChartKey } from 'src/explore/exploreUtils'; -import { runAnnotationQuery } from 'src/chart/chartAction'; +import { runAnnotationQuery } from 'src/components/Chart/chartAction'; import CustomListItem from 'src/explore/components/controls/CustomListItem'; const AnnotationLayer = AsyncEsmComponent( diff --git a/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx b/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx index 38b89c289a370..238982c3d85f5 100644 --- a/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx +++ b/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx @@ -24,7 +24,7 @@ import CopyToClipboard from 'src/components/CopyToClipboard'; import Loading from 'src/components/Loading'; import { CopyButton } from 'src/explore/components/DataTableControl'; import { getClientErrorObject } from 'src/utils/getClientErrorObject'; -import { getChartDataRequest } from 'src/chart/chartAction'; +import { getChartDataRequest } from 'src/components/Chart/chartAction'; import markdownSyntax from 'react-syntax-highlighter/dist/cjs/languages/hljs/markdown'; import htmlSyntax from 'react-syntax-highlighter/dist/cjs/languages/hljs/htmlbars'; import sqlSyntax from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql'; diff --git a/superset-frontend/src/explore/reducers/exploreReducer.js b/superset-frontend/src/explore/reducers/exploreReducer.js index e2ec3a74dcdc0..96fa18be53bb5 100644 --- a/superset-frontend/src/explore/reducers/exploreReducer.js +++ b/superset-frontend/src/explore/reducers/exploreReducer.js @@ -18,7 +18,7 @@ */ /* eslint camelcase: 0 */ import { ensureIsArray } from '@superset-ui/core'; -import { DYNAMIC_PLUGIN_CONTROLS_READY } from 'src/chart/chartAction'; +import { DYNAMIC_PLUGIN_CONTROLS_READY } from 'src/components/Chart/chartAction'; import { DEFAULT_TIME_RANGE } from 'src/explore/constants'; import { getControlsState } from 'src/explore/store'; import { diff --git a/superset-frontend/src/explore/reducers/index.js b/superset-frontend/src/explore/reducers/index.js index 555922dd0a47d..a504fbf6e644c 100644 --- a/superset-frontend/src/explore/reducers/index.js +++ b/superset-frontend/src/explore/reducers/index.js @@ -19,7 +19,7 @@ import { combineReducers } from 'redux'; import reports from 'src/reports/reducers/reports'; -import charts from 'src/chart/chartReducer'; +import charts from 'src/components/Chart/chartReducer'; import dataMask from 'src/dataMask/reducer'; import messageToasts from 'src/components/MessageToasts/reducers'; import saveModal from './saveModalReducer'; diff --git a/superset-frontend/src/views/store.ts b/superset-frontend/src/views/store.ts index e9be565131082..04dacba80eda8 100644 --- a/superset-frontend/src/views/store.ts +++ b/superset-frontend/src/views/store.ts @@ -20,7 +20,7 @@ import { applyMiddleware, combineReducers, compose, createStore } from 'redux'; import thunk from 'redux-thunk'; import messageToastReducer from 'src/components/MessageToasts/reducers'; import { initEnhancer } from 'src/reduxUtils'; -import charts from 'src/chart/chartReducer'; +import charts from 'src/components/Chart/chartReducer'; import dataMask from 'src/dataMask/reducer'; import reports from 'src/reports/reducers/reports'; import dashboardInfo from 'src/dashboard/reducers/dashboardInfo';