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

@@ -20,7 +20,7 @@
*/
import { useRef, useState, useEffect } from 'react';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
import { Column } from '@superset-ui/core/components/ThemedAgGridReact';
import FilterIcon from './Filter';

View File

@@ -17,7 +17,7 @@
* under the License.
*/
/* eslint-disable theme-colors/no-literal-colors */
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
VerticalLeftOutlined,
VerticalRightOutlined,

View File

@@ -20,7 +20,7 @@
import { useState } from 'react';
import { Dropdown } from 'antd';
import { TableOutlined, DownOutlined, CheckOutlined } from '@ant-design/icons';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { InfoText, ColumnLabel, CheckIconWrapper } from '../../styles';
interface ComparisonColumn {

View File

@@ -42,7 +42,7 @@ import {
CellClickedEvent,
IMenuActionParams,
} from '@superset-ui/core/components/ThemedAgGridReact';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
AgGridChartState,
DataRecordValue,

View File

@@ -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 {
DataRecord,
DataRecordValue,
getTimeFormatterForGranularity,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { useCallback, useEffect, useState, useMemo } from 'react';
import { isEqual } from 'lodash';

View File

@@ -41,7 +41,7 @@ import {
isPercentMetric,
ColorSchemeEnum,
} from '@superset-ui/chart-controls';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ensureIsArray,
isAdhocColumn,
@@ -54,7 +54,7 @@ import {
validateServerPagination,
withLabel,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { isEmpty, last } from 'lodash';
import { PAGE_SIZE_OPTIONS, SERVER_PAGE_SIZE_OPTIONS } from './consts';

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, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';

View File

@@ -16,7 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
import { styled, useTheme, type SupersetTheme } from '@apache-superset/core/ui';
import {
styled,
useTheme,
type SupersetTheme,
} from '@apache-superset/core/theme';
import { CustomCellRendererProps } from '@superset-ui/core/components/ThemedAgGridReact';
import { BasicColorFormatterType, InputColumn, ValueRange } from '../types';
import { useIsDark } from '../utils/useTableTheme';

View File

@@ -18,7 +18,7 @@
* under the License.
*/
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import { isProbablyHTML, sanitizeHtml } from '@superset-ui/core';
import { InfoCircleOutlined } from '@ant-design/icons';
import { Tooltip } from '@superset-ui/core/components';

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 { ChartDataResponseResult, VizType } from '@superset-ui/core';
import { TableChartFormData } from '../types';

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { css, styled } from '@apache-superset/core/ui';
import { css, styled } from '@apache-superset/core/theme';
import { Select } from '@superset-ui/core/components';
/* Components for AgGridTable */

View File

@@ -17,7 +17,7 @@
* under the License.
*/
import memoizeOne from 'memoize-one';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ComparisonType,
Currency,
@@ -35,7 +35,7 @@ import {
TimeFormats,
TimeFormatter,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { isEmpty, isEqual, merge } from 'lodash';
import {
ConditionalFormattingConfig,

View File

@@ -24,7 +24,7 @@ import {
isProbablyHTML,
sanitizeHtml,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import {
ValueFormatterParams,
ValueGetterParams,

View File

@@ -20,7 +20,7 @@
import { ColDef } from '@superset-ui/core/components/ThemedAgGridReact';
import { useCallback, useMemo } from 'react';
import { DataRecord, DataRecordValue } from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { ColorFormatters } from '@superset-ui/chart-controls';
import { extent as d3Extent, max as d3Max } from 'd3-array';
import {

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { useTheme } from '@apache-superset/core/ui';
import { useTheme } from '@apache-superset/core/theme';
import {
colorSchemeDark,
colorSchemeLight,