refactor(core): reorganize superset-core packages into feature-based structure (#38448)

This commit is contained in:
Michael S. Molina
2026-03-05 17:41:15 -03:00
committed by GitHub
parent 5f0efd2be9
commit 357e35dc62
1182 changed files with 2468 additions and 2054 deletions
@@ -17,13 +17,13 @@
* under the License.
*/
import { useEffect, useMemo, useState } from 'react';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ensureIsArray,
fetchTimeRange,
getTimeOffset,
} from '@superset-ui/core';
import { css, styled, useTheme } from '@apache-superset/core/ui';
import { css, styled, useTheme } from '@apache-superset/core/theme';
import { Tooltip } from '@superset-ui/core/components';
import {
DEFAULT_DATE_PATTERN,
@@ -16,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { t } from '@apache-superset/core/translation';
import { GenericDataType } from '@apache-superset/core/common';
import {
ControlPanelConfig,
getStandardizedControls,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ChartMetadata, ChartPlugin } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { SMART_DATE_ID } from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import {
ControlPanelConfig,
D3_FORMAT_DOCS,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import controlPanel from './controlPanel';
import transformProps from './transformProps';
@@ -17,7 +17,7 @@
* under the License.
*/
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { getColorFormatters } from '@superset-ui/chart-controls';
import { BigNumberTotalChartProps } from '../types';
import transformProps from './transformProps';
@@ -27,7 +27,7 @@ import {
QueryFormData,
getValueFormatter,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { BigNumberTotalChartProps, BigNumberVizProps } from '../types';
import { getDateFormatter, getOriginalLabel, parseMetricValue } from '../utils';
import { Refs } from '../../types';
@@ -17,7 +17,7 @@
* under the License.
*/
import { useState, useEffect, useRef, MouseEvent } from 'react';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
getNumberFormatter,
getTimeFormatter,
@@ -27,7 +27,7 @@ import {
BinaryQueryObjectFilterClause,
DTTM_ALIAS,
} from '@superset-ui/core';
import { styled, useTheme } from '@apache-superset/core/ui';
import { styled, useTheme } from '@apache-superset/core/theme';
import Echart from '../components/Echart';
import { BigNumberVizProps } from './types';
import { EventHandlers } from '../types';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { SMART_DATE_ID } from '@superset-ui/core';
import {
aggregationControl,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import controlPanel from './controlPanel';
import transformProps from './transformProps';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import transformProps from './transformProps';
import { BigNumberWithTrendlineChartProps, BigNumberDatum } from '../types';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
extractTimegrain,
getNumberFormatter,
@@ -27,7 +27,7 @@ import {
getValueFormatter,
tooltipHtml,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { EChartsCoreOption, graphic } from 'echarts/core';
import { aggregationChoices } from '@superset-ui/chart-controls';
import { TIMESERIES_CONSTANTS } from '../../constants';
@@ -18,7 +18,7 @@
*/
// These are control configurations that are shared ONLY within the BigNumberWithTrendline viz plugin repo.
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { CustomControlItem } from '@superset-ui/chart-controls';
const FONT_SIZE_OPTIONS_SMALL = [
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ensureIsArray,
isAdhocColumn,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
formatSelectOptions,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import thumbnailDark from './images/thumbnail-dark.png';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlSubSectionHeader,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -18,7 +18,7 @@
*/
import { useEffect, useRef, useState } from 'react';
import { sharedControlComponents } from '@superset-ui/chart-controls';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import Echart from '../components/Echart';
import { EchartsGanttChartTransformedProps } from './types';
import { EventHandlers } from '../types';
@@ -22,8 +22,8 @@ import {
sections,
sharedControls,
} from '@superset-ui/chart-controls';
import { t } from '@apache-superset/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { t } from '@apache-superset/core/translation';
import { GenericDataType } from '@apache-superset/core/common';
import {
legendSection,
showExtraControls,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import transformProps from './transformProps';
import controlPanel from './controlPanel';
@@ -24,7 +24,7 @@ import {
EChartsCoreOption,
LineSeriesOption,
} from 'echarts';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
AxisType,
CategoricalColorNamespace,
@@ -35,7 +35,7 @@ import {
tooltipHtml,
} from '@superset-ui/core';
import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { CallbackDataParams } from 'echarts/types/src/util/types';
import {
Cartesian2dCoordSys,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { SupersetTheme } from '@apache-superset/core/ui';
import { SupersetTheme } from '@apache-superset/core/theme';
import type { GaugeSeriesOption } from 'echarts/charts';
export const defaultGaugeSeriesOption = (
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
sharedControls,
ControlPanelConfig,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import controlPanel from './controlPanel';
import transformProps from './transformProps';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlSubSectionHeader,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import controlPanel from './controlPanel';
import transformProps from './transformProps';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { validateNonEmpty } from '@superset-ui/core';
import {
ControlPanelConfig,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ChartMetadata, ChartPlugin } from '@superset-ui/core';
import transformProps from './transformProps';
import buildQuery from './buildQuery';
@@ -29,8 +29,8 @@ import {
tooltipHtml,
DataRecordValue,
} from '@superset-ui/core';
import { logging } from '@apache-superset/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { logging } from '@apache-superset/core/utils';
import { GenericDataType } from '@apache-superset/core/common';
import memoizeOne from 'memoize-one';
import { maxBy, minBy } from 'lodash';
import type { ComposeOption } from 'echarts/core';
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
validateInteger,
validateNonEmpty,
withLabel,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import {
ControlPanelConfig,
formatSelectOptionsForRange,
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ChartMetadata, ChartPlugin } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ensureIsArray } from '@superset-ui/core';
import { cloneDeep } from 'lodash';
import {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { AnnotationType, Behavior } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -42,7 +42,7 @@ import {
tooltipHtml,
ValueFormatter,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { getOriginalSeries } from '@superset-ui/chart-controls';
import type { EChartsCoreOption } from 'echarts/core';
import type { SeriesOption } from 'echarts';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ensureIsInt, validateNonEmpty } from '@superset-ui/core';
import {
ControlPanelConfig,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
CategoricalColorNamespace,
getColumnLabel,
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ChartDataResponseResult,
QueryFormMetric,
validateNumber,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import {
ControlPanelConfig,
ControlSubSectionHeader,
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { validateNonEmpty } from '@superset-ui/core';
import {
ControlPanelConfig,
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ChartMetadata, ChartPlugin } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
CategoricalColorNamespace,
DataRecordValue,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { AnnotationType, Behavior } from '@superset-ui/core';
import buildQuery from '../buildQuery';
import controlPanel from './controlPanel';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ensureIsArray, JsonArray } from '@superset-ui/core';
import {
ControlPanelConfig,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { AnnotationType, Behavior } from '@superset-ui/core';
import {
EchartsTimeseriesChartProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { AnnotationType, Behavior } from '@superset-ui/core';
import {
EchartsTimeseriesChartProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { AnnotationType, Behavior } from '@superset-ui/core';
import {
EchartsTimeseriesChartProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { AnnotationType, Behavior } from '@superset-ui/core';
import {
EchartsTimeseriesChartProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { AnnotationType, Behavior } from '@superset-ui/core';
import { EchartsTimeseriesChartProps, EchartsTimeseriesFormData } from '../..';
import buildQuery from '../buildQuery';
@@ -20,7 +20,7 @@ import {
DEFAULT_SORT_SERIES_DATA,
sections,
} from '@superset-ui/chart-controls';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { LegendOrientation, LegendType } from '../types';
import {
OrientationType,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { AnnotationType, Behavior } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './Regular/Line/controlPanel';
@@ -18,7 +18,7 @@
*/
/* eslint-disable camelcase */
import { invert } from 'lodash';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
AnnotationLayer,
AxisType,
@@ -42,7 +42,7 @@ import {
TimeseriesDataRecord,
NumberFormats,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import {
extractExtraMetrics,
getOriginalSeries,
@@ -30,7 +30,7 @@ import {
TimeseriesDataRecord,
ValueFormatter,
} from '@superset-ui/core';
import { SupersetTheme, isThemeDark } from '@apache-superset/core/ui';
import { SupersetTheme, isThemeDark } from '@apache-superset/core/theme';
import { getContrastingColor } from '@superset-ui/core';
import type {
CallbackDataParams,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlSubSectionHeader,
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import controlPanel from './controlPanel';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlSubSectionHeader,
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { Behavior } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -17,7 +17,7 @@
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
export const TOTAL_MARK = t('Total');
export const ASSIST_MARK = t('Assist');
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ControlPanelConfig,
ControlSubSectionHeader,
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ChartMetadata, ChartPlugin } from '@superset-ui/core';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
@@ -28,7 +28,7 @@ import {
rgbToHex,
tooltipHtml,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import type { ComposeOption } from 'echarts/core';
import type { BarSeriesOption } from 'echarts/charts';
import {
@@ -29,7 +29,7 @@ import {
} from 'react';
import { useSelector } from 'react-redux';
import { styled, useTheme } from '@apache-superset/core/ui';
import { styled, useTheme } from '@apache-superset/core/theme';
import { use, init, EChartsType, registerLocale } from 'echarts/core';
import {
SankeyChart,
@@ -18,7 +18,7 @@
*/
import { useState, useEffect, useMemo, useCallback } from 'react';
import { HandlerFunction, JsonValue } from '@superset-ui/core';
import { styled } from '@apache-superset/core/ui';
import { styled } from '@apache-superset/core/theme';
import { sharedControlComponents } from '@superset-ui/chart-controls';
import { AreaChartStackControlOptions } from '../constants';
@@ -17,7 +17,7 @@
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { JsonValue, TimeGranularity } from '@superset-ui/core';
import { ReactNode } from 'react';
import {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { VizType } from '@superset-ui/core';
import {
ControlPanelsContainerProps,
@@ -31,8 +31,8 @@ import {
TimeFormatter,
ValueFormatter,
} from '@superset-ui/core';
import { SupersetTheme } from '@apache-superset/core/ui';
import { GenericDataType } from '@apache-superset/core/api/core';
import { SupersetTheme } from '@apache-superset/core/theme';
import { GenericDataType } from '@apache-superset/core/common';
import { SortSeriesType, LegendPaddingType } from '@superset-ui/chart-controls';
import { format } from 'echarts/core';
import type { LegendComponentOption } from 'echarts/components';
@@ -17,7 +17,7 @@
* under the License.
*/
import { DatasourceType, TimeGranularity, VizType } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import transformProps from '../../src/BigNumber/BigNumberWithTrendline/transformProps';
import {
BigNumberDatum,
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps, SqlaFormData } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import { EchartsBoxPlotChartProps } from '../../src/BoxPlot/types';
import transformProps from '../../src/BoxPlot/transformProps';
@@ -22,7 +22,7 @@ import {
getNumberFormatter,
SqlaFormData,
} from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import { EchartsBubbleChartProps } from '../../src/Bubble/types';
import transformProps, { formatTooltip } from '../../src/Bubble/transformProps';
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps, getNumberFormatter } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import transformProps, { parseParams } from '../../src/Funnel/transformProps';
import {
EchartsFunnelChartProps,
@@ -17,7 +17,7 @@
* under the License.
*/
import { AxisType, ChartProps } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import {
LegendOrientation,
LegendType,
@@ -22,7 +22,7 @@ import {
SqlaFormData,
VizType,
} from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import transformProps, {
getIntervalBoundsAndColors,
} from '../../src/Gauge/transformProps';
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps, SqlaFormData } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import transformProps from '../../src/Graph/transformProps';
import { DEFAULT_GRAPH_SERIES_OPTION } from '../../src/Graph/constants';
import { EchartsGraphChartProps } from '../../src/Graph/types';
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import { HeatmapChartProps, HeatmapFormData } from '../../src/Heatmap/types';
import transformProps from '../../src/Heatmap/transformProps';
@@ -21,7 +21,7 @@ import {
getNumberFormatter,
SqlaFormData,
} from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import type { PieSeriesOption } from 'echarts/charts';
import type {
LabelFormatterCallback,
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import { RadarSeriesOption } from 'echarts/charts';
import transformProps from '../../src/Radar/transformProps';
import {
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps, SqlaFormData } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import { EchartsTimeseriesChartProps } from '../../../src/types';
import transformProps from '../../../src/Timeseries/transformProps';
import { DEFAULT_FORM_DATA } from '../../../src/Timeseries/constants';
@@ -25,12 +25,12 @@ import {
EchartsTimeseriesFormData,
EchartsTimeseriesChartProps,
} from '../../../src/Timeseries/types';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import {
D3_FORMAT_OPTIONS,
D3_TIME_FORMAT_OPTIONS,
} from '@superset-ui/chart-controls';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
describe('Scatter Chart X-axis Time Formatting', () => {
const baseFormData: EchartsTimeseriesFormData = {
@@ -17,8 +17,8 @@
* under the License.
*/
import { CategoricalColorScale, ChartProps } from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { GenericDataType } from '@apache-superset/core/common';
import { supersetTheme } from '@apache-superset/core/theme';
import type { SeriesOption } from 'echarts';
import { EchartsTimeseriesSeriesType } from '../../src';
import { TIMESERIES_CONSTANTS } from '../../src/constants';
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import transformProps from '../../src/Tree/transformProps';
import { EchartsTreeChartProps } from '../../src/Tree/types';
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import { EchartsTreemapChartProps } from '../../src/Treemap/types';
import transformProps from '../../src/Treemap/transformProps';
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import {
EchartsWaterfallChartProps,
WaterfallChartTransformedProps,
@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps, ChartDataResponseResult } from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
/**
* Datasource shape used by Echarts Timeseries and Mixed Timeseries chart props.
@@ -23,8 +23,8 @@ import {
getNumberFormatter,
getTimeFormatter,
} from '@superset-ui/core';
import { supersetTheme as theme } from '@apache-superset/core/ui';
import { GenericDataType } from '@apache-superset/core/api/core';
import { supersetTheme as theme } from '@apache-superset/core/theme';
import { GenericDataType } from '@apache-superset/core/common';
import {
calculateLowerLogTick,
dedupSeries,
@@ -30,7 +30,7 @@ import {
TimeseriesAnnotationLayer,
TimeseriesDataRecord,
} from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/ui';
import { supersetTheme } from '@apache-superset/core/theme';
import { OrientationType } from '../../src';
import {
transformEventAnnotation,