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

View File

@@ -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,

View File

@@ -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,

View File

@@ -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';

View File

@@ -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,

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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,

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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 = [