chore: Moves messageToasts to the components folder (#14431)

* chore: Moves messageToasts to the components folder

* Rebases
This commit is contained in:
Michael S. Molina
2021-09-22 07:44:54 -03:00
committed by GitHub
parent b6d78bf4f2
commit 9b17e86b44
83 changed files with 179 additions and 237 deletions

View File

@@ -23,15 +23,15 @@ import invert from 'lodash/invert';
import mapKeys from 'lodash/mapKeys';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import { now } from '../../modules/dates';
import { now } from 'src/modules/dates';
import {
addDangerToast as addDangerToastAction,
addInfoToast as addInfoToastAction,
addSuccessToast as addSuccessToastAction,
addWarningToast as addWarningToastAction,
} from '../../messageToasts/actions/index';
import { getClientErrorObject } from '../../utils/getClientErrorObject';
import COMMON_ERR_MESSAGES from '../../utils/errorMessages';
} from 'src/components/MessageToasts/actions';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import COMMON_ERR_MESSAGES from 'src/utils/errorMessages';
export const RESET_STATE = 'RESET_STATE';
export const ADD_QUERY_EDITOR = 'ADD_QUERY_EDITOR';

View File

@@ -23,16 +23,16 @@ import { connect } from 'react-redux';
import { t, supersetTheme, ThemeProvider } from '@superset-ui/core';
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
import throttle from 'lodash/throttle';
import TabbedSqlEditors from './TabbedSqlEditors';
import QueryAutoRefresh from './QueryAutoRefresh';
import QuerySearch from './QuerySearch';
import ToastPresenter from '../../messageToasts/containers/ToastPresenter';
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
import {
LOCALSTORAGE_MAX_USAGE_KB,
LOCALSTORAGE_WARNING_THRESHOLD,
LOCALSTORAGE_WARNING_MESSAGE_THROTTLE_MS,
} from '../constants';
import * as Actions from '../actions/sqlLab';
} from 'src/SqlLab/constants';
import * as Actions from 'src/SqlLab/actions/sqlLab';
import TabbedSqlEditors from './TabbedSqlEditors';
import QueryAutoRefresh from './QueryAutoRefresh';
import QuerySearch from './QuerySearch';
class App extends React.PureComponent {
constructor(props) {
@@ -109,7 +109,7 @@ class App extends React.PureComponent {
<ThemeProvider theme={supersetTheme}>
<div className="App SqlLab">
{content}
<ToastPresenter />
<ToastContainer />
</div>
</ThemeProvider>
);

View File

@@ -18,10 +18,9 @@
*/
import React from 'react';
import { t, useTheme, styled } from '@superset-ui/core';
import Button from 'src/components/Button';
import withToasts from 'src/messageToasts/enhancers/withToasts';
import Icons from 'src/components/Icons';
import withToasts from 'src/components/MessageToasts/withToasts';
import CopyToClipboard from 'src/components/CopyToClipboard';
import { storeQuery } from 'src/utils/common';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';

View File

@@ -17,7 +17,7 @@
* under the License.
*/
import { t } from '@superset-ui/core';
import getToastsFromPyFlashMessages from '../../messageToasts/utils/getToastsFromPyFlashMessages';
import getToastsFromPyFlashMessages from 'src/components/MessageToasts/getToastsFromPyFlashMessages';
export default function getInitialState({
defaultDbId,

View File

@@ -17,10 +17,9 @@
* under the License.
*/
import { combineReducers } from 'redux';
import messageToasts from 'src/components/MessageToasts/reducers';
import sqlLab from './sqlLab';
import localStorageUsageInKilobytes from './localStorageUsage';
import messageToasts from '../../messageToasts/reducers/index';
import common from './common';
export default combineReducers({