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

@@ -29,7 +29,7 @@ import {
useMemo,
} from 'react';
import { typedMemo, usePrevious } from '@superset-ui/core';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
useTable,
usePagination,

View File

@@ -25,7 +25,7 @@ import {
Ref,
} from 'react';
import { Row, FilterValue } from 'react-table';
import { t, tn } from '@apache-superset/core';
import { t, tn } from '@apache-superset/core/translation';
import { Input, type InputRef, Space } from '@superset-ui/core/components';
import useAsyncState from '../utils/useAsyncState';

View File

@@ -17,7 +17,7 @@
* under the License.
*/
/* eslint-disable import/no-extraneous-dependencies */
import { styled } from '@apache-superset/core/ui';
import { styled } from '@apache-superset/core/theme';
import { RawAntdSelect } from '@superset-ui/core/components';
import { SearchOption } from '../../types';

View File

@@ -17,8 +17,8 @@
* under the License.
*/
import { memo } from 'react';
import { t } from '@apache-superset/core';
import { css } from '@apache-superset/core/ui';
import { t } from '@apache-superset/core/translation';
import { css } from '@apache-superset/core/theme';
import { formatSelectOptions } from '@superset-ui/chart-controls';
import { RawAntdSelect } from '@superset-ui/core/components';

View File

@@ -30,7 +30,7 @@ import {
UIEventHandler,
} from 'react';
import { TableInstance, Hooks } from 'react-table';
import { useTheme, css } from '@apache-superset/core/ui';
import { useTheme, css } from '@apache-superset/core/theme';
import getScrollBarSize from '../utils/getScrollBarSize';
import needScrollBar from '../utils/needScrollBar';
import useMountedMemo from '../utils/useMountedMemo';

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';
export default styled.div`
${({ theme }) => css`

View File

@@ -54,10 +54,9 @@ import {
css,
useTheme,
SupersetTheme,
t,
tn,
} from '@apache-superset/core/ui';
import { GenericDataType } from '@apache-superset/core/api/core';
} from '@apache-superset/core/theme';
import { t, tn } from '@apache-superset/core/translation';
import { GenericDataType } from '@apache-superset/core/common';
import {
Input,
Space,

View File

@@ -17,7 +17,7 @@
* under the License.
*/
import { formatSelectOptions } from '@superset-ui/chart-controls';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
export const PAGE_SIZE_OPTIONS = formatSelectOptions<number>([
[0, t('All')],

View File

@@ -43,7 +43,7 @@ import {
ObjectFormattingEnum,
ColorSchemeEnum,
} from '@superset-ui/chart-controls';
import { t } from '@apache-superset/core';
import { t } from '@apache-superset/core/translation';
import {
ensureIsArray,
isAdhocColumn,
@@ -56,7 +56,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

@@ -17,7 +17,7 @@
* under the License.
*/
import { ChartDataResponseResult, VizType } from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import {
TableChartFormData,
TableChartProps,

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,
CurrencyFormatter,
@@ -36,7 +36,7 @@ import {
TimeFormats,
TimeFormatter,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import {
ColorFormatters,
ConditionalFormattingConfig,

View File

@@ -23,7 +23,7 @@ import {
isProbablyHTML,
sanitizeHtml,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/api/core';
import { GenericDataType } from '@apache-superset/core/common';
import { DataColumnMeta } from '../types';
import DateWithFormatter from './DateWithFormatter';