chore: Organizes the files of the ReportModal feature (#25046)
This commit is contained in:
parent
a9efd4b2e3
commit
0dadf06245
|
|
@ -30,7 +30,7 @@ import saveModal from 'src/explore/reducers/saveModalReducer';
|
|||
import explore from 'src/explore/reducers/exploreReducer';
|
||||
import sqlLab from 'src/SqlLab/reducers/sqlLab';
|
||||
import localStorageUsageInKilobytes from 'src/SqlLab/reducers/localStorageUsage';
|
||||
import reports from 'src/reports/reducers/reports';
|
||||
import reports from 'src/features/reports/ReportModal/reducer';
|
||||
import getBootstrapData from 'src/utils/getBootstrapData';
|
||||
|
||||
const impressionId = (state = '') => state;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ const createProps = () => ({
|
|||
fetchFaveStar: jest.fn(),
|
||||
fetchCharts: jest.fn(),
|
||||
onRefresh: jest.fn(),
|
||||
fetchUISpecificReport: jest.fn(),
|
||||
saveFaveStar: jest.fn(),
|
||||
savePublished: jest.fn(),
|
||||
isPublished: false,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import ShareMenuItems from 'src/dashboard/components/menu/ShareMenuItems';
|
|||
import CssEditor from 'src/dashboard/components/CssEditor';
|
||||
import RefreshIntervalModal from 'src/dashboard/components/RefreshIntervalModal';
|
||||
import SaveModal from 'src/dashboard/components/SaveModal';
|
||||
import HeaderReportDropdown from 'src/components/ReportModal/HeaderReportDropdown';
|
||||
import HeaderReportDropdown from 'src/features/reports/ReportModal/HeaderReportDropdown';
|
||||
import injectCustomCss from 'src/dashboard/util/injectCustomCss';
|
||||
import { SAVE_TYPE_NEWDASHBOARD } from 'src/dashboard/util/constants';
|
||||
import FilterScopeModal from 'src/dashboard/components/filterscope/FilterScopeModal';
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ import {
|
|||
|
||||
import { logEvent } from 'src/logger/actions';
|
||||
import { DASHBOARD_HEADER_ID } from 'src/dashboard/util/constants';
|
||||
import { fetchUISpecificReport } from 'src/reports/actions/reports';
|
||||
|
||||
function mapStateToProps({
|
||||
dashboardLayout: undoableLayout,
|
||||
|
|
@ -130,7 +129,6 @@ function mapDispatchToProps(dispatch) {
|
|||
dashboardInfoChanged,
|
||||
dashboardTitleChanged,
|
||||
updateDataMask,
|
||||
fetchUISpecificReport,
|
||||
},
|
||||
dispatch,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import { exportChart, getChartKey } from 'src/explore/exploreUtils';
|
|||
import downloadAsImage from 'src/utils/downloadAsImage';
|
||||
import { getChartPermalink } from 'src/utils/urlUtils';
|
||||
import copyTextToClipboard from 'src/utils/copy';
|
||||
import HeaderReportDropDown from 'src/components/ReportModal/HeaderReportDropdown';
|
||||
import HeaderReportDropDown from 'src/features/reports/ReportModal/HeaderReportDropdown';
|
||||
import ViewQueryModal from '../controls/ViewQueryModal';
|
||||
import EmbedCodeContent from '../EmbedCodeContent';
|
||||
import DashboardsSubMenu from './DashboardsSubMenu';
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ import Owner from 'src/types/Owner';
|
|||
import { AntdCheckbox, AsyncSelect, Select } from 'src/components';
|
||||
import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
|
||||
import { useCommonConf } from 'src/features/databases/state';
|
||||
import { CustomWidthHeaderStyle } from 'src/components/ReportModal/styles';
|
||||
import { CustomWidthHeaderStyle } from 'src/features/reports/ReportModal/styles';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
import {
|
||||
NotificationMethodOption,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import Owner from 'src/types/Owner';
|
||||
import { NOTIFICATION_FORMATS } from 'src/reports/types';
|
||||
import { NOTIFICATION_FORMATS } from 'src/features/reports/types';
|
||||
|
||||
type user = {
|
||||
id: number;
|
||||
|
|
|
|||
|
|
@ -38,14 +38,14 @@ import Checkbox from 'src/components/Checkbox';
|
|||
import { noOp } from 'src/utils/common';
|
||||
import { NoAnimationDropdown } from 'src/components/Dropdown';
|
||||
import DeleteModal from 'src/components/DeleteModal';
|
||||
import ReportModal from 'src/components/ReportModal';
|
||||
import ReportModal from 'src/features/reports/ReportModal';
|
||||
import { ChartState } from 'src/explore/types';
|
||||
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
|
||||
import {
|
||||
fetchUISpecificReport,
|
||||
toggleActive,
|
||||
deleteActiveReport,
|
||||
} from 'src/reports/actions/reports';
|
||||
} from 'src/features/reports/ReportModal/actions';
|
||||
import { reportSelector } from 'src/views/CRUD/hooks';
|
||||
import { MenuItemWithCheckboxContainer } from 'src/explore/components/useExploreAdditionalActionsMenu/index';
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ import sinon from 'sinon';
|
|||
import fetchMock from 'fetch-mock';
|
||||
import { render, screen, waitFor } from 'spec/helpers/testing-library';
|
||||
import * as uiCore from '@superset-ui/core';
|
||||
import * as actions from 'src/reports/actions/reports';
|
||||
import * as actions from 'src/features/reports/ReportModal/actions';
|
||||
import { FeatureFlag } from '@superset-ui/core';
|
||||
import ReportModal from '.';
|
||||
|
||||
|
|
@ -26,7 +26,10 @@ import React, {
|
|||
import { t, SupersetTheme } from '@superset-ui/core';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||
import { addReport, editReport } from 'src/reports/actions/reports';
|
||||
import {
|
||||
addReport,
|
||||
editReport,
|
||||
} from 'src/features/reports/ReportModal/actions';
|
||||
import Alert from 'src/components/Alert';
|
||||
import TimezoneSelector from 'src/components/TimezoneSelector';
|
||||
import LabeledErrorBoundInput from 'src/components/Form/LabeledErrorBoundInput';
|
||||
|
|
@ -40,7 +43,7 @@ import {
|
|||
ReportCreationMethod,
|
||||
ReportObject,
|
||||
NOTIFICATION_FORMATS,
|
||||
} from 'src/reports/types';
|
||||
} from 'src/features/reports/types';
|
||||
import { reportSelector } from 'src/views/CRUD/hooks';
|
||||
import {
|
||||
TRANSLATIONS,
|
||||
|
|
@ -19,12 +19,7 @@
|
|||
/* eslint-disable camelcase */
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { omit } from 'lodash';
|
||||
import {
|
||||
SET_REPORT,
|
||||
ADD_REPORT,
|
||||
EDIT_REPORT,
|
||||
DELETE_REPORT,
|
||||
} from '../actions/reports';
|
||||
import { SET_REPORT, ADD_REPORT, EDIT_REPORT, DELETE_REPORT } from './actions';
|
||||
|
||||
export default function reportsReducer(state = {}, action) {
|
||||
const actionHandlers = {
|
||||
|
|
@ -31,7 +31,7 @@ import Select from 'src/components/Select/Select';
|
|||
import AsyncSelect from 'src/components/Select/AsyncSelect';
|
||||
import rison from 'rison';
|
||||
import { LabeledErrorBoundInput } from 'src/components/Form';
|
||||
import { noBottomMargin } from 'src/components/ReportModal/styles';
|
||||
import { noBottomMargin } from 'src/features/reports/ReportModal/styles';
|
||||
import InfoTooltip from 'src/components/InfoTooltip';
|
||||
import { useSingleViewResource } from 'src/views/CRUD/hooks';
|
||||
import { FilterOptions } from './constants';
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import { api } from 'src/hooks/apiResources/queryApi';
|
|||
import messageToastReducer from 'src/components/MessageToasts/reducers';
|
||||
import charts from 'src/components/Chart/chartReducer';
|
||||
import dataMask from 'src/dataMask/reducer';
|
||||
import reports from 'src/reports/reducers/reports';
|
||||
import reports from 'src/features/reports/ReportModal/reducer';
|
||||
import dashboardInfo from 'src/dashboard/reducers/dashboardInfo';
|
||||
import dashboardState from 'src/dashboard/reducers/dashboardState';
|
||||
import dashboardFilters from 'src/dashboard/reducers/dashboardFilters';
|
||||
|
|
|
|||
Loading…
Reference in New Issue