mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
chore: Moves the hooks folder to the src folder (#17896)
This commit is contained in:
committed by
GitHub
parent
3b5cee4d99
commit
53d8d383cc
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { useChartOwnerNames } from 'src/common/hooks/apiResources';
|
||||
import { useChartOwnerNames } from 'src/hooks/apiResources';
|
||||
import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace';
|
||||
import { SupersetError } from 'src/components/ErrorMessage/types';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { Tooltip } from 'src/components/Tooltip';
|
||||
import { useComponentDidMount } from 'src/common/hooks/useComponentDidMount';
|
||||
import { useComponentDidMount } from 'src/hooks/useComponentDidMount';
|
||||
import Icons from 'src/components/Icons';
|
||||
|
||||
interface FaveStarProps {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { useToasts } from 'src/components/MessageToasts/withToasts';
|
||||
import { useComponentDidMount } from 'src/common/hooks/useComponentDidMount';
|
||||
import { useComponentDidMount } from 'src/hooks/useComponentDidMount';
|
||||
|
||||
type FlashMessageType = 'info' | 'alert' | 'danger' | 'warning' | 'success';
|
||||
export type FlashMessage = [FlashMessageType, string];
|
||||
|
||||
@@ -21,7 +21,7 @@ import React, { useRef, useState } from 'react';
|
||||
import { styled, t } from '@superset-ui/core';
|
||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||
import Modal from 'src/components/Modal';
|
||||
import { useComponentDidMount } from 'src/common/hooks/useComponentDidMount';
|
||||
import { useComponentDidMount } from 'src/hooks/useComponentDidMount';
|
||||
import { logEvent } from 'src/logger/actions';
|
||||
import { Omnibar } from './Omnibar';
|
||||
import { LOG_ACTIONS_OMNIBAR_TRIGGERED } from '../../logger/LogUtils';
|
||||
|
||||
@@ -34,7 +34,7 @@ import { useDispatch, useSelector } from 'react-redux';
|
||||
import { getUrlParam } from 'src/utils/urlUtils';
|
||||
import { DashboardLayout, RootState } from 'src/dashboard/types';
|
||||
import { setDirectPathToChild } from 'src/dashboard/actions/dashboardState';
|
||||
import { useElementOnScreen } from 'src/common/hooks/useElementOnScreen';
|
||||
import { useElementOnScreen } from 'src/hooks/useElementOnScreen';
|
||||
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||
import {
|
||||
deleteTopLevelTabs,
|
||||
|
||||
@@ -21,7 +21,7 @@ import { useDispatch, useSelector } from 'react-redux';
|
||||
import { uniqWith } from 'lodash';
|
||||
import cx from 'classnames';
|
||||
import Icons from 'src/components/Icons';
|
||||
import { usePrevious } from 'src/common/hooks/usePrevious';
|
||||
import { usePrevious } from 'src/hooks/usePrevious';
|
||||
import { DataMaskStateWithId } from 'src/dataMask/types';
|
||||
import DetailsPanelPopover from './DetailsPanel';
|
||||
import { Pill } from './Styles';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { useUrlShortener } from 'src/common/hooks/useUrlShortener';
|
||||
import { useUrlShortener } from 'src/hooks/useUrlShortener';
|
||||
import copyTextToClipboard from 'src/utils/copy';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { Menu } from 'src/common/components';
|
||||
|
||||
@@ -25,7 +25,7 @@ import cx from 'classnames';
|
||||
import Icons from 'src/components/Icons';
|
||||
import { Tabs } from 'src/common/components';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { usePrevious } from 'src/common/hooks/usePrevious';
|
||||
import { usePrevious } from 'src/hooks/usePrevious';
|
||||
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
|
||||
import { updateDataMask, clearDataMask } from 'src/dataMask/actions';
|
||||
import { DataMaskStateWithId, DataMaskWithId } from 'src/dataMask/types';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import React, { useCallback, useState, useMemo, useEffect } from 'react';
|
||||
import { FormInstance } from 'antd/lib/form';
|
||||
import { Column, ensureIsArray, SupersetClient, t } from '@superset-ui/core';
|
||||
import { useChangeEffect } from 'src/common/hooks/useChangeEffect';
|
||||
import { useChangeEffect } from 'src/hooks/useChangeEffect';
|
||||
import { Select } from 'src/components';
|
||||
import { useToasts } from 'src/components/MessageToasts/withToasts';
|
||||
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
|
||||
|
||||
@@ -21,7 +21,7 @@ import React, { FC, useCallback, useState } from 'react';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { Radio } from 'src/components/Radio';
|
||||
import { Form, Typography } from 'src/common/components';
|
||||
import { useComponentDidUpdate } from 'src/common/hooks/useComponentDidUpdate/useComponentDidUpdate';
|
||||
import { useComponentDidUpdate } from 'src/hooks/useComponentDidUpdate/useComponentDidUpdate';
|
||||
import { Scope } from '../../../types';
|
||||
import { ScopingType } from './types';
|
||||
import ScopingTree from './ScopingTree';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useEffect } from 'react';
|
||||
import { usePrevious } from 'src/hooks/usePrevious';
|
||||
import { FilterRemoval } from './types';
|
||||
import { usePrevious } from '../../../../common/hooks/usePrevious';
|
||||
import { NativeFilterType } from '../types';
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
useDashboard,
|
||||
useDashboardCharts,
|
||||
useDashboardDatasets,
|
||||
} from 'src/common/hooks/apiResources';
|
||||
} from 'src/hooks/apiResources';
|
||||
import { hydrateDashboard } from 'src/dashboard/actions/hydrate';
|
||||
import { setDatasources } from 'src/dashboard/actions/datasources';
|
||||
import injectCustomCss from 'src/dashboard/util/injectCustomCss';
|
||||
|
||||
@@ -23,7 +23,7 @@ import Icons from 'src/components/Icons';
|
||||
import { Tooltip } from 'src/components/Tooltip';
|
||||
import copyTextToClipboard from 'src/utils/copy';
|
||||
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||
import { useUrlShortener } from 'src/common/hooks/useUrlShortener';
|
||||
import { useUrlShortener } from 'src/hooks/useUrlShortener';
|
||||
import EmbedCodeButton from './EmbedCodeButton';
|
||||
import { exportChart, getExploreLongUrl } from '../exploreUtils';
|
||||
import ExploreAdditionalActionsMenu from './ExploreAdditionalActionsMenu';
|
||||
|
||||
@@ -28,8 +28,8 @@ import { Resizable } from 're-resizable';
|
||||
import { usePluginContext } from 'src/components/DynamicPlugins';
|
||||
import { Global } from '@emotion/react';
|
||||
import { Tooltip } from 'src/components/Tooltip';
|
||||
import { usePrevious } from 'src/common/hooks/usePrevious';
|
||||
import { useComponentDidMount } from 'src/common/hooks/useComponentDidMount';
|
||||
import { usePrevious } from 'src/hooks/usePrevious';
|
||||
import { useComponentDidMount } from 'src/hooks/useComponentDidMount';
|
||||
import Icons from 'src/components/Icons';
|
||||
import {
|
||||
getItem,
|
||||
|
||||
@@ -20,7 +20,7 @@ import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { styled, css, t, useTheme } from '@superset-ui/core';
|
||||
import Icons from 'src/components/Icons';
|
||||
import ControlHeader from 'src/explore/components/ControlHeader';
|
||||
import { useComponentDidUpdate } from 'src/common/hooks/useComponentDidUpdate';
|
||||
import { useComponentDidUpdate } from 'src/hooks/useComponentDidUpdate';
|
||||
import { FormattingPopover } from './FormattingPopover';
|
||||
import {
|
||||
COMPARATOR,
|
||||
|
||||
@@ -31,7 +31,7 @@ import OptionWrapper from 'src/explore/components/controls/DndColumnSelectContro
|
||||
import { OptionSelector } from 'src/explore/components/controls/DndColumnSelectControl/utils';
|
||||
import { DatasourcePanelDndItem } from 'src/explore/components/DatasourcePanel/types';
|
||||
import { DndItemType } from 'src/explore/components/DndItemType';
|
||||
import { useComponentDidUpdate } from 'src/common/hooks/useComponentDidUpdate';
|
||||
import { useComponentDidUpdate } from 'src/hooks/useComponentDidUpdate';
|
||||
import ColumnSelectPopoverTrigger from './ColumnSelectPopoverTrigger';
|
||||
import { DndControlProps } from './types';
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
} from '@superset-ui/core';
|
||||
import { ColumnMeta } from '@superset-ui/chart-controls';
|
||||
import { isEqual } from 'lodash';
|
||||
import { usePrevious } from 'src/common/hooks/usePrevious';
|
||||
import { usePrevious } from 'src/hooks/usePrevious';
|
||||
import AdhocMetric from 'src/explore/components/controls/MetricControl/AdhocMetric';
|
||||
import AdhocMetricPopoverTrigger from 'src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger';
|
||||
import MetricDefinitionValue from 'src/explore/components/controls/MetricControl/MetricDefinitionValue';
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
HeaderContainer,
|
||||
LabelsContainer,
|
||||
} from 'src/explore/components/controls/OptionControls';
|
||||
import { usePrevious } from 'src/common/hooks/usePrevious';
|
||||
import { usePrevious } from 'src/hooks/usePrevious';
|
||||
import columnType from './columnType';
|
||||
import MetricDefinitionValue from './MetricDefinitionValue';
|
||||
import AdhocMetric from './AdhocMetric';
|
||||
|
||||
Reference in New Issue
Block a user