diff --git a/docs/developer_docs/extensions/components/alert.mdx b/docs/developer_docs/extensions/components/alert.mdx index f83234a01b5..8c42c821160 100644 --- a/docs/developer_docs/extensions/components/alert.mdx +++ b/docs/developer_docs/extensions/components/alert.mdx @@ -23,7 +23,7 @@ sidebar_label: Alert --> import { StoryWithControls } from '../../../src/components/StorybookWrapper'; -import { Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; # Alert @@ -105,10 +105,10 @@ function Demo() { ## Usage in Extensions -This component is available in the `@apache-superset/core/ui` package, which is automatically available to Superset extensions. +This component is available in the `@apache-superset/core/components` package, which is automatically available to Superset extensions. ```tsx -import { Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; function MyExtension() { return ( diff --git a/docs/developer_docs/extensions/components/index.mdx b/docs/developer_docs/extensions/components/index.mdx index e40b4126f7f..d4b4eaa5921 100644 --- a/docs/developer_docs/extensions/components/index.mdx +++ b/docs/developer_docs/extensions/components/index.mdx @@ -25,7 +25,7 @@ sidebar_position: 1 # Extension Components -These UI components are available to Superset extension developers through the `@apache-superset/core/ui` package. They provide a consistent look and feel with the rest of Superset and are designed to be used in extension panels, views, and other UI elements. +These UI components are available to Superset extension developers through the `@apache-superset/core/components` package. They provide a consistent look and feel with the rest of Superset and are designed to be used in extension panels, views, and other UI elements. ## Available Components @@ -33,10 +33,10 @@ These UI components are available to Superset extension developers through the ` ## Usage -All components are exported from the `@apache-superset/core/ui` package: +All components are exported from the `@apache-superset/core/components` package: ```tsx -import { Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; export function MyExtensionPanel() { return ( @@ -49,7 +49,7 @@ export function MyExtensionPanel() { ## Adding New Components -Components in `@apache-superset/core/ui` are automatically documented here. To add a new extension component: +Components in `@apache-superset/core/components` are automatically documented here. To add a new extension component: 1. Add the component to `superset-frontend/packages/superset-core/src/ui/components/` 2. Export it from `superset-frontend/packages/superset-core/src/ui/components/index.ts` diff --git a/docs/developer_docs/extensions/contribution-types.md b/docs/developer_docs/extensions/contribution-types.md index 945e288b932..cf959005b6c 100644 --- a/docs/developer_docs/extensions/contribution-types.md +++ b/docs/developer_docs/extensions/contribution-types.md @@ -118,7 +118,7 @@ Backend contribution types allow extensions to extend Superset's server-side cap Extensions can register custom REST API endpoints under the `/extensions/` namespace. This dedicated namespace prevents conflicts with built-in endpoints and provides a clear separation between core and extension functionality. ```python -from superset_core.api.rest_api import RestApi, api +from superset_core.rest_api.api import RestApi, api from flask_appbuilder.api import expose, protect @api( diff --git a/docs/developer_docs/extensions/dependencies.md b/docs/developer_docs/extensions/dependencies.md index 6b3eb2e4a46..8fb9e61e988 100644 --- a/docs/developer_docs/extensions/dependencies.md +++ b/docs/developer_docs/extensions/dependencies.md @@ -70,8 +70,8 @@ import { someInternalFunction } from 'src/explore/components/SomeComponent'; ```python # ✅ Public API - stable -from superset_core.api.models import Database -from superset_core.api.daos import DatabaseDAO +from superset_core.common.models import Database +from superset_core.common.daos import DatabaseDAO # ❌ Internal code - may break without notice from superset.views.core import SomeInternalClass @@ -117,7 +117,7 @@ Extension developers should depend on and use core libraries directly: **Frontend (examples):** - [React](https://react.dev/) - UI framework -- [Ant Design](https://ant.design/) - UI component library (prefer Superset components from `@apache-superset/core/ui` when available to preserve visual consistency) +- [Ant Design](https://ant.design/) - UI component library (prefer Superset components from `@apache-superset/core/components` when available to preserve visual consistency) - [Emotion](https://emotion.sh/) - CSS-in-JS styling - ... diff --git a/docs/developer_docs/extensions/development.md b/docs/developer_docs/extensions/development.md index c6baa635986..244d0f386f6 100644 --- a/docs/developer_docs/extensions/development.md +++ b/docs/developer_docs/extensions/development.md @@ -201,9 +201,9 @@ Backend APIs (via `apache-superset-core`) follow a similar pattern, providing ac Extension endpoints are registered under a dedicated `/extensions` namespace to avoid conflicting with built-in endpoints and also because they don't share the same version constraints. By grouping all extension endpoints under `/extensions`, Superset establishes a clear boundary between core and extension functionality, making it easier to manage, document, and secure both types of APIs. ```python -from superset_core.api.models import Database, get_session -from superset_core.api.daos import DatabaseDAO -from superset_core.api.rest_api import RestApi, api +from superset_core.common.models import Database, get_session +from superset_core.common.daos import DatabaseDAO +from superset_core.rest_api.api import RestApi, api from flask_appbuilder.api import expose, protect @api( diff --git a/docs/developer_docs/extensions/mcp.md b/docs/developer_docs/extensions/mcp.md index ad9b10e6e85..4ba74e3540a 100644 --- a/docs/developer_docs/extensions/mcp.md +++ b/docs/developer_docs/extensions/mcp.md @@ -61,7 +61,7 @@ Prompts provide interactive guidance and context to AI agents. They help agents The simplest way to create an MCP tool is using the `@tool` decorator: ```python -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool @tool def hello_world() -> dict: @@ -94,7 +94,7 @@ Here's a more comprehensive example showing best practices: import random from datetime import datetime, timezone from pydantic import BaseModel, Field -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool class RandomNumberRequest(BaseModel): """Request schema for random number generation.""" @@ -253,7 +253,7 @@ The AI agent sees your tool's: Create interactive prompts using the `@prompt` decorator: ```python -from superset_core.api.mcp import prompt +from superset_core.mcp.decorators import prompt from fastmcp import Context @prompt("my_extension.workflow_guide") diff --git a/docs/developer_docs/extensions/overview.md b/docs/developer_docs/extensions/overview.md index 2a6bce06c96..74ee7ac98c3 100644 --- a/docs/developer_docs/extensions/overview.md +++ b/docs/developer_docs/extensions/overview.md @@ -43,7 +43,7 @@ Extensions can provide: ## UI Components for Extensions -Extension developers have access to pre-built UI components via `@apache-superset/core/ui`. Browse all available components on the [UI Components](/docs/components/) page and filter by **Extension Compatible** to see components available to extensions. +Extension developers have access to pre-built UI components via `@apache-superset/core/components`. Browse all available components on the [UI Components](/docs/components/) page and filter by **Extension Compatible** to see components available to extensions. ## Next Steps diff --git a/docs/developer_docs/extensions/quick-start.md b/docs/developer_docs/extensions/quick-start.md index 1f0e97720b2..a856185cbd3 100644 --- a/docs/developer_docs/extensions/quick-start.md +++ b/docs/developer_docs/extensions/quick-start.md @@ -129,7 +129,7 @@ The CLI generated a basic `backend/src/superset_extensions/my_org/hello_world/en ```python from flask import Response from flask_appbuilder.api import expose, protect, safe -from superset_core.api.rest_api import RestApi, api +from superset_core.rest_api.api import RestApi, api @api( @@ -175,7 +175,7 @@ class HelloWorldAPI(RestApi): **Key points:** - Uses [`@api`](superset-core/src/superset_core/api/rest_api.py:59) decorator with automatic context detection -- Extends `RestApi` from `superset_core.api.rest_api` +- Extends `RestApi` from `superset_core.rest_api.api` - Uses Flask-AppBuilder decorators (`@expose`, `@protect`, `@safe`) - Returns responses using `self.response(status_code, result=data)` - The endpoint will be accessible at `/extensions/my-org/hello-world/message` (automatic extension context) diff --git a/docs/developer_docs/extensions/tasks.md b/docs/developer_docs/extensions/tasks.md index 47e0e7cf562..c36fa9aaba1 100644 --- a/docs/developer_docs/extensions/tasks.md +++ b/docs/developer_docs/extensions/tasks.md @@ -50,7 +50,7 @@ When GTF is considered stable, it will replace legacy Celery tasks for built-in ### Define a Task ```python -from superset_core.api.tasks import task, get_context +from superset_core.tasks.decorators import task, get_context @task def process_data(dataset_id: int) -> None: @@ -245,7 +245,8 @@ Always implement an abort handler for long-running tasks. This allows users to c Set a timeout to automatically abort tasks that run too long: ```python -from superset_core.api.tasks import task, get_context, TaskOptions +from superset_core.tasks.decorators import task, get_context +from superset_core.tasks.types import TaskOptions # Set default timeout in decorator @task(timeout=300) # 5 minutes @@ -299,7 +300,7 @@ Timeouts require an abort handler to be effective. Without one, the timeout trig Use `task_key` to prevent duplicate task execution: ```python -from superset_core.api.tasks import TaskOptions +from superset_core.tasks.types import TaskOptions # Without key - creates new task each time (random UUID) task1 = my_task.schedule(x=1) @@ -331,7 +332,8 @@ print(task2.status) # "success" (terminal status) ## Task Scopes ```python -from superset_core.api.tasks import task, TaskScope +from superset_core.tasks.decorators import task +from superset_core.tasks.types import TaskScope @task # Private by default def private_task(): ... diff --git a/superset-core/README.md b/superset-core/README.md index 3ee489c7afc..0ca50a252f7 100644 --- a/superset-core/README.md +++ b/superset-core/README.md @@ -48,8 +48,8 @@ The package is organized into logical modules, each providing specific functiona ```python from flask import request, Response from flask_appbuilder.api import expose, permission_name, protect, safe -from superset_core.api import models, query, rest_api -from superset_core.api.rest_api import RestApi +from superset_core import common, queries, rest_api +from superset_core.rest_api.api import RestApi class DatasetReferencesAPI(RestApi): """Example extension API demonstrating core functionality.""" diff --git a/superset-core/src/superset_core/api/__init__.py b/superset-core/src/superset_core/common/__init__.py similarity index 100% rename from superset-core/src/superset_core/api/__init__.py rename to superset-core/src/superset_core/common/__init__.py diff --git a/superset-core/src/superset_core/api/daos.py b/superset-core/src/superset_core/common/daos.py similarity index 72% rename from superset-core/src/superset_core/api/daos.py rename to superset-core/src/superset_core/common/daos.py index f686f0c659d..ab2964f8a7e 100644 --- a/superset-core/src/superset_core/api/daos.py +++ b/superset-core/src/superset_core/common/daos.py @@ -16,13 +16,13 @@ # under the License. """ -Data Access Object API for superset-core. +Common Data Access Object API for superset-core. Provides dependency-injected DAO classes that will be replaced by host implementations during initialization. Usage: - from superset_core.api.daos import DatasetDAO, DatabaseDAO + from superset_core.common.daos import DatasetDAO, DatabaseDAO # Use standard BaseDAO methods datasets = DatasetDAO.find_all() @@ -36,17 +36,14 @@ from typing import Any, ClassVar, Generic, TypeVar from flask_appbuilder.models.filters import BaseFilter from sqlalchemy.orm import Query as SQLAQuery -from superset_core.api.models import ( +from superset_core.common.models import ( Chart, CoreModel, Dashboard, Database, Dataset, KeyValue, - Query, - SavedQuery, Tag, - Task, User, ) @@ -193,34 +190,6 @@ class UserDAO(BaseDAO[User]): id_column_name = "id" -class QueryDAO(BaseDAO[Query]): - """ - Abstract Query DAO interface. - - Host implementations will replace this class during initialization - with a concrete implementation providing actual functionality. - """ - - # Class variables that will be set by host implementation - model_cls = None - base_filter = None - id_column_name = "id" - - -class SavedQueryDAO(BaseDAO[SavedQuery]): - """ - Abstract SavedQuery DAO interface. - - Host implementations will replace this class during initialization - with a concrete implementation providing actual functionality. - """ - - # Class variables that will be set by host implementation - model_cls = None - base_filter = None - id_column_name = "id" - - class TagDAO(BaseDAO[Tag]): """ Abstract Tag DAO interface. @@ -249,48 +218,6 @@ class KeyValueDAO(BaseDAO[KeyValue]): id_column_name = "id" -class TaskDAO(BaseDAO[Task]): - """ - Abstract Task DAO interface. - - Host implementations will replace this class during initialization - with a concrete implementation providing actual functionality. - """ - - # Class variables that will be set by host implementation - model_cls = None - base_filter = None - id_column_name = "id" - uuid_column_name = "uuid" - - @classmethod - @abstractmethod - def find_by_task_key( - cls, - task_type: str, - task_key: str, - scope: str = "private", - user_id: int | None = None, - ) -> Task | None: - """ - Find active task by type, key, scope, and user. - - Uses dedup_key internally for efficient querying with a unique index. - Only returns tasks that are active (pending or in progress). - - Uniqueness logic by scope: - - private: scope + task_type + task_key + user_id - - shared/system: scope + task_type + task_key (user-agnostic) - - :param task_type: Task type to filter by - :param task_key: Task identifier for deduplication - :param scope: Task scope (private/shared/system) - :param user_id: User ID (required for private tasks) - :returns: Task instance or None if not found or not active - """ - ... - - __all__ = [ "BaseDAO", "DatasetDAO", @@ -298,9 +225,6 @@ __all__ = [ "ChartDAO", "DashboardDAO", "UserDAO", - "QueryDAO", - "SavedQueryDAO", "TagDAO", "KeyValueDAO", - "TaskDAO", ] diff --git a/superset-core/src/superset_core/api/models.py b/superset-core/src/superset_core/common/models.py similarity index 62% rename from superset-core/src/superset_core/api/models.py rename to superset-core/src/superset_core/common/models.py index 91e10255d04..742be6fa17b 100644 --- a/superset-core/src/superset_core/api/models.py +++ b/superset-core/src/superset_core/common/models.py @@ -16,13 +16,13 @@ # under the License. """ -Model API for superset-core. +Common model API for superset-core. -Provides model classes that will be replaced by host implementations +Provides core model classes that will be replaced by host implementations during initialization for extension developers to use. Usage: - from superset_core.api.models import Dataset, Database, get_session + from superset_core.common.models import Dataset, Database, get_session # Use as regular model classes dataset = Dataset(name="My Dataset") @@ -40,8 +40,7 @@ from flask_appbuilder import Model from sqlalchemy.orm import scoped_session if TYPE_CHECKING: - from superset_core.api.tasks import TaskProperties - from superset_core.api.types import ( + from superset_core.queries.types import ( AsyncQueryHandle, QueryOptions, QueryResult, @@ -88,8 +87,8 @@ class Database(CoreModel): def execute( self, sql: str, - options: QueryOptions | None = None, - ) -> QueryResult: + options: "QueryOptions | None" = None, + ) -> "QueryResult": """ Execute SQL synchronously. @@ -103,8 +102,8 @@ class Database(CoreModel): :returns: QueryResult with status, data (DataFrame), and metadata Example: - from superset_core.api.daos import DatabaseDAO - from superset_core.api.types import QueryOptions, QueryStatus + from superset_core.common.daos import DatabaseDAO + from superset_core.queries.types import QueryOptions, QueryStatus db = DatabaseDAO.find_one_or_none(id=1) result = db.execute( @@ -136,8 +135,8 @@ class Database(CoreModel): def execute_async( self, sql: str, - options: QueryOptions | None = None, - ) -> AsyncQueryHandle: + options: "QueryOptions | None" = None, + ) -> "AsyncQueryHandle": """ Execute SQL asynchronously. @@ -286,47 +285,6 @@ class User(CoreModel): active: bool -class Query(CoreModel): - """ - Abstract Query model interface. - - Host implementations will replace this class during initialization - with concrete implementation providing actual functionality. - """ - - __abstract__ = True - - # Type hints for expected attributes (no actual field definitions) - id: int - client_id: str | None - database_id: int | None - sql: str | None - status: str | None - user_id: int | None - progress: int - error_message: str | None - - -class SavedQuery(CoreModel): - """ - Abstract SavedQuery model interface. - - Host implementations will replace this class during initialization - with concrete implementation providing actual functionality. - """ - - __abstract__ = True - - # Type hints for expected attributes (no actual field definitions) - id: int - uuid: UUID | None - label: str | None - sql: str | None - database_id: int | None - description: str | None - user_id: int | None - - class Tag(CoreModel): """ Abstract Tag model interface. @@ -362,132 +320,6 @@ class KeyValue(CoreModel): changed_by_fk: int | None -class Task(CoreModel): - """ - Abstract Task model interface. - - Host implementations will replace this class during initialization - with concrete implementation providing actual functionality. - - This model represents async tasks in the Global Task Framework (GTF). - - Non-filterable fields (progress, error info, execution config) are stored - in a `properties` JSON blob for schema flexibility. - """ - - __abstract__ = True - - # Type hints for expected column attributes - id: int - uuid: UUID - task_key: str # For deduplication - task_type: str # e.g., 'sql_execution' - task_name: str | None # Human readable name - scope: str # private/shared/system - status: str - dedup_key: str # Computed deduplication key - - # Timestamps (from AuditMixinNullable) - created_on: datetime | None - changed_on: datetime | None - started_at: datetime | None - ended_at: datetime | None - - # User context - created_by_fk: int | None - user_id: int | None - - # Task output data - payload: str # JSON serialized task output data - - def get_payload(self) -> dict[str, Any]: - """ - Get payload as parsed JSON. - - Payload contains task-specific output data set by task code. - - Host implementations will replace this method during initialization - with concrete implementation providing actual functionality. - - :returns: Dictionary containing payload data - """ - raise NotImplementedError("Method will be replaced during initialization") - - def set_payload(self, data: dict[str, Any]) -> None: - """ - Update payload with new data (merges with existing). - - Host implementations will replace this method during initialization - with concrete implementation providing actual functionality. - - :param data: Dictionary of data to merge into payload - """ - raise NotImplementedError("Method will be replaced during initialization") - - @property - def properties(self) -> Any: - """ - Get typed properties (runtime state and execution config). - - Properties contain: - - is_abortable: bool | None - has abort handler registered - - progress_percent: float | None - progress 0.0-1.0 - - progress_current: int | None - current iteration count - - progress_total: int | None - total iterations - - error_message: str | None - human-readable error message - - exception_type: str | None - exception class name - - stack_trace: str | None - full formatted traceback - - timeout: int | None - timeout in seconds - - Host implementations will replace this property during initialization. - - :returns: TaskProperties dataclass instance - """ - raise NotImplementedError("Property will be replaced during initialization") - - def update_properties(self, updates: "TaskProperties") -> None: - """ - Update specific properties fields (merge semantics). - - Only updates fields present in the updates dict. - - Host implementations will replace this method during initialization. - - :param updates: TaskProperties dict with fields to update - - Example: - task.update_properties({"is_abortable": True}) - """ - raise NotImplementedError("Method will be replaced during initialization") - - -class TaskSubscriber(CoreModel): - """ - Abstract TaskSubscriber model interface. - - Host implementations will replace this class during initialization - with concrete implementation providing actual functionality. - - This model tracks task subscriptions for multi-user shared tasks. When a user - schedules a shared task with the same parameters as an existing task, - they are subscribed to that task instead of creating a duplicate. - """ - - __abstract__ = True - - # Type hints for expected attributes (no actual field definitions) - id: int - task_id: int - user_id: int - subscribed_at: datetime - - # Audit fields from AuditMixinNullable - created_on: datetime | None - changed_on: datetime | None - created_by_fk: int | None - changed_by_fk: int | None - - def get_session() -> scoped_session: """ Retrieve the SQLAlchemy session to directly interface with the @@ -507,12 +339,8 @@ __all__ = [ "Chart", "Dashboard", "User", - "Query", - "SavedQuery", "Tag", "KeyValue", - "Task", - "TaskSubscriber", "CoreModel", "get_session", ] diff --git a/superset-core/src/superset_core/mcp/__init__.py b/superset-core/src/superset_core/mcp/__init__.py new file mode 100644 index 00000000000..13a83393a91 --- /dev/null +++ b/superset-core/src/superset_core/mcp/__init__.py @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. diff --git a/superset-core/src/superset_core/api/mcp.py b/superset-core/src/superset_core/mcp/decorators.py similarity index 99% rename from superset-core/src/superset_core/api/mcp.py rename to superset-core/src/superset_core/mcp/decorators.py index f413a9ec7e7..d8c814a1acd 100644 --- a/superset-core/src/superset_core/api/mcp.py +++ b/superset-core/src/superset_core/mcp/decorators.py @@ -22,7 +22,7 @@ This module provides a decorator interface to register MCP tools with the host application. Usage: - from superset_core.api.mcp import tool + from superset_core.mcp.decorators import tool @tool(name="my_tool", description="Custom business logic", tags=["extension"]) def my_extension_tool(param: str) -> dict: diff --git a/superset-core/src/superset_core/queries/__init__.py b/superset-core/src/superset_core/queries/__init__.py new file mode 100644 index 00000000000..13a83393a91 --- /dev/null +++ b/superset-core/src/superset_core/queries/__init__.py @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. diff --git a/superset-core/src/superset_core/queries/daos.py b/superset-core/src/superset_core/queries/daos.py new file mode 100644 index 00000000000..fcc86674c3b --- /dev/null +++ b/superset-core/src/superset_core/queries/daos.py @@ -0,0 +1,63 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +""" +Query Data Access Object API for superset-core. + +Provides query-related DAO classes that will be replaced by host implementations +during initialization. + +Usage: + from superset_core.queries.daos import QueryDAO, SavedQueryDAO +""" + +from superset_core.common.daos import BaseDAO +from superset_core.queries.models import Query, SavedQuery + + +class QueryDAO(BaseDAO[Query]): + """ + Abstract Query DAO interface. + + Host implementations will replace this class during initialization + with a concrete implementation providing actual functionality. + """ + + # Class variables that will be set by host implementation + model_cls = None + base_filter = None + id_column_name = "id" + + +class SavedQueryDAO(BaseDAO[SavedQuery]): + """ + Abstract SavedQuery DAO interface. + + Host implementations will replace this class during initialization + with a concrete implementation providing actual functionality. + """ + + # Class variables that will be set by host implementation + model_cls = None + base_filter = None + id_column_name = "id" + + +__all__ = [ + "QueryDAO", + "SavedQueryDAO", +] diff --git a/superset-core/src/superset_core/queries/models.py b/superset-core/src/superset_core/queries/models.py new file mode 100644 index 00000000000..4b8ce5417f1 --- /dev/null +++ b/superset-core/src/superset_core/queries/models.py @@ -0,0 +1,79 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +""" +Query model API for superset-core. + +Provides query-related model classes that will be replaced by host implementations +during initialization for extension developers to use. + +Usage: + from superset_core.queries.models import Query, SavedQuery +""" + +from __future__ import annotations + +from uuid import UUID + +from superset_core.common.models import CoreModel + + +class Query(CoreModel): + """ + Abstract Query model interface. + + Host implementations will replace this class during initialization + with concrete implementation providing actual functionality. + """ + + __abstract__ = True + + # Type hints for expected attributes (no actual field definitions) + id: int + client_id: str | None + database_id: int | None + sql: str | None + status: str | None + user_id: int | None + progress: int + error_message: str | None + + +class SavedQuery(CoreModel): + """ + Abstract SavedQuery model interface. + + Host implementations will replace this class during initialization + with concrete implementation providing actual functionality. + """ + + __abstract__ = True + + # Type hints for expected attributes (no actual field definitions) + id: int + uuid: UUID | None + label: str | None + sql: str | None + database_id: int | None + description: str | None + user_id: int | None + + +__all__ = [ + "Query", + "SavedQuery", +] diff --git a/superset-core/src/superset_core/api/query.py b/superset-core/src/superset_core/queries/query.py similarity index 93% rename from superset-core/src/superset_core/api/query.py rename to superset-core/src/superset_core/queries/query.py index 050067e9e3b..b11d461c443 100644 --- a/superset-core/src/superset_core/api/query.py +++ b/superset-core/src/superset_core/queries/query.py @@ -22,7 +22,7 @@ Provides dependency-injected query utility functions that will be replaced by host implementations during initialization. Usage: - from superset_core.api.query import get_sqlglot_dialect + from superset_core.queries.query import get_sqlglot_dialect dialect = get_sqlglot_dialect(database) """ @@ -32,7 +32,7 @@ from typing import TYPE_CHECKING from sqlglot import Dialects if TYPE_CHECKING: - from superset_core.api.models import Database + from superset_core.common.models import Database def get_sqlglot_dialect(database: "Database") -> Dialects: diff --git a/superset-core/src/superset_core/api/types.py b/superset-core/src/superset_core/queries/types.py similarity index 100% rename from superset-core/src/superset_core/api/types.py rename to superset-core/src/superset_core/queries/types.py diff --git a/superset-core/src/superset_core/rest_api/__init__.py b/superset-core/src/superset_core/rest_api/__init__.py new file mode 100644 index 00000000000..13a83393a91 --- /dev/null +++ b/superset-core/src/superset_core/rest_api/__init__.py @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. diff --git a/superset-core/src/superset_core/rest_api/api.py b/superset-core/src/superset_core/rest_api/api.py new file mode 100644 index 00000000000..ebcc4b83f49 --- /dev/null +++ b/superset-core/src/superset_core/rest_api/api.py @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from flask_appbuilder.api import BaseApi + + +class RestApi(BaseApi): + """ + Base REST API class for Superset with browser login support. + + This class extends Flask-AppBuilder's BaseApi and enables browser-based + authentication by default. + """ + + allow_browser_login = True + + +__all__ = ["RestApi"] diff --git a/superset-core/src/superset_core/api/rest_api.py b/superset-core/src/superset_core/rest_api/decorators.py similarity index 82% rename from superset-core/src/superset_core/api/rest_api.py rename to superset-core/src/superset_core/rest_api/decorators.py index 40d7d2ce8a4..37581713ead 100644 --- a/superset-core/src/superset_core/api/rest_api.py +++ b/superset-core/src/superset_core/rest_api/decorators.py @@ -16,15 +16,11 @@ # under the License. """ -REST API functions and decorators for superset-core. - -Provides dependency-injected REST API utility functions and decorators that will be -replaced by host implementations during initialization. +REST API decorator for superset-core. Usage: - from superset_core.api.rest_api import api + from superset_core.rest_api.decorators import api - # Unified decorator for both host and extension APIs @api( id="main_api", name="Main API", @@ -34,25 +30,15 @@ Usage: pass """ -from typing import Callable, TypeVar +from typing import Callable, TYPE_CHECKING, TypeVar -from flask_appbuilder.api import BaseApi +if TYPE_CHECKING: + from superset_core.rest_api.api import RestApi # Type variable for decorated API classes T = TypeVar("T", bound=type["RestApi"]) -class RestApi(BaseApi): - """ - Base REST API class for Superset with browser login support. - - This class extends Flask-AppBuilder's BaseApi and enables browser-based - authentication by default. - """ - - allow_browser_login = True - - def api( id: str, name: str, @@ -114,4 +100,4 @@ def api( ) -__all__ = ["RestApi", "api"] +__all__ = ["api"] diff --git a/superset-core/src/superset_core/tasks/__init__.py b/superset-core/src/superset_core/tasks/__init__.py new file mode 100644 index 00000000000..13a83393a91 --- /dev/null +++ b/superset-core/src/superset_core/tasks/__init__.py @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. diff --git a/superset-core/src/superset_core/tasks/daos.py b/superset-core/src/superset_core/tasks/daos.py new file mode 100644 index 00000000000..b810edec31a --- /dev/null +++ b/superset-core/src/superset_core/tasks/daos.py @@ -0,0 +1,76 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +""" +Task Data Access Object API for superset-core. + +Provides task-related DAO classes that will be replaced by host implementations +during initialization. + +Usage: + from superset_core.tasks.daos import TaskDAO +""" + +from abc import abstractmethod + +from superset_core.common.daos import BaseDAO +from superset_core.tasks.models import Task + + +class TaskDAO(BaseDAO[Task]): + """ + Abstract Task DAO interface. + + Host implementations will replace this class during initialization + with a concrete implementation providing actual functionality. + """ + + # Class variables that will be set by host implementation + model_cls = None + base_filter = None + id_column_name = "id" + uuid_column_name = "uuid" + + @classmethod + @abstractmethod + def find_by_task_key( + cls, + task_type: str, + task_key: str, + scope: str = "private", + user_id: int | None = None, + ) -> Task | None: + """ + Find active task by type, key, scope, and user. + + Uses dedup_key internally for efficient querying with a unique index. + Only returns tasks that are active (pending or in progress). + + Uniqueness logic by scope: + - private: scope + task_type + task_key + user_id + - shared/system: scope + task_type + task_key (user-agnostic) + + :param task_type: Task type to filter by + :param task_key: Task identifier for deduplication + :param scope: Task scope (private/shared/system) + :param user_id: User ID (required for private tasks) + :returns: Task instance or None if not found or not active + """ + ... + + +__all__ = ["TaskDAO"] diff --git a/superset-core/src/superset_core/tasks/decorators.py b/superset-core/src/superset_core/tasks/decorators.py new file mode 100644 index 00000000000..5785add4624 --- /dev/null +++ b/superset-core/src/superset_core/tasks/decorators.py @@ -0,0 +1,152 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from __future__ import annotations + +from typing import Callable, Generic, ParamSpec, TYPE_CHECKING, TypeVar + +from superset_core.tasks.types import TaskContext, TaskScope + +if TYPE_CHECKING: + from superset_core.tasks.models import Task + +P = ParamSpec("P") +R = TypeVar("R") + + +def task( + name: str | None = None, + scope: TaskScope = TaskScope.PRIVATE, + timeout: int | None = None, +) -> Callable[[Callable[P, R]], "TaskWrapper[P]"]: + """ + Decorator to register a task. + + Host implementations will replace this function during initialization + with a concrete implementation providing actual functionality. + + :param name: Optional unique task name (e.g., "superset.generate_thumbnail"). + If not provided, uses the function name as the task name. + :param scope: Task scope (TaskScope.PRIVATE, SHARED, or SYSTEM). + Defaults to TaskScope.PRIVATE. + :param timeout: Optional timeout in seconds. When the timeout is reached, + abort handlers are triggered if registered. Can be overridden + at call time via TaskOptions(timeout=...). + :returns: TaskWrapper with .schedule() method + + Note: + Both direct calls and .schedule() return Task, regardless of the + original function's return type. The decorated function's return value + is discarded; only side effects and context updates matter. + + Example: + from superset_core.tasks.decorators import task, get_context + from superset_core.tasks.types import TaskScope + + # Private task (default scope) + @task + def generate_thumbnail(chart_id: int) -> None: + ctx = get_context() + # ... task implementation + + # Named task with shared scope + @task(name="generate_report", scope=TaskScope.SHARED) + def generate_chart_thumbnail(chart_id: int) -> None: + ctx = get_context() + + # Update progress and payload atomically + ctx.update_task( + progress=0.5, + payload={"chart_id": chart_id, "status": "processing"} + ) + # ... task implementation + + ctx.update_task(progress=1.0) + + # System task (admin-only) + @task(scope=TaskScope.SYSTEM) + def cleanup_old_data() -> None: + ctx = get_context() + # ... cleanup implementation + + # Task with timeout + @task(timeout=300) # 5-minute timeout + def long_running_task() -> None: + ctx = get_context() + + @ctx.on_abort + def handle_abort(): + # Called when timeout or manual abort + pass + + # Schedule async execution + task = generate_chart_thumbnail.schedule(chart_id=123) # Returns Task + + # Direct call for sync execution (blocks until task is complete) + task = generate_chart_thumbnail(chart_id=123) # Also returns Task + """ + raise NotImplementedError("Function will be replaced during initialization") + + +class TaskWrapper(Generic[P]): + """ + Type stub for task wrapper returned by @task decorator. + + Both __call__ and .schedule() return Task. + """ + + def __call__(self, *args: P.args, **kwargs: P.kwargs) -> "Task": + """Execute the task synchronously.""" + raise NotImplementedError("Will be replaced during initialization") + + def schedule(self, *args: P.args, **kwargs: P.kwargs) -> "Task": + """Schedule the task for async execution.""" + raise NotImplementedError("Will be replaced during initialization") + + +def get_context() -> TaskContext: + """ + Get the current task context from ambient context. + + Host implementations will replace this function during initialization + with a concrete implementation providing actual functionality. + + This function provides ambient access to the task context without + requiring it to be passed as a parameter. It can only be called + from within an async task execution. + + :returns: The current TaskContext + :raises RuntimeError: If called outside a task execution context + + Example: + @task("thumbnail_generation") + def generate_chart_thumbnail(chart_id: int): + ctx = get_context() # Access ambient context + + # Update task state - no need to fetch task object + ctx.update_task( + progress=0.5, + payload={"chart_id": chart_id} + ) + """ + raise NotImplementedError("Function will be replaced during initialization") + + +__all__ = [ + "task", + "get_context", +] diff --git a/superset-core/src/superset_core/tasks/models.py b/superset-core/src/superset_core/tasks/models.py new file mode 100644 index 00000000000..1dcf70ad1a8 --- /dev/null +++ b/superset-core/src/superset_core/tasks/models.py @@ -0,0 +1,169 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +""" +Task model API for superset-core. + +Provides task-related model classes that will be replaced by host implementations +during initialization for extension developers to use. + +Usage: + from superset_core.tasks.models import Task, TaskSubscriber +""" + +from __future__ import annotations + +from datetime import datetime +from typing import Any, TYPE_CHECKING +from uuid import UUID + +from superset_core.common.models import CoreModel + +if TYPE_CHECKING: + from superset_core.tasks.types import TaskProperties + + +class Task(CoreModel): + """ + Abstract Task model interface. + + Host implementations will replace this class during initialization + with concrete implementation providing actual functionality. + + This model represents async tasks in the Global Task Framework (GTF). + + Non-filterable fields (progress, error info, execution config) are stored + in a `properties` JSON blob for schema flexibility. + """ + + __abstract__ = True + + # Type hints for expected column attributes + id: int + uuid: UUID + task_key: str # For deduplication + task_type: str # e.g., 'sql_execution' + task_name: str | None # Human readable name + scope: str # private/shared/system + status: str + dedup_key: str # Computed deduplication key + + # Timestamps (from AuditMixinNullable) + created_on: datetime | None + changed_on: datetime | None + started_at: datetime | None + ended_at: datetime | None + + # User context + created_by_fk: int | None + user_id: int | None + + # Task output data + payload: str # JSON serialized task output data + + def get_payload(self) -> dict[str, Any]: + """ + Get payload as parsed JSON. + + Payload contains task-specific output data set by task code. + + Host implementations will replace this method during initialization + with concrete implementation providing actual functionality. + + :returns: Dictionary containing payload data + """ + raise NotImplementedError("Method will be replaced during initialization") + + def set_payload(self, data: dict[str, Any]) -> None: + """ + Update payload with new data (merges with existing). + + Host implementations will replace this method during initialization + with concrete implementation providing actual functionality. + + :param data: Dictionary of data to merge into payload + """ + raise NotImplementedError("Method will be replaced during initialization") + + @property + def properties(self) -> Any: + """ + Get typed properties (runtime state and execution config). + + Properties contain: + - is_abortable: bool | None - has abort handler registered + - progress_percent: float | None - progress 0.0-1.0 + - progress_current: int | None - current iteration count + - progress_total: int | None - total iterations + - error_message: str | None - human-readable error message + - exception_type: str | None - exception class name + - stack_trace: str | None - full formatted traceback + - timeout: int | None - timeout in seconds + + Host implementations will replace this property during initialization. + + :returns: TaskProperties dataclass instance + """ + raise NotImplementedError("Property will be replaced during initialization") + + def update_properties(self, updates: "TaskProperties") -> None: + """ + Update specific properties fields (merge semantics). + + Only updates fields present in the updates dict. + + Host implementations will replace this method during initialization. + + :param updates: TaskProperties dict with fields to update + + Example: + task.update_properties({"is_abortable": True}) + """ + raise NotImplementedError("Method will be replaced during initialization") + + +class TaskSubscriber(CoreModel): + """ + Abstract TaskSubscriber model interface. + + Host implementations will replace this class during initialization + with concrete implementation providing actual functionality. + + This model tracks task subscriptions for multi-user shared tasks. When a user + schedules a shared task with the same parameters as an existing task, + they are subscribed to that task instead of creating a duplicate. + """ + + __abstract__ = True + + # Type hints for expected attributes (no actual field definitions) + id: int + task_id: int + user_id: int + subscribed_at: datetime + + # Audit fields from AuditMixinNullable + created_on: datetime | None + changed_on: datetime | None + created_by_fk: int | None + changed_by_fk: int | None + + +__all__ = [ + "Task", + "TaskSubscriber", +] diff --git a/superset-core/src/superset_core/api/tasks.py b/superset-core/src/superset_core/tasks/types.py similarity index 62% rename from superset-core/src/superset_core/api/tasks.py rename to superset-core/src/superset_core/tasks/types.py index cc00689d622..7e4f886f10b 100644 --- a/superset-core/src/superset_core/api/tasks.py +++ b/superset-core/src/superset_core/tasks/types.py @@ -20,12 +20,7 @@ from __future__ import annotations from abc import ABC, abstractmethod from dataclasses import dataclass from enum import Enum -from typing import Any, Callable, Generic, Literal, ParamSpec, TypedDict, TypeVar - -from superset_core.api.models import Task - -P = ParamSpec("P") -R = TypeVar("R") +from typing import Any, Callable, Literal, TypedDict class TaskStatus(str, Enum): @@ -104,7 +99,7 @@ class TaskOptions: - Retry policies and backoff strategies Example: - from superset_core.api.tasks import TaskOptions, TaskScope + from superset_core.tasks.types import TaskOptions, TaskScope # Private task (default) task = my_task.schedule(arg1) @@ -233,129 +228,10 @@ class TaskContext(ABC): ... -def task( - name: str | None = None, - scope: TaskScope = TaskScope.PRIVATE, - timeout: int | None = None, -) -> Callable[[Callable[P, R]], "TaskWrapper[P]"]: - """ - Decorator to register a task. - - Host implementations will replace this function during initialization - with a concrete implementation providing actual functionality. - - :param name: Optional unique task name (e.g., "superset.generate_thumbnail"). - If not provided, uses the function name as the task name. - :param scope: Task scope (TaskScope.PRIVATE, SHARED, or SYSTEM). - Defaults to TaskScope.PRIVATE. - :param timeout: Optional timeout in seconds. When the timeout is reached, - abort handlers are triggered if registered. Can be overridden - at call time via TaskOptions(timeout=...). - :returns: TaskWrapper with .schedule() method - - Note: - Both direct calls and .schedule() return Task, regardless of the - original function's return type. The decorated function's return value - is discarded; only side effects and context updates matter. - - Example: - from superset_core.api.tasks import task, get_context, TaskScope - - # Private task (default scope) - @task - def generate_thumbnail(chart_id: int) -> None: - ctx = get_context() - # ... task implementation - - # Named task with shared scope - @task(name="generate_report", scope=TaskScope.SHARED) - def generate_chart_thumbnail(chart_id: int) -> None: - ctx = get_context() - - # Update progress and payload atomically - ctx.update_task( - progress=0.5, - payload={"chart_id": chart_id, "status": "processing"} - ) - # ... task implementation - - ctx.update_task(progress=1.0) - - # System task (admin-only) - @task(scope=TaskScope.SYSTEM) - def cleanup_old_data() -> None: - ctx = get_context() - # ... cleanup implementation - - # Task with timeout - @task(timeout=300) # 5-minute timeout - def long_running_task() -> None: - ctx = get_context() - - @ctx.on_abort - def handle_abort(): - # Called when timeout or manual abort - pass - - # Schedule async execution - task = generate_chart_thumbnail.schedule(chart_id=123) # Returns Task - - # Direct call for sync execution (blocks until task is complete) - task = generate_chart_thumbnail(chart_id=123) # Also returns Task - """ - raise NotImplementedError("Function will be replaced during initialization") - - -class TaskWrapper(Generic[P]): - """ - Type stub for task wrapper returned by @task decorator. - - Both __call__ and .schedule() return Task. - """ - - def __call__(self, *args: P.args, **kwargs: P.kwargs) -> Task: - """Execute the task synchronously.""" - raise NotImplementedError("Will be replaced during initialization") - - def schedule(self, *args: P.args, **kwargs: P.kwargs) -> Task: - """Schedule the task for async execution.""" - raise NotImplementedError("Will be replaced during initialization") - - -def get_context() -> TaskContext: - """ - Get the current task context from ambient context. - - Host implementations will replace this function during initialization - with a concrete implementation providing actual functionality. - - This function provides ambient access to the task context without - requiring it to be passed as a parameter. It can only be called - from within an async task execution. - - :returns: The current TaskContext - :raises RuntimeError: If called outside a task execution context - - Example: - @task("thumbnail_generation") - def generate_chart_thumbnail(chart_id: int): - ctx = get_context() # Access ambient context - - # Update task state - no need to fetch task object - ctx.update_task( - progress=0.5, - payload={"chart_id": chart_id} - ) - """ - raise NotImplementedError("Function will be replaced during initialization") - - __all__ = [ "TaskStatus", "TaskScope", "TaskProperties", "TaskContext", "TaskOptions", - "task", - "get_context", ] diff --git a/superset-frontend/.storybook/preview.jsx b/superset-frontend/.storybook/preview.jsx index d216da26875..1dd959257f3 100644 --- a/superset-frontend/.storybook/preview.jsx +++ b/superset-frontend/.storybook/preview.jsx @@ -17,7 +17,7 @@ * under the License. */ import { withJsx } from '@mihkeleidast/storybook-addon-source'; -import { themeObject, css, exampleThemes } from '@apache-superset/core/ui'; +import { themeObject, css, exampleThemes } from '@apache-superset/core/theme'; import { combineReducers, createStore, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; import { Provider } from 'react-redux'; diff --git a/superset-frontend/.storybook/shared/ResizableChartDemo.tsx b/superset-frontend/.storybook/shared/ResizableChartDemo.tsx index 617e6d87375..81031bdb9ef 100644 --- a/superset-frontend/.storybook/shared/ResizableChartDemo.tsx +++ b/superset-frontend/.storybook/shared/ResizableChartDemo.tsx @@ -18,7 +18,7 @@ */ import { useState, ReactNode, SyntheticEvent } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import type { Decorator } from '@storybook/react'; import { ResizeCallbackData } from 'react-resizable'; import ResizablePanel, { Size } from './ResizablePanel'; diff --git a/superset-frontend/.storybook/shared/ResizablePanel.tsx b/superset-frontend/.storybook/shared/ResizablePanel.tsx index 8a18a49fad6..3ac33c57052 100644 --- a/superset-frontend/.storybook/shared/ResizablePanel.tsx +++ b/superset-frontend/.storybook/shared/ResizablePanel.tsx @@ -23,7 +23,7 @@ import { ResizableBoxProps, ResizeCallbackData, } from 'react-resizable'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import 'react-resizable/css/styles.css'; diff --git a/superset-frontend/.storybook/shared/VerifyCORS.tsx b/superset-frontend/.storybook/shared/VerifyCORS.tsx index bbc3e115bf6..78fb78c6fb2 100644 --- a/superset-frontend/.storybook/shared/VerifyCORS.tsx +++ b/superset-frontend/.storybook/shared/VerifyCORS.tsx @@ -18,7 +18,7 @@ */ import { Component, ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, Method, diff --git a/superset-frontend/packages/superset-core/package.json b/superset-frontend/packages/superset-core/package.json index caf96df61ea..c6cae725228 100644 --- a/superset-frontend/packages/superset-core/package.json +++ b/superset-frontend/packages/superset-core/package.json @@ -5,6 +5,68 @@ "sideEffects": false, "main": "lib/index.js", "types": "lib/index.d.ts", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + }, + "./common": { + "types": "./lib/common/index.d.ts", + "default": "./lib/common/index.js" + }, + "./authentication": { + "types": "./lib/authentication/index.d.ts", + "default": "./lib/authentication/index.js" + }, + "./commands": { + "types": "./lib/commands/index.d.ts", + "default": "./lib/commands/index.js" + }, + "./editors": { + "types": "./lib/editors/index.d.ts", + "default": "./lib/editors/index.js" + }, + "./extensions": { + "types": "./lib/extensions/index.d.ts", + "default": "./lib/extensions/index.js" + }, + "./menus": { + "types": "./lib/menus/index.d.ts", + "default": "./lib/menus/index.js" + }, + "./sqlLab": { + "types": "./lib/sqlLab/index.d.ts", + "default": "./lib/sqlLab/index.js" + }, + "./views": { + "types": "./lib/views/index.d.ts", + "default": "./lib/views/index.js" + }, + "./contributions": { + "types": "./lib/contributions/index.d.ts", + "default": "./lib/contributions/index.js" + }, + "./theme": { + "types": "./lib/theme/index.d.ts", + "default": "./lib/theme/index.js" + }, + "./translation": { + "types": "./lib/translation/index.d.ts", + "default": "./lib/translation/index.js" + }, + "./components": { + "types": "./lib/components/index.d.ts", + "default": "./lib/components/index.js" + }, + "./utils": { + "types": "./lib/utils/index.d.ts", + "default": "./lib/utils/index.js" + }, + "./testing": { + "types": "./lib/testing.d.ts", + "default": "./lib/testing.js" + } + }, "files": [ "lib" ], diff --git a/superset-frontend/packages/superset-core/src/api/index.ts b/superset-frontend/packages/superset-core/src/api/index.ts deleted file mode 100644 index 0fbe91a7bf3..00000000000 --- a/superset-frontend/packages/superset-core/src/api/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * @fileoverview Main entry point for the Superset Extension API. - * - * This module exports all public APIs for Superset extensions, providing - * a unified interface for extension developers to interact with the Superset - * platform. The API includes: - * - * - `authentication`: Handle user authentication and authorization - * - `commands`: Execute Superset commands and operations - * - `contributions`: Register UI contributions and customizations - * - `core`: Access fundamental Superset types and utilities - * - `editors`: Register custom text editor implementations - * - `extensions`: Manage extension lifecycle and metadata - * - `sqlLab`: Integrate with SQL Lab functionality - */ - -export * as authentication from './authentication'; -export * as commands from './commands'; -export * as contributions from './contributions'; -export * as core from './core'; -export * as editors from './editors'; -export * as extensions from './extensions'; -export * as menus from './menus'; -export * as sqlLab from './sqlLab'; -export * as views from './views'; diff --git a/superset-frontend/packages/superset-core/src/api/authentication.ts b/superset-frontend/packages/superset-core/src/authentication/index.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/api/authentication.ts rename to superset-frontend/packages/superset-core/src/authentication/index.ts diff --git a/superset-frontend/packages/superset-core/src/api/commands.ts b/superset-frontend/packages/superset-core/src/commands/index.ts similarity index 98% rename from superset-frontend/packages/superset-core/src/api/commands.ts rename to superset-frontend/packages/superset-core/src/commands/index.ts index f00aa3a4812..5873e7eec7c 100644 --- a/superset-frontend/packages/superset-core/src/api/commands.ts +++ b/superset-frontend/packages/superset-core/src/commands/index.ts @@ -25,7 +25,7 @@ * via keyboard shortcuts, menu items, programmatic calls, or other user interactions. */ -import { Disposable } from './core'; +import { Disposable } from '../common'; /** * Describes a command that can be contributed to the application. diff --git a/superset-frontend/packages/superset-core/src/api/core.ts b/superset-frontend/packages/superset-core/src/common/index.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/api/core.ts rename to superset-frontend/packages/superset-core/src/common/index.ts diff --git a/superset-frontend/packages/superset-core/src/ui/components/Alert/Alert.stories.tsx b/superset-frontend/packages/superset-core/src/components/Alert/Alert.stories.tsx similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/components/Alert/Alert.stories.tsx rename to superset-frontend/packages/superset-core/src/components/Alert/Alert.stories.tsx diff --git a/superset-frontend/packages/superset-core/src/ui/components/Alert/Alert.test.tsx b/superset-frontend/packages/superset-core/src/components/Alert/Alert.test.tsx similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/components/Alert/Alert.test.tsx rename to superset-frontend/packages/superset-core/src/components/Alert/Alert.test.tsx diff --git a/superset-frontend/packages/superset-core/src/ui/components/Alert/index.tsx b/superset-frontend/packages/superset-core/src/components/Alert/index.tsx similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/components/Alert/index.tsx rename to superset-frontend/packages/superset-core/src/components/Alert/index.tsx diff --git a/superset-frontend/packages/superset-core/src/ui/components/index.ts b/superset-frontend/packages/superset-core/src/components/index.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/components/index.ts rename to superset-frontend/packages/superset-core/src/components/index.ts diff --git a/superset-frontend/packages/superset-core/src/api/contributions.ts b/superset-frontend/packages/superset-core/src/contributions/index.ts similarity index 94% rename from superset-frontend/packages/superset-core/src/api/contributions.ts rename to superset-frontend/packages/superset-core/src/contributions/index.ts index 6aec1bd0122..faccbb305dc 100644 --- a/superset-frontend/packages/superset-core/src/api/contributions.ts +++ b/superset-frontend/packages/superset-core/src/contributions/index.ts @@ -26,10 +26,10 @@ * menus, editors) and re-exported here for the manifest schema. */ -import { Command } from './commands'; -import { View } from './views'; -import { Menu } from './menus'; -import { Editor } from './editors'; +import { Command } from '../commands'; +import { View } from '../views'; +import { Menu } from '../menus'; +import { Editor } from '../editors'; /** * Valid locations within SQL Lab. diff --git a/superset-frontend/packages/superset-core/src/api/editors.ts b/superset-frontend/packages/superset-core/src/editors/index.ts similarity index 99% rename from superset-frontend/packages/superset-core/src/api/editors.ts rename to superset-frontend/packages/superset-core/src/editors/index.ts index cb151be75fa..39c8178fee5 100644 --- a/superset-frontend/packages/superset-core/src/api/editors.ts +++ b/superset-frontend/packages/superset-core/src/editors/index.ts @@ -34,8 +34,8 @@ */ import { ForwardRefExoticComponent, RefAttributes } from 'react'; -import { Disposable, Event } from './core'; -import type { SupersetTheme } from '../ui'; +import { Disposable, Event } from '../common'; +import type { SupersetTheme } from '../theme'; /** * Supported editor languages. diff --git a/superset-frontend/packages/superset-core/src/api/extensions.ts b/superset-frontend/packages/superset-core/src/extensions/index.ts similarity index 98% rename from superset-frontend/packages/superset-core/src/api/extensions.ts rename to superset-frontend/packages/superset-core/src/extensions/index.ts index 5a4caea09a4..2a21f45e91f 100644 --- a/superset-frontend/packages/superset-core/src/api/extensions.ts +++ b/superset-frontend/packages/superset-core/src/extensions/index.ts @@ -26,7 +26,7 @@ * in the extension ecosystem. */ -import { Extension } from './core'; +import { Extension } from '../common'; /** * Get an extension by its full identifier in the form of: `publisher.name`. diff --git a/superset-frontend/packages/superset-core/src/index.ts b/superset-frontend/packages/superset-core/src/index.ts index b02156449f2..75863372409 100644 --- a/superset-frontend/packages/superset-core/src/index.ts +++ b/superset-frontend/packages/superset-core/src/index.ts @@ -16,6 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -export * from './api'; -export * from './ui'; -export * from './utils'; +export * as common from './common'; +export * as authentication from './authentication'; +export * as commands from './commands'; +export * as editors from './editors'; +export * as extensions from './extensions'; +export * as menus from './menus'; +export * as sqlLab from './sqlLab'; +export * as views from './views'; +export * as contributions from './contributions'; +export * as theme from './theme'; +export * as translation from './translation'; +export * as components from './components'; +export * as utils from './utils'; diff --git a/superset-frontend/packages/superset-core/src/api/menus.ts b/superset-frontend/packages/superset-core/src/menus/index.ts similarity index 98% rename from superset-frontend/packages/superset-core/src/api/menus.ts rename to superset-frontend/packages/superset-core/src/menus/index.ts index 8580af6ae2b..1614d840f9e 100644 --- a/superset-frontend/packages/superset-core/src/api/menus.ts +++ b/superset-frontend/packages/superset-core/src/menus/index.ts @@ -37,7 +37,7 @@ * ``` */ -import { Disposable } from './core'; +import { Disposable } from '../common'; /** * Represents a menu item that links a view to a command. diff --git a/superset-frontend/packages/superset-core/src/api/sqlLab.ts b/superset-frontend/packages/superset-core/src/sqlLab/index.ts similarity index 99% rename from superset-frontend/packages/superset-core/src/api/sqlLab.ts rename to superset-frontend/packages/superset-core/src/sqlLab/index.ts index f2290676da3..cae3bc2d4e5 100644 --- a/superset-frontend/packages/superset-core/src/api/sqlLab.ts +++ b/superset-frontend/packages/superset-core/src/sqlLab/index.ts @@ -29,8 +29,8 @@ * - Global APIs: Functions and events available across the entire SQL Lab interface */ -import { Event, Database, SupersetError, Column } from './core'; -import { EditorHandle } from './editors'; +import { Event, Database, SupersetError, Column } from '../common'; +import { EditorHandle } from '../editors'; /** * Provides imperative control over the code editor component. diff --git a/superset-frontend/packages/superset-core/src/ui/testing.tsx b/superset-frontend/packages/superset-core/src/testing.tsx similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/testing.tsx rename to superset-frontend/packages/superset-core/src/testing.tsx diff --git a/superset-frontend/packages/superset-core/src/ui/theme/GlobalStyles.tsx b/superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/GlobalStyles.tsx rename to superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx diff --git a/superset-frontend/packages/superset-core/src/ui/theme/Theme.test.tsx b/superset-frontend/packages/superset-core/src/theme/Theme.test.tsx similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/Theme.test.tsx rename to superset-frontend/packages/superset-core/src/theme/Theme.test.tsx diff --git a/superset-frontend/packages/superset-core/src/ui/theme/Theme.tsx b/superset-frontend/packages/superset-core/src/theme/Theme.tsx similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/Theme.tsx rename to superset-frontend/packages/superset-core/src/theme/Theme.tsx diff --git a/superset-frontend/packages/superset-core/src/ui/theme/exampleThemes.ts b/superset-frontend/packages/superset-core/src/theme/exampleThemes.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/exampleThemes.ts rename to superset-frontend/packages/superset-core/src/theme/exampleThemes.ts diff --git a/superset-frontend/packages/superset-core/src/ui/theme/index.tsx b/superset-frontend/packages/superset-core/src/theme/index.tsx similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/index.tsx rename to superset-frontend/packages/superset-core/src/theme/index.tsx diff --git a/superset-frontend/packages/superset-core/src/ui/theme/types.ts b/superset-frontend/packages/superset-core/src/theme/types.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/types.ts rename to superset-frontend/packages/superset-core/src/theme/types.ts diff --git a/superset-frontend/packages/superset-core/src/ui/theme/utils/index.ts b/superset-frontend/packages/superset-core/src/theme/utils/index.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/utils/index.ts rename to superset-frontend/packages/superset-core/src/theme/utils/index.ts diff --git a/superset-frontend/packages/superset-core/src/ui/theme/utils/themeUtils.test.ts b/superset-frontend/packages/superset-core/src/theme/utils/themeUtils.test.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/utils/themeUtils.test.ts rename to superset-frontend/packages/superset-core/src/theme/utils/themeUtils.test.ts diff --git a/superset-frontend/packages/superset-core/src/ui/theme/utils/themeUtils.ts b/superset-frontend/packages/superset-core/src/theme/utils/themeUtils.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/utils/themeUtils.ts rename to superset-frontend/packages/superset-core/src/theme/utils/themeUtils.ts diff --git a/superset-frontend/packages/superset-core/src/ui/theme/utils/utils.test.ts b/superset-frontend/packages/superset-core/src/theme/utils/utils.test.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/theme/utils/utils.test.ts rename to superset-frontend/packages/superset-core/src/theme/utils/utils.test.ts diff --git a/superset-frontend/packages/superset-core/src/ui/translation/README.md b/superset-frontend/packages/superset-core/src/translation/README.md similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/translation/README.md rename to superset-frontend/packages/superset-core/src/translation/README.md diff --git a/superset-frontend/packages/superset-core/src/ui/translation/Translator.ts b/superset-frontend/packages/superset-core/src/translation/Translator.ts similarity index 98% rename from superset-frontend/packages/superset-core/src/ui/translation/Translator.ts rename to superset-frontend/packages/superset-core/src/translation/Translator.ts index 52283a7294e..bf27ec7ce4f 100644 --- a/superset-frontend/packages/superset-core/src/ui/translation/Translator.ts +++ b/superset-frontend/packages/superset-core/src/translation/Translator.ts @@ -17,7 +17,7 @@ * under the License. */ import UntypedJed from 'jed'; -import logging from '../../utils/logging'; +import logging from '../utils/logging'; import { Jed, TranslatorConfig, diff --git a/superset-frontend/packages/superset-core/src/ui/translation/TranslatorSingleton.ts b/superset-frontend/packages/superset-core/src/translation/TranslatorSingleton.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/translation/TranslatorSingleton.ts rename to superset-frontend/packages/superset-core/src/translation/TranslatorSingleton.ts diff --git a/superset-frontend/packages/superset-core/src/ui/translation/index.ts b/superset-frontend/packages/superset-core/src/translation/index.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/translation/index.ts rename to superset-frontend/packages/superset-core/src/translation/index.ts diff --git a/superset-frontend/packages/superset-core/src/ui/translation/types/index.ts b/superset-frontend/packages/superset-core/src/translation/types/index.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/translation/types/index.ts rename to superset-frontend/packages/superset-core/src/translation/types/index.ts diff --git a/superset-frontend/packages/superset-core/src/ui/translation/types/jed.ts b/superset-frontend/packages/superset-core/src/translation/types/jed.ts similarity index 100% rename from superset-frontend/packages/superset-core/src/ui/translation/types/jed.ts rename to superset-frontend/packages/superset-core/src/translation/types/jed.ts diff --git a/superset-frontend/packages/superset-core/src/ui/index.ts b/superset-frontend/packages/superset-core/src/ui/index.ts deleted file mode 100644 index ba78535d95d..00000000000 --- a/superset-frontend/packages/superset-core/src/ui/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -export * from './theme'; -export * from './components'; -export * from './translation'; diff --git a/superset-frontend/packages/superset-core/src/spec/utils/logging.test.ts b/superset-frontend/packages/superset-core/src/utils/logging.test.ts similarity index 94% rename from superset-frontend/packages/superset-core/src/spec/utils/logging.test.ts rename to superset-frontend/packages/superset-core/src/utils/logging.test.ts index 11962db4ef9..2856ba59119 100644 --- a/superset-frontend/packages/superset-core/src/spec/utils/logging.test.ts +++ b/superset-frontend/packages/superset-core/src/utils/logging.test.ts @@ -22,7 +22,7 @@ beforeEach(() => { }); test('should pipe to `console` methods', () => { - const { logging } = require('@apache-superset/core'); + const { logging } = require('@apache-superset/core/utils'); jest.spyOn(logging, 'debug').mockImplementation(); jest.spyOn(logging, 'log').mockImplementation(); @@ -51,7 +51,7 @@ test('should pipe to `console` methods', () => { test('should use noop functions when console unavailable', () => { Object.assign(window, { console: undefined }); - const { logging } = require('@apache-superset/core'); + const { logging } = require('@apache-superset/core/utils'); expect(() => { logging.debug(); diff --git a/superset-frontend/packages/superset-core/src/api/views.ts b/superset-frontend/packages/superset-core/src/views/index.ts similarity index 98% rename from superset-frontend/packages/superset-core/src/api/views.ts rename to superset-frontend/packages/superset-core/src/views/index.ts index 26c3a0eb4e2..a79098fb12a 100644 --- a/superset-frontend/packages/superset-core/src/api/views.ts +++ b/superset-frontend/packages/superset-core/src/views/index.ts @@ -36,7 +36,7 @@ */ import { ReactElement } from 'react'; -import { Disposable } from './core'; +import { Disposable } from '../common'; /** * Represents a contributed view in the application. diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx index 82de6b7cecc..03d7a70438b 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx @@ -17,8 +17,8 @@ * under the License. */ import { kebabCase } from 'lodash'; -import { t } from '@apache-superset/core'; -import { useTheme, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme, styled } from '@apache-superset/core/theme'; import { Tooltip } from '@superset-ui/core/components'; interface CertifiedIconWithTooltipProps { diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnOption.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnOption.tsx index 1fc55b7b09b..ca3c9edb164 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnOption.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnOption.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, ReactNode, useLayoutEffect, RefObject } from 'react'; -import { css, styled, SupersetTheme } from '@apache-superset/core/ui'; +import { css, styled, SupersetTheme } from '@apache-superset/core/theme'; import { SafeMarkdown, Tooltip, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnTypeLabel/ColumnTypeLabel.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnTypeLabel/ColumnTypeLabel.tsx index 57988ee9651..8ea43bdc8a6 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnTypeLabel/ColumnTypeLabel.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/ColumnTypeLabel/ColumnTypeLabel.tsx @@ -18,9 +18,9 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; +import { GenericDataType } from '@apache-superset/core/common'; import { ClockCircleOutlined, QuestionOutlined, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx index 009d3bc35c2..ff2807be8b1 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode } 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 { InfoTooltip, Tooltip, Icons } from '@superset-ui/core/components'; type ValidationError = string; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlSubSectionHeader.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlSubSectionHeader.tsx index 456faf6ba01..79be75e55dd 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlSubSectionHeader.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlSubSectionHeader.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; export const ControlSubSectionHeader = styled.div` ${({ theme }) => css` diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx index 1f7f43c4e49..b272403df0c 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx @@ -19,7 +19,7 @@ import { useState, ReactNode, useLayoutEffect, RefObject } from 'react'; import { Metric } from '@superset-ui/core'; -import { css, styled, SupersetTheme } from '@apache-superset/core/ui'; +import { css, styled, SupersetTheme } from '@apache-superset/core/theme'; import { SafeMarkdown, Typography, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/SQLPopover.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/SQLPopover.tsx index 68ef3fbbed0..437e933f1f7 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/SQLPopover.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/SQLPopover.tsx @@ -22,8 +22,8 @@ import { SQLEditor, } from '@superset-ui/core/components'; import { CalculatorOutlined } from '@ant-design/icons'; -import { t } from '@apache-superset/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; const StyledCalculatorIcon = styled(CalculatorOutlined)` ${({ theme }) => css` diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx index 8a4fb2a745e..d4a1aec7fe7 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx @@ -18,8 +18,8 @@ */ import { ReactNode, RefObject } from 'react'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { ColumnMeta, Metric } from '@superset-ui/chart-controls'; const TooltipSectionWrapper = styled.div` diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/constants.ts b/superset-frontend/packages/superset-ui-chart-controls/src/constants.ts index d467f1c522b..8b53d872663 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/constants.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/constants.ts @@ -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 { DTTM_ALIAS, QueryColumn, QueryMode } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ColumnMeta, SortSeriesData, SortSeriesType } from './types'; export const DEFAULT_MAX_ROW = 100000; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/fixtures.ts b/superset-frontend/packages/superset-ui-chart-controls/src/fixtures.ts index 9a988a49e9a..fd0aeb516be 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/fixtures.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/fixtures.ts @@ -17,7 +17,7 @@ * under the License. */ import { DatasourceType } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { Dataset } from './types'; export const TestDataset: Dataset = { diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx index 12bb52af9e4..cd200003209 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx @@ -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 { RollingType, ComparisonType } from '@superset-ui/core'; import { ControlSubSectionHeader } from '../components/ControlSubSectionHeader'; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/annotationsAndLayers.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/annotationsAndLayers.tsx index 97ec274ac58..7ee318a46ae 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/annotationsAndLayers.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/annotationsAndLayers.tsx @@ -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 { ControlPanelSectionConfig } from '../types'; export const annotationLayers = []; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx index c00fa892c30..cc98584223d 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx @@ -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 { ControlSubSectionHeader } from '../components/ControlSubSectionHeader'; import { ControlPanelSectionConfig } from '../types'; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/echartsTimeSeriesQuery.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/echartsTimeSeriesQuery.tsx index 17cc5b73b7d..a8c61c5e1b9 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/echartsTimeSeriesQuery.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/echartsTimeSeriesQuery.tsx @@ -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 { ControlPanelSectionConfig, ControlSetRow } from '../types'; import { contributionModeControl, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/forecastInterval.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/forecastInterval.tsx index a3a874a15dc..fa8b7ed579f 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/forecastInterval.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/forecastInterval.tsx @@ -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 { legacyValidateInteger, legacyValidateNumber } from '@superset-ui/core'; import { ControlPanelSectionConfig } from '../types'; import { displayTimeRelatedControls } from '../utils'; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/matrixify.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/matrixify.tsx index c92e8f911c6..dde1f0431db 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/matrixify.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/matrixify.tsx @@ -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 { ControlPanelSectionConfig } from '../types'; export const matrixifyEnableSection: ControlPanelSectionConfig = { diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/sections.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/sections.tsx index d5bd0ee2a37..f1e3c793d4c 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/sections.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/sections.tsx @@ -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 { ControlPanelSectionConfig } from '../types'; // A few standard controls sections that are used internally. diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/sections/timeComparison.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/sections/timeComparison.tsx index aacdbbe16d2..6f0f2641fa4 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/sections/timeComparison.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/sections/timeComparison.tsx @@ -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 { ComparisonType } from '@superset-ui/core'; import { diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx index 95ca7645f04..c244893d614 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { JsonValue } from '@superset-ui/core'; import { Radio, Tooltip, TooltipPlacement } from '@superset-ui/core/components'; import { ControlHeader } from '../../components/ControlHeader'; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/customControls.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/customControls.tsx index 1d6a33ba8e9..fd355ff1167 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/customControls.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/customControls.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ContributionType, ensureIsArray, @@ -26,7 +26,7 @@ import { QueryFormColumn, QueryFormMetric, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ControlPanelState, ControlState, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/dndControls.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/dndControls.tsx index bc8c0b0c774..807c698f83d 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/dndControls.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/dndControls.tsx @@ -17,9 +17,9 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryColumn, validateNonEmpty } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ExtraControlProps, SharedControlConfig, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/matrixifyControls.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/matrixifyControls.tsx index 274da0f7f26..be93b6fec1c 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/matrixifyControls.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/matrixifyControls.tsx @@ -18,7 +18,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNonEmpty } from '@superset-ui/core'; import { SharedControlConfig } from '../types'; import { dndAdhocMetricControl } from './dndControls'; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/mixins.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/mixins.tsx index 6587723cc7b..840dfc3a35f 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/mixins.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/mixins.tsx @@ -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, NO_TIME_RANGE, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx index 0ec021d11f6..fdedfcac032 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx @@ -33,7 +33,7 @@ * control interface. */ import { isEmpty } from 'lodash'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getCategoricalSchemeRegistry, getSequentialSchemeRegistry, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts index 8825f5aca64..1cc9743f4cf 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts @@ -36,7 +36,7 @@ import type { QueryResponse, TimeFormatter, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { sharedControls, sharedControlComponents } from './shared-controls'; export type { Metric } from '@superset-ui/core'; diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/utils/D3Formatting.ts b/superset-frontend/packages/superset-ui-chart-controls/src/utils/D3Formatting.ts index 7c43cef3b33..5a331448b28 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/utils/D3Formatting.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/utils/D3Formatting.ts @@ -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, NumberFormats, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/utils/checkColumnType.ts b/superset-frontend/packages/superset-ui-chart-controls/src/utils/checkColumnType.ts index 744aadb3912..5981ba09406 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/utils/checkColumnType.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/utils/checkColumnType.ts @@ -17,7 +17,7 @@ * under the License. */ import { ensureIsArray, ValueOf } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ControlPanelState, isDataset, isQueryResponse } from '../types'; export function checkColumnType( diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/utils/columnChoices.ts b/superset-frontend/packages/superset-ui-chart-controls/src/utils/columnChoices.ts index f1dfa22b8da..3c60f9d8f3d 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/utils/columnChoices.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/utils/columnChoices.ts @@ -17,7 +17,7 @@ * under the License. */ import { QueryColumn, QueryResponse } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ColumnMeta, Dataset, isDataset, isQueryResponse } from '../types'; export function columnsByType( diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/utils/getColorFormatters.ts b/superset-frontend/packages/superset-ui-chart-controls/src/utils/getColorFormatters.ts index 81d1ee40a42..5869472de9b 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/utils/getColorFormatters.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/utils/getColorFormatters.ts @@ -18,7 +18,7 @@ */ import memoizeOne from 'memoize-one'; import { isString, isBoolean } from 'lodash'; -import { isBlank } from '@apache-superset/core'; +import { isBlank } from '@apache-superset/core/utils'; import { addAlpha, DataRecord } from '@superset-ui/core'; import { ColorFormatters, diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/utils/isSortable.ts b/superset-frontend/packages/superset-ui-chart-controls/src/utils/isSortable.ts index 679878100ba..7de415a03b5 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/utils/isSortable.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/utils/isSortable.ts @@ -21,7 +21,7 @@ import { isPhysicalColumn, QueryFormColumn, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { checkColumnType, ControlStateMapping } from '..'; export function isSortable(controls: ControlStateMapping): boolean { diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/components/ColumnOption.test.tsx b/superset-frontend/packages/superset-ui-chart-controls/test/components/ColumnOption.test.tsx index 347e5ee5749..2d9a380ba35 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/components/ColumnOption.test.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/test/components/ColumnOption.test.tsx @@ -18,7 +18,7 @@ */ import '@testing-library/jest-dom'; import { render } from '@superset-ui/core/spec'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ColumnOption, ColumnOptionProps } from '../../src'; jest.mock('@superset-ui/chart-controls/components/SQLPopover', () => ({ diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/components/ColumnTypeLabel.test.tsx b/superset-frontend/packages/superset-ui-chart-controls/test/components/ColumnTypeLabel.test.tsx index c216fba3291..fc65cd26f86 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/components/ColumnTypeLabel.test.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/test/components/ColumnTypeLabel.test.tsx @@ -19,7 +19,7 @@ import { isValidElement } from 'react'; import { render, screen } from '@superset-ui/core/spec'; import '@testing-library/jest-dom'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ColumnTypeLabel, ColumnTypeLabelProps } from '../../src'; describe('ColumnOption', () => { diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/shared-controls/customControls.test.tsx b/superset-frontend/packages/superset-ui-chart-controls/test/shared-controls/customControls.test.tsx index 7aece02d9be..38681840a77 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/shared-controls/customControls.test.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/test/shared-controls/customControls.test.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { xAxisForceCategoricalControl } from '../../src/shared-controls/customControls'; import { checkColumnType } from '../../src/utils/checkColumnType'; import type { ControlState } from '@superset-ui/chart-controls'; diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/utils/checkColumnType.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/utils/checkColumnType.test.ts index 00c0bfc20ad..ef0fcf510c2 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/utils/checkColumnType.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/utils/checkColumnType.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { testQueryResponse } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { checkColumnType, TestDataset } from '../../src'; test('checkColumnType columns from a Dataset', () => { diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/utils/columnChoices.test.tsx b/superset-frontend/packages/superset-ui-chart-controls/test/utils/columnChoices.test.tsx index bc135886b54..c3728c2c37a 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/utils/columnChoices.test.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/test/utils/columnChoices.test.tsx @@ -17,7 +17,7 @@ * under the License. */ import { DatasourceType, testQueryResponse } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { columnChoices } from '../../src'; describe('columnChoices()', () => { diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/utils/getColorFormatters.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/utils/getColorFormatters.test.ts index 16e4feeb3e7..1ed3f031d70 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/utils/getColorFormatters.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/utils/getColorFormatters.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { configure } from '@apache-superset/core'; +import { configure } from '@apache-superset/core/translation'; import { Comparator, getOpacity, diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/utils/getTemporalColumns.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/utils/getTemporalColumns.test.ts index e5943882a1b..57a6a3c5daf 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/utils/getTemporalColumns.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/utils/getTemporalColumns.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { testQueryResponse, testQueryResults } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { Dataset, getTemporalColumns, diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/utils/isSortable.test.ts b/superset-frontend/packages/superset-ui-chart-controls/test/utils/isSortable.test.ts index 05917623613..8c58aba3294 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/test/utils/isSortable.test.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/test/utils/isSortable.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlStateMapping } from '@superset-ui/chart-controls'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { isSortable } from '../../src/utils/isSortable'; const controls: ControlStateMapping = { diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx index 3d20b8b0f07..3a262c00b72 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx @@ -17,8 +17,8 @@ * under the License. */ -import { t } from '@apache-superset/core'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { FallbackPropsWithDimension } from './SuperChart'; export type Props = Partial; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridCell.test.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridCell.test.tsx index 1528680cb44..1a962b25530 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridCell.test.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridCell.test.tsx @@ -19,7 +19,7 @@ import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom'; -import { ThemeProvider, supersetTheme } from '@apache-superset/core/ui'; +import { ThemeProvider, supersetTheme } from '@apache-superset/core/theme'; import MatrixifyGridCell from './MatrixifyGridCell'; import { MatrixifyGridCell as MatrixifyGridCellType } from '../../types/matrixify'; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridCell.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridCell.tsx index b25dd04a3c6..5a808378c84 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridCell.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridCell.tsx @@ -18,8 +18,8 @@ */ import { memo, useMemo } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { MatrixifyGridCell as GridCellData } from '../../types/matrixify'; import StatefulChart from '../StatefulChart'; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx index 1ba393f122f..7c1fc8d7bc7 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx @@ -19,8 +19,8 @@ import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; -import { ThemeProvider } from '@apache-superset/core/ui'; -import { supersetTheme } from '@apache-superset/core'; +import { ThemeProvider } from '@apache-superset/core/theme'; +import { supersetTheme } from '@apache-superset/core/theme'; import MatrixifyGridRenderer from './MatrixifyGridRenderer'; import { generateMatrixifyGrid } from './MatrixifyGridGenerator'; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.tsx index 6d6e53b9031..90402f8e782 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.tsx @@ -18,7 +18,7 @@ */ import { useMemo } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { MatrixifyFormData } from '../../types/matrixify'; import { generateMatrixifyGrid } from './MatrixifyGridGenerator'; import MatrixifyGridCell from './MatrixifyGridCell'; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/NoResultsComponent.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/NoResultsComponent.tsx index 90fcbb4d6a5..4e2dce9eb69 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/NoResultsComponent.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/NoResultsComponent.tsx @@ -18,7 +18,8 @@ */ import { CSSProperties } from 'react'; -import { css, styled, t } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; const MESSAGE_STYLES: CSSProperties = { maxWidth: 800 }; const MIN_WIDTH_FOR_BODY = 250; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/StatefulChart.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/StatefulChart.tsx index b3ef2efa2b1..2e9a4903410 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/StatefulChart.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/StatefulChart.tsx @@ -19,7 +19,7 @@ import { useState, useEffect, useRef, useCallback } from 'react'; import { ParentSize } from '@visx/responsive'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryFormData, QueryData, diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChartCore.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChartCore.tsx index 9fea3c3153a..844dbae7c6a 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChartCore.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/SuperChartCore.tsx @@ -19,7 +19,7 @@ /* eslint-disable react/jsx-sort-default-props */ import { PureComponent } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { createSelector } from 'reselect'; import getChartComponentRegistry from '../registries/ChartComponentRegistrySingleton'; import getChartTransformPropsRegistry from '../registries/ChartTransformPropsRegistrySingleton'; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts index 77727e471fd..a66667c5b36 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts @@ -19,7 +19,7 @@ import { RefObject } from 'react'; import { createSelector, lruMemoize } from 'reselect'; -import { supersetTheme, SupersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme, SupersetTheme } from '@apache-superset/core/theme'; import { AppSection, Behavior, diff --git a/superset-frontend/packages/superset-ui-core/src/components/ActionButton/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/ActionButton/index.tsx index 4d2d19c01c5..ccc2cbd2b71 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ActionButton/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/ActionButton/index.tsx @@ -23,7 +23,7 @@ import { type TooltipPlacement, type IconType, } from '@superset-ui/core/components'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; export interface ActionProps { label: string; diff --git a/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx index 6ec452d5a9e..56230e130f0 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx @@ -32,7 +32,7 @@ import { AsyncEsmComponent, PlaceholderProps, } from '@superset-ui/core/components/AsyncEsmComponent'; -import { useTheme, css } from '@apache-superset/core/ui'; +import { useTheme, css } from '@apache-superset/core/theme'; import { Global } from '@emotion/react'; export { getTooltipHTML } from './Tooltip'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Badge/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Badge/index.tsx index adf0011627a..8ea419c7c99 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Badge/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Badge/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Badge as AntdBadge } from 'antd'; import type { BadgeProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx index 3a78ef989bf..626abfaa404 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx @@ -19,7 +19,7 @@ import { Children, ReactElement, Fragment } from 'react'; import cx from 'classnames'; import { Button as AntdButton } from 'antd'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { Tooltip } from '../Tooltip'; import type { ButtonColorType, diff --git a/superset-frontend/packages/superset-ui-core/src/components/CachedLabel/TooltipContent.tsx b/superset-frontend/packages/superset-ui-core/src/components/CachedLabel/TooltipContent.tsx index 4874f50a776..da85ff5cd06 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/CachedLabel/TooltipContent.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/CachedLabel/TooltipContent.tsx @@ -18,7 +18,7 @@ */ import { FC } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { extendedDayjs } from '../../utils/dates'; interface Props { diff --git a/superset-frontend/packages/superset-ui-core/src/components/CachedLabel/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/CachedLabel/index.tsx index b370ad7f6b4..027526fe33f 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/CachedLabel/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/CachedLabel/index.tsx @@ -18,7 +18,7 @@ */ import { useState, FC } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Icons } from '@superset-ui/core/components/Icons'; import { Label } from '../Label'; import { Tooltip } from '../Tooltip'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Card/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Card/index.tsx index 5a34f1a4880..0099728f94d 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Card/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Card/index.tsx @@ -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 { Card as AntdCard } from 'antd'; import type { CardProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/CertifiedBadge.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/CertifiedBadge.stories.tsx index c340a2c2ed7..f755e9324c8 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/CertifiedBadge.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/CertifiedBadge.stories.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { configure as configureTranslation } from '@apache-superset/core'; +import { configure as configureTranslation } from '@apache-superset/core/translation'; import { CertifiedBadge } from '.'; import type { CertifiedBadgeProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/index.tsx index 47e1abc84d5..04089b2f90e 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/index.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '../Tooltip'; import type { CertifiedBadgeProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Checkbox/CheckboxIcons.tsx b/superset-frontend/packages/superset-ui-core/src/components/Checkbox/CheckboxIcons.tsx index 77dd457397f..a9d07f73067 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Checkbox/CheckboxIcons.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Checkbox/CheckboxIcons.tsx @@ -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'; export const CheckboxChecked = () => { const theme = useTheme(); diff --git a/superset-frontend/packages/superset-ui-core/src/components/CodeSyntaxHighlighter/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/CodeSyntaxHighlighter/index.tsx index 0ca6f6c590f..131abad4304 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/CodeSyntaxHighlighter/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/CodeSyntaxHighlighter/index.tsx @@ -20,7 +20,7 @@ import { useEffect, useState } from 'react'; import SyntaxHighlighterBase from 'react-syntax-highlighter/dist/cjs/light'; import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github'; import tomorrow from 'react-syntax-highlighter/dist/cjs/styles/hljs/tomorrow-night'; -import { isThemeDark, useTheme } from '@apache-superset/core/ui'; +import { isThemeDark, useTheme } from '@apache-superset/core/theme'; export type SupportedLanguage = 'sql' | 'htmlbars' | 'markdown' | 'json'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Collapse/Collapse.tsx b/superset-frontend/packages/superset-ui-core/src/components/Collapse/Collapse.tsx index bcb00f7abc5..eeb45ecaba7 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Collapse/Collapse.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Collapse/Collapse.tsx @@ -15,7 +15,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Collapse as AntdCollapse } from 'antd'; import type { CollapseProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Collapse/CollapseLabelInModal.tsx b/superset-frontend/packages/superset-ui-core/src/components/Collapse/CollapseLabelInModal.tsx index d0a5d39cd34..1b434415908 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Collapse/CollapseLabelInModal.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Collapse/CollapseLabelInModal.tsx @@ -15,7 +15,7 @@ * specific language governing permissions and limitations * under the License. */ -import { useTheme, css } from '@apache-superset/core/ui'; +import { useTheme, css } from '@apache-superset/core/theme'; import { Typography } from '@superset-ui/core/components/Typography'; import { Icons } from '@superset-ui/core/components'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/ConfirmModal/ConfirmModal.test.tsx b/superset-frontend/packages/superset-ui-core/src/components/ConfirmModal/ConfirmModal.test.tsx index 65df48b1400..0d1eef0e25a 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ConfirmModal/ConfirmModal.test.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/ConfirmModal/ConfirmModal.test.tsx @@ -17,7 +17,7 @@ * under the License. */ import { render, screen, userEvent } from '@superset-ui/core/spec'; -import { ThemeProvider, supersetTheme } from '@apache-superset/core/ui'; +import { ThemeProvider, supersetTheme } from '@apache-superset/core/theme'; import { ConfirmModal } from '.'; const defaultProps = { diff --git a/superset-frontend/packages/superset-ui-core/src/components/ConfirmModal/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/ConfirmModal/index.tsx index bb9d1cc5a41..28eac0522ab 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ConfirmModal/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/ConfirmModal/index.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; -import { t } from '@apache-superset/core'; +import { styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Icons, Modal, Typography, Button } from '@superset-ui/core/components'; import type { FC, ReactElement, ReactNode } from 'react'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/CronPicker/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/CronPicker/index.tsx index f329e090dcb..7b4f1f68b5a 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/CronPicker/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/CronPicker/index.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import ReactCronPicker from 'react-js-cron'; import type { Locale, CronProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/DatePicker/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/DatePicker/index.tsx index 0657805d759..7fecc5a9296 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/DatePicker/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/DatePicker/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { DatePicker as AntdDatePicker } from 'antd'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import type { DatePickerProps, RangePickerProps } from './types'; export const DatePicker = (props: DatePickerProps) => ( diff --git a/superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx index 3b3e27b466d..55356166ea9 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { useState, useRef, useEffect, ChangeEvent } from 'react'; import { FormLabel } from '../Form'; import { Input, InputRef } from '../Input'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Divider/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Divider/index.tsx index c8e6a85b263..385710f7ba5 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Divider/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Divider/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Divider as AntdDivider } from 'antd'; import type { DividerProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Dropdown/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Dropdown/index.tsx index 19ef2d74bf2..d5092353e43 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Dropdown/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Dropdown/index.tsx @@ -19,7 +19,7 @@ import { ReactElement, cloneElement } from 'react'; import { Dropdown as AntdDropdown, DropdownProps } from 'antd'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { IconOrientation, diff --git a/superset-frontend/packages/superset-ui-core/src/components/DropdownButton/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/DropdownButton/index.tsx index e3ac5aa9b6f..d9cdb5d4632 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/DropdownButton/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/DropdownButton/index.tsx @@ -18,7 +18,7 @@ */ import { Dropdown } from 'antd'; import { kebabCase } from 'lodash'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Tooltip } from '../Tooltip'; import type { DropdownButtonProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.stories.tsx index 663436ba8fe..8790a2a6f53 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.stories.tsx @@ -18,7 +18,7 @@ */ import { useRef, useCallback, useState } from 'react'; import { isEqual } from 'lodash'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Button } from '../Button'; import { Select } from '../Select'; import type { DropdownContainerProps, DropdownRef } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.tsx b/superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.tsx index 14df91f4cf1..32a464f2ce8 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.tsx @@ -30,9 +30,9 @@ import { } from 'react'; import { Global } from '@emotion/react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { usePrevious } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { useResizeDetector } from 'react-resize-detector'; import { Badge, Icons, Button, Tooltip, Popover } from '..'; import { DropdownContainerProps, DropdownItem, DropdownRef } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/DynamicEditableTitle/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/DynamicEditableTitle/index.tsx index 3f4bc6e5e85..0604b976de0 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/DynamicEditableTitle/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/DynamicEditableTitle/index.tsx @@ -25,8 +25,8 @@ import { useLayoutEffect, useState, } from 'react'; -import { t } from '@apache-superset/core'; -import { css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, SupersetTheme, useTheme } from '@apache-superset/core/theme'; import { useResizeDetector } from 'react-resize-detector'; import { Tooltip } from '../Tooltip'; import { Input } from '../Input'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/EditableTitle/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/EditableTitle/index.tsx index 1c955deaa72..e2c5d139e4b 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/EditableTitle/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/EditableTitle/index.tsx @@ -17,8 +17,8 @@ * under the License. */ -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { useEffect, useState, useRef } from 'react'; import cx from 'classnames'; import { Tooltip } from '../Tooltip'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/EmptyState/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/EmptyState/index.tsx index 30031e50550..71f840e7aab 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/EmptyState/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/EmptyState/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode, SyntheticEvent } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, css, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css, SupersetTheme } from '@apache-superset/core/theme'; // Importing svg images import FilterResultsImage from './svgs/filter-results.svg'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/FaveStar/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/FaveStar/index.tsx index 504341f60d0..308e44e4630 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/FaveStar/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/FaveStar/index.tsx @@ -19,8 +19,8 @@ import { useCallback, useEffect, MouseEvent } from 'react'; -import { t } from '@apache-superset/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '../Tooltip'; import type { FaveStarProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Flex/Flex.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/Flex/Flex.stories.tsx index 5ba2311a73a..a9826fdb4e0 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Flex/Flex.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Flex/Flex.stories.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Flex } from '.'; import type { FlexProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Form/FormItem.tsx b/superset-frontend/packages/superset-ui-core/src/components/Form/FormItem.tsx index 77f59d90463..3b237d6e276 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Form/FormItem.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Form/FormItem.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Form } from 'antd'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; export const FormItem = styled(Form.Item)` ${({ theme }) => ` diff --git a/superset-frontend/packages/superset-ui-core/src/components/Form/FormLabel.tsx b/superset-frontend/packages/superset-ui-core/src/components/Form/FormLabel.tsx index 209312ae652..3cb6c176261 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Form/FormLabel.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Form/FormLabel.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; export type FormLabelProps = { children: ReactNode; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Form/LabeledErrorBoundInput.tsx b/superset-frontend/packages/superset-ui-core/src/components/Form/LabeledErrorBoundInput.tsx index 1506ecde1e7..882fabf8b41 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Form/LabeledErrorBoundInput.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Form/LabeledErrorBoundInput.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Button, Icons, InfoTooltip, Tooltip, Flex } from '..'; import { Input } from '../Input'; import { FormLabel } from './FormLabel'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/IconButton/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/IconButton/index.tsx index e2cef0ae681..31a7899d99b 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/IconButton/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/IconButton/index.tsx @@ -18,7 +18,7 @@ */ // eslint-disable-next-line -import { SupersetTheme, css } from '@apache-superset/core/ui'; +import { SupersetTheme, css } from '@apache-superset/core/theme'; import { Typography } from '../Typography'; import { Icons } from '../Icons'; import { Card } from '../Card'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/IconTooltip/IconTooltip.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/IconTooltip/IconTooltip.stories.tsx index f6bf8361b0f..f61affa3787 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/IconTooltip/IconTooltip.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/IconTooltip/IconTooltip.stories.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Icons } from '@superset-ui/core/components/Icons'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { IconTooltip } from '.'; import type { IconTooltipProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx b/superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx index 99374dfcc7c..e87e6a04adf 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Icons/BaseIcon.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { css, useTheme, getFontSize } from '@apache-superset/core/ui'; +import { css, useTheme, getFontSize } from '@apache-superset/core/theme'; import { AntdIconType, BaseIconProps, CustomIconType, IconType } from './types'; const genAriaLabel = (fileName: string) => { diff --git a/superset-frontend/packages/superset-ui-core/src/components/Icons/Icons.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/Icons/Icons.stories.tsx index 8aeea5fd2b8..db107ef282d 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Icons/Icons.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Icons/Icons.stories.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState } from 'react'; -import { styled, supersetTheme } from '@apache-superset/core/ui'; +import { styled, supersetTheme } from '@apache-superset/core/theme'; import { Input } from '../Input'; import { Icons, IconNameType } from '.'; import type { IconType } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/InfoTooltip/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/InfoTooltip/index.tsx index 553ac193084..171d7ab4790 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/InfoTooltip/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/InfoTooltip/index.tsx @@ -19,8 +19,8 @@ import { KeyboardEvent, useMemo } from 'react'; import { SerializedStyles, CSSObject } from '@emotion/react'; import { kebabCase } from 'lodash'; -import { t } from '@apache-superset/core'; -import { css, useTheme, getFontSize } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, useTheme, getFontSize } from '@apache-superset/core/theme'; import { CloseCircleOutlined, InfoCircleOutlined, diff --git a/superset-frontend/packages/superset-ui-core/src/components/Label/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Label/index.tsx index 6b311e8808a..4d1de1fe125 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Label/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Label/index.tsx @@ -18,7 +18,7 @@ */ import { Tag } from '@superset-ui/core/components/Tag'; import { css } from '@emotion/react'; -import { useTheme, getColorVariants } from '@apache-superset/core/ui'; +import { useTheme, getColorVariants } from '@apache-superset/core/theme'; import { DatasetTypeLabel } from './reusable/DatasetTypeLabel'; import { PublishedLabel } from './reusable/PublishedLabel'; import type { LabelProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx b/superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx index d8567d93b2a..48784d937a3 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx @@ -17,8 +17,8 @@ * under the License. */ import { Icons } from '@superset-ui/core/components/Icons'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { Label } from '..'; // Define the prop types for DatasetTypeLabel diff --git a/superset-frontend/packages/superset-ui-core/src/components/Label/reusable/PublishedLabel.tsx b/superset-frontend/packages/superset-ui-core/src/components/Label/reusable/PublishedLabel.tsx index 86a80ed2fcd..91fe9facde2 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Label/reusable/PublishedLabel.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Label/reusable/PublishedLabel.tsx @@ -17,8 +17,8 @@ * under the License. */ import { Icons } from '@superset-ui/core/components/Icons'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { Label } from '..'; // Define props for the PublishedLabel component diff --git a/superset-frontend/packages/superset-ui-core/src/components/LastUpdated/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/LastUpdated/index.tsx index 1816f2310eb..1a070e0be7b 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/LastUpdated/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/LastUpdated/index.tsx @@ -18,8 +18,8 @@ */ import { useEffect, useState, FunctionComponent } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, css, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css, useTheme } from '@apache-superset/core/theme'; import { Dayjs } from 'dayjs'; import { extendedDayjs } from '../../utils/dates'; import 'dayjs/plugin/updateLocale'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/List/index.ts b/superset-frontend/packages/superset-ui-core/src/components/List/index.ts index 1927d288f75..5c3030e7c97 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/List/index.ts +++ b/superset-frontend/packages/superset-ui-core/src/components/List/index.ts @@ -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 { List as AntdList } from 'antd'; import type { ListProps, ListItemProps, ListItemMetaProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/ListViewCard/ImageLoader.tsx b/superset-frontend/packages/superset-ui-core/src/components/ListViewCard/ImageLoader.tsx index b2ba0530009..fec42902cab 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ListViewCard/ImageLoader.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/ListViewCard/ImageLoader.tsx @@ -18,8 +18,8 @@ */ import { useEffect, useState, DetailedHTMLProps, HTMLAttributes } from 'react'; -import { logging } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { logging } from '@apache-superset/core/utils'; +import { styled } from '@apache-superset/core/theme'; export type BackgroundPosition = 'top' | 'bottom'; interface ImageContainerProps { diff --git a/superset-frontend/packages/superset-ui-core/src/components/ListViewCard/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/ListViewCard/index.tsx index 2e718662f22..c5994181323 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ListViewCard/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/ListViewCard/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC } from 'react'; -import { styled, useTheme, css } from '@apache-superset/core/ui'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; import { Skeleton } from '../Skeleton'; import { Card } from '../Card'; import { CertifiedBadge } from '../CertifiedBadge'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Loading/index.test.tsx b/superset-frontend/packages/superset-ui-core/src/components/Loading/index.test.tsx index e43a59bed66..ce50d5595d6 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Loading/index.test.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Loading/index.test.tsx @@ -18,7 +18,7 @@ */ import { render, screen } from '@superset-ui/core/spec'; -import * as themeModule from '@apache-superset/core/ui/theme'; +import * as themeModule from '@apache-superset/core/theme'; import { Loading } from '.'; // Mock the loading SVG import since it's a file stub in tests diff --git a/superset-frontend/packages/superset-ui-core/src/components/Loading/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Loading/index.tsx index 7d060f3e465..1b8335e207a 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Loading/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Loading/index.tsx @@ -18,8 +18,8 @@ */ import cls from 'classnames'; -import { t } from '@apache-superset/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Loading as LoaderSvg } from '../assets'; import type { LoadingProps, SizeOption } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Menu/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Menu/index.tsx index 9bdbcd34f67..6357471d19d 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Menu/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Menu/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { ReactElement } from 'react'; import { Menu as AntdMenu } from 'antd'; import { MenuProps as AntdMenuProps } from 'antd/es/menu'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Metadata/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Metadata/index.tsx index e4328578e8e..11698f305c4 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Metadata/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Metadata/index.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; const MetadataWrapper = styled.div` display: flex; diff --git a/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/ContentConfig.tsx b/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/ContentConfig.tsx index 12915382006..225549989b5 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/ContentConfig.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/ContentConfig.tsx @@ -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 { ensureIsArray } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { ContentType, MetadataType } from '.'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.stories.tsx index 9228769255e..bec6b033e18 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.stories.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { useResizeDetector } from 'react-resize-detector'; import MetadataBar, { MetadataBarProps, MetadataType } from '.'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.test.tsx b/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.test.tsx index 1a42c264ffa..e1356579a8d 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.test.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.test.tsx @@ -19,7 +19,7 @@ import { render, screen, userEvent, within } from '@superset-ui/core/spec'; import * as resizeDetector from 'react-resize-detector'; import { hexToRgb } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; import MetadataBar, { MIN_NUMBER_ITEMS, MAX_NUMBER_ITEMS, diff --git a/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.tsx b/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.tsx index ccfca5028c3..32e71f6b1aa 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.tsx @@ -19,7 +19,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { useResizeDetector } from 'react-resize-detector'; import { uniqWith } from 'lodash'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Tooltip } from '../Tooltip'; import { TooltipPlacement } from '../Tooltip/types'; import { ContentType } from './ContentType'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Modal/FormModal.tsx b/superset-frontend/packages/superset-ui-core/src/components/Modal/FormModal.tsx index d4581e380c7..a7fe66fd898 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Modal/FormModal.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Modal/FormModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useCallback } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Button } from '../Button'; import { Form } from '../Form'; import { Modal } from './Modal'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx b/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx index 173ab6f83a2..890084be4c6 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx @@ -18,8 +18,8 @@ */ import { isValidElement, cloneElement, useMemo, useRef, useState } from 'react'; import { isNil } from 'lodash'; -import { t } from '@apache-superset/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { Modal as AntdModal, ModalProps as AntdModalProps } from 'antd'; import { Resizable } from 're-resizable'; import Draggable, { diff --git a/superset-frontend/packages/superset-ui-core/src/components/PageHeaderWithActions/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/PageHeaderWithActions/index.tsx index 469d9598f99..ae11b6ceff8 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/PageHeaderWithActions/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/PageHeaderWithActions/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode, ReactElement } from 'react'; -import { t } from '@apache-superset/core'; -import { css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, SupersetTheme, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import type { DropdownProps } from '../Dropdown/types'; import type { TooltipPlacement } from '../Tooltip/types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/PopoverDropdown/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/PopoverDropdown/index.tsx index 927e38399f5..c619add42c1 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/PopoverDropdown/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/PopoverDropdown/index.tsx @@ -18,7 +18,7 @@ */ import { Key } from 'react'; import cx from 'classnames'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Dropdown } from '../Dropdown'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/PopoverSection/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/PopoverSection/index.tsx index 200705247d7..39009eba76a 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/PopoverSection/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/PopoverSection/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { MouseEventHandler, ReactNode } from 'react'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '../Tooltip'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/ProgressBar/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/ProgressBar/index.tsx index b08caada3f6..f76879eb2c3 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ProgressBar/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/ProgressBar/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Progress as AntdProgress } from 'antd'; import { ProgressProps } from 'antd/es/progress/progress'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Radio/Radio.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/Radio/Radio.stories.tsx index 403fd0eed73..377525a21a1 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Radio/Radio.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Radio/Radio.stories.tsx @@ -17,7 +17,7 @@ * under the License. */ import type { StoryObj } from '@storybook/react'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Space } from '../Space'; import { Radio, type RadioProps, type RadioGroupWrapperProps } from '.'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/RefreshLabel/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/RefreshLabel/index.tsx index 0489fad65d6..08f5b1c88f9 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/RefreshLabel/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/RefreshLabel/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { MouseEventHandler, forwardRef } from 'react'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import type { IconType } from '@superset-ui/core/components/Icons/types'; import { Tooltip } from '../Tooltip'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx index 172632da03d..9acd2f4893f 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx @@ -31,7 +31,7 @@ import { ClipboardEvent, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, usePrevious, diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx index 569f865333c..a5863d1a6f4 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx @@ -30,7 +30,7 @@ import { ReactElement, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, usePrevious } from '@superset-ui/core'; import { Constants } from '@superset-ui/core/components'; import { diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/constants.ts b/superset-frontend/packages/superset-ui-core/src/components/Select/constants.ts index 4132870b68b..b72b146068a 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Select/constants.ts +++ b/superset-frontend/packages/superset-ui-core/src/components/Select/constants.ts @@ -17,7 +17,7 @@ * under the License. */ import { LabeledValue as AntdLabeledValue } from 'antd/es/select'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { rankedSearchCompare } from '../../utils/rankedSearchCompare'; import { RawValue, SelectProps } from './types'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx index 47dc0f297a7..b90d18fd904 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Select } from 'antd'; import { Icons } from '@superset-ui/core/components/Icons'; import { Spin } from '../Spin'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/utils.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/utils.tsx index 234fba49c9d..05f5483fe1f 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Select/utils.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Select/utils.tsx @@ -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 { ReactElement, RefObject } from 'react'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Table/VirtualTable.tsx b/superset-frontend/packages/superset-ui-core/src/components/Table/VirtualTable.tsx index 35cdc89e8ee..b9bc81715a0 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Table/VirtualTable.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Table/VirtualTable.tsx @@ -27,7 +27,7 @@ import { useResizeDetector } from 'react-resize-detector'; import { useEffect, useRef, useState, useCallback, CSSProperties } from 'react'; import { VariableSizeGrid as Grid } from 'react-window'; import { safeHtmlSpan } from '@superset-ui/core'; -import { useTheme, styled } from '@apache-superset/core/ui'; +import { useTheme, styled } from '@apache-superset/core/theme'; import { TableSize, ETableAction } from './index'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/ActionCell/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/ActionCell/index.tsx index e14852255d3..6a7102f5b4b 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/ActionCell/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/ActionCell/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useEffect } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { MenuDotsDropdown } from '../../../Dropdown'; import { IconOrientation } from '../../../Dropdown/types'; import { Menu, MenuProps } from '../../../Menu'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/NullCell/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/NullCell/index.tsx index 1e30e9f3523..3ea5d20b176 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/NullCell/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/NullCell/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Constants } from '../../..'; const GrayCell = styled.span` diff --git a/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/NumericCell/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/NumericCell/index.tsx index e84aaf0487e..ea609fc80c4 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/NumericCell/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Table/cell-renderers/NumericCell/index.tsx @@ -17,7 +17,7 @@ * specific language governing permissions and limitations * under the License. */ -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; export interface NumericCellProps { /** diff --git a/superset-frontend/packages/superset-ui-core/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx b/superset-frontend/packages/superset-ui-core/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx index 80c1cb7d4ca..c0f123ae44e 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Table/header-renderers/HeaderWithRadioGroup.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState } from 'react'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Icons, Radio, Popover } from '../..'; export interface HeaderWithRadioGroupProps { diff --git a/superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx index 084bea37530..f3087139886 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx @@ -21,9 +21,9 @@ import { useState, useEffect, useRef, Key, FC } from 'react'; import { Table as AntTable } from 'antd'; import { ColumnsType, TableProps as AntTableProps } from 'antd/es/table'; import { PaginationProps } from 'antd/es/pagination'; -import { t } from '@apache-superset/core'; -import { logging } from '@apache-superset/core'; -import { useTheme, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { logging } from '@apache-superset/core/utils'; +import { useTheme, styled } from '@apache-superset/core/theme'; import { Loading } from '@superset-ui/core/components'; import { RowSelectionType } from 'antd/es/table/interface'; import InteractiveTableUtils from './utils/InteractiveTableUtils'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx index 1edd0f440fb..bc6ec88ab65 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx @@ -25,7 +25,7 @@ import { TableBodyPropGetter, TablePropGetter, } from 'react-table'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Table, TableSize } from '@superset-ui/core/components/Table'; import { TableRowSelection, SorterResult } from 'antd/es/table/interface'; import { mapColumns, mapRows } from './utils'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/TableView/TableView.tsx b/superset-frontend/packages/superset-ui-core/src/components/TableView/TableView.tsx index 4544013b34c..87e899f7362 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/TableView/TableView.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/TableView/TableView.tsx @@ -18,7 +18,7 @@ */ import { memo, useEffect, useRef, useMemo, useCallback } from 'react'; import { isEqual } from 'lodash'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { useFilters, usePagination, useSortBy, useTable } from 'react-table'; import { Empty } from '@superset-ui/core/components'; import TableCollection from '@superset-ui/core/components/TableCollection'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/Tabs/Tabs.tsx b/superset-frontend/packages/superset-ui-core/src/components/Tabs/Tabs.tsx index 16c1c1ffb21..9a192168fae 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Tabs/Tabs.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Tabs/Tabs.tsx @@ -17,7 +17,7 @@ * under the License. */ import type { FC } from 'react'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; // eslint-disable-next-line no-restricted-imports import { Tabs as AntdTabs, TabsProps as AntdTabsProps } from 'antd'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/ThemedAgGridReact.test.tsx b/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/ThemedAgGridReact.test.tsx index 8b2dd2c18ff..4d34e022edf 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/ThemedAgGridReact.test.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/ThemedAgGridReact.test.tsx @@ -19,13 +19,13 @@ import { render, screen } from '@superset-ui/core/spec'; import { AgGridReact } from 'ag-grid-react'; import { createRef } from 'react'; -import { ThemeProvider, supersetTheme } from '@apache-superset/core'; -import * as uiModule from '@apache-superset/core/ui'; +import { ThemeProvider, supersetTheme } from '@apache-superset/core/theme'; +import * as uiModule from '@apache-superset/core/theme'; import { ThemedAgGridReact } from './index'; // Mock useThemeMode hook -jest.mock('@apache-superset/core/ui', () => ({ - ...jest.requireActual('@apache-superset/core/ui'), +jest.mock('@apache-superset/core/theme', () => ({ + ...jest.requireActual('@apache-superset/core/theme'), useThemeMode: jest.fn(() => false), // Default to light mode })); diff --git a/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/index.tsx index 7742eb06eda..507a6d73b2a 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/index.tsx @@ -24,7 +24,7 @@ import { colorSchemeDark, colorSchemeLight, } from 'ag-grid-community'; -import { useTheme, useThemeMode } from '@apache-superset/core/ui'; +import { useTheme, useThemeMode } from '@apache-superset/core/theme'; // Note: With ag-grid v34's new theming API, CSS files are injected automatically // Do NOT import 'ag-grid-community/styles/ag-grid.css' or theme CSS files diff --git a/superset-frontend/packages/superset-ui-core/src/components/Timer/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Timer/index.tsx index 88ddcd1946f..e42ba8cd55a 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Timer/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Timer/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, useRef, useState } from 'react'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { now, fDuration } from '../../utils/dates'; import { Label, Icons, type LabelType } from '..'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/TimezoneSelector/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/TimezoneSelector/index.tsx index aedd9f6c1f1..a790963e333 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/TimezoneSelector/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/TimezoneSelector/index.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Select } from '@superset-ui/core/components'; import { extendedDayjs } from '../../utils/dates'; import { diff --git a/superset-frontend/packages/superset-ui-core/src/components/TruncatedList/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/TruncatedList/index.tsx index e0fc92f37da..9b6653a7511 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/TruncatedList/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/TruncatedList/index.tsx @@ -19,9 +19,9 @@ import { ReactNode, Key, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useTruncation } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Tooltip } from '@superset-ui/core/components'; export type TruncatedListProps = { diff --git a/superset-frontend/packages/superset-ui-core/src/components/Typography/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Typography/index.tsx index 7b5a1bfe45a..aff5b395786 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Typography/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Typography/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { Typography as AntdTypography } from 'antd'; export type { TitleProps } from 'antd/es/typography/Title'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/index.tsx index 55f7a51bf83..cca9c7573df 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/index.tsx @@ -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 { Icons, Modal, Typography, Button } from '@superset-ui/core/components'; import type { FC, ReactElement } from 'react'; diff --git a/superset-frontend/packages/superset-ui-core/src/components/WarningIconWithTooltip/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/WarningIconWithTooltip/index.tsx index cb90977e035..070cfff6d4b 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/WarningIconWithTooltip/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/WarningIconWithTooltip/index.tsx @@ -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 { Icons, type IconType, SafeMarkdown, Tooltip } from '..'; export interface WarningIconWithTooltipProps { diff --git a/superset-frontend/packages/superset-ui-core/src/components/constants.ts b/superset-frontend/packages/superset-ui-core/src/components/constants.ts index 3999febd745..e07111f1b2d 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/constants.ts +++ b/superset-frontend/packages/superset-ui-core/src/components/constants.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core/ui/translation'; +import { t } from '@apache-superset/core/translation'; export const Constants = { FAST_DEBOUNCE: 250, diff --git a/superset-frontend/packages/superset-ui-core/src/query/extractQueryFields.ts b/superset-frontend/packages/superset-ui-core/src/query/extractQueryFields.ts index d544b8fd14e..24c3303b2fd 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/extractQueryFields.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/extractQueryFields.ts @@ -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 { removeDuplicates } from '../utils'; import getColumnLabel from './getColumnLabel'; import getMetricLabel from './getMetricLabel'; diff --git a/superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts b/superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts index 78cdf2bde69..cc555fa4e93 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts @@ -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 { COMMON_ERR_MESSAGES, JsonObject, diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/Column.ts b/superset-frontend/packages/superset-ui-core/src/query/types/Column.ts index 0fe1317e3de..c157d05fc1b 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/types/Column.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/types/Column.ts @@ -18,7 +18,7 @@ * under the License. */ -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { QueryFormColumn } from './QueryFormData'; export interface AdhocColumn { diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts b/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts index 14d4e2273b2..929a5147c6d 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/types/Query.ts @@ -17,7 +17,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 { DatasourceType } from './Datasource'; import { BinaryOperator, SetOperator, UnaryOperator } from './Operator'; import { AppliedTimeExtras, TimeRange } from './Time'; diff --git a/superset-frontend/packages/superset-ui-core/src/query/types/QueryResponse.ts b/superset-frontend/packages/superset-ui-core/src/query/types/QueryResponse.ts index a1786da7389..210685f3480 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/types/QueryResponse.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/types/QueryResponse.ts @@ -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 { TimeseriesDataRecord } from '../../chart'; import { AnnotationData } from './AnnotationLayer'; diff --git a/superset-frontend/packages/superset-ui-core/src/spec/index.tsx b/superset-frontend/packages/superset-ui-core/src/spec/index.tsx index 34d0d7a03d2..212bc2f897b 100644 --- a/superset-frontend/packages/superset-ui-core/src/spec/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/spec/index.tsx @@ -20,7 +20,7 @@ import userEvent from '@testing-library/user-event'; import { ReactElement } from 'react'; import { render, RenderOptions } from '@testing-library/react'; import '@testing-library/jest-dom'; -import { themeObject } from '@apache-superset/core/ui'; +import { themeObject } from '@apache-superset/core/theme'; // Define the wrapper component outside const AllTheProviders = ({ children }: { children: React.ReactNode }) => ( diff --git a/superset-frontend/packages/superset-ui-core/src/style/stories/Theme.stories.tsx b/superset-frontend/packages/superset-ui-core/src/style/stories/Theme.stories.tsx index 71b0a8d9f99..eb6a8df95b0 100644 --- a/superset-frontend/packages/superset-ui-core/src/style/stories/Theme.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/style/stories/Theme.stories.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; const colorTypes = ['primary', 'error', 'warning', 'success', 'info']; diff --git a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts index 9770951342b..7a5ba44dce8 100644 --- a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts +++ b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { logging as logger } from '@apache-superset/core'; +import { logging as logger } from '@apache-superset/core/utils'; // We can codegen the enum definition based on a list of supported flags that we // check into source control. We're hardcoding the supported flags for now. diff --git a/superset-frontend/packages/superset-ui-core/src/utils/tooltip.ts b/superset-frontend/packages/superset-ui-core/src/utils/tooltip.ts index 2ca22fcd79d..15e5b4be4de 100644 --- a/superset-frontend/packages/superset-ui-core/src/utils/tooltip.ts +++ b/superset-frontend/packages/superset-ui-core/src/utils/tooltip.ts @@ -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 { sanitizeHtml } from './html'; const TRUNCATION_STYLE = ` diff --git a/superset-frontend/packages/superset-ui-core/src/validator/legacyValidateInteger.ts b/superset-frontend/packages/superset-ui-core/src/validator/legacyValidateInteger.ts index e2b3303506b..02f70aa3604 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/legacyValidateInteger.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/legacyValidateInteger.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; /** * formerly called integer() diff --git a/superset-frontend/packages/superset-ui-core/src/validator/legacyValidateNumber.ts b/superset-frontend/packages/superset-ui-core/src/validator/legacyValidateNumber.ts index e075500c76d..e2f4ed4c248 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/legacyValidateNumber.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/legacyValidateNumber.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; /** * formerly called numeric() diff --git a/superset-frontend/packages/superset-ui-core/src/validator/validateInteger.ts b/superset-frontend/packages/superset-ui-core/src/validator/validateInteger.ts index 4aa4af1d21b..dfe6923aeaf 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/validateInteger.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/validateInteger.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; export default function validateInteger(v: unknown): string | false { if ( diff --git a/superset-frontend/packages/superset-ui-core/src/validator/validateMapboxStylesUrl.ts b/superset-frontend/packages/superset-ui-core/src/validator/validateMapboxStylesUrl.ts index 66c474d5ad4..06e3c9334a7 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/validateMapboxStylesUrl.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/validateMapboxStylesUrl.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const VALIDE_OSM_URLS = ['https://tile.osm', 'https://tile.openstreetmap']; diff --git a/superset-frontend/packages/superset-ui-core/src/validator/validateMaxValue.ts b/superset-frontend/packages/superset-ui-core/src/validator/validateMaxValue.ts index 353e14315c6..3a8bcb70d44 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/validateMaxValue.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/validateMaxValue.ts @@ -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'; export default function validateMaxValue( v: unknown, diff --git a/superset-frontend/packages/superset-ui-core/src/validator/validateNonEmpty.ts b/superset-frontend/packages/superset-ui-core/src/validator/validateNonEmpty.ts index 1d8a525c631..3e7ec790f9f 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/validateNonEmpty.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/validateNonEmpty.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; export default function validateNonEmpty(v: unknown): string | false { if ( diff --git a/superset-frontend/packages/superset-ui-core/src/validator/validateNumber.ts b/superset-frontend/packages/superset-ui-core/src/validator/validateNumber.ts index 524d27d4b58..8b77468b84b 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/validateNumber.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/validateNumber.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; export default function validateNumber(v: unknown): string | false { if ( diff --git a/superset-frontend/packages/superset-ui-core/src/validator/validateServerPagination.ts b/superset-frontend/packages/superset-ui-core/src/validator/validateServerPagination.ts index 4fde0b12aa9..c109e3c8f1d 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/validateServerPagination.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/validateServerPagination.ts @@ -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'; export default function validateServerPagination( v: unknown, diff --git a/superset-frontend/packages/superset-ui-core/src/validator/validateTimeComparisonRangeValues.ts b/superset-frontend/packages/superset-ui-core/src/validator/validateTimeComparisonRangeValues.ts index 2c8ccc5cb98..d29391cdb03 100644 --- a/superset-frontend/packages/superset-ui-core/src/validator/validateTimeComparisonRangeValues.ts +++ b/superset-frontend/packages/superset-ui-core/src/validator/validateTimeComparisonRangeValues.ts @@ -18,7 +18,7 @@ */ import { ComparisonTimeRangeType } from '../time-comparison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray } from '../utils'; export const validateTimeComparisonRangeValues = ( diff --git a/superset-frontend/packages/superset-ui-core/test/chart/clients/ChartClient.test.ts b/superset-frontend/packages/superset-ui-core/test/chart/clients/ChartClient.test.ts index f1b69b96de8..5bc0b6a9f1a 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/clients/ChartClient.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/chart/clients/ChartClient.test.ts @@ -29,7 +29,7 @@ import { ChartMetadata, VizType, } from '@superset-ui/core'; -import { configure as configureTranslation } from '@apache-superset/core'; +import { configure as configureTranslation } from '@apache-superset/core/translation'; import { LOGIN_GLOB } from '../fixtures/constants'; import { sankeyFormData } from '../fixtures/formData'; diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/MockChartPlugins.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/MockChartPlugins.tsx index d89d7d53879..88a83e818d5 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/MockChartPlugins.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/MockChartPlugins.tsx @@ -19,7 +19,7 @@ /* eslint-disable max-classes-per-file */ import { QueryFormData, ChartMetadata, ChartPlugin } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; const DIMENSION_STYLE = { fontSize: 36, diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx index e053f3c393d..0ec17ed6f2f 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx @@ -20,7 +20,7 @@ import '@testing-library/jest-dom'; import mockConsole, { RestoreConsole } from 'jest-mock-console'; import { ChartProps } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; import { render, screen, waitFor } from '@superset-ui/core/spec'; import SuperChartCore from '../../../src/chart/components/SuperChartCore'; import { diff --git a/superset-frontend/packages/superset-ui-core/test/chart/models/ChartPlugin.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/models/ChartPlugin.test.tsx index 41a455a734b..c7b43c469cd 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/models/ChartPlugin.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/models/ChartPlugin.test.tsx @@ -32,7 +32,7 @@ import { DatasourceType, VizType, } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; describe('ChartPlugin', () => { const FakeChart = () => test; diff --git a/superset-frontend/packages/superset-ui-core/test/chart/models/ChartProps.test.ts b/superset-frontend/packages/superset-ui-core/test/chart/models/ChartProps.test.ts index 232d40c93a0..72614935ec6 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/models/ChartProps.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/chart/models/ChartProps.test.ts @@ -18,7 +18,7 @@ */ import { Behavior, ChartProps } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; const RAW_FORM_DATA = { some_field: 1, diff --git a/superset-frontend/packages/superset-ui-core/test/components/Icons/AsyncIcon.integration.test.tsx b/superset-frontend/packages/superset-ui-core/test/components/Icons/AsyncIcon.integration.test.tsx index 7e36a460bf6..9727246d8dc 100644 --- a/superset-frontend/packages/superset-ui-core/test/components/Icons/AsyncIcon.integration.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/components/Icons/AsyncIcon.integration.test.tsx @@ -19,7 +19,7 @@ import '@testing-library/jest-dom'; import { render, fireEvent } from '@testing-library/react'; -import { SupersetTheme, ThemeProvider } from '@apache-superset/core/ui'; +import { SupersetTheme, ThemeProvider } from '@apache-superset/core/theme'; // CRITICAL: Don't import from the mocked path - import directly to avoid global mocks import AsyncIcon from '../../../src/components/Icons/AsyncIcon'; diff --git a/superset-frontend/packages/superset-ui-core/test/fixtures.ts b/superset-frontend/packages/superset-ui-core/test/fixtures.ts index 9904d6fa5f4..78a90dd1817 100644 --- a/superset-frontend/packages/superset-ui-core/test/fixtures.ts +++ b/superset-frontend/packages/superset-ui-core/test/fixtures.ts @@ -17,7 +17,7 @@ * under the License. */ import { AdhocMetric } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; export const NUM_METRIC: AdhocMetric = { expressionType: 'SIMPLE', diff --git a/superset-frontend/packages/superset-ui-core/test/query/extractQueryFields.test.ts b/superset-frontend/packages/superset-ui-core/test/query/extractQueryFields.test.ts index 38dd0c72e18..a55fb9e5408 100644 --- a/superset-frontend/packages/superset-ui-core/test/query/extractQueryFields.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/query/extractQueryFields.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { QueryMode } from '@superset-ui/core'; -import { configure } from '@apache-superset/core'; +import { configure } from '@apache-superset/core/translation'; import extractQueryFields from '../../src/query/extractQueryFields'; import { NUM_METRIC } from '../fixtures'; diff --git a/superset-frontend/packages/superset-ui-core/test/utils/featureFlag.test.ts b/superset-frontend/packages/superset-ui-core/test/utils/featureFlag.test.ts index 0bdfae3ddc3..6ee4ccaf644 100644 --- a/superset-frontend/packages/superset-ui-core/test/utils/featureFlag.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/utils/featureFlag.test.ts @@ -52,12 +52,12 @@ test('does nothing if feature flags are already initialized', () => { }); test('returns false and raises console error if feature flags have not been initialized', () => { - const logging = jest.spyOn(uiCore.logging, 'error'); + const logging = jest.spyOn(uiCore.utils.logging, 'error'); Object.defineProperty(window, 'featureFlags', { value: undefined, }); expect(isFeatureEnabled(FeatureFlag.DrillBy)).toEqual(false); - expect(uiCore.logging.error).toHaveBeenCalled(); + expect(uiCore.utils.logging.error).toHaveBeenCalled(); expect(logging).toHaveBeenCalledWith('Failed to query feature flag DRILL_BY'); }); diff --git a/superset-frontend/packages/superset-ui-core/test/validator/setup.ts b/superset-frontend/packages/superset-ui-core/test/validator/setup.ts index 5196a451729..5ab46c76665 100644 --- a/superset-frontend/packages/superset-ui-core/test/validator/setup.ts +++ b/superset-frontend/packages/superset-ui-core/test/validator/setup.ts @@ -17,6 +17,6 @@ * under the License. */ -import { configure as configureTranslation } from '@apache-superset/core'; +import { configure as configureTranslation } from '@apache-superset/core/translation'; configureTranslation(); diff --git a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.ts b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.ts index f5fd3c29f88..794959fe7c4 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.ts @@ -19,7 +19,8 @@ import { extent as d3Extent, range as d3Range } from 'd3-array'; import { select as d3Select } from 'd3-selection'; import { getSequentialSchemeRegistry } from '@superset-ui/core'; -import { SupersetTheme, t } from '@apache-superset/core/ui'; +import { SupersetTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import CalHeatMapImport from './vendor/cal-heatmap'; import { convertUTCTimestampToLocal } from './utils'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/ReactCalendar.tsx b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/ReactCalendar.tsx index a40b0d3d216..fdcf5880c16 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/ReactCalendar.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/ReactCalendar.tsx @@ -17,7 +17,7 @@ * under the License. */ import { reactify } from '@superset-ui/core'; -import { styled, css, useTheme } from '@apache-superset/core/ui'; +import { styled, css, useTheme } from '@apache-superset/core/theme'; import { Global } from '@emotion/react'; import Component from './Calendar'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/controlPanel.ts index 33780f5ef21..79e5670f7a1 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/controlPanel.ts @@ -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 { legacyValidateInteger } from '@superset-ui/core'; import { ControlPanelConfig, diff --git a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/index.ts index e83b45b2a8d..ea2ce7e47ec 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/index.ts @@ -17,7 +17,7 @@ * under the License. */ import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import transformProps from './transformProps'; import example from './images/example.jpg'; import exampleDark from './images/example-dark.jpg'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.ts b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.ts index 1ccf62f996a..61f74e0d3ac 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.ts @@ -10,7 +10,7 @@ /* eslint-disable */ import d3tip from 'd3-tip'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { getContrastingColor } from '@superset-ui/core'; var d3 = typeof require === 'function' ? require('d3') : window.d3; diff --git a/superset-frontend/plugins/legacy-plugin-chart-chord/src/ReactChord.tsx b/superset-frontend/plugins/legacy-plugin-chart-chord/src/ReactChord.tsx index 040e67e6d3c..32ae7719df7 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-chord/src/ReactChord.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-chord/src/ReactChord.tsx @@ -17,7 +17,7 @@ * under the License. */ import { reactify } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import Component from './Chord'; // Type-erase the render function to allow flexible prop spreading in the wrapper. diff --git a/superset-frontend/plugins/legacy-plugin-chart-chord/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-chord/src/controlPanel.ts index f4469e8d173..011227e6ff4 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-chord/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-chord/src/controlPanel.ts @@ -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, validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, diff --git a/superset-frontend/plugins/legacy-plugin-chart-chord/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-chord/src/index.ts index 7da9d07b1c9..4f96b2f547b 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-chord/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-chord/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import example from './images/chord.jpg'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.tsx b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.tsx index d1afe8289d9..5d5ee7edef1 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.tsx @@ -17,7 +17,7 @@ * under the License. */ import { reactify } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import Component from './CountryMap'; // Type-erase the render function to allow flexible prop spreading in the wrapper. diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/controlPanel.ts index eed4fe0f088..ba163e2617f 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/controlPanel.ts @@ -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, diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.ts index 0478dc122f8..e59be4ec4b0 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import exampleUsa from './images/exampleUsa.jpg'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/stories/CountryMap.stories.tsx b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/stories/CountryMap.stories.tsx index 194b77f7c4d..e4f46b2bcbe 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/stories/CountryMap.stories.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/stories/CountryMap.stories.tsx @@ -19,7 +19,7 @@ import { useEffect, useState } from 'react'; import { JsonObject, seed, SuperChart, SequentialD3 } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import CountryMapChartPlugin, { countries, } from '@superset-ui/legacy-plugin-chart-country-map'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/HorizonChart.tsx b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/HorizonChart.tsx index 0ec77b51b89..a95cae279dd 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/HorizonChart.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/HorizonChart.tsx @@ -20,7 +20,7 @@ import { PureComponent } from 'react'; import { extent as d3Extent } from 'd3-array'; import { ensureIsArray } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import HorizonRow, { DEFAULT_COLORS } from './HorizonRow'; interface DataValue { diff --git a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/controlPanel.ts index 880051fda29..e778b01129a 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/controlPanel.ts @@ -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, diff --git a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/index.ts index 20564d19576..ea5a357c4b4 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import example from './images/Horizon_Chart.jpg'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/controlPanel.ts index 58a3f327eb5..80d6ab0c7f6 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/controlPanel.ts @@ -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 { validateMapboxStylesUrl } from '@superset-ui/core'; import { columnChoices, diff --git a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/index.ts index 595387721da..666e8ea2303 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +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'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/MapBox.stories.tsx b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/MapBox.stories.tsx index 1f646df037c..8f68419e769 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/MapBox.stories.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/MapBox.stories.tsx @@ -19,7 +19,7 @@ /* eslint-disable no-magic-numbers */ import { SuperChart } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import MapBoxChartPlugin from '@superset-ui/legacy-plugin-chart-map-box'; import { withResizableChartDemo } from '@storybook-shared'; import { generateData } from './data'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/data.ts b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/data.ts index 589fcc69e34..10edb62dcab 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/data.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/data.ts @@ -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'; /* eslint-disable sort-keys, no-magic-numbers */ export const generateData = (theme: SupersetTheme) => ({ diff --git a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.tsx b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.tsx index 65f94ea66b7..c7a1edfa897 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.tsx @@ -18,7 +18,7 @@ */ /* eslint-disable react/no-array-index-key */ import { PureComponent } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import TTestTable, { DataEntry } from './TTestTable'; interface PairedTTestProps { diff --git a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/controlPanel.ts index e3fb8b46e7b..973cc0127a4 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/controlPanel.ts @@ -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 } from '@superset-ui/chart-controls'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.ts index 1fefb490678..a2e28a06114 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import example from './images/example.jpg'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.tsx b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.tsx index 6f989daa1ae..f5e8a5c8a9b 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.tsx @@ -18,7 +18,7 @@ */ import { type ComponentProps } from 'react'; import { reactify, addAlpha } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import Component from './ParallelCoordinates'; const ReactComponent = reactify(Component); diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/controlPanel.ts index 782a8cacc0a..726d06a20e9 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/controlPanel.ts @@ -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 } from '@superset-ui/chart-controls'; const config: ControlPanelConfig = { diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.ts index 641d9a8af63..f5cb8a5c381 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/ReactPartition.tsx b/superset-frontend/plugins/legacy-plugin-chart-partition/src/ReactPartition.tsx index 8677fa1b805..57bed0264e2 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-partition/src/ReactPartition.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-partition/src/ReactPartition.tsx @@ -17,7 +17,7 @@ * under the License. */ import { reactify } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import Component from './Partition'; // Type-erase the render function to allow flexible prop spreading in the wrapper. diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/controlPanel.tsx b/superset-frontend/plugins/legacy-plugin-chart-partition/src/controlPanel.tsx index 537da7a8954..ece7cbe0259 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-partition/src/controlPanel.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-partition/src/controlPanel.tsx @@ -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 { ColumnMeta, diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.ts index ef30851d933..0ae654105c5 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.tsx b/superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.tsx index 6ac6afdf59f..fde642a9b67 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.tsx @@ -17,7 +17,7 @@ * under the License. */ import { reactify } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { Global } from '@emotion/react'; import Component from './Rose'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-rose/src/controlPanel.tsx b/superset-frontend/plugins/legacy-plugin-chart-rose/src/controlPanel.tsx index fe0c7da0bd8..b4b25661319 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-rose/src/controlPanel.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-rose/src/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/legacy-plugin-chart-rose/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-rose/src/index.ts index 8e005b5d454..3fcf289f8a8 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-rose/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-rose/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/ReactWorldMap.tsx b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/ReactWorldMap.tsx index 53dca6da86f..704edac8315 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/ReactWorldMap.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/ReactWorldMap.tsx @@ -17,7 +17,7 @@ * under the License. */ import { reactify } from '@superset-ui/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { styled, useTheme } from '@apache-superset/core/theme'; import WorldMap from './WorldMap'; // Type-erase the render function to allow flexible prop spreading in the wrapper. diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/controlPanel.ts index 29cb3680661..974264e80fb 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/controlPanel.ts @@ -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, diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.ts b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.ts index 0a8d12bfe6c..4b53c5cb9ec 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx index b22de708785..d558532298d 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx @@ -37,7 +37,7 @@ import { StaticMap } from 'react-map-gl'; import DeckGL from '@deck.gl/react'; import type { Layer } from '@deck.gl/core'; import { JsonObject, JsonValue, usePrevious } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Device } from '@luma.gl/core'; import Tooltip, { TooltipProps } from './components/Tooltip'; import 'mapbox-gl/dist/mapbox-gl.css'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.test.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.test.tsx index 0930b58f011..f1e50c5b589 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.test.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.test.tsx @@ -18,7 +18,7 @@ */ import { render, screen, waitFor } from '@testing-library/react'; import '@testing-library/jest-dom'; -import { supersetTheme, ThemeProvider } from '@apache-superset/core/ui'; +import { supersetTheme, ThemeProvider } from '@apache-superset/core/theme'; import { Provider } from 'react-redux'; import { configureStore } from '@reduxjs/toolkit'; import { DatasourceType, SupersetClient } from '@superset-ui/core'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx index f0f4d34a959..c361eb755c8 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx @@ -40,7 +40,7 @@ import { SupersetClient, usePrevious, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Layer } from '@deck.gl/core'; import { diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/controlPanel.ts index 3bf2613e8a5..da720d82868 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/controlPanel.ts @@ -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 { viewport, mapboxStyle, autozoom } from '../utilities/Shared_DeckGL'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts index 9777b6fe5bb..84069b4d978 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/index.ts @@ -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'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx index 05e048a5995..fe21ce2955d 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx @@ -21,7 +21,7 @@ */ import { memo } from 'react'; import { formatNumber } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Color } from '@deck.gl/core'; const StyledLegend = styled.div` diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Tooltip.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Tooltip.tsx index a73c16e2b93..11ed4219d7b 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Tooltip.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Tooltip.tsx @@ -18,7 +18,7 @@ */ import { safeHtmlSpan } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { ReactNode } from 'react'; export type TooltipProps = { diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/controlPanel.ts index 9cf7a1d08ee..46c5e44bde3 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNonEmpty, legacyValidateInteger } from '@superset-ui/core'; import timeGrainSqlaAnimationOverrides, { columnChoices, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts index b3dcabb03de..e077e529f6a 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/Contour.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/Contour.tsx index bf5a1daf9ca..9c7f37eb4d3 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/Contour.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/Contour.tsx @@ -19,7 +19,7 @@ import { ContourLayer } from '@deck.gl/aggregation-layers'; import { PolygonLayer } from '@deck.gl/layers'; import { Position } from '@deck.gl/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { commonLayerProps } from '../common'; import sandboxedEval from '../../utils/sandbox'; import { GetLayerType, createDeckGLComponent } from '../../factory'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/controlPanel.ts index 9e9d92b46f2..ee53209ec30 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/controlPanel.ts @@ -20,7 +20,7 @@ import { ControlPanelConfig, getStandardizedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNonEmpty } from '@superset-ui/core'; import { autozoom, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts index c2759e0bc83..5fa660e8d04 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/controlPanel.ts index 889af60f094..cfb8c89cba6 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { legacyValidateInteger, isFeatureEnabled, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/index.ts index 587dcf181d1..9b2a8733b1e 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Geojson/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/controlPanel.ts index 6d59561bac0..c0a280e4b75 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/controlPanel.ts @@ -20,7 +20,7 @@ import { ControlPanelConfig, getStandardizedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNonEmpty } from '@superset-ui/core'; import { filterNulls, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/index.ts index f3326b1bda0..8055b8b716c 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Grid/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx index 194906b50d9..4fffc554080 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx @@ -18,7 +18,7 @@ */ import { HeatmapLayer } from '@deck.gl/aggregation-layers'; import { Position } from '@deck.gl/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getSequentialSchemeRegistry, JsonObject, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/controlPanel.ts index 21f1dbe8514..efeda7d0b15 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/controlPanel.ts @@ -20,7 +20,7 @@ import { ControlPanelConfig, formatSelectOptions, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNonEmpty, legacyValidateNumber, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts index 95dd519f992..465d9f740f0 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/controlPanel.ts index 580769f9a15..df0cf267ed8 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/controlPanel.ts @@ -20,7 +20,7 @@ import { ControlPanelConfig, getStandardizedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { autozoom, extruded, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts index eacfa995799..0c95e97a2b7 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Hex/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/controlPanel.ts index 194b9d92802..82248cc4923 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { filterNulls, autozoom, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts index a3c4f44bb17..e2e64d553f8 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/stories/Path.stories.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/stories/Path.stories.tsx index 1b1a4c0f410..0d5651ad946 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/stories/Path.stories.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Path/stories/Path.stories.tsx @@ -20,7 +20,7 @@ /* eslint-disable sort-keys */ /* eslint-disable no-magic-numbers */ import { SuperChart } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { PathChartPlugin } from '@superset-ui/legacy-preset-chart-deckgl'; import { withResizableChartDemo, dummyDatasource } from '@storybook-shared'; import payload from './payload'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.test.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.test.tsx index 9e8cf8f82f0..d6e1d640228 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.test.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.test.tsx @@ -20,7 +20,7 @@ import { render, screen } from '@testing-library/react'; // eslint-disable-next-line import/no-extraneous-dependencies import '@testing-library/jest-dom'; -import { supersetTheme, ThemeProvider } from '@apache-superset/core/ui'; +import { supersetTheme, ThemeProvider } from '@apache-superset/core/theme'; import DeckGLPolygon, { getPoints } from './Polygon'; import { COLOR_SCHEME_TYPES } from '../../utilities/utils'; import * as utils from '../../utils'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.tsx index e85c694b54a..0a4d8088b28 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.tsx @@ -22,7 +22,7 @@ /* eslint no-underscore-dangle: ["error", { "allow": ["", "__timestamp"] }] */ import { memo, useCallback, useEffect, useRef, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ContextMenuFilters, FilterState, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/controlPanel.ts index 56bcdcb93f5..45198a9d291 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/controlPanel.ts @@ -20,7 +20,7 @@ import { ControlPanelConfig, getStandardizedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import timeGrainSqlaAnimationOverrides from '../../utilities/controls'; import { COLOR_SCHEME_TYPES, formatSelectOptions } from '../../utilities/utils'; import { diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/index.ts index b7499e27e38..0d5a691ab4e 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/Scatter.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/Scatter.tsx index 20545763a65..5209493a3b0 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/Scatter.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/Scatter.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ScatterplotLayer } from '@deck.gl/layers'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { JsonObject, QueryFormData } from '@superset-ui/core'; import { isPointInBonds } from '../../utilities/utils'; import { commonLayerProps } from '../common'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/controlPanel.ts index 7438dcd003f..e670bcde231 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNonEmpty } from '@superset-ui/core'; import timeGrainSqlaAnimationOverrides from '../../utilities/controls'; import { diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/index.ts index c0a99d61fe3..ee43b4a2749 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/Screengrid.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/Screengrid.tsx index e78561d3edb..ec39564387a 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/Screengrid.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/Screengrid.tsx @@ -19,13 +19,13 @@ import { ScreenGridLayer } from '@deck.gl/aggregation-layers'; import { Color } from '@deck.gl/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { JsonObject, QueryFormData, CategoricalColorNamespace, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { COLOR_SCHEME_TYPES, ColorSchemeType, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/controlPanel.ts index 28884144506..22c31047204 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/controlPanel.ts @@ -20,7 +20,7 @@ import { ControlPanelConfig, getStandardizedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNonEmpty } from '@superset-ui/core'; import timeGrainSqlaAnimationOverrides from '../../utilities/controls'; import { diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/index.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/index.ts index 04458664eb7..30c6d9d7f67 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/index.ts @@ -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, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/spatialUtils.test.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/spatialUtils.test.ts index d9329760cc9..b33d2f3c86b 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/spatialUtils.test.ts +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/spatialUtils.test.ts @@ -21,7 +21,7 @@ import { DatasourceType, QueryObjectFilterClause, } from '@superset-ui/core'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { decode } from 'ngeohash'; import { diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/HandlebarsRenderer.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/HandlebarsRenderer.tsx index 7666ec31441..a6d0a0fdc36 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/HandlebarsRenderer.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/HandlebarsRenderer.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useEffect, useState, memo, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { sanitizeHtml } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; import Handlebars from 'handlebars'; import { isPlainObject } from 'lodash'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/Shared_DeckGL.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/Shared_DeckGL.tsx index 7c6680da5de..b2aabf4d931 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/Shared_DeckGL.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/Shared_DeckGL.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled, diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/TooltipTemplateControl.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/TooltipTemplateControl.tsx index 5c03826029d..94bdc970806 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/TooltipTemplateControl.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/TooltipTemplateControl.tsx @@ -19,8 +19,8 @@ import { useCallback } from 'react'; import { debounce } from 'lodash'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { InfoTooltip, Constants } from '@superset-ui/core/components'; import { ControlHeader } from '@superset-ui/chart-controls'; import { TooltipTemplateEditor } from './TooltipTemplateEditor'; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/TooltipTemplateEditor.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/TooltipTemplateEditor.tsx index 32ea0a2613b..e49ff09895e 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/TooltipTemplateEditor.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/TooltipTemplateEditor.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useEffect, useState } from 'react'; -import { styled, css, useThemeMode } from '@apache-superset/core/ui'; +import { styled, css, useThemeMode } from '@apache-superset/core/theme'; import { CodeEditor } from '@superset-ui/core/components'; const EditorContainer = styled.div` diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/sharedDndControls.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/sharedDndControls.tsx index 21909c6de0e..63808441c93 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/sharedDndControls.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/sharedDndControls.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { sharedControls } from '@superset-ui/chart-controls'; export const dndLineColumn = { diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/tooltipUtils.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/tooltipUtils.tsx index 994e34e014f..6d7711372a6 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/tooltipUtils.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/tooltipUtils.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { JsonObject, QueryFormData } from '@superset-ui/core'; import { useMemo, memo } from 'react'; import { HandlebarsRenderer } from './HandlebarsRenderer'; diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/controlPanel.ts index 03b56e727b2..f6073a37095 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/controlPanel.ts @@ -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, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/index.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/index.ts index 41c7baa8340..6ee81a6ed61 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core'; import transformProps from '../transformProps'; import example from './images/example.jpg'; diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/controlPanel.ts index 22ca8771878..0ef99b890aa 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/controlPanel.ts @@ -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 } from '@superset-ui/chart-controls'; const config: ControlPanelConfig = { diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/index.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/index.ts index 4f6091424bd..a6689705450 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from '../transformProps'; import example from './images/example.jpg'; diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/controlPanel.ts index 139a2c79b0e..5a8f8bfb1a1 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/controlPanel.ts @@ -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, getStandardizedControls, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.ts index b33682bdd8e..28229f649b9 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core'; import transformProps from '../transformProps'; import thumbnail from './images/thumbnail.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx index 756959d73c2..aebe4a56574 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx @@ -18,7 +18,7 @@ */ /* eslint-disable react/jsx-key */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ControlPanelSectionConfig, ControlSubSectionHeader, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.ts index d3dc4acea32..23b779e09e4 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.ts @@ -33,7 +33,7 @@ import { SMART_DATE_VERBOSE_ID, VizType, } from '@superset-ui/core'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; import 'nvd3-fork/build/nv.d3.css'; diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.tsx b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.tsx index 368f3b2183a..f472ac24528 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.tsx @@ -18,7 +18,7 @@ */ // @ts-nocheck -- legacy reactified component with untyped `this` context from reactify callbacks import { reactify } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import PropTypes from 'prop-types'; import Component from './NVD3Vis'; import { hideTooltips, removeTooltip } from './utils'; diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts index fef611203d5..da9aaffe3b6 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts @@ -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, D3_FORMAT_OPTIONS, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.ts index 48851a88ecd..bf98ec9a44e 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from '../transformProps'; import thumbnail from './images/thumbnail.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.ts index 19b2af126df..bafea70f29b 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.ts +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.ts @@ -17,7 +17,7 @@ * under the License. */ // @ts-nocheck -- vendor file; not fully typed -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; function extractTypes(metadata) { return Object.keys(metadata).reduce((prev, key) => { diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/CustomHeader.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/CustomHeader.tsx index 61761c0f927..cb6e58e5491 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/CustomHeader.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/CustomHeader.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/Pagination.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/Pagination.tsx index 267a0d59d6a..676a24562fb 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/Pagination.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/Pagination.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/TimeComparisonVisibility.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/TimeComparisonVisibility.tsx index 067b8845f2d..f8c8964a673 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/TimeComparisonVisibility.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/components/TimeComparisonVisibility.tsx @@ -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 { diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx index 45e0c8cb9ed..011c2cf0ef9 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTableChart.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTableChart.tsx index 79eee9a91ff..b4eae18de41 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTableChart.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx index 993bdf56f8f..c0aa70ea66d 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/index.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/index.ts index 6818ad020de..d17af0908b0 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/index.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/NumericCellRenderer.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/NumericCellRenderer.tsx index a13502374af..87529673110 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/NumericCellRenderer.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/NumericCellRenderer.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/TextCellRenderer.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/TextCellRenderer.tsx index eb52f206a88..9b24fa3cd33 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/TextCellRenderer.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/TextCellRenderer.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/stories/data.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/stories/data.ts index 1c9a0db8c35..6dfd11f77ea 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/stories/data.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/stories/data.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/styles/index.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/styles/index.tsx index e3aedf7e6ea..62e1fc35b79 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/styles/index.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/styles/index.tsx @@ -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 */ diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts index c22b6ff46c4..be174cb5a21 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/transformProps.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/formatValue.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/formatValue.ts index a6772d1e13a..2e2b76853c5 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/formatValue.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/formatValue.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts index e78e51aab70..84606c5013f 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useColDefs.ts @@ -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 { diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useTableTheme.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useTableTheme.ts index f37bcf4dc51..1ef82fa3839 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useTableTheme.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/useTableTheme.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.tsx b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.tsx index 647ce938d6c..b85535d5340 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.tsx +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/controlPanel.test.tsx @@ -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 { QueryFormData } from '@superset-ui/core'; import { Dataset, diff --git a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/utils/useColDefs.test.ts b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/utils/useColDefs.test.ts index 760be579792..9f2a44a82d0 100644 --- a/superset-frontend/plugins/plugin-chart-ag-grid-table/test/utils/useColDefs.test.ts +++ b/superset-frontend/plugins/plugin-chart-ag-grid-table/test/utils/useColDefs.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { renderHook } from '@testing-library/react-hooks'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { useColDefs } from '../../src/utils/useColDefs'; import { InputColumn } from '../../src/types'; diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/src/CartodiagramPlugin.tsx b/superset-frontend/plugins/plugin-chart-cartodiagram/src/CartodiagramPlugin.tsx index 15d7ca53e57..77f6eeeba83 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/src/CartodiagramPlugin.tsx +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/src/CartodiagramPlugin.tsx @@ -17,7 +17,7 @@ * under the License. */ import { createRef, useState } from 'react'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { styled, useTheme } from '@apache-superset/core/theme'; import OlMap from 'ol/Map'; import { CartodiagramPluginProps, diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/src/components/ChartLayer.tsx b/superset-frontend/plugins/plugin-chart-cartodiagram/src/components/ChartLayer.tsx index 33e3573f974..88f78098a2a 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/src/components/ChartLayer.tsx +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/src/components/ChartLayer.tsx @@ -20,7 +20,7 @@ import Layer from 'ol/layer/Layer'; import { FrameState } from 'ol/Map'; import { apply as applyTransform } from 'ol/transform'; import ReactDOM from 'react-dom'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { ChartConfig, ChartLayerOptions, ChartSizeValues } from '../types'; import { createChartComponent } from '../util/chartUtil'; import { getProjectedCoordinateFromPointGeoJson } from '../util/geometryUtil'; diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/src/components/ChartWrapper.tsx b/superset-frontend/plugins/plugin-chart-cartodiagram/src/components/ChartWrapper.tsx index bcdcbec4fc6..efc637f3b2e 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/src/components/ChartWrapper.tsx +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/src/components/ChartWrapper.tsx @@ -18,7 +18,7 @@ */ import { configureStore } from '@reduxjs/toolkit'; import { getChartComponentRegistry } from '@superset-ui/core'; -import { ThemeProvider } from '@apache-superset/core/ui'; +import { ThemeProvider } from '@apache-superset/core/theme'; import { FC, useEffect, useState } from 'react'; import { Provider as ReduxProvider } from 'react-redux'; import { ChartWrapperProps } from '../types'; diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/controlPanel.ts b/superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/controlPanel.ts index 7bb5d2e186b..c472ef4a5b0 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/controlPanel.ts +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/controlPanel.ts @@ -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 } from '@superset-ui/chart-controls'; import { selectedChartMutator } from '../util/controlPanelUtil'; diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/index.ts b/superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/index.ts index 34c3dcb56d8..7bf99854318 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/index.ts +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/src/types.ts b/superset-frontend/plugins/plugin-chart-cartodiagram/src/types.ts index 3e5528f86ec..9f05391dddb 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/src/types.ts +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/src/types.ts @@ -17,7 +17,7 @@ * under the License. */ import { DataRecord, TimeseriesDataRecord } from '@superset-ui/core'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { RenderFunction } from 'ol/layer/Layer'; import { Extent } from 'ol/extent'; import Source from 'ol/source/Source'; diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/src/util/chartUtil.tsx b/superset-frontend/plugins/plugin-chart-cartodiagram/src/util/chartUtil.tsx index 9932b9bab96..c37f5acc8c0 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/src/util/chartUtil.tsx +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/src/util/chartUtil.tsx @@ -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 { ChartConfig, ChartConfigFeature } from '../types'; import ChartWrapper from '../components/ChartWrapper'; diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/src/util/controlPanelUtil.tsx b/superset-frontend/plugins/plugin-chart-cartodiagram/src/util/controlPanelUtil.tsx index a2ae810858c..1048a02c67f 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/src/util/controlPanelUtil.tsx +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/src/util/controlPanelUtil.tsx @@ -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 } from '@superset-ui/chart-controls'; /** diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/transformProps.test.ts index e59b46955c1..f24217a5241 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/transformProps.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { ChartProps, getChartTransformPropsRegistry } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; import { LayerConf, MapViewConfigs, ZoomConfigs } from '../../src/types'; import transformProps from '../../src/plugin/transformProps'; import { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.tsx index c66e339aae4..209c4a20748 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/controlPanel.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/controlPanel.ts index e8557ced595..9da2cfa8e2e 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/controlPanel.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/controlPanel.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/index.ts index 03f53fe18f0..77872ac1bc6 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/controlPanel.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/controlPanel.ts index 603fbcf9040..d926f06de01 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/controlPanel.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/controlPanel.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts index bfda10d9028..7d8458479d1 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.test.ts index 76a3cbde936..2b2f38a0ac2 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.ts index ef9501fe9af..c79e85784ba 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx index e66eda4e13d..3215eb3dd6c 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/controlPanel.tsx index 2928f532312..9351efabeb4 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts index d76f7a3d48a..74a7da2c043 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.test.ts index aa0dcdcb6b0..c769ad97165 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts index a1e11c63fea..0010a19f8c3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/sharedControls.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/sharedControls.ts index d57d998d699..5c7647fa576 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/sharedControls.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/sharedControls.ts @@ -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 = [ diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/controlPanel.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/controlPanel.ts index 64611323f3e..d98c135ced8 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/controlPanel.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/controlPanel.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/index.ts index b28e2db187f..cd196b19311 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Bubble/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Bubble/controlPanel.tsx index 5d2775aee2f..ccc176e039f 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Bubble/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Bubble/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Bubble/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Bubble/index.ts index 7d55a84eb5e..5795acd3cd4 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Bubble/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Bubble/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx index 4d706d4bb42..67910b1b71a 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/index.ts index 2fbf81aa270..056443ecfb9 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/EchartsGantt.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/EchartsGantt.tsx index f914b7f4ace..48e7e590022 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/EchartsGantt.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/EchartsGantt.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/controlPanel.tsx index 8db566d038e..fd8127d428a 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/index.ts index 998b8e49e97..104afe3a44d 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts index 62893e1cbd9..997cbab1397 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/constants.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/constants.ts index 5e7a23545f0..5f51fd05310 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/constants.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/constants.ts @@ -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 = ( diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx index b4aeafacdfa..423fa6f4d81 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/index.ts index dd7d9d5e39b..1347ec21dcd 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Graph/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Graph/controlPanel.tsx index d792dc78669..f382dddfaee 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Graph/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Graph/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Graph/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Graph/index.ts index a4e7bc25b75..768e4732454 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Graph/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Graph/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx index 12fd9bda043..5ac5440f08c 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/index.ts index 39b113af7b3..56965454a11 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts index 60c6aceaf29..8d6185c05a5 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/controlPanel.tsx index 839a2af354f..889f9c04edd 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/index.ts index f399c62e88a..f0e0d8905b8 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx index ea5c8ca0053..1945302d031 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx @@ -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 { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/index.ts index 393788313f8..82c5496efe0 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts index 0d58f825322..f4db0afc3d9 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx index e44ee3dddd9..08f84c7bce3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts index d1e20817916..389bcb5f19c 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts index d33110f6ab3..3a66e61910e 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx index 0d2cb9a1fcc..0925962dde0 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts index 732bc039530..357ab9ae790 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/controlPanel.tsx index ec5681a96db..4135e1097fa 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/index.ts index 8ff643616fb..e473bf096b4 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sankey/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/controlPanel.tsx index 7269eee8967..b19bc2a2fa1 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/index.ts index cd0205ac4ef..36646e69060 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts index 5deb443372f..9104518625d 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx index 8eb4295de58..4909ea38a81 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts index f8e134f38fe..b860f9638e6 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx index 9a1a92d12b6..8ab2b643809 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts index 69a1cc703ea..604cd60a876 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/controlPanel.tsx index 2c339e70f30..5d2ca46e3f3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts index 1be5d44d99a..e9eda463d7c 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx index 99702e13b39..97a6114b367 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts index 0d431e24962..d001ad3fe0a 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx index c5c2f31bead..c13d89787c3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts index bebc8f47199..44665bf5db4 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/controlPanel.tsx index c31d2a7604a..cbb17d7e0b4 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/index.ts index 31a53a66567..6b0e656d0bf 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/constants.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/constants.ts index 90c05008b5a..c07be715216 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/constants.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/constants.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/index.ts index c65110c52c6..2f4c4a37e78 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts index eabd63cc901..6eff01ca80b 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts index 64f6593ce1f..d6e7f57fc92 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx index f72355ad044..49190078aaf 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/index.ts index 9df35c632a7..c1807aec3e2 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Tree/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Tree/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/controlPanel.tsx index 712d5698d97..aaee57adfa8 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts index 24f0f6e4ea1..57264b20f1e 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/constants.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/constants.ts index 4f41b53bafc..5b6897f2476 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/constants.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/constants.ts @@ -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'); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx index 475f219a775..0826b9e1472 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/index.ts index b04293dca6b..7a67fc90e2a 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts index c77a2783f47..4a82498fd59 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/transformProps.ts @@ -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 { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx index 3dd9bbd2dab..624316280ca 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/components/ExtraControls.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/components/ExtraControls.tsx index 5bf1700d2b9..8df8e20af34 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/components/ExtraControls.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/components/ExtraControls.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts b/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts index 036f4324757..286f611e6d3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts @@ -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 { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx index 3bf67ade2ae..cec603649ec 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts index c380b5ec2ad..882612ec33f 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/BigNumber/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/BigNumber/transformProps.test.ts index 66933c4f813..08912e4cbfb 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/BigNumber/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/BigNumber/transformProps.test.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/BoxPlot/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/BoxPlot/transformProps.test.ts index 13cbbd78a00..cdf52dd1ae8 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/BoxPlot/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/BoxPlot/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Bubble/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Bubble/transformProps.test.ts index da66802c4e8..297fbad5656 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Bubble/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Bubble/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Funnel/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Funnel/transformProps.test.ts index 3987bbc6483..b2e36c42bba 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Funnel/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Funnel/transformProps.test.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Gantt/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Gantt/transformProps.test.ts index 759e5eb43d0..fd0545d5e99 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Gantt/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Gantt/transformProps.test.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Gauge/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Gauge/transformProps.test.ts index 945938a1af9..b8fd46d0527 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Gauge/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Gauge/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Graph/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Graph/transformProps.test.ts index 50057ae148a..5b700ed1396 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Graph/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Graph/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Heatmap/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Heatmap/transformProps.test.ts index 2fa5775ade1..d91e8ec935a 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Heatmap/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Heatmap/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Pie/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Pie/transformProps.test.ts index d2daf2d1d6a..78b35ddbc65 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Pie/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Pie/transformProps.test.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Radar/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Radar/transformProps.test.ts index 1aef6afdc0b..d51f3304f40 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Radar/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Radar/transformProps.test.ts @@ -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 { diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/transformProps.test.ts index e300b7b84de..ec5bdac5a8c 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Bar/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Scatter/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Scatter/transformProps.test.ts index 4f799eeb41e..401f85ed5cf 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Scatter/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Scatter/transformProps.test.ts @@ -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 = { diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts index 1fc9c6558da..7a2cb392337 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Tree/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Tree/transformProps.test.ts index 9721fc64cf4..f4a7f15636a 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Tree/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Tree/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Treemap/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Treemap/transformProps.test.ts index e8e832f0b7c..387c9199ef1 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Treemap/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Treemap/transformProps.test.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Waterfall/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Waterfall/transformProps.test.ts index 271bb746b6d..ab5cbd8de43 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Waterfall/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Waterfall/transformProps.test.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/helpers.ts b/superset-frontend/plugins/plugin-chart-echarts/test/helpers.ts index 2fe9dc8ae03..24b19705b54 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/helpers.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/helpers.ts @@ -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. diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts index a2cda2facf9..88c58f34837 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/utils/transformers.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/utils/transformers.test.ts index 24685716ce0..ef372b65047 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/utils/transformers.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/utils/transformers.test.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/Handlebars.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/Handlebars.tsx index 82c1c069af2..54d6de1d346 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/Handlebars.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/Handlebars.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { createRef } from 'react'; import { HandlebarsViewer } from './components/Handlebars/HandlebarsViewer'; import { HandlebarsProps, HandlebarsStylesProps } from './types'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx index 19f2193c51d..557290af42f 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { SafeMarkdown } from '@superset-ui/core/components'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; import Handlebars from 'handlebars'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controlPanel.tsx index d23f575ba50..c161b46778f 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controlPanel.tsx @@ -20,7 +20,7 @@ import { ControlPanelConfig, getStandardizedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { allColumnsControlSetItem } from './controls/columns'; import { groupByControlSetItem } from './controls/groupBy'; import { handlebarsTemplateControlSetItem } from './controls/handlebarTemplate'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/columns.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/columns.tsx index fe8ee183083..bd7d30a139f 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/columns.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/columns.tsx @@ -23,7 +23,7 @@ import { Dataset, ColumnMeta, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray } from '@superset-ui/core'; import { getQueryMode, isRawMode } from './shared'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/handlebarTemplate.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/handlebarTemplate.tsx index d7edc7f73a1..2f407c6dd92 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/handlebarTemplate.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/handlebarTemplate.tsx @@ -21,9 +21,9 @@ import { CustomControlConfig, sharedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNonEmpty } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { InfoTooltip, SafeMarkdown } from '@superset-ui/core/components'; import { CodeEditor } from '../../components/CodeEditor/CodeEditor'; import { ControlHeader } from '../../components/ControlHeader/controlHeader'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/includeTime.ts b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/includeTime.ts index d3e1a2b2d9a..b02530049fc 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/includeTime.ts +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/includeTime.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlSetItem } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isAggMode } from './shared'; export const includeTimeControlSetItem: ControlSetItem = { diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx index 0c866213f66..de33013527b 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx @@ -25,7 +25,7 @@ import { ColumnMeta, defineSavedMetrics, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getQueryMode, isAggMode, validateAggControlValues } from './shared'; const percentMetrics: typeof sharedControls.metrics = { diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/orderBy.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/orderBy.tsx index 84feb76ebd2..cd46e8a3880 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/orderBy.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/orderBy.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ControlSetItem, Dataset } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isEmpty } from 'lodash'; import { isAggMode, isRawMode } from './shared'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/queryMode.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/queryMode.tsx index d2d1e80ace3..9d25c154304 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/queryMode.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/queryMode.tsx @@ -21,7 +21,7 @@ import { ControlSetItem, QueryModeLabel, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryMode } from '@superset-ui/core'; import { getQueryMode } from './shared'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/shared.ts b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/shared.ts index d6bd318e812..895e7f70d3e 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/shared.ts +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/shared.ts @@ -20,7 +20,7 @@ import { ControlPanelsContainerProps, ControlStateMapping, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, QueryFormColumn, QueryMode } from '@superset-ui/core'; export function getQueryMode(controls: ControlStateMapping): QueryMode { diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx index 74c60fdcc39..ce4b6cf48bf 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/style.tsx @@ -21,8 +21,8 @@ import { CustomControlConfig, sharedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { InfoTooltip } from '@superset-ui/core/components'; import { CodeEditor } from '../../components/CodeEditor/CodeEditor'; import { ControlHeader } from '../../components/ControlHeader/controlHeader'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/index.ts b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/index.ts index 612e3fb19f4..f8e28f2ad31 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/index.ts +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-handlebars/test/plugin/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-handlebars/test/plugin/transformProps.test.ts index c73abe9dd5b..c47308e8f87 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/test/plugin/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-handlebars/test/plugin/transformProps.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { ChartProps, QueryFormData, VizType } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; import { HandlebarsQueryFormData } from '../../src/types'; import transformProps from '../../src/plugin/transformProps'; diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx b/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx index 7a1fb79f7ad..425c3598117 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx @@ -22,7 +22,7 @@ import { type MouseEvent as ReactMouseEvent, } from 'react'; import { MinusSquareOutlined, PlusSquareOutlined } from '@ant-design/icons'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { AdhocMetric, BinaryQueryObjectFilterClause, @@ -40,7 +40,7 @@ import { normalizeCurrency, NumberFormatter, } from '@superset-ui/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { aggregatorTemplates, PivotTable, sortAs } from './react-pivottable'; import { FilterType, diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx index e6b373a18ea..4e916857b27 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx @@ -23,7 +23,7 @@ import { getStandardizedControls, sharedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, isAdhocColumn, diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts index a5378b45a79..4108faa0c59 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts index 847247a2141..1bba188ca05 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts @@ -26,7 +26,7 @@ import { SMART_DATE_ID, TimeFormats, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { getColorFormatters } from '@superset-ui/chart-controls'; import { DateFormatter } from '../types'; diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts index dcc8ccb590b..169913898f4 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.ts @@ -17,7 +17,7 @@ * under the License. */ -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; export const Styles = styled.div<{ isDashboardEditMode: boolean }>` ${({ theme, isDashboardEditMode }) => css` diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx index 3d5f29631e0..cc1d8fbe2df 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx @@ -19,7 +19,7 @@ import { Component, ReactNode, MouseEvent } from 'react'; import { safeHtmlSpan } from '@superset-ui/core'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import PropTypes from 'prop-types'; import { FaSort } from 'react-icons/fa'; import { FaSortDown as FaSortDesc } from 'react-icons/fa'; diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts index 321387092c3..4c76b4217d7 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts @@ -18,7 +18,7 @@ */ import PropTypes from 'prop-types'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; type SortFunction = ( a: string | number | null, diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/test/plugin/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-pivot-table/test/plugin/transformProps.test.ts index 5f243b04e4e..a900e43fb0e 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/test/plugin/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/test/plugin/transformProps.test.ts @@ -18,7 +18,7 @@ */ import { ChartProps, QueryFormData } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; import transformProps from '../../src/plugin/transformProps'; import { MetricsLayoutEnum } from '../../src/types'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx index d3bbf06a527..74ffcbefb1f 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx index 93dfc4de4a6..baf9fad9b2d 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx index 54b69b60187..e612742b1fa 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SelectPageSize.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SelectPageSize.tsx index 2572e9596e9..ba187383362 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SelectPageSize.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SelectPageSize.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx index e6e58939c6a..76bbc2759aa 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx b/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx index 27bea632bc1..baa54df0198 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx @@ -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` diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index d05193edbc3..02be074bf65 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-table/src/consts.ts b/superset-frontend/plugins/plugin-chart-table/src/consts.ts index 7f2136767b1..7617aa9c527 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/consts.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/consts.ts @@ -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([ [0, t('All')], diff --git a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx index c951887175e..2787fed15a1 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/index.ts b/superset-frontend/plugins/plugin-chart-table/src/index.ts index 48712ebfc2f..d5ec21896be 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/index.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/index.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/stories/testData.ts b/superset-frontend/plugins/plugin-chart-table/src/stories/testData.ts index 0d4daf339f9..d304e5f1558 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/stories/testData.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/stories/testData.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index 7b86347d1bb..30ad5f9ed69 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-table/src/utils/formatValue.ts b/superset-frontend/plugins/plugin-chart-table/src/utils/formatValue.ts index 3769abe5514..f15347f1f0d 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/utils/formatValue.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/utils/formatValue.ts @@ -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'; diff --git a/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx b/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx index e6a955b511b..f3963b0477d 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx +++ b/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx @@ -33,7 +33,7 @@ import { getTimeFormatterForGranularity, } from '@superset-ui/core'; import TableChart, { sanitizeHeaderId } from '../src/TableChart'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import transformProps from '../src/transformProps'; import DateWithFormatter from '../src/utils/DateWithFormatter'; import testData from './testData'; diff --git a/superset-frontend/plugins/plugin-chart-table/test/controlPanel.test.tsx b/superset-frontend/plugins/plugin-chart-table/test/controlPanel.test.tsx index 647ce938d6c..b85535d5340 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/controlPanel.test.tsx +++ b/superset-frontend/plugins/plugin-chart-table/test/controlPanel.test.tsx @@ -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 { QueryFormData } from '@superset-ui/core'; import { Dataset, diff --git a/superset-frontend/plugins/plugin-chart-table/test/testData.ts b/superset-frontend/plugins/plugin-chart-table/test/testData.ts index f4f96ad9d10..16285ff773c 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/testData.ts +++ b/superset-frontend/plugins/plugin-chart-table/test/testData.ts @@ -24,8 +24,8 @@ import { ComparisonType, VizType, } 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 { TableChartProps, TableChartFormData } from '../src/types'; const basicFormData: TableChartFormData = { diff --git a/superset-frontend/plugins/plugin-chart-table/test/testHelpers.tsx b/superset-frontend/plugins/plugin-chart-table/test/testHelpers.tsx index ebb0db9bd7f..852758e1a63 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/testHelpers.tsx +++ b/superset-frontend/plugins/plugin-chart-table/test/testHelpers.tsx @@ -21,7 +21,7 @@ import { ThemeProvider, EmotionCacheProvider, createEmotionCache, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; const emotionCache = createEmotionCache({ key: 'test', diff --git a/superset-frontend/plugins/plugin-chart-table/test/utils/formatValue.test.ts b/superset-frontend/plugins/plugin-chart-table/test/utils/formatValue.test.ts index 74430924142..d8a2b8d2a4a 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/utils/formatValue.test.ts +++ b/superset-frontend/plugins/plugin-chart-table/test/utils/formatValue.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { CurrencyFormatter, getNumberFormatter } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { formatColumnValue } from '../../src/utils/formatValue'; import { DataColumnMeta } from '../../src/types'; diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx index 6d1abedb774..75736057c19 100644 --- a/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx +++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx @@ -20,7 +20,7 @@ import { PureComponent } from 'react'; import cloudLayout from 'd3-cloud'; import { scaleLinear } from 'd3-scale'; import { seed, CategoricalColorNamespace } from '@superset-ui/core'; -import { SupersetTheme, withTheme } from '@apache-superset/core/ui'; +import { SupersetTheme, withTheme } from '@apache-superset/core/theme'; import { isEqual } from 'lodash'; const seedRandom = seed('superset-ui'); diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controlPanel.tsx index 6408c07b2e8..9098a282c08 100644 --- a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controlPanel.tsx @@ -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, diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl/ColorSchemeLabel.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl/ColorSchemeLabel.tsx index 135d7d1134b..557c5d15454 100644 --- a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl/ColorSchemeLabel.tsx +++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl/ColorSchemeLabel.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { useRef, useState } from 'react'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl/index.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl/index.tsx index 7400b5358a3..b10654aa270 100644 --- a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl/index.tsx +++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl/index.tsx @@ -18,7 +18,7 @@ */ import { useMemo, ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ColorScheme, ColorSchemeGroup, @@ -26,7 +26,7 @@ import { getLabelsColorMap, CategoricalColorNamespace, } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { sortBy } from 'lodash'; import { ControlHeader } from '@superset-ui/chart-controls'; import { diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/RotationControl.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/RotationControl.tsx index 464312ae479..ff8a1f28b27 100644 --- a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/RotationControl.tsx +++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/RotationControl.tsx @@ -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 { Select, SelectValue } from '@superset-ui/core/components'; import { ControlHeader } from '@superset-ui/chart-controls'; import { ControlComponentProps } from '@superset-ui/chart-controls'; diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/index.ts b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/index.ts index c37d27d8cc3..e1977db2a8f 100644 --- a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/index.ts +++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/index.ts @@ -17,7 +17,7 @@ * 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'; diff --git a/superset-frontend/spec/helpers/ProviderWrapper.tsx b/superset-frontend/spec/helpers/ProviderWrapper.tsx index c355638e7a0..74a90252363 100644 --- a/superset-frontend/spec/helpers/ProviderWrapper.tsx +++ b/superset-frontend/spec/helpers/ProviderWrapper.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { ThemeProvider } from '@apache-superset/core/ui'; +import { ThemeProvider } from '@apache-superset/core/theme'; import querystring from 'query-string'; import { BrowserRouter as Router } from 'react-router-dom'; import { QueryParamProvider } from 'use-query-params'; diff --git a/superset-frontend/spec/helpers/shim.tsx b/superset-frontend/spec/helpers/shim.tsx index 9e49116df42..8dd24a70e8e 100644 --- a/superset-frontend/spec/helpers/shim.tsx +++ b/superset-frontend/spec/helpers/shim.tsx @@ -22,7 +22,7 @@ import 'regenerator-runtime/runtime'; import jQuery from 'jquery'; // https://jestjs.io/docs/jest-object#jestmockmodulename-factory-options // in order to mock modules in test case, so avoid absolute import module -import { configure as configureTranslation } from '@apache-superset/core/ui'; +import { configure as configureTranslation } from '@apache-superset/core/translation'; import fetchMock from 'fetch-mock'; import { Worker } from './Worker'; import { IntersectionObserver } from './IntersectionObserver'; diff --git a/superset-frontend/spec/helpers/testing-library.tsx b/superset-frontend/spec/helpers/testing-library.tsx index e753a3ac037..2645e68feee 100644 --- a/superset-frontend/spec/helpers/testing-library.tsx +++ b/superset-frontend/spec/helpers/testing-library.tsx @@ -30,7 +30,7 @@ import { ThemeProvider, themeObject, supersetTheme, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import { SupersetThemeProvider } from 'src/theme/ThemeProvider'; import { ThemeController } from 'src/theme/ThemeController'; import { BrowserRouter } from 'react-router-dom'; diff --git a/superset-frontend/src/SqlLab/SqlLabGlobalStyles.tsx b/superset-frontend/src/SqlLab/SqlLabGlobalStyles.tsx index 648067cbab9..6eb17fefccf 100644 --- a/superset-frontend/src/SqlLab/SqlLabGlobalStyles.tsx +++ b/superset-frontend/src/SqlLab/SqlLabGlobalStyles.tsx @@ -18,7 +18,7 @@ */ import { Global } from '@emotion/react'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; export const SqlLabGlobalStyles = () => ( { diff --git a/superset-frontend/src/SqlLab/components/EditorAutoSync/EditorAutoSync.test.tsx b/superset-frontend/src/SqlLab/components/EditorAutoSync/EditorAutoSync.test.tsx index 0870724176b..b670dfc9387 100644 --- a/superset-frontend/src/SqlLab/components/EditorAutoSync/EditorAutoSync.test.tsx +++ b/superset-frontend/src/SqlLab/components/EditorAutoSync/EditorAutoSync.test.tsx @@ -38,11 +38,11 @@ import fetchMock from 'fetch-mock'; import { render, act } from 'spec/helpers/testing-library'; import ToastContainer from 'src/components/MessageToasts/ToastContainer'; import { initialState, defaultQueryEditor } from 'src/SqlLab/fixtures'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import EditorAutoSync, { INTERVAL } from '.'; -jest.mock('@apache-superset/core', () => ({ - ...jest.requireActual('@apache-superset/core'), +jest.mock('@apache-superset/core/utils', () => ({ + ...jest.requireActual('@apache-superset/core/utils'), logging: { warn: jest.fn(), }, diff --git a/superset-frontend/src/SqlLab/components/EditorAutoSync/index.tsx b/superset-frontend/src/SqlLab/components/EditorAutoSync/index.tsx index 567842350bf..0a13bcf9c12 100644 --- a/superset-frontend/src/SqlLab/components/EditorAutoSync/index.tsx +++ b/superset-frontend/src/SqlLab/components/EditorAutoSync/index.tsx @@ -20,7 +20,7 @@ import { useRef, useEffect, FC, useMemo } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { SqlLabRootState, QueryEditor, diff --git a/superset-frontend/src/SqlLab/components/EditorWrapper/index.tsx b/superset-frontend/src/SqlLab/components/EditorWrapper/index.tsx index b096fd3eec4..aafaa234402 100644 --- a/superset-frontend/src/SqlLab/components/EditorWrapper/index.tsx +++ b/superset-frontend/src/SqlLab/components/EditorWrapper/index.tsx @@ -19,7 +19,7 @@ import { useState, useEffect, useRef, useCallback, useMemo } from 'react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { usePrevious } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Global } from '@emotion/react'; import type { editors } from '@apache-superset/core'; diff --git a/superset-frontend/src/SqlLab/components/EditorWrapper/useAnnotations.ts b/superset-frontend/src/SqlLab/components/EditorWrapper/useAnnotations.ts index 0b4196be295..91c60d75bd0 100644 --- a/superset-frontend/src/SqlLab/components/EditorWrapper/useAnnotations.ts +++ b/superset-frontend/src/SqlLab/components/EditorWrapper/useAnnotations.ts @@ -18,7 +18,7 @@ */ import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { COMMON_ERR_MESSAGES, ClientErrorObject } from '@superset-ui/core'; import { SqlLabRootState } from 'src/SqlLab/types'; import { VALIDATION_DEBOUNCE_MS } from 'src/SqlLab/constants'; diff --git a/superset-frontend/src/SqlLab/components/EditorWrapper/useKeywords.ts b/superset-frontend/src/SqlLab/components/EditorWrapper/useKeywords.ts index 52c0cd818b0..ce1896e0886 100644 --- a/superset-frontend/src/SqlLab/components/EditorWrapper/useKeywords.ts +++ b/superset-frontend/src/SqlLab/components/EditorWrapper/useKeywords.ts @@ -18,7 +18,7 @@ */ import { useEffect, useMemo, useRef } from 'react'; import { useSelector, useDispatch, shallowEqual, useStore } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getExtensionsRegistry } from '@superset-ui/core'; import type { Editor } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx b/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx index 621020c410d..b89290741ae 100644 --- a/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx @@ -18,8 +18,9 @@ */ import { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; -import { css, styled, Alert } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { Alert } from '@apache-superset/core/components'; +import { css, styled } from '@apache-superset/core/theme'; import { Button, diff --git a/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton/index.tsx b/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton/index.tsx index ee4a0f04860..b7f6978dde8 100644 --- a/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useSelector, useDispatch } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { JsonObject, VizType } from '@superset-ui/core'; import { createCtasDatasource, diff --git a/superset-frontend/src/SqlLab/components/ExploreResultsButton/index.tsx b/superset-frontend/src/SqlLab/components/ExploreResultsButton/index.tsx index 39deb485b2c..1312ef02001 100644 --- a/superset-frontend/src/SqlLab/components/ExploreResultsButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/ExploreResultsButton/index.tsx @@ -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 { Button, type OnClickHandler, diff --git a/superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx b/superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx index 2617babf0db..f958e05a32d 100644 --- a/superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx +++ b/superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx @@ -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 { ModalTrigger } from '@superset-ui/core/components'; import CodeSyntaxHighlighter from '@superset-ui/core/components/CodeSyntaxHighlighter'; diff --git a/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx b/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx index c3188f9efa2..d9d4e1ce6b6 100644 --- a/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { FC } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css } from '@apache-superset/core/theme'; import { ModalTrigger } from '@superset-ui/core/components'; import { detectOS } from 'src/utils/common'; diff --git a/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx b/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx index 31071473c4d..1e58a30f5c5 100644 --- a/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx @@ -21,9 +21,9 @@ import { shallowEqual, useSelector } from 'react-redux'; import { useInView } from 'react-intersection-observer'; import { omit } from 'lodash'; import { EmptyState, Skeleton } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import QueryTable from 'src/SqlLab/components/QueryTable'; import { SqlLabRootState } from 'src/SqlLab/types'; import { useEditorQueriesQuery } from 'src/hooks/apiResources/queries'; diff --git a/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx b/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx index 9b63b494df7..9dadb22b091 100644 --- a/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useDispatch } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Dropdown, Button } from '@superset-ui/core/components'; import { Menu } from '@superset-ui/core/components/Menu'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/SqlLab/components/QueryStateLabel/index.tsx b/superset-frontend/src/SqlLab/components/QueryStateLabel/index.tsx index 1a56ce9b461..cb616211519 100644 --- a/superset-frontend/src/SqlLab/components/QueryStateLabel/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryStateLabel/index.tsx @@ -19,7 +19,7 @@ import { Label } from '@superset-ui/core/components'; import { STATE_TYPE_MAP, STATE_TYPE_MAP_LOCALIZED } from 'src/SqlLab/constants'; import { Query } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; interface QueryStateLabelProps { query: Pick; diff --git a/superset-frontend/src/SqlLab/components/QueryStatusBar/index.tsx b/superset-frontend/src/SqlLab/components/QueryStatusBar/index.tsx index 69230fea178..317d8646cd9 100644 --- a/superset-frontend/src/SqlLab/components/QueryStatusBar/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryStatusBar/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { FC, useMemo, createContext, useContext, useRef } from 'react'; -import { t, styled } from '@apache-superset/core'; +import { styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Flex, Steps, diff --git a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx index 9f7c4aaf17e..2ba0985aed7 100644 --- a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx @@ -27,9 +27,9 @@ import { TableView, } from '@superset-ui/core/components'; import ProgressBar from '@superset-ui/core/components/ProgressBar'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryResponse, QueryState } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { diff --git a/superset-frontend/src/SqlLab/components/QueryTable/styles.ts b/superset-frontend/src/SqlLab/components/QueryTable/styles.ts index 2aae4e7c90b..30bb0fb71e5 100644 --- a/superset-frontend/src/SqlLab/components/QueryTable/styles.ts +++ b/superset-frontend/src/SqlLab/components/QueryTable/styles.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { IconTooltip } from '@superset-ui/core/components'; export const StaticPosition = css` diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx index de3e64ee55c..510228596d7 100644 --- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx +++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx @@ -44,7 +44,7 @@ import { ErrorMessageWithStackTrace, } from 'src/components'; import { nanoid } from 'nanoid'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryState, usePrevious, @@ -52,8 +52,9 @@ import { getExtensionsRegistry, ErrorTypeEnum, } from '@superset-ui/core'; -import { tn } from '@apache-superset/core'; -import { styled, useTheme, css, Alert } from '@apache-superset/core/ui'; +import { tn } from '@apache-superset/core/translation'; +import { Alert } from '@apache-superset/core/components'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; import { ISaveableDatasource, ISimpleColumn, diff --git a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx index 9bc54bb2687..4353951a715 100644 --- a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx @@ -18,8 +18,8 @@ */ import { useMemo, FC, ReactElement } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, useTheme, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme, SupersetTheme } from '@apache-superset/core/theme'; import { Button, DropdownButton } from '@superset-ui/core/components'; import { IconType, Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx index a68edb7efaa..b82f788f420 100644 --- a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx @@ -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 { Icons } from '@superset-ui/core/components/Icons'; import { Button } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx index c1a2fc871f0..e6ead23fbb3 100644 --- a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx +++ b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx @@ -30,7 +30,7 @@ import { Icons, Flex, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, JsonResponse, @@ -42,7 +42,7 @@ import { isFeatureEnabled, getClientErrorObject, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; import { useSelector, useDispatch } from 'react-redux'; import rison from 'rison'; diff --git a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx index fa09eddb8ad..3d235cbd739 100644 --- a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx +++ b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx @@ -18,8 +18,8 @@ */ import { useState, useEffect, useMemo, ChangeEvent } from 'react'; import type { DatabaseObject } from 'src/features/databases/types'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Input, Button, diff --git a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx index a65416818b3..bf1b0ab2a2b 100644 --- a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx @@ -21,8 +21,8 @@ import { FunctionComponent, useState, useRef, ChangeEvent } from 'react'; import SchemaForm, { FormProps } from '@rjsf/core'; import { FormValidation } from '@rjsf/utils'; import validator from '@rjsf/validator-ajv8'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { parseDate } from 'chrono-node'; import { ModalTrigger, diff --git a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx index 7b84b5325a6..6be69ca8639 100644 --- a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx +++ b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx @@ -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 { getClientErrorObject, SupersetClient } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Button } from '@superset-ui/core/components'; import { CopyToClipboard } from 'src/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/SqlLab/components/SouthPane/Results.tsx b/superset-frontend/src/SqlLab/components/SouthPane/Results.tsx index 14d76300fd4..6ae07d3fcb8 100644 --- a/superset-frontend/src/SqlLab/components/SouthPane/Results.tsx +++ b/superset-frontend/src/SqlLab/components/SouthPane/Results.tsx @@ -19,9 +19,10 @@ import { FC, useMemo } from 'react'; import { shallowEqual, useSelector } from 'react-redux'; import { EmptyState } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled } from '@superset-ui/core'; -import { styled, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { styled } from '@apache-superset/core/theme'; import { SqlLabRootState } from 'src/SqlLab/types'; import ResultSet from '../ResultSet'; diff --git a/superset-frontend/src/SqlLab/components/SouthPane/index.tsx b/superset-frontend/src/SqlLab/components/SouthPane/index.tsx index da5a33ad35b..5ee5b172f6d 100644 --- a/superset-frontend/src/SqlLab/components/SouthPane/index.tsx +++ b/superset-frontend/src/SqlLab/components/SouthPane/index.tsx @@ -20,8 +20,8 @@ import { createRef, useCallback, useMemo } from 'react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { nanoid } from 'nanoid'; import Tabs from '@superset-ui/core/components/Tabs'; -import { t } from '@apache-superset/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { removeTables, setActiveSouthPaneTab } from 'src/SqlLab/actions/sqlLab'; diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx index e1483e6663b..d7ce0e56296 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx @@ -32,7 +32,7 @@ import type { editors } from '@apache-superset/core'; import useEffectEvent from 'src/hooks/useEffectEvent'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import AutoSizer from 'react-virtualized-auto-sizer'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled, @@ -40,7 +40,8 @@ import { QueryResponse, Query, } from '@superset-ui/core'; -import { css, styled, useTheme, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import type { QueryEditor, SqlLabRootState, diff --git a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx index 91c8fe4e7e9..9ff47fd6223 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx @@ -28,8 +28,8 @@ import { Popover, Typography, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css } from '@apache-superset/core/theme'; import type { SchemaOption, CatalogOption } from 'src/hooks/apiResources'; import { DatabaseSelector, type DatabaseObject } from 'src/components'; diff --git a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx index 40c11f8a7d7..6753612a8e9 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx @@ -22,9 +22,14 @@ import { bindActionCreators } from 'redux'; import { useSelector, useDispatch, shallowEqual } from 'react-redux'; import { MenuDotsDropdown } from '@superset-ui/core/components'; import { Menu, MenuItemType } from '@superset-ui/core/components/Menu'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryState } from '@superset-ui/core'; -import { styled, css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { + styled, + css, + SupersetTheme, + useTheme, +} from '@apache-superset/core/theme'; import { removeQueryEditor, removeAllOtherQueryEditors, diff --git a/superset-frontend/src/SqlLab/components/SqlEditorTopBar/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorTopBar/index.tsx index 8b77d0bf5df..db87975ea9b 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorTopBar/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorTopBar/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Flex } from '@superset-ui/core/components'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { MenuItemType } from '@superset-ui/core/components/Menu'; import { ViewLocations } from 'src/SqlLab/contributions'; import PanelToolbar from 'src/components/PanelToolbar'; diff --git a/superset-frontend/src/SqlLab/components/StatusBar/index.tsx b/superset-frontend/src/SqlLab/components/StatusBar/index.tsx index 878fdb07cf1..f4ff20cb89b 100644 --- a/superset-frontend/src/SqlLab/components/StatusBar/index.tsx +++ b/superset-frontend/src/SqlLab/components/StatusBar/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core'; +import { styled } from '@apache-superset/core/theme'; import { Flex } from '@superset-ui/core/components'; import ViewListExtension from 'src/components/ViewListExtension'; import { views } from 'src/core'; diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx index 83c870e1233..f03f399583c 100644 --- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx +++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx @@ -20,9 +20,9 @@ import { PureComponent } from 'react'; import { EditableTabs } from '@superset-ui/core/components/Tabs'; import { connect } from 'react-redux'; import type { QueryEditor, SqlLabRootState } from 'src/SqlLab/types'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { Logger } from 'src/logger/LogUtils'; import { EmptyState, Tooltip } from '@superset-ui/core/components'; import { detectOS } from 'src/utils/common'; diff --git a/superset-frontend/src/SqlLab/components/TableElement/index.tsx b/superset-frontend/src/SqlLab/components/TableElement/index.tsx index 6aa508902f0..710f2eb4bdc 100644 --- a/superset-frontend/src/SqlLab/components/TableElement/index.tsx +++ b/superset-frontend/src/SqlLab/components/TableElement/index.tsx @@ -31,8 +31,8 @@ import { type CollapseProps, } from '@superset-ui/core/components'; import { CopyToClipboard } from 'src/components'; -import { t } from '@apache-superset/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { debounce } from 'lodash'; import { diff --git a/superset-frontend/src/SqlLab/components/TableExploreTree/TreeNodeRenderer.tsx b/superset-frontend/src/SqlLab/components/TableExploreTree/TreeNodeRenderer.tsx index 9f1b9fec345..5e845c45e6b 100644 --- a/superset-frontend/src/SqlLab/components/TableExploreTree/TreeNodeRenderer.tsx +++ b/superset-frontend/src/SqlLab/components/TableExploreTree/TreeNodeRenderer.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { css, styled, t } from '@apache-superset/core'; +import { css, styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import type { NodeRendererProps } from 'react-arborist'; import { Icons, Tooltip, Typography } from '@superset-ui/core/components'; import RefreshLabel from '@superset-ui/core/components/RefreshLabel'; diff --git a/superset-frontend/src/SqlLab/components/TableExploreTree/index.tsx b/superset-frontend/src/SqlLab/components/TableExploreTree/index.tsx index 5840d177339..13b6e700ad5 100644 --- a/superset-frontend/src/SqlLab/components/TableExploreTree/index.tsx +++ b/superset-frontend/src/SqlLab/components/TableExploreTree/index.tsx @@ -24,7 +24,8 @@ import { useMemo, } from 'react'; import { useSelector, useDispatch, shallowEqual } from 'react-redux'; -import { styled, css, t, useTheme } from '@apache-superset/core'; +import { styled, css, useTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import AutoSizer from 'react-virtualized-auto-sizer'; // Due to performance issues with the virtual list in the existing Ant Design (antd)-based tree view, // it has been replaced with react-arborist solution. diff --git a/superset-frontend/src/SqlLab/components/TableExploreTree/useTreeData.ts b/superset-frontend/src/SqlLab/components/TableExploreTree/useTreeData.ts index 7653c0c36dc..0a85f5cbd7c 100644 --- a/superset-frontend/src/SqlLab/components/TableExploreTree/useTreeData.ts +++ b/superset-frontend/src/SqlLab/components/TableExploreTree/useTreeData.ts @@ -17,7 +17,7 @@ * under the License. */ import { useMemo, useReducer, useCallback } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Table, type TableMetaData, diff --git a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx index e69fad4473b..9e38b83ad7a 100644 --- a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx +++ b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx @@ -19,9 +19,10 @@ import { type FC, useCallback, useMemo, useRef, useState } from 'react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { nanoid } from 'nanoid'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ClientErrorObject, getExtensionsRegistry } from '@superset-ui/core'; -import { css, styled, Alert, useTheme } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { SafeMarkdown, Breadcrumb, diff --git a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx index 9b27e45427b..10f17f6c593 100644 --- a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx +++ b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState, useEffect } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { debounce } from 'lodash'; import { Badge, diff --git a/superset-frontend/src/SqlLab/constants.ts b/superset-frontend/src/SqlLab/constants.ts index 1f8753453cb..236af259aab 100644 --- a/superset-frontend/src/SqlLab/constants.ts +++ b/superset-frontend/src/SqlLab/constants.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import type { LabelType } from '@superset-ui/core/components'; export const STATE_TYPE_MAP: Record = { diff --git a/superset-frontend/src/SqlLab/fixtures.ts b/superset-frontend/src/SqlLab/fixtures.ts index 05bd77b4af7..179a2a60295 100644 --- a/superset-frontend/src/SqlLab/fixtures.ts +++ b/superset-frontend/src/SqlLab/fixtures.ts @@ -25,7 +25,7 @@ import { QueryResponse, QueryState, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { LatestQueryEditorVersion } from 'src/SqlLab/types'; import { ISaveableDatasource } from 'src/SqlLab/components/SaveDatasetModal'; diff --git a/superset-frontend/src/SqlLab/reducers/getInitialState.ts b/superset-frontend/src/SqlLab/reducers/getInitialState.ts index 0f870ac0fb8..6ee4ac50177 100644 --- a/superset-frontend/src/SqlLab/reducers/getInitialState.ts +++ b/superset-frontend/src/SqlLab/reducers/getInitialState.ts @@ -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 { nanoid } from 'nanoid'; import type { BootstrapData } from 'src/types/bootstrapTypes'; import type { InitialState } from 'src/hooks/apiResources/sqlLab'; diff --git a/superset-frontend/src/SqlLab/reducers/sqlLab.ts b/superset-frontend/src/SqlLab/reducers/sqlLab.ts index e3f51e3d0c3..46277bb86b6 100644 --- a/superset-frontend/src/SqlLab/reducers/sqlLab.ts +++ b/superset-frontend/src/SqlLab/reducers/sqlLab.ts @@ -17,7 +17,7 @@ * under the License. */ import { normalizeTimestamp, QueryState } from '@superset-ui/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isEqual, omit } from 'lodash'; import { shallowEqual } from 'react-redux'; import { now } from '@superset-ui/core/utils/dates'; diff --git a/superset-frontend/src/SqlLab/utils/newQueryTabName.ts b/superset-frontend/src/SqlLab/utils/newQueryTabName.ts index 94f71559579..12fa765a357 100644 --- a/superset-frontend/src/SqlLab/utils/newQueryTabName.ts +++ b/superset-frontend/src/SqlLab/utils/newQueryTabName.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryEditor } from '../types'; const untitledQueryRegex = /^Untitled Query (\d+)$/; // Literal notation isn't recompiled diff --git a/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/DeckglLayerVisibilityCustomizationPlugin.tsx b/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/DeckglLayerVisibilityCustomizationPlugin.tsx index dca9832dd64..ff2461683f2 100644 --- a/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/DeckglLayerVisibilityCustomizationPlugin.tsx +++ b/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/DeckglLayerVisibilityCustomizationPlugin.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useEffect, useState, useMemo, useRef, useCallback } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DataMask, ExtraFormData } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { Select, FormItem, diff --git a/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/index.ts b/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/index.ts index a4127b4903b..687ee7a082d 100644 --- a/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/index.ts +++ b/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/index.ts @@ -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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/DynamicGroupByPlugin.tsx b/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/DynamicGroupByPlugin.tsx index 8a8c045e0df..4919246dac0 100644 --- a/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/DynamicGroupByPlugin.tsx +++ b/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/DynamicGroupByPlugin.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t, tn } from '@apache-superset/core'; +import { t, tn } from '@apache-superset/core/translation'; import { ensureIsArray, ExtraFormData } from '@superset-ui/core'; import { useEffect, useState, useMemo } from 'react'; import { diff --git a/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/controlPanel.ts b/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/controlPanel.ts index a09523b6cfb..f1e20b4ef6f 100644 --- a/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/controlPanel.ts +++ b/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const config: ControlPanelConfig = { controlPanelSections: [ diff --git a/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/index.ts b/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/index.ts index 4b81919fca6..57d3a986ef3 100644 --- a/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/index.ts +++ b/superset-frontend/src/chartCustomizations/components/DynamicGroupBy/index.ts @@ -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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/src/chartCustomizations/components/TimeColumn/TimeColumnFilterPlugin.tsx b/superset-frontend/src/chartCustomizations/components/TimeColumn/TimeColumnFilterPlugin.tsx index 7377816429e..72849696247 100644 --- a/superset-frontend/src/chartCustomizations/components/TimeColumn/TimeColumnFilterPlugin.tsx +++ b/superset-frontend/src/chartCustomizations/components/TimeColumn/TimeColumnFilterPlugin.tsx @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -import { t, tn } from '@apache-superset/core'; +import { t, tn } from '@apache-superset/core/translation'; import { ensureIsArray, ExtraFormData } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { useEffect, useState } from 'react'; import { FormItem, diff --git a/superset-frontend/src/chartCustomizations/components/TimeColumn/controlPanel.ts b/superset-frontend/src/chartCustomizations/components/TimeColumn/controlPanel.ts index cef113e3865..119a992ab89 100644 --- a/superset-frontend/src/chartCustomizations/components/TimeColumn/controlPanel.ts +++ b/superset-frontend/src/chartCustomizations/components/TimeColumn/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const config: ControlPanelConfig = { controlPanelSections: [ diff --git a/superset-frontend/src/chartCustomizations/components/TimeColumn/index.ts b/superset-frontend/src/chartCustomizations/components/TimeColumn/index.ts index 6971be03d2b..5c9dce38ee9 100644 --- a/superset-frontend/src/chartCustomizations/components/TimeColumn/index.ts +++ b/superset-frontend/src/chartCustomizations/components/TimeColumn/index.ts @@ -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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/src/chartCustomizations/components/TimeGrain/TimeGrainFilterPlugin.tsx b/superset-frontend/src/chartCustomizations/components/TimeGrain/TimeGrainFilterPlugin.tsx index 4fdd0a33aae..5ff909e8375 100644 --- a/superset-frontend/src/chartCustomizations/components/TimeGrain/TimeGrainFilterPlugin.tsx +++ b/superset-frontend/src/chartCustomizations/components/TimeGrain/TimeGrainFilterPlugin.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t, tn } from '@apache-superset/core'; +import { t, tn } from '@apache-superset/core/translation'; import { ensureIsArray, ExtraFormData, diff --git a/superset-frontend/src/chartCustomizations/components/TimeGrain/controlPanel.ts b/superset-frontend/src/chartCustomizations/components/TimeGrain/controlPanel.ts index 49049f70ba2..cd9079fa097 100644 --- a/superset-frontend/src/chartCustomizations/components/TimeGrain/controlPanel.ts +++ b/superset-frontend/src/chartCustomizations/components/TimeGrain/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const config: ControlPanelConfig = { controlPanelSections: [ diff --git a/superset-frontend/src/chartCustomizations/components/TimeGrain/index.ts b/superset-frontend/src/chartCustomizations/components/TimeGrain/index.ts index 8c2c95632c4..885797e6484 100644 --- a/superset-frontend/src/chartCustomizations/components/TimeGrain/index.ts +++ b/superset-frontend/src/chartCustomizations/components/TimeGrain/index.ts @@ -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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/src/chartCustomizations/components/common.ts b/superset-frontend/src/chartCustomizations/components/common.ts index 38d98a5ae09..01725ccb18e 100644 --- a/superset-frontend/src/chartCustomizations/components/common.ts +++ b/superset-frontend/src/chartCustomizations/components/common.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { FormItem } from '@superset-ui/core/components'; import { PluginFilterStylesProps } from './types'; diff --git a/superset-frontend/src/components/AlteredSliceTag/index.tsx b/superset-frontend/src/components/AlteredSliceTag/index.tsx index 2ad313bbd69..0637bba6006 100644 --- a/superset-frontend/src/components/AlteredSliceTag/index.tsx +++ b/superset-frontend/src/components/AlteredSliceTag/index.tsx @@ -18,7 +18,7 @@ */ import { useEffect, useMemo, useState, FC } from 'react'; import { isEmpty } from 'lodash'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import getControlsForVizType from 'src/utils/getControlsForVizType'; import { Label, diff --git a/superset-frontend/src/components/AuditInfo/index.tsx b/superset-frontend/src/components/AuditInfo/index.tsx index 1df21c848cc..37f49cafd57 100644 --- a/superset-frontend/src/components/AuditInfo/index.tsx +++ b/superset-frontend/src/components/AuditInfo/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import getOwnerName from 'src/utils/getOwnerName'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Tooltip } from '@superset-ui/core/components'; import type { AuditInfoProps } from './types'; diff --git a/superset-frontend/src/components/Chart/Chart.tsx b/superset-frontend/src/components/Chart/Chart.tsx index a9797f4f56a..a7e38aa61a4 100644 --- a/superset-frontend/src/components/Chart/Chart.tsx +++ b/superset-frontend/src/components/Chart/Chart.tsx @@ -17,7 +17,8 @@ * under the License. */ import { PureComponent } from 'react'; -import { t, logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, FeatureFlag, @@ -30,7 +31,7 @@ import { type JsonObject, type AgGridChartState, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import type { ChartState, Datasource, ChartStatus } from 'src/explore/types'; import { PLACEHOLDER_DATASOURCE } from 'src/dashboard/constants'; import { EmptyState, Loading } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx index 56b295b0cf7..ecb52a7d87d 100644 --- a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx +++ b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx @@ -28,7 +28,7 @@ import { } from 'react'; import ReactDOM from 'react-dom'; import { useDispatch, useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Behavior, BinaryQueryObjectFilterClause, @@ -41,7 +41,7 @@ import { isFeatureEnabled, QueryFormData, } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { RootState } from 'src/dashboard/types'; import { MenuItem } from '@superset-ui/core/components/Menu'; import { usePermissions } from 'src/hooks/usePermissions'; diff --git a/superset-frontend/src/components/Chart/ChartRenderer.tsx b/superset-frontend/src/components/Chart/ChartRenderer.tsx index be6fd3aeaec..33528f78a38 100644 --- a/superset-frontend/src/components/Chart/ChartRenderer.tsx +++ b/superset-frontend/src/components/Chart/ChartRenderer.tsx @@ -35,8 +35,8 @@ import { ContextMenuFilters, DataRecordFilters, } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; -import { t } from '@apache-superset/core/ui'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; import { Logger, LOG_ACTIONS_RENDER_CHART } from 'src/logger/LogUtils'; import { EmptyState } from '@superset-ui/core/components'; import { ChartSource } from 'src/types/ChartSource'; diff --git a/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx b/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx index 8e47d36ddcb..46ccc5b9647 100644 --- a/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx +++ b/superset-frontend/src/components/Chart/DisabledMenuItemTooltip.tsx @@ -18,7 +18,7 @@ */ import { ReactNode } from 'react'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByChart.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByChart.tsx index 6463948827e..b977433e853 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByChart.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByChart.tsx @@ -23,7 +23,7 @@ import { SuperChart, ContextMenuFilters, } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Dataset } from '../types'; interface DrillByChartProps { diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx index 6245945de45..1bb63d0d81e 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useContext, useEffect, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { BinaryQueryObjectFilterClause, BaseFormData, @@ -29,7 +29,8 @@ import { ContextMenuFilters, AdhocFilter, } from '@superset-ui/core'; -import { css, useTheme, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { css, useTheme } from '@apache-superset/core/theme'; import { useDispatch, useSelector } from 'react-redux'; import { Link } from 'react-router-dom'; import { diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx index 9e3ebde3a07..8bb347e7dfa 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx @@ -26,7 +26,7 @@ import { useRef, useState, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { BaseFormData, Behavior, @@ -35,7 +35,7 @@ import { ensureIsArray, getChartMetadataRegistry, } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Constants, Input, diff --git a/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx b/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx index 8676d9fdb83..e4744378726 100644 --- a/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx @@ -18,8 +18,8 @@ */ import { useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { Radio } from '@superset-ui/core/components/Radio'; import { DrillByType } from '../types'; diff --git a/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx b/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx index ce27989a003..f84a2f3be40 100644 --- a/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx @@ -17,7 +17,8 @@ * under the License. */ import { isDefined, QueryData } from '@superset-ui/core'; -import { css, styled, t } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { SingleQueryResultPane } from 'src/explore/components/DataTablesPane/components/SingleQueryResultPane'; import Tabs from '@superset-ui/core/components/Tabs'; diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx index 89b61ecf42f..fcf3d96f9df 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx @@ -19,12 +19,12 @@ import { useCallback, useContext, useMemo } from 'react'; import { useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { BinaryQueryObjectFilterClause, QueryFormData, } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Button, Modal } from '@superset-ui/core/components'; import { useSelector } from 'react-redux'; import { DashboardPageIdContext } from 'src/dashboard/containers/DashboardPage'; diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx index 5dfb9ccc86e..747c17d80bf 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx @@ -26,7 +26,7 @@ import { useState, } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { BinaryQueryObjectFilterClause, DatasourceType, @@ -34,8 +34,8 @@ import { JsonObject, QueryFormData, } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { css, useTheme } from '@apache-superset/core/theme'; +import { GenericDataType } from '@apache-superset/core/common'; import { useResizeDetector } from 'react-resize-detector'; import BooleanCell from '@superset-ui/core/components/Table/cell-renderers/BooleanCell'; import NullCell from '@superset-ui/core/components/Table/cell-renderers/NullCell'; diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx index 9f4b2bd0c76..f1c7e23af39 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx @@ -19,12 +19,12 @@ import { useCallback, useMemo } from 'react'; import { Tag } from 'src/components/Tag'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { BinaryQueryObjectFilterClause, isAdhocColumn, } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import RowCountLabel from 'src/components/RowCountLabel'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/components/Chart/DrillDetail/types.ts b/superset-frontend/src/components/Chart/DrillDetail/types.ts index 430de0cde3d..f300e165a1a 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/types.ts +++ b/superset-frontend/src/components/Chart/DrillDetail/types.ts @@ -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'; export type ResultsPage = { total: number; diff --git a/superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx b/superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx index 45fb77ad2da..89cdec80c32 100644 --- a/superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx +++ b/superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx @@ -19,7 +19,7 @@ import { ReactNode, CSSProperties, useCallback } from 'react'; import { truncationCSS, useCSSTextTruncation } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Menu, type ItemType } from '@superset-ui/core/components/Menu'; import { Flex, Tooltip } from '@superset-ui/core/components'; import { MenuItemProps } from 'antd'; diff --git a/superset-frontend/src/components/Chart/chartAction.ts b/superset-frontend/src/components/Chart/chartAction.ts index 2ed8bba83b7..40d8ed79b16 100644 --- a/superset-frontend/src/components/Chart/chartAction.ts +++ b/superset-frontend/src/components/Chart/chartAction.ts @@ -31,7 +31,7 @@ import { DatasourceType, LatestQueryFormData, } from '@superset-ui/core'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import type { ControlStateMapping } from '@superset-ui/chart-controls'; import { getControlsState } from 'src/explore/store'; import { diff --git a/superset-frontend/src/components/Chart/chartReducer.ts b/superset-frontend/src/components/Chart/chartReducer.ts index 416e3843bf4..874c7d18cf8 100644 --- a/superset-frontend/src/components/Chart/chartReducer.ts +++ b/superset-frontend/src/components/Chart/chartReducer.ts @@ -17,7 +17,7 @@ * under the License. */ /* eslint camelcase: 0 */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { omit } from 'lodash'; import { HYDRATE_DASHBOARD } from 'src/dashboard/actions/hydrate'; import { DatasourcesAction } from 'src/dashboard/actions/datasources'; diff --git a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/index.tsx b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/index.tsx index 13c64f1550d..74ca3f5be0c 100644 --- a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/index.tsx +++ b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/index.tsx @@ -25,7 +25,7 @@ import { useMemo, } from 'react'; import { isEmpty } from 'lodash'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Behavior, BinaryQueryObjectFilterClause, @@ -34,7 +34,7 @@ import { QueryFormData, removeHTMLTags, } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { useSelector } from 'react-redux'; import { type ItemType } from '@superset-ui/core/components/Menu'; import { RootState } from 'src/dashboard/types'; diff --git a/superset-frontend/src/components/CopyToClipboard/index.tsx b/superset-frontend/src/components/CopyToClipboard/index.tsx index 976f0059c30..3c3a51a845b 100644 --- a/superset-frontend/src/components/CopyToClipboard/index.tsx +++ b/superset-frontend/src/components/CopyToClipboard/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { Component, cloneElement, ReactElement } from 'react'; -import { t } from '@apache-superset/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import copyTextToClipboard from 'src/utils/copy'; import { Tooltip } from '@superset-ui/core/components'; import withToasts from '../MessageToasts/withToasts'; diff --git a/superset-frontend/src/components/CrudThemeProvider.tsx b/superset-frontend/src/components/CrudThemeProvider.tsx index 4ecc1c68ce2..506d5a64688 100644 --- a/superset-frontend/src/components/CrudThemeProvider.tsx +++ b/superset-frontend/src/components/CrudThemeProvider.tsx @@ -18,7 +18,7 @@ */ import { ReactNode, useEffect, useState } from 'react'; import { useThemeContext } from 'src/theme/ThemeProvider'; -import { Theme } from '@apache-superset/core/ui'; +import { Theme } from '@apache-superset/core/theme'; import { Loading } from '@superset-ui/core/components'; interface CrudThemeProviderProps { diff --git a/superset-frontend/src/components/DatabaseSelector/index.tsx b/superset-frontend/src/components/DatabaseSelector/index.tsx index 47820e475b2..ee5f39b9979 100644 --- a/superset-frontend/src/components/DatabaseSelector/index.tsx +++ b/superset-frontend/src/components/DatabaseSelector/index.tsx @@ -24,9 +24,9 @@ import { useRef, useCallback, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, SupersetError } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import rison from 'rison'; import RefreshLabel from '@superset-ui/core/components/RefreshLabel'; import { useToasts } from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/components/DatabaseSelector/styles.ts b/superset-frontend/src/components/DatabaseSelector/styles.ts index 5b6b576aa1f..f3dab563bbd 100644 --- a/superset-frontend/src/components/DatabaseSelector/styles.ts +++ b/superset-frontend/src/components/DatabaseSelector/styles.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { FormLabel } from '@superset-ui/core/components'; export const StyledFormLabel = styled(FormLabel)` diff --git a/superset-frontend/src/components/Datasource/ChangeDatasourceModal/index.tsx b/superset-frontend/src/components/Datasource/ChangeDatasourceModal/index.tsx index ea1e1e56298..3b8f3531039 100644 --- a/superset-frontend/src/components/Datasource/ChangeDatasourceModal/index.tsx +++ b/superset-frontend/src/components/Datasource/ChangeDatasourceModal/index.tsx @@ -25,9 +25,10 @@ import { ChangeEvent, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, getClientErrorObject } from '@superset-ui/core'; -import { styled, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { styled } from '@apache-superset/core/theme'; import { Button, Constants, diff --git a/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx b/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx index f8b9f5dbb30..d3e34b76484 100644 --- a/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx +++ b/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx @@ -18,7 +18,7 @@ */ import { FunctionComponent, useState, useEffect, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, getClientErrorObject, @@ -26,7 +26,8 @@ import { isFeatureEnabled, FeatureFlag, } from '@superset-ui/core'; -import { styled, useTheme, css, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; import { Icons, diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.styles.ts b/superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.styles.ts index 86d7bfaba1f..8c95a3a4a6a 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.styles.ts +++ b/superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.styles.ts @@ -17,7 +17,7 @@ * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; export const FOLDER_INDENTATION_WIDTH = 24; export const ITEM_INDENTATION_WIDTH = 4; diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.tsx b/superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.tsx index 11e4c31c59e..46d2a08bbda 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.tsx +++ b/superset-frontend/src/components/Datasource/FoldersEditor/TreeItem.tsx @@ -21,7 +21,8 @@ import { CSSProperties, useState, memo, useMemo } from 'react'; import { useSortable } from '@dnd-kit/sortable'; import { useDroppable } from '@dnd-kit/core'; import { CSS } from '@dnd-kit/utilities'; -import { css, t } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Checkbox, Input, @@ -35,7 +36,7 @@ import { ColumnTypeLabel, Metric, } from '@superset-ui/chart-controls'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { OptionControlContainer, Label, diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/components/DragOverlayContent.tsx b/superset-frontend/src/components/Datasource/FoldersEditor/components/DragOverlayContent.tsx index 1fd6a4d5251..63c6a406ba5 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/components/DragOverlayContent.tsx +++ b/superset-frontend/src/components/Datasource/FoldersEditor/components/DragOverlayContent.tsx @@ -18,7 +18,7 @@ */ import { memo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Metric } from '@superset-ui/core'; import { ColumnMeta } from '@superset-ui/chart-controls'; import { FoldersEditorItemType } from '../../types'; diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/components/FoldersToolbarComponent.tsx b/superset-frontend/src/components/Datasource/FoldersEditor/components/FoldersToolbarComponent.tsx index e62cff18444..a222f638bc9 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/components/FoldersToolbarComponent.tsx +++ b/superset-frontend/src/components/Datasource/FoldersEditor/components/FoldersToolbarComponent.tsx @@ -18,7 +18,7 @@ */ import { memo, useMemo } from 'react'; -import { t, tn } from '@apache-superset/core'; +import { t, tn } from '@apache-superset/core/translation'; import { Button, Input, Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; import { diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/components/ResetConfirmModal.tsx b/superset-frontend/src/components/Datasource/FoldersEditor/components/ResetConfirmModal.tsx index 0aabc92d8ac..c5b82d3e308 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/components/ResetConfirmModal.tsx +++ b/superset-frontend/src/components/Datasource/FoldersEditor/components/ResetConfirmModal.tsx @@ -18,7 +18,7 @@ */ import { memo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Modal } from '@superset-ui/core/components'; interface ResetConfirmModalProps { diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/folderOperations.ts b/superset-frontend/src/components/Datasource/FoldersEditor/folderOperations.ts index cb810bd4a01..e251b2fbb67 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/folderOperations.ts +++ b/superset-frontend/src/components/Datasource/FoldersEditor/folderOperations.ts @@ -23,7 +23,7 @@ */ import { Metric, ColumnMeta } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { v4 as uuidv4 } from 'uuid'; import { DatasourceFolder, diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/folderValidation.ts b/superset-frontend/src/components/Datasource/FoldersEditor/folderValidation.ts index a9430da322c..3acfcc9365b 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/folderValidation.ts +++ b/superset-frontend/src/components/Datasource/FoldersEditor/folderValidation.ts @@ -22,7 +22,7 @@ * Determines what actions are allowed based on folder structure and types. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DatasourceFolder } from 'src/explore/components/DatasourcePanel/types'; import { ValidationResult, diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useDragHandlers.ts b/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useDragHandlers.ts index d5388f84eff..9437872010c 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useDragHandlers.ts +++ b/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useDragHandlers.ts @@ -18,7 +18,7 @@ */ import { useCallback, useMemo, useRef, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { UniqueIdentifier, DragStartEvent, diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useItemHeights.ts b/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useItemHeights.ts index e45382a663f..240a9d8023c 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useItemHeights.ts +++ b/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useItemHeights.ts @@ -18,7 +18,7 @@ */ import { useMemo } from 'react'; -import { useTheme, SupersetTheme } from '@apache-superset/core/ui'; +import { useTheme, SupersetTheme } from '@apache-superset/core/theme'; import { FOLDER_INDENTATION_WIDTH, ITEM_INDENTATION_WIDTH, diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/styles.tsx b/superset-frontend/src/components/Datasource/FoldersEditor/styles.tsx index 95e91a0343a..b5ed9e615f6 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/styles.tsx +++ b/superset-frontend/src/components/Datasource/FoldersEditor/styles.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { calculateItemHeights } from './hooks/useItemHeights'; export const FoldersContainer = styled.div` diff --git a/superset-frontend/src/components/Datasource/components/CollectionTable/index.tsx b/superset-frontend/src/components/Datasource/components/CollectionTable/index.tsx index a99e7f344f5..0004ade750a 100644 --- a/superset-frontend/src/components/Datasource/components/CollectionTable/index.tsx +++ b/superset-frontend/src/components/Datasource/components/CollectionTable/index.tsx @@ -18,8 +18,8 @@ */ import { PureComponent, ReactNode } from 'react'; import { nanoid } from 'nanoid'; -import { t } from '@apache-superset/core'; -import { styled, css, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css, SupersetTheme } from '@apache-superset/core/theme'; import { Icons, Button, InfoTooltip } from '@superset-ui/core/components'; import { FilterValue } from 'react-table'; import Table, { diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx index 5e8be8d450b..6150927ca6a 100644 --- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx +++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx @@ -20,7 +20,7 @@ import rison from 'rison'; import { PureComponent, useCallback, type ReactNode } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import type { JsonObject } from '@superset-ui/core'; -import type { SupersetTheme } from '@apache-superset/core/ui'; +import { type SupersetTheme } from '@apache-superset/core/theme'; import type { AnyAction } from 'redux'; import type { ThunkDispatch } from 'redux-thunk'; import { Radio } from '@superset-ui/core/components/Radio'; @@ -31,15 +31,15 @@ import { getClientErrorObject, getExtensionsRegistry, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; +import { Alert } from '@apache-superset/core/components'; import { css, styled, themeObject, - Alert, withTheme, - t, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import Tabs from '@superset-ui/core/components/Tabs'; import WarningIconWithTooltip from '@superset-ui/core/components/WarningIconWithTooltip'; import TableSelector from 'src/components/TableSelector'; diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DashboardLinksExternal/index.tsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DashboardLinksExternal/index.tsx index 5f6e4d15485..d9b25673dae 100644 --- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DashboardLinksExternal/index.tsx +++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DashboardLinksExternal/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { GenericLink } from 'src/components'; const DashboardLinksWrapper = styled.span` diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DatasetUsageTab/index.tsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DatasetUsageTab/index.tsx index 85b52f5f08f..8c1456a07f0 100644 --- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DatasetUsageTab/index.tsx +++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DatasetUsageTab/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState, useEffect, useMemo, useCallback, useRef } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css } from '@apache-superset/core/theme'; import { CertifiedBadge, InfoTooltip, diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditorCurrency.test.tsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditorCurrency.test.tsx index 6efa680965b..fa999a79ece 100644 --- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditorCurrency.test.tsx +++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditorCurrency.test.tsx @@ -23,7 +23,7 @@ import { userEvent, selectOption, } from 'spec/helpers/testing-library'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import type { DatasetObject } from 'src/features/datasets/types'; import { createProps, diff --git a/superset-frontend/src/components/Datasource/components/Field/index.tsx b/superset-frontend/src/components/Datasource/components/Field/index.tsx index 9c940c7e962..6c20adf6f84 100644 --- a/superset-frontend/src/components/Datasource/components/Field/index.tsx +++ b/superset-frontend/src/components/Datasource/components/Field/index.tsx @@ -18,7 +18,7 @@ */ import { useCallback, ReactNode, ReactElement, cloneElement } from 'react'; -import { css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme, useTheme } from '@apache-superset/core/theme'; import { Icons, Tooltip, diff --git a/superset-frontend/src/components/Datasource/components/Fieldset/index.tsx b/superset-frontend/src/components/Datasource/components/Fieldset/index.tsx index 151120cf560..85107403c39 100644 --- a/superset-frontend/src/components/Datasource/components/Fieldset/index.tsx +++ b/superset-frontend/src/components/Datasource/components/Fieldset/index.tsx @@ -18,7 +18,7 @@ */ import { ReactNode, useCallback } from 'react'; import { Divider, Form, Typography } from '@superset-ui/core/components'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { recurseReactClone } from '../../utils'; import Field from '../Field'; diff --git a/superset-frontend/src/components/Datasource/utils/index.ts b/superset-frontend/src/components/Datasource/utils/index.ts index 3d5ef8c3f88..221be9d8abf 100644 --- a/superset-frontend/src/components/Datasource/utils/index.ts +++ b/superset-frontend/src/components/Datasource/utils/index.ts @@ -25,7 +25,7 @@ import { } from 'react'; import { nanoid } from 'nanoid'; import { SupersetClient } from '@superset-ui/core'; -import { tn } from '@apache-superset/core/ui'; +import { tn } from '@apache-superset/core/translation'; import rison from 'rison'; // Type definitions diff --git a/superset-frontend/src/components/Datasource/utils/utils.test.tsx b/superset-frontend/src/components/Datasource/utils/utils.test.tsx index 047eaeba461..21a66deb8ca 100644 --- a/superset-frontend/src/components/Datasource/utils/utils.test.tsx +++ b/superset-frontend/src/components/Datasource/utils/utils.test.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { tn } from '@apache-superset/core'; +import { tn } from '@apache-superset/core/translation'; import { updateColumns } from '.'; // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks diff --git a/superset-frontend/src/components/DynamicPlugins/index.tsx b/superset-frontend/src/components/DynamicPlugins/index.tsx index f1170480a8b..22601f29c65 100644 --- a/superset-frontend/src/components/DynamicPlugins/index.tsx +++ b/superset-frontend/src/components/DynamicPlugins/index.tsx @@ -26,7 +26,7 @@ import { getChartMetadataRegistry, makeApi, } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { omitBy } from 'lodash'; import type { Plugin, PluginAction, PluginContextType } from './types'; diff --git a/superset-frontend/src/components/ErrorBoundary/index.tsx b/superset-frontend/src/components/ErrorBoundary/index.tsx index 8dcef63b406..59f5f582a50 100644 --- a/superset-frontend/src/components/ErrorBoundary/index.tsx +++ b/superset-frontend/src/components/ErrorBoundary/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Component, ErrorInfo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ErrorAlert } from '../ErrorMessage'; import type { ErrorBoundaryProps, ErrorBoundaryState } from './types'; diff --git a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx index 804612b8911..92bc923edca 100644 --- a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx +++ b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.test.tsx @@ -19,7 +19,7 @@ import { render, screen } from 'spec/helpers/testing-library'; import { ErrorLevel } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; import { BasicErrorAlert } from './BasicErrorAlert'; jest.mock( diff --git a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx index 92ce75e0806..213182ffec4 100644 --- a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx +++ b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx @@ -17,7 +17,11 @@ * under the License. */ import { ErrorLevel } from '@superset-ui/core'; -import { styled, useTheme, getColorVariants } from '@apache-superset/core/ui'; +import { + styled, + useTheme, + getColorVariants, +} from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components'; const StyledContent = styled.div` diff --git a/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx index fad71169c58..60f2de47824 100644 --- a/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { tn } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; +import { tn } from '@apache-superset/core/translation'; import type { ErrorMessageComponentProps } from './types'; import { IssueCode } from './IssueCode'; diff --git a/superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.tsx index 6623715ee0b..e74da4d0649 100644 --- a/superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/DatasetNotFoundErrorMessage.tsx @@ -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 type { ErrorMessageComponentProps } from './types'; import { ErrorAlert } from './ErrorAlert'; diff --git a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx index 97c6ed70471..228668973ff 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx @@ -17,8 +17,9 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@apache-superset/core'; -import { useTheme, Alert } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { Alert } from '@apache-superset/core/components'; +import { useTheme } from '@apache-superset/core/theme'; import { Icons, Modal, diff --git a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx index 2dc7f793bbe..a98820837e5 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ErrorSource, SupersetError } from '@superset-ui/core'; import { Typography } from '@superset-ui/core/components'; import { getErrorMessageComponentRegistry } from './getErrorMessageComponentRegistry'; diff --git a/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.tsx index e52b96b8fee..899e332410c 100644 --- a/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.tsx @@ -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 type { ErrorMessageComponentProps } from './types'; import { ErrorAlert } from './ErrorAlert'; diff --git a/superset-frontend/src/components/ErrorMessage/InvalidSQLErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/InvalidSQLErrorMessage.tsx index 5792f2d4db3..4c89a0c08e2 100644 --- a/superset-frontend/src/components/ErrorMessage/InvalidSQLErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/InvalidSQLErrorMessage.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import type { ErrorMessageComponentProps } from './types'; import { ErrorAlert } from './ErrorAlert'; diff --git a/superset-frontend/src/components/ErrorMessage/IssueCode.tsx b/superset-frontend/src/components/ErrorMessage/IssueCode.tsx index 918d3c8f784..6b117578cb2 100644 --- a/superset-frontend/src/components/ErrorMessage/IssueCode.tsx +++ b/superset-frontend/src/components/ErrorMessage/IssueCode.tsx @@ -17,8 +17,8 @@ * under the License. */ import { Icons } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; interface IssueCodeProps { code: number; diff --git a/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx index 871c4eef394..b65b0e4d61f 100644 --- a/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx @@ -17,7 +17,7 @@ * under the License. */ import { JSONTree } from 'react-json-tree'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useJsonTreeTheme } from 'src/hooks/useJsonTreeTheme'; import { Collapse, List, Typography } from '@superset-ui/core/components'; import type { ErrorMessageComponentProps } from './types'; diff --git a/superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.tsx b/superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.tsx index 1c6ede178b7..2dc655fdec0 100644 --- a/superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.tsx @@ -25,7 +25,7 @@ import { RootState } from 'src/dashboard/types'; import { reRunQuery } from 'src/SqlLab/actions/sqlLab'; import { triggerQuery } from 'src/components/Chart/chartAction'; import { onRefresh } from 'src/dashboard/actions/dashboardState'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryResponse } from '@superset-ui/core'; import type { ErrorMessageComponentProps } from './types'; diff --git a/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx index 73d8b264c7f..bc79d52613a 100644 --- a/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { tn } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; +import { tn } from '@apache-superset/core/translation'; import levenshtein from 'js-levenshtein'; import { List } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx index 298d1859832..c359efcde28 100644 --- a/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { tn } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; +import { tn } from '@apache-superset/core/translation'; import type { ErrorMessageComponentProps } from './types'; import { IssueCode } from './IssueCode'; diff --git a/superset-frontend/src/components/FilterableTable/utils.tsx b/superset-frontend/src/components/FilterableTable/utils.tsx index 9eae059b28d..336f64383b9 100644 --- a/superset-frontend/src/components/FilterableTable/utils.tsx +++ b/superset-frontend/src/components/FilterableTable/utils.tsx @@ -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 { safeHtmlSpan } from '@superset-ui/core'; import { JsonModal } from '../JsonModal'; import { safeJsonObjectParse } from '../JsonModal/utils'; diff --git a/superset-frontend/src/components/GridTable/Header.tsx b/superset-frontend/src/components/GridTable/Header.tsx index f47d9432d6a..ece0a8eb251 100644 --- a/superset-frontend/src/components/GridTable/Header.tsx +++ b/superset-frontend/src/components/GridTable/Header.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useCallback, useEffect, useRef, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme } from '@apache-superset/core/theme'; import type { Column, GridApi } from 'ag-grid-community'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/components/GridTable/HeaderMenu.tsx b/superset-frontend/src/components/GridTable/HeaderMenu.tsx index fbf517619e1..783feb42c0e 100644 --- a/superset-frontend/src/components/GridTable/HeaderMenu.tsx +++ b/superset-frontend/src/components/GridTable/HeaderMenu.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useCallback } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import type { Column, ColumnPinnedType, GridApi } from 'ag-grid-community'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/components/GridTable/index.tsx b/superset-frontend/src/components/GridTable/index.tsx index 2860847df62..33d48b8394c 100644 --- a/superset-frontend/src/components/GridTable/index.tsx +++ b/superset-frontend/src/components/GridTable/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useCallback, useMemo } from 'react'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { ThemedAgGridReact } from '@superset-ui/core/components'; import type { Column, GridOptions } from 'ag-grid-community'; import type { AgGridReactProps } from 'ag-grid-react'; diff --git a/superset-frontend/src/components/ImportModal/ErrorAlert.tsx b/superset-frontend/src/components/ImportModal/ErrorAlert.tsx index 571d7bd9a5d..24551678c38 100644 --- a/superset-frontend/src/components/ImportModal/ErrorAlert.tsx +++ b/superset-frontend/src/components/ImportModal/ErrorAlert.tsx @@ -18,8 +18,9 @@ */ import { FunctionComponent } from 'react'; -import { t } from '@apache-superset/core'; -import { SupersetTheme, Alert } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { Alert } from '@apache-superset/core/components'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { getDatabaseDocumentationLinks } from 'src/views/CRUD/hooks'; import { antdWarningAlertStyles } from './styles'; diff --git a/superset-frontend/src/components/ImportModal/ImportErrorAlert.tsx b/superset-frontend/src/components/ImportModal/ImportErrorAlert.tsx index a485aecb5e6..30c360f3c77 100644 --- a/superset-frontend/src/components/ImportModal/ImportErrorAlert.tsx +++ b/superset-frontend/src/components/ImportModal/ImportErrorAlert.tsx @@ -18,7 +18,7 @@ */ import { FunctionComponent } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getDatabaseDocumentationLinks } from 'src/views/CRUD/hooks'; import { ErrorAlert } from 'src/components'; diff --git a/superset-frontend/src/components/ImportModal/index.tsx b/superset-frontend/src/components/ImportModal/index.tsx index dd43e57b178..39fa38398ef 100644 --- a/superset-frontend/src/components/ImportModal/index.tsx +++ b/superset-frontend/src/components/ImportModal/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { FunctionComponent, useEffect, useState, ChangeEvent } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css } from '@apache-superset/core/theme'; import { useImportResource } from 'src/views/CRUD/hooks'; import { Upload, diff --git a/superset-frontend/src/components/ImportModal/styles.ts b/superset-frontend/src/components/ImportModal/styles.ts index 99b660512d0..a63de41334a 100644 --- a/superset-frontend/src/components/ImportModal/styles.ts +++ b/superset-frontend/src/components/ImportModal/styles.ts @@ -17,7 +17,7 @@ * under the License. */ -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; export const antdWarningAlertStyles = (theme: SupersetTheme) => css` margin: ${theme.sizeUnit * 4}px 0; diff --git a/superset-frontend/src/components/JsonModal/index.tsx b/superset-frontend/src/components/JsonModal/index.tsx index cc38d28454d..b365ea0705d 100644 --- a/superset-frontend/src/components/JsonModal/index.tsx +++ b/superset-frontend/src/components/JsonModal/index.tsx @@ -19,7 +19,7 @@ import { FC, useMemo } from 'react'; import { JSONTree } from 'react-json-tree'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { useJsonTreeTheme } from 'src/hooks/useJsonTreeTheme'; import { Button, ModalTrigger } from '@superset-ui/core/components'; import { CopyToClipboard } from '../CopyToClipboard'; diff --git a/superset-frontend/src/components/LastQueriedLabel/index.tsx b/superset-frontend/src/components/LastQueriedLabel/index.tsx index 30d54523321..0e60aff3fb6 100644 --- a/superset-frontend/src/components/LastQueriedLabel/index.tsx +++ b/superset-frontend/src/components/LastQueriedLabel/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { FC } from 'react'; -import { t } from '@apache-superset/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, useTheme } from '@apache-superset/core/theme'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; interface LastQueriedLabelProps { diff --git a/superset-frontend/src/components/ListView/ActionsBar.tsx b/superset-frontend/src/components/ListView/ActionsBar.tsx index 503b3bbee91..33bde585790 100644 --- a/superset-frontend/src/components/ListView/ActionsBar.tsx +++ b/superset-frontend/src/components/ListView/ActionsBar.tsx @@ -36,7 +36,7 @@ * under the License. */ import { ReactElement } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { IconNameType, Icons, diff --git a/superset-frontend/src/components/ListView/CardCollection.tsx b/superset-frontend/src/components/ListView/CardCollection.tsx index 8d192037f38..d3e8999713a 100644 --- a/superset-frontend/src/components/ListView/CardCollection.tsx +++ b/superset-frontend/src/components/ListView/CardCollection.tsx @@ -18,7 +18,7 @@ */ import { ReactNode, MouseEvent as ReactMouseEvent } from 'react'; import { TableInstance, Row, UseRowSelectRowProps } from 'react-table'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import cx from 'classnames'; interface CardCollectionProps { diff --git a/superset-frontend/src/components/ListView/CardSortSelect.tsx b/superset-frontend/src/components/ListView/CardSortSelect.tsx index 5ec2a001b31..57617fc2f25 100644 --- a/superset-frontend/src/components/ListView/CardSortSelect.tsx +++ b/superset-frontend/src/components/ListView/CardSortSelect.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState, useMemo } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { FormLabel, Select } from '@superset-ui/core/components'; import { SELECT_WIDTH } from './utils'; import { CardSortSelectOption, SortColumn } from './types'; diff --git a/superset-frontend/src/components/ListView/CrossLinks.tsx b/superset-frontend/src/components/ListView/CrossLinks.tsx index 05c5cee227b..6f4cd6d262b 100644 --- a/superset-frontend/src/components/ListView/CrossLinks.tsx +++ b/superset-frontend/src/components/ListView/CrossLinks.tsx @@ -18,7 +18,7 @@ */ import { memo, useMemo } from 'react'; import { useTruncation } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Link } from 'react-router-dom'; import CrossLinksTooltip from './CrossLinksTooltip'; diff --git a/superset-frontend/src/components/ListView/CrossLinksTooltip.tsx b/superset-frontend/src/components/ListView/CrossLinksTooltip.tsx index 88504e45e92..2f8517ca2fb 100644 --- a/superset-frontend/src/components/ListView/CrossLinksTooltip.tsx +++ b/superset-frontend/src/components/ListView/CrossLinksTooltip.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Link } from 'react-router-dom'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/ListView/Filters/Base.ts b/superset-frontend/src/components/ListView/Filters/Base.ts index 7f5fd9d05e3..2924f490a96 100644 --- a/superset-frontend/src/components/ListView/Filters/Base.ts +++ b/superset-frontend/src/components/ListView/Filters/Base.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { Flex } from '@superset-ui/core/components'; interface FilterContainerProps { diff --git a/superset-frontend/src/components/ListView/Filters/DateRange.tsx b/superset-frontend/src/components/ListView/Filters/DateRange.tsx index 00703f63bb2..1b735a5c9b0 100644 --- a/superset-frontend/src/components/ListView/Filters/DateRange.tsx +++ b/superset-frontend/src/components/ListView/Filters/DateRange.tsx @@ -24,7 +24,7 @@ import { RefObject, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Dayjs } from 'dayjs'; import { useLocale } from 'src/hooks/useLocale'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; diff --git a/superset-frontend/src/components/ListView/Filters/NumericalRange.tsx b/superset-frontend/src/components/ListView/Filters/NumericalRange.tsx index 11efbad1b5e..4079693961a 100644 --- a/superset-frontend/src/components/ListView/Filters/NumericalRange.tsx +++ b/superset-frontend/src/components/ListView/Filters/NumericalRange.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState, forwardRef, useImperativeHandle, RefObject } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { InputNumber } from '@superset-ui/core/components/Input'; import { FormLabel } from '@superset-ui/core/components/Form'; import type { BaseFilter, FilterHandler } from './types'; diff --git a/superset-frontend/src/components/ListView/Filters/Search.tsx b/superset-frontend/src/components/ListView/Filters/Search.tsx index 9655a29b6c5..d06a6c1b1cc 100644 --- a/superset-frontend/src/components/ListView/Filters/Search.tsx +++ b/superset-frontend/src/components/ListView/Filters/Search.tsx @@ -24,8 +24,8 @@ import { ChangeEvent, } from 'react'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { Input, InfoTooltip, diff --git a/superset-frontend/src/components/ListView/Filters/Select.tsx b/superset-frontend/src/components/ListView/Filters/Select.tsx index 7c7273e5ee2..5e38d99bd84 100644 --- a/superset-frontend/src/components/ListView/Filters/Select.tsx +++ b/superset-frontend/src/components/ListView/Filters/Select.tsx @@ -24,7 +24,7 @@ import { type RefObject, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Select, AsyncSelect, FormLabel } from '@superset-ui/core/components'; import { ListViewFilter as Filter, SelectOption } from '../types'; import type { BaseFilter, FilterHandler } from './types'; diff --git a/superset-frontend/src/components/ListView/Filters/index.tsx b/superset-frontend/src/components/ListView/Filters/index.tsx index a0895fe87ef..c32d2393b21 100644 --- a/superset-frontend/src/components/ListView/Filters/index.tsx +++ b/superset-frontend/src/components/ListView/Filters/index.tsx @@ -24,7 +24,7 @@ import { RefObject, } from 'react'; -import { withTheme } from '@apache-superset/core/ui'; +import { withTheme } from '@apache-superset/core/theme'; import type { ListViewFilterValue as FilterValue, diff --git a/superset-frontend/src/components/ListView/ListView.tsx b/superset-frontend/src/components/ListView/ListView.tsx index 397ebb0f85d..87135397554 100644 --- a/superset-frontend/src/components/ListView/ListView.tsx +++ b/superset-frontend/src/components/ListView/ListView.tsx @@ -16,8 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled, Alert } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { Alert } from '@apache-superset/core/components'; +import { styled } from '@apache-superset/core/theme'; import { useCallback, useEffect, useRef, useState, ReactNode } from 'react'; import cx from 'classnames'; import TableCollection from '@superset-ui/core/components/TableCollection'; diff --git a/superset-frontend/src/components/MessageToasts/Toast.tsx b/superset-frontend/src/components/MessageToasts/Toast.tsx index 87d0be567be..97205384058 100644 --- a/superset-frontend/src/components/MessageToasts/Toast.tsx +++ b/superset-frontend/src/components/MessageToasts/Toast.tsx @@ -16,8 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; -import { t } from '@apache-superset/core'; +import { + styled, + css, + SupersetTheme, + useTheme, +} from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import cx from 'classnames'; import { Interweave } from 'interweave'; import { useCallback, useEffect, useRef, useState } from 'react'; diff --git a/superset-frontend/src/components/MessageToasts/ToastPresenter.tsx b/superset-frontend/src/components/MessageToasts/ToastPresenter.tsx index ca6d694c1db..de90f4a8f31 100644 --- a/superset-frontend/src/components/MessageToasts/ToastPresenter.tsx +++ b/superset-frontend/src/components/MessageToasts/ToastPresenter.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { ToastMeta } from 'src/components/MessageToasts/types'; import Toast from './Toast'; diff --git a/superset-frontend/src/components/Modal/CollapsibleModalSection.tsx b/superset-frontend/src/components/Modal/CollapsibleModalSection.tsx index a83114ba947..cad4424ed1a 100644 --- a/superset-frontend/src/components/Modal/CollapsibleModalSection.tsx +++ b/superset-frontend/src/components/Modal/CollapsibleModalSection.tsx @@ -18,7 +18,7 @@ */ import { ReactNode } from 'react'; import { Collapse, CollapseLabelInModal } from '@superset-ui/core/components'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; interface CollapsibleModalSectionProps { sectionKey: string; diff --git a/superset-frontend/src/components/Modal/ModalFormField.tsx b/superset-frontend/src/components/Modal/ModalFormField.tsx index 14e71e245e1..c825e465b58 100644 --- a/superset-frontend/src/components/Modal/ModalFormField.tsx +++ b/superset-frontend/src/components/Modal/ModalFormField.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { InfoTooltip } from '@superset-ui/core/components'; interface ModalFormFieldProps { diff --git a/superset-frontend/src/components/Modal/StandardModal.tsx b/superset-frontend/src/components/Modal/StandardModal.tsx index 97e4f8d638e..0ab85a4e187 100644 --- a/superset-frontend/src/components/Modal/StandardModal.tsx +++ b/superset-frontend/src/components/Modal/StandardModal.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Modal, Loading, Flex } from '@superset-ui/core/components'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; diff --git a/superset-frontend/src/components/Modal/useModalValidation.tsx b/superset-frontend/src/components/Modal/useModalValidation.tsx index 4c3ab352cde..845bb3f220f 100644 --- a/superset-frontend/src/components/Modal/useModalValidation.tsx +++ b/superset-frontend/src/components/Modal/useModalValidation.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState, useCallback, useMemo, ReactNode } 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 { List } from '@superset-ui/core/components'; export interface SectionValidationObject { diff --git a/superset-frontend/src/components/ModalTitleWithIcon/index.tsx b/superset-frontend/src/components/ModalTitleWithIcon/index.tsx index 037e24159a5..f1b4575fdc7 100644 --- a/superset-frontend/src/components/ModalTitleWithIcon/index.tsx +++ b/superset-frontend/src/components/ModalTitleWithIcon/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { isValidElement, cloneElement } from 'react'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Typography, Icons, TitleProps } from '@superset-ui/core/components'; import type { IconType } from '@superset-ui/core/components/Icons/types'; diff --git a/superset-frontend/src/components/PanelToolbar/index.tsx b/superset-frontend/src/components/PanelToolbar/index.tsx index 16aa8930176..8f1dcd93705 100644 --- a/superset-frontend/src/components/PanelToolbar/index.tsx +++ b/superset-frontend/src/components/PanelToolbar/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo } from 'react'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Button, Divider, Dropdown } from '@superset-ui/core/components'; import { Menu, MenuItemType } from '@superset-ui/core/components/Menu'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/components/ResizableSidebar/index.tsx b/superset-frontend/src/components/ResizableSidebar/index.tsx index 500283a436e..507d8e7c440 100644 --- a/superset-frontend/src/components/ResizableSidebar/index.tsx +++ b/superset-frontend/src/components/ResizableSidebar/index.tsx @@ -18,7 +18,7 @@ */ import { FC, ReactNode } from 'react'; import { Resizable } from 're-resizable'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import useStoredSidebarWidth from './useStoredSidebarWidth'; const ResizableWrapper = styled.div` diff --git a/superset-frontend/src/components/RowCountLabel/index.tsx b/superset-frontend/src/components/RowCountLabel/index.tsx index fc367e307ea..b36ac0e7ccb 100644 --- a/superset-frontend/src/components/RowCountLabel/index.tsx +++ b/superset-frontend/src/components/RowCountLabel/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t, tn } from '@apache-superset/core'; +import { t, tn } from '@apache-superset/core/translation'; import { getNumberFormatter } from '@superset-ui/core'; import { Label, Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/SQLEditorWithValidation/index.tsx b/superset-frontend/src/components/SQLEditorWithValidation/index.tsx index de483fd90c3..8f43d513b1c 100644 --- a/superset-frontend/src/components/SQLEditorWithValidation/index.tsx +++ b/superset-frontend/src/components/SQLEditorWithValidation/index.tsx @@ -17,10 +17,10 @@ * under the License. */ import { useCallback, useState, useEffect, forwardRef } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import type { editors } from '@apache-superset/core'; import { SupersetClient } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Button, Icons, Tooltip, Flex } from '@superset-ui/core/components'; import { EditorHost } from 'src/core/editors'; import { diff --git a/superset-frontend/src/components/StreamingExportModal/StreamingExportModal.tsx b/superset-frontend/src/components/StreamingExportModal/StreamingExportModal.tsx index 995bcc53f64..301cb82d7bd 100644 --- a/superset-frontend/src/components/StreamingExportModal/StreamingExportModal.tsx +++ b/superset-frontend/src/components/StreamingExportModal/StreamingExportModal.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Modal, Button, diff --git a/superset-frontend/src/components/TableSelector/index.tsx b/superset-frontend/src/components/TableSelector/index.tsx index 1527b40f7bb..69b17bffcf8 100644 --- a/superset-frontend/src/components/TableSelector/index.tsx +++ b/superset-frontend/src/components/TableSelector/index.tsx @@ -25,9 +25,9 @@ import { } from 'react'; import type { SelectValue } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetError } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { CertifiedBadge, Select } from '@superset-ui/core/components'; import { DatabaseSelector, ErrorMessageWithStackTrace } from 'src/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/components/Tag/index.tsx b/superset-frontend/src/components/Tag/index.tsx index 385338e5fc1..d09334e175b 100644 --- a/superset-frontend/src/components/Tag/index.tsx +++ b/superset-frontend/src/components/Tag/index.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Link } from 'react-router-dom'; import type { TagType } from 'src/types/TagType'; import { Tag as AntdTag } from '@superset-ui/core/components/Tag'; diff --git a/superset-frontend/src/components/Tag/utils.tsx b/superset-frontend/src/components/Tag/utils.tsx index bcb913f54a1..75cc840fa45 100644 --- a/superset-frontend/src/components/Tag/utils.tsx +++ b/superset-frontend/src/components/Tag/utils.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ClientErrorObject, getClientErrorObject, diff --git a/superset-frontend/src/components/TagsList/index.tsx b/superset-frontend/src/components/TagsList/index.tsx index 4cc3c9e39ab..654b828bfb2 100644 --- a/superset-frontend/src/components/TagsList/index.tsx +++ b/superset-frontend/src/components/TagsList/index.tsx @@ -18,7 +18,7 @@ */ import { useMemo, useState } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import type { TagType } from 'src/types/TagType'; import { Tag } from 'src/components/Tag'; diff --git a/superset-frontend/src/core/commands/index.ts b/superset-frontend/src/core/commands/index.ts index 1eac191f112..05e64851137 100644 --- a/superset-frontend/src/core/commands/index.ts +++ b/superset-frontend/src/core/commands/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { commands as commandsApi } from '@apache-superset/core'; import { Disposable } from '../models'; diff --git a/superset-frontend/src/core/editors/AceEditorProvider.test.tsx b/superset-frontend/src/core/editors/AceEditorProvider.test.tsx index 330dc9f8d9a..a35dd83826a 100644 --- a/superset-frontend/src/core/editors/AceEditorProvider.test.tsx +++ b/superset-frontend/src/core/editors/AceEditorProvider.test.tsx @@ -25,7 +25,7 @@ import { } from '@testing-library/react'; import '@testing-library/jest-dom'; import userEvent from '@testing-library/user-event'; -import { ThemeProvider, supersetTheme } from '@apache-superset/core/ui'; +import { ThemeProvider, supersetTheme } from '@apache-superset/core/theme'; import type { editors } from '@apache-superset/core'; import AceEditorProvider from './AceEditorProvider'; diff --git a/superset-frontend/src/core/editors/EditorHost.tsx b/superset-frontend/src/core/editors/EditorHost.tsx index 210d2241b19..11b9ccab1b3 100644 --- a/superset-frontend/src/core/editors/EditorHost.tsx +++ b/superset-frontend/src/core/editors/EditorHost.tsx @@ -28,7 +28,7 @@ import { useState, useEffect, forwardRef } from 'react'; import type { editors } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import EditorProviders from './EditorProviders'; import AceEditorProvider from './AceEditorProvider'; diff --git a/superset-frontend/src/core/index.ts b/superset-frontend/src/core/index.ts index 3dba313cf97..6a106ebe87a 100644 --- a/superset-frontend/src/core/index.ts +++ b/superset-frontend/src/core/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { core as coreType } from '@apache-superset/core'; +import { common as coreType } from '@apache-superset/core'; import { Disposable } from './models'; const { GenericDataType } = coreType; diff --git a/superset-frontend/src/core/models.ts b/superset-frontend/src/core/models.ts index 0acd614c6b4..7dfa53b621f 100644 --- a/superset-frontend/src/core/models.ts +++ b/superset-frontend/src/core/models.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { core as coreType } from '@apache-superset/core'; +import { common as coreType } from '@apache-superset/core'; export class Table implements coreType.Table { name: string; diff --git a/superset-frontend/src/core/sqlLab/models.ts b/superset-frontend/src/core/sqlLab/models.ts index 747c914acf6..ce593c582f1 100644 --- a/superset-frontend/src/core/sqlLab/models.ts +++ b/superset-frontend/src/core/sqlLab/models.ts @@ -16,7 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -import { sqlLab as sqlLabType, core as coreType } from '@apache-superset/core'; +import { + sqlLab as sqlLabType, + common as coreType, +} from '@apache-superset/core'; const { CTASMethod } = sqlLabType; diff --git a/superset-frontend/src/core/utils.ts b/superset-frontend/src/core/utils.ts index 8b192e96cfd..1e4dded93c3 100644 --- a/superset-frontend/src/core/utils.ts +++ b/superset-frontend/src/core/utils.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { core } from '@apache-superset/core'; +import type { common as core } from '@apache-superset/core'; import { AnyAction } from 'redux'; import { listenerMiddleware, RootState, store } from 'src/views/store'; import { AnyListenerPredicate } from '@reduxjs/toolkit'; diff --git a/superset-frontend/src/dashboard/actions/chartCustomizationActions.ts b/superset-frontend/src/dashboard/actions/chartCustomizationActions.ts index 672cd104206..348f65c9b86 100644 --- a/superset-frontend/src/dashboard/actions/chartCustomizationActions.ts +++ b/superset-frontend/src/dashboard/actions/chartCustomizationActions.ts @@ -18,7 +18,7 @@ */ import { AnyAction } from 'redux'; import { ThunkAction, ThunkDispatch } from 'redux-thunk'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { makeApi, getClientErrorObject, diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts index e65b7143fb7..fb10123d307 100644 --- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts +++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts @@ -17,7 +17,7 @@ * under the License. */ import { Dispatch } from 'redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { makeApi, getClientErrorObject } from '@superset-ui/core'; import { addDangerToast } from 'src/components/MessageToasts/actions'; import { diff --git a/superset-frontend/src/dashboard/actions/dashboardLayout.ts b/superset-frontend/src/dashboard/actions/dashboardLayout.ts index 176b89c3a8d..38030cdace2 100644 --- a/superset-frontend/src/dashboard/actions/dashboardLayout.ts +++ b/superset-frontend/src/dashboard/actions/dashboardLayout.ts @@ -17,7 +17,7 @@ * under the License. */ import { ActionCreators as UndoActionCreators } from 'redux-undo'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import type { AnyAction } from 'redux'; import type { ThunkDispatch } from 'redux-thunk'; import { addWarningToast } from 'src/components/MessageToasts/actions'; diff --git a/superset-frontend/src/dashboard/actions/dashboardState.ts b/superset-frontend/src/dashboard/actions/dashboardState.ts index 61907bb2e6d..af5f7707dec 100644 --- a/superset-frontend/src/dashboard/actions/dashboardState.ts +++ b/superset-frontend/src/dashboard/actions/dashboardState.ts @@ -35,8 +35,8 @@ import { removeChart, refreshChart, } from 'src/components/Chart/chartAction'; -import { logging } from '@apache-superset/core'; -import { t } from '@apache-superset/core/ui'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; import { chart as initChart } from 'src/components/Chart/chartReducer'; import { applyDefaultFormData } from 'src/explore/store'; import { diff --git a/superset-frontend/src/dashboard/actions/sliceEntities.ts b/superset-frontend/src/dashboard/actions/sliceEntities.ts index 719bf20f195..f28a7a19604 100644 --- a/superset-frontend/src/dashboard/actions/sliceEntities.ts +++ b/superset-frontend/src/dashboard/actions/sliceEntities.ts @@ -17,7 +17,7 @@ * under the License. */ import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DatasourceType, SupersetClient, diff --git a/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx b/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx index e49b3b93a73..56229cc2bc3 100644 --- a/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx +++ b/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx @@ -29,9 +29,9 @@ import { FC, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Tooltip, ImageLoader } from '@superset-ui/core/components'; import { GenericLink, usePluginContext } from 'src/components'; import { assetUrl } from 'src/utils/assetUrl'; diff --git a/superset-frontend/src/dashboard/components/AnchorLink/index.tsx b/superset-frontend/src/dashboard/components/AnchorLink/index.tsx index 9412085db9d..b613df4a213 100644 --- a/superset-frontend/src/dashboard/components/AnchorLink/index.tsx +++ b/superset-frontend/src/dashboard/components/AnchorLink/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import URLShortLinkButton, { URLShortLinkButtonProps, diff --git a/superset-frontend/src/dashboard/components/AutoRefreshIndicator/index.tsx b/superset-frontend/src/dashboard/components/AutoRefreshIndicator/index.tsx index 8e7ac3c8f9a..bc10f8b4abe 100644 --- a/superset-frontend/src/dashboard/components/AutoRefreshIndicator/index.tsx +++ b/superset-frontend/src/dashboard/components/AutoRefreshIndicator/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { FC, useMemo } from 'react'; -import { css, useTheme, t } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Label, Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; import { useRealTimeDashboard } from '../../hooks/useRealTimeDashboard'; diff --git a/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.tsx b/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.tsx index c6c7c434231..6d1766c1052 100644 --- a/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.tsx +++ b/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC, useMemo, useRef, useEffect, useState } from 'react'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { AutoRefreshStatus } from '../../types/autoRefresh'; export interface StatusIndicatorDotProps { diff --git a/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusTooltipContent.tsx b/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusTooltipContent.tsx index d7e252b331d..061b8ac2aae 100644 --- a/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusTooltipContent.tsx +++ b/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusTooltipContent.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC } from 'react'; -import { t, tn } from '@apache-superset/core/ui'; +import { t, tn } from '@apache-superset/core/translation'; import { AutoRefreshStatus } from '../../types/autoRefresh'; export interface StatusTooltipContentProps { diff --git a/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx b/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx index bf48c8ed33d..e772a38b934 100644 --- a/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx +++ b/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx @@ -19,8 +19,8 @@ /* eslint-env browser */ import tinycolor from 'tinycolor2'; import Tabs from '@superset-ui/core/components/Tabs'; -import { t } from '@apache-superset/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import SliceAdder from 'src/dashboard/containers/SliceAdder'; import dashboardComponents from 'src/visualizations/presets/dashboardComponents'; import NewColumn from '../gridComponents/new/NewColumn'; diff --git a/superset-frontend/src/dashboard/components/ColorSchemeControlWrapper.tsx b/superset-frontend/src/dashboard/components/ColorSchemeControlWrapper.tsx index e6f116f12e0..5000ecc8efe 100644 --- a/superset-frontend/src/dashboard/components/ColorSchemeControlWrapper.tsx +++ b/superset-frontend/src/dashboard/components/ColorSchemeControlWrapper.tsx @@ -17,7 +17,7 @@ * under the License. */ /* eslint-env browser */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getCategoricalSchemeRegistry } from '@superset-ui/core'; import { useEffect, useState } from 'react'; import ColorSchemeControl from 'src/explore/components/controls/ColorSchemeControl'; diff --git a/superset-frontend/src/dashboard/components/ColorSchemeSelect.tsx b/superset-frontend/src/dashboard/components/ColorSchemeSelect.tsx index a6fb1b25d0f..58906e4fd7c 100644 --- a/superset-frontend/src/dashboard/components/ColorSchemeSelect.tsx +++ b/superset-frontend/src/dashboard/components/ColorSchemeSelect.tsx @@ -17,14 +17,14 @@ * under the License. */ import { ReactNode, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ColorScheme, ColorSchemeGroup, getCategoricalSchemeRegistry, CategoricalScheme, } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { sortBy } from 'lodash'; import { Select, Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/dashboard/components/CustomizationsBadge/index.tsx b/superset-frontend/src/dashboard/components/CustomizationsBadge/index.tsx index b67a99e275b..dbe3c91c8c7 100644 --- a/superset-frontend/src/dashboard/components/CustomizationsBadge/index.tsx +++ b/superset-frontend/src/dashboard/components/CustomizationsBadge/index.tsx @@ -19,9 +19,9 @@ import { memo, useMemo, useState, useRef } from 'react'; import { useSelector } from 'react-redux'; import { createSelector } from '@reduxjs/toolkit'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ChartCustomization, DataMaskStateWithId } from '@superset-ui/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Icons, Badge, Tooltip, Tag } from '@superset-ui/core/components'; import { getFilterValueForDisplay } from '../nativeFilters/utils'; import { extractLabel } from '../nativeFilters/selectors'; diff --git a/superset-frontend/src/dashboard/components/Dashboard.tsx b/superset-frontend/src/dashboard/components/Dashboard.tsx index f760156d95a..d349a89464c 100644 --- a/superset-frontend/src/dashboard/components/Dashboard.tsx +++ b/superset-frontend/src/dashboard/components/Dashboard.tsx @@ -17,7 +17,7 @@ * under the License. */ import { PureComponent, ReactNode } from 'react'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { JsonObject } from '@superset-ui/core'; import { Loading } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index d8593ff8b30..c2ea76ca2f8 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -19,9 +19,9 @@ /* eslint-env browser */ import cx from 'classnames'; import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { addAlpha, JsonObject, useElementOnScreen } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { useDispatch, useSelector } from 'react-redux'; import { EmptyState, Loading } from '@superset-ui/core/components'; import { ErrorBoundary, BasicErrorAlert } from 'src/components'; diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardWrapper.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardWrapper.tsx index ec423b7bb03..1c8b5970d54 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardWrapper.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardWrapper.tsx @@ -18,7 +18,7 @@ */ import { FC, PropsWithChildren, useEffect, useState } from 'react'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { Constants } from '@superset-ui/core/components'; import { RootState } from 'src/dashboard/types'; import { useSelector } from 'react-redux'; diff --git a/superset-frontend/src/dashboard/components/DashboardGrid.tsx b/superset-frontend/src/dashboard/components/DashboardGrid.tsx index 5dde8ab06ab..9fdefeb5cbf 100644 --- a/superset-frontend/src/dashboard/components/DashboardGrid.tsx +++ b/superset-frontend/src/dashboard/components/DashboardGrid.tsx @@ -20,7 +20,8 @@ import { PureComponent, Fragment } from 'react'; import { withTheme } from '@emotion/react'; import classNames from 'classnames'; import { addAlpha } from '@superset-ui/core'; -import { css, styled, t, type SupersetTheme } from '@apache-superset/core/ui'; +import { css, styled, type SupersetTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { EmptyState } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; import { navigateTo } from 'src/utils/navigationUtils'; diff --git a/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx b/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx index 59708101494..6ff78d794c0 100644 --- a/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx +++ b/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx @@ -17,13 +17,14 @@ * under the License. */ import { useCallback, useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { makeApi, SupersetApiError, getExtensionsRegistry, } from '@superset-ui/core'; -import { styled, css, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { styled, css } from '@apache-superset/core/theme'; import { Button, FormItem, diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx index 86bada7dc23..45766ad2086 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx @@ -19,8 +19,8 @@ import { RefObject, useEffect, useRef, KeyboardEvent } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { List, Popover } from '@superset-ui/core/components'; import { FiltersContainer, diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx index 374de9630ac..37c9e78b77b 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/FilterIndicator/index.tsx @@ -18,7 +18,7 @@ */ import { forwardRef } from 'react'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { getFilterValueForDisplay } from 'src/dashboard/components/nativeFilters/utils'; import { diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx index cff149e4281..8009520cb42 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx @@ -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 const Pill = styled.div` ${({ theme }) => css` diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx index 41b2e2fd813..a1df06aa1d7 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx @@ -29,14 +29,14 @@ import { import { useDispatch, useSelector } from 'react-redux'; import { uniqWith } from 'lodash'; import cx from 'classnames'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DataMaskStateWithId, Filters, JsonObject, usePrevious, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { setDirectPathToChild } from 'src/dashboard/actions/dashboardState'; import { useChartLayoutItems } from 'src/dashboard/util/useChartLayoutItems'; diff --git a/superset-frontend/src/dashboard/components/Header/index.tsx b/superset-frontend/src/dashboard/components/Header/index.tsx index 547bd6f5fc2..417c332fd2a 100644 --- a/superset-frontend/src/dashboard/components/Header/index.tsx +++ b/superset-frontend/src/dashboard/components/Header/index.tsx @@ -23,7 +23,8 @@ import { FeatureFlag, getExtensionsRegistry, } from '@superset-ui/core'; -import { styled, css, SupersetTheme, t } from '@apache-superset/core/ui'; +import { styled, css, SupersetTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Global } from '@emotion/react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { bindActionCreators } from 'redux'; diff --git a/superset-frontend/src/dashboard/components/Header/useDashboardMetadataBar.tsx b/superset-frontend/src/dashboard/components/Header/useDashboardMetadataBar.tsx index d5819a14faa..f9556464d7b 100644 --- a/superset-frontend/src/dashboard/components/Header/useDashboardMetadataBar.tsx +++ b/superset-frontend/src/dashboard/components/Header/useDashboardMetadataBar.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DashboardInfo } from 'src/dashboard/types'; import MetadataBar, { MetadataType, diff --git a/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx b/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx index 5eeff33dd65..7c648458024 100644 --- a/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx +++ b/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx @@ -21,7 +21,7 @@ import { useState, useEffect, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; import { useHistory } from 'react-router-dom'; import { Menu, MenuItem } from '@superset-ui/core/components/Menu'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isEmpty } from 'lodash'; import { URL_PARAMS } from 'src/constants'; import { useShareMenuItems } from 'src/dashboard/components/menu/ShareMenuItems'; diff --git a/superset-frontend/src/dashboard/components/IconButton.tsx b/superset-frontend/src/dashboard/components/IconButton.tsx index df1298097ca..a70d7c3d217 100644 --- a/superset-frontend/src/dashboard/components/IconButton.tsx +++ b/superset-frontend/src/dashboard/components/IconButton.tsx @@ -17,7 +17,7 @@ * under the License. */ import { MouseEventHandler } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; interface IconButtonProps { icon: JSX.Element; diff --git a/superset-frontend/src/dashboard/components/MissingChart.tsx b/superset-frontend/src/dashboard/components/MissingChart.tsx index 6ff520af789..4f3a56042b4 100644 --- a/superset-frontend/src/dashboard/components/MissingChart.tsx +++ b/superset-frontend/src/dashboard/components/MissingChart.tsx @@ -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'; interface MissingChartProps { height: number; diff --git a/superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx b/superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx index 39f27192ab9..af03f2c1190 100644 --- a/superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx +++ b/superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx @@ -27,8 +27,8 @@ import { saveDashboardRequest, setOverrideConfirm, } from 'src/dashboard/actions/dashboardState'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { SAVE_TYPE_OVERWRITE_CONFIRMED } from 'src/dashboard/util/constants'; const STICKY_HEADER_TOP = 16; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx index 23d37cfc9c7..d7e4b8e1ec8 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx @@ -26,7 +26,7 @@ import fetchMock from 'fetch-mock'; import * as ColorSchemeSelect from 'src/dashboard/components/ColorSchemeSelect'; import * as SupersetCore from '@superset-ui/core'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import PropertiesModal from '.'; // Increase timeout for CI environment diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx index 786d9fc7b1e..8fbcbb690b8 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx @@ -27,7 +27,7 @@ import { import { useJsonValidation } from '@superset-ui/core/components/AsyncAceEditor'; import { type TagType } from 'src/components'; import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, isFeatureEnabled, diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx index 1ef452d8bf7..d2bd52f760e 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { AsyncSelect } from '@superset-ui/core/components'; import { type TagType } from 'src/components'; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx index 9717a2de9ba..e9fd5d869d7 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import type { editors } from '@apache-superset/core'; import { EditorHost } from 'src/core/editors'; import { ModalFormField } from 'src/components/Modal'; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/BasicInfoSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/BasicInfoSection.tsx index 1da89e8534a..1aafc74fb8d 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/BasicInfoSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/BasicInfoSection.tsx @@ -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 { FormItem, Input, FormInstance } from '@superset-ui/core/components'; import { ModalFormField } from 'src/components/Modal'; import { ValidationObject } from 'src/components/Modal/useModalValidation'; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/CertificationSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/CertificationSection.tsx index c5ceaeacad4..c5dbe124296 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/CertificationSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/CertificationSection.tsx @@ -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 { FormItem, Input } from '@superset-ui/core/components'; import { ModalFormField } from 'src/components/Modal'; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/RefreshSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/RefreshSection.tsx index 6f9bfa746db..87eac044c69 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/RefreshSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/RefreshSection.tsx @@ -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 { ModalFormField } from 'src/components/Modal'; import { RefreshFrequencySelect } from '../../RefreshFrequency/RefreshFrequencySelect'; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.tsx index 1aa5e4b5412..5194b910282 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.tsx @@ -17,13 +17,14 @@ * under the License. */ import { useCallback, useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, isFeatureEnabled, FeatureFlag, } from '@superset-ui/core'; -import { styled, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { styled } from '@apache-superset/core/theme'; import { Select, Switch } from '@superset-ui/core/components'; import { EditorHost } from 'src/core/editors'; import rison from 'rison'; diff --git a/superset-frontend/src/dashboard/components/PublishedStatus/index.tsx b/superset-frontend/src/dashboard/components/PublishedStatus/index.tsx index b05cd30bf3b..8696fbbbb67 100644 --- a/superset-frontend/src/dashboard/components/PublishedStatus/index.tsx +++ b/superset-frontend/src/dashboard/components/PublishedStatus/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Component } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Tooltip, PublishedLabel } from '@superset-ui/core/components'; import { HeaderProps, HeaderDropdownProps } from '../Header/types'; diff --git a/superset-frontend/src/dashboard/components/RefreshButton/index.tsx b/superset-frontend/src/dashboard/components/RefreshButton/index.tsx index a16d11d8fbd..1240753ce69 100644 --- a/superset-frontend/src/dashboard/components/RefreshButton/index.tsx +++ b/superset-frontend/src/dashboard/components/RefreshButton/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { FC, useState, useCallback } from 'react'; -import { css, useTheme, t } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx b/superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx index c1d918fc5b2..6f5736d9078 100644 --- a/superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx +++ b/superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ChangeEvent, useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Input } from '@superset-ui/core/components'; import { Radio, RadioChangeEvent } from '@superset-ui/core/components/Radio'; diff --git a/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx b/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx index a0ae4aa959c..a4ec52d7313 100644 --- a/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx +++ b/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx @@ -18,8 +18,8 @@ */ import { useMemo, useState } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Form, Checkbox } from '@superset-ui/core/components'; import { StandardModal } from 'src/components/Modal'; import { RootState } from 'src/dashboard/types'; diff --git a/superset-frontend/src/dashboard/components/SaveModal.tsx b/superset-frontend/src/dashboard/components/SaveModal.tsx index 4daf944df69..0e451d3f3af 100644 --- a/superset-frontend/src/dashboard/components/SaveModal.tsx +++ b/superset-frontend/src/dashboard/components/SaveModal.tsx @@ -27,8 +27,8 @@ import { Divider, Flex, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { ModalTrigger, diff --git a/superset-frontend/src/dashboard/components/SliceAdder.tsx b/superset-frontend/src/dashboard/components/SliceAdder.tsx index afe5d2056fb..8ad34e3c065 100644 --- a/superset-frontend/src/dashboard/components/SliceAdder.tsx +++ b/superset-frontend/src/dashboard/components/SliceAdder.tsx @@ -22,8 +22,8 @@ import AutoSizer from 'react-virtualized-auto-sizer'; import { FixedSizeList as List } from 'react-window'; // @ts-expect-error import { createFilter } from 'react-search-input'; -import { t } from '@apache-superset/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css } from '@apache-superset/core/theme'; import { Button, Checkbox, diff --git a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx index 77da178b246..be29e3c8e89 100644 --- a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx @@ -24,9 +24,14 @@ import { useRef, useState, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getExtensionsRegistry, QueryData } from '@superset-ui/core'; -import { css, styled, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { + css, + styled, + SupersetTheme, + useTheme, +} from '@apache-superset/core/theme'; import { useUiConfig } from 'src/components/UiConfigContext'; import { isEmbedded } from 'src/dashboard/util/isEmbedded'; import { Tooltip, EditableTitle, Icons } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/ViewResultsModalTrigger.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/ViewResultsModalTrigger.tsx index c7295ce8be4..c9c9845cc5a 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls/ViewResultsModalTrigger.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/ViewResultsModalTrigger.tsx @@ -18,8 +18,8 @@ */ import { ReactChild, RefObject, useCallback } from 'react'; import { useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Button, ModalTrigger } from '@superset-ui/core/components'; export const ViewResultsModalTrigger = ({ diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx index cec1ed1b5e3..9fcf2ab0096 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx @@ -27,7 +27,7 @@ import { import { RouteComponentProps, useHistory } from 'react-router-dom'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Behavior, isFeatureEnabled, @@ -37,7 +37,7 @@ import { BinaryQueryObjectFilterClause, QueryFormData, } from '@superset-ui/core'; -import { css, useTheme, styled } from '@apache-superset/core/ui'; +import { css, useTheme, styled } from '@apache-superset/core/theme'; import { useSelector } from 'react-redux'; import { Menu, MenuItem } from '@superset-ui/core/components/Menu'; import { diff --git a/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx b/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx index 49e6de249f9..136c44425b9 100644 --- a/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx +++ b/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getClientErrorObject } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { Button, Icons, diff --git a/superset-frontend/src/dashboard/components/dnd/DragDroppable.tsx b/superset-frontend/src/dashboard/components/dnd/DragDroppable.tsx index 7cb532cdac8..cd603b6af6d 100644 --- a/superset-frontend/src/dashboard/components/dnd/DragDroppable.tsx +++ b/superset-frontend/src/dashboard/components/dnd/DragDroppable.tsx @@ -32,7 +32,7 @@ import { ConnectDropTarget, } from 'react-dnd'; import cx from 'classnames'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { dragConfig, dropConfig } from './dragDroppableConfig'; import type { DragDroppableProps as BaseDragDroppableProps } from './dragDroppableConfig'; diff --git a/superset-frontend/src/dashboard/components/dnd/DragHandle.tsx b/superset-frontend/src/dashboard/components/dnd/DragHandle.tsx index caa947d902a..4d3023e72d5 100644 --- a/superset-frontend/src/dashboard/components/dnd/DragHandle.tsx +++ b/superset-frontend/src/dashboard/components/dnd/DragHandle.tsx @@ -17,7 +17,7 @@ * under the License. */ import { LegacyRef } from 'react'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; interface DragHandleProps { diff --git a/superset-frontend/src/dashboard/components/filterscope/FilterScope.test.tsx b/superset-frontend/src/dashboard/components/filterscope/FilterScope.test.tsx index 35f544f18c8..2c18ba4a208 100644 --- a/superset-frontend/src/dashboard/components/filterscope/FilterScope.test.tsx +++ b/superset-frontend/src/dashboard/components/filterscope/FilterScope.test.tsx @@ -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 { cleanup, render, diff --git a/superset-frontend/src/dashboard/components/filterscope/FilterScopeModal.tsx b/superset-frontend/src/dashboard/components/filterscope/FilterScopeModal.tsx index 428daf4ec33..5dd6b01ee54 100644 --- a/superset-frontend/src/dashboard/components/filterscope/FilterScopeModal.tsx +++ b/superset-frontend/src/dashboard/components/filterscope/FilterScopeModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { createRef, PureComponent } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { ModalTrigger, ModalTriggerRef, diff --git a/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.tsx b/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.tsx index 0e4eca61ee9..7d10c1b691d 100644 --- a/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.tsx +++ b/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.tsx @@ -19,7 +19,8 @@ import { PureComponent, ChangeEvent, type ReactElement } from 'react'; import cx from 'classnames'; import { Button, Input } from '@superset-ui/core/components'; -import { css, styled, t } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import buildFilterScopeTreeEntry from 'src/dashboard/util/buildFilterScopeTreeEntry'; import getFilterScopeNodesTree from 'src/dashboard/util/getFilterScopeNodesTree'; diff --git a/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.tsx b/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.tsx index 3867a69aad9..8930868d21a 100644 --- a/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.tsx +++ b/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.tsx @@ -18,7 +18,7 @@ */ import { ReactNode } from 'react'; import cx from 'classnames'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { CHART_TYPE } from 'src/dashboard/util/componentTypes'; diff --git a/superset-frontend/src/dashboard/components/filterscope/treeIcons.tsx b/superset-frontend/src/dashboard/components/filterscope/treeIcons.tsx index 294faf968ba..c77a69e3b44 100644 --- a/superset-frontend/src/dashboard/components/filterscope/treeIcons.tsx +++ b/superset-frontend/src/dashboard/components/filterscope/treeIcons.tsx @@ -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 'react-checkbox-tree/lib/react-checkbox-tree.css'; import { diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.tsx b/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.tsx index cbf930183be..3c6c136159c 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.tsx @@ -19,7 +19,8 @@ import cx from 'classnames'; import { useCallback, useEffect, useRef, useMemo, useState, memo } from 'react'; import type { ChartCustomization, JsonObject } from '@superset-ui/core'; -import { styled, t } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { debounce } from 'lodash'; import { bindActionCreators } from 'redux'; import { useDispatch, useSelector } from 'react-redux'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/ChartHolder/ChartHolder.tsx b/superset-frontend/src/dashboard/components/gridComponents/ChartHolder/ChartHolder.tsx index 6b7560d3613..597f8887796 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/ChartHolder/ChartHolder.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/ChartHolder/ChartHolder.tsx @@ -21,7 +21,7 @@ import { useState, useMemo, useCallback, useEffect, memo } from 'react'; import { ResizeCallback, ResizeStartCallback } from 're-resizable'; import cx from 'classnames'; import { useSelector } from 'react-redux'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { LayoutItem, RootState } from 'src/dashboard/types'; import AnchorLink from 'src/dashboard/components/AnchorLink'; import Chart from 'src/dashboard/components/gridComponents/Chart'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx b/superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx index ecf9fde33de..4f8baf16a69 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx @@ -18,7 +18,8 @@ */ import { Fragment, useCallback, useState, useMemo, memo } from 'react'; import cx from 'classnames'; -import { t, css, styled, SupersetTheme } from '@apache-superset/core/ui'; +import { css, styled, SupersetTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Icons } from '@superset-ui/core/components/Icons'; import type { LayoutItem } from 'src/dashboard/types'; import type { DropResult } from 'src/dashboard/components/dnd/dragDroppableConfig'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Divider/Divider.tsx b/superset-frontend/src/dashboard/components/gridComponents/Divider/Divider.tsx index a241f3dd627..f6b26b48928 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Divider/Divider.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Divider/Divider.tsx @@ -18,7 +18,7 @@ */ import { PureComponent } from 'react'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { Draggable } from '../../dnd/DragDroppable'; import HoverMenu from '../../menu/HoverMenu'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/DynamicComponent/DynamicComponent.tsx b/superset-frontend/src/dashboard/components/gridComponents/DynamicComponent/DynamicComponent.tsx index c2233dfda79..124b91dbf1f 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/DynamicComponent/DynamicComponent.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/DynamicComponent/DynamicComponent.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC, Suspense } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DashboardComponentMetadata, JsonObject } from '@superset-ui/core'; import backgroundStyleOptions from 'src/dashboard/util/backgroundStyleOptions'; import cx from 'classnames'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Header/Header.tsx b/superset-frontend/src/dashboard/components/gridComponents/Header/Header.tsx index f61a2d1de14..dd9b2a6a6d6 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Header/Header.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Header/Header.tsx @@ -18,7 +18,7 @@ */ import { PureComponent } from 'react'; import cx from 'classnames'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import PopoverDropdown from '@superset-ui/core/components/PopoverDropdown'; import { EditableTitle } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx index 142ab621213..ea2848bbf43 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx @@ -25,7 +25,7 @@ import { userEvent, RenderResult, } from 'spec/helpers/testing-library'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; import { mockStore } from 'spec/fixtures/mockStore'; import { dashboardLayout as mockLayout } from 'spec/fixtures/mockDashboardLayout'; import MarkdownConnected from './Markdown'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.tsx b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.tsx index fd931625d69..b10e4e23224 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.tsx @@ -22,7 +22,8 @@ import cx from 'classnames'; import type { JsonObject } from '@superset-ui/core'; import type { ResizeStartCallback, ResizeCallback } from 're-resizable'; -import { t, css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { SafeMarkdown } from '@superset-ui/core/components'; import { EditorHost } from 'src/core/editors'; import { Logger, LOG_ACTIONS_RENDER_CHART } from 'src/logger/LogUtils'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx b/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx index 2ed137e9d12..707370d4050 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx @@ -28,9 +28,9 @@ import { RefObject, } from 'react'; import cx from 'classnames'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled, JsonObject } from '@superset-ui/core'; -import { css, styled, SupersetTheme } from '@apache-superset/core/ui'; +import { css, styled, SupersetTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components'; import { Draggable, diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.tsx b/superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.tsx index 6b2fe507e91..60c0da870c1 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.tsx @@ -27,7 +27,8 @@ import { } from 'react'; import classNames from 'classnames'; import { useDispatch, useSelector } from 'react-redux'; -import { t, styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { EditableTitle, EmptyState } from '@superset-ui/core/components'; import { setEditMode, onRefresh } from 'src/dashboard/actions/dashboardState'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.tsx b/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.tsx index 33f91af1b1b..d3eacb0cf7d 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.tsx @@ -25,7 +25,8 @@ import { ReactElement, } from 'react'; import { usePrevious } from '@superset-ui/core'; -import { t, useTheme, styled } from '@apache-superset/core/ui'; +import { useTheme, styled } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { useSelector } from 'react-redux'; import { Icons } from '@superset-ui/core/components/Icons'; import { LOG_ACTIONS_SELECT_DASHBOARD_TAB } from 'src/logger/LogUtils'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx b/superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx index 72761e6d914..6d030b06a56 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx @@ -25,7 +25,7 @@ import { useRef, useState, } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { LineEditableTabs, TabsProps as AntdTabsProps, diff --git a/superset-frontend/src/dashboard/components/gridComponents/new/DraggableNewComponent.tsx b/superset-frontend/src/dashboard/components/gridComponents/new/DraggableNewComponent.tsx index 542de90040e..8426521d4e0 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/new/DraggableNewComponent.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/new/DraggableNewComponent.tsx @@ -18,7 +18,7 @@ */ import { PureComponent } from 'react'; import cx from 'classnames'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { DragDroppable } from 'src/dashboard/components/dnd/DragDroppable'; import type { ConnectDragSource } from 'react-dnd'; import { NEW_COMPONENTS_SOURCE_ID } from 'src/dashboard/util/constants'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.tsx b/superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.tsx index 11f38b468b9..7040ad40675 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.tsx @@ -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 { Icons } from '@superset-ui/core/components'; import { COLUMN_TYPE } from '../../../util/componentTypes'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/new/NewDivider.tsx b/superset-frontend/src/dashboard/components/gridComponents/new/NewDivider.tsx index b95fa1c30b5..ae7a161ef09 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/new/NewDivider.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/new/NewDivider.tsx @@ -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 { Icons } from '@superset-ui/core/components'; import { DIVIDER_TYPE } from '../../../util/componentTypes'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/new/NewHeader.tsx b/superset-frontend/src/dashboard/components/gridComponents/new/NewHeader.tsx index 0513cb6fa58..835e4bea46f 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/new/NewHeader.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/new/NewHeader.tsx @@ -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 { Icons } from '@superset-ui/core/components'; import { HEADER_TYPE } from '../../../util/componentTypes'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/new/NewMarkdown.tsx b/superset-frontend/src/dashboard/components/gridComponents/new/NewMarkdown.tsx index 96dedf76880..39b70f3c1c5 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/new/NewMarkdown.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/new/NewMarkdown.tsx @@ -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 { Icons } from '@superset-ui/core/components'; import { MARKDOWN_TYPE } from '../../../util/componentTypes'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/new/NewRow.tsx b/superset-frontend/src/dashboard/components/gridComponents/new/NewRow.tsx index c8a87fabb7c..e62bf032421 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/new/NewRow.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/new/NewRow.tsx @@ -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 { Icons } from '@superset-ui/core/components'; import { ROW_TYPE } from '../../../util/componentTypes'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/new/NewTabs.tsx b/superset-frontend/src/dashboard/components/gridComponents/new/NewTabs.tsx index 71145550492..f66add5f392 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/new/NewTabs.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/new/NewTabs.tsx @@ -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 { Icons } from '@superset-ui/core/components'; import { TABS_TYPE } from '../../../util/componentTypes'; diff --git a/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx b/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx index 6c20491a5c0..46d8eb2f5f3 100644 --- a/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx +++ b/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx @@ -18,8 +18,8 @@ */ import { PureComponent } from 'react'; import cx from 'classnames'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import backgroundStyleOptions from 'src/dashboard/util/backgroundStyleOptions'; import PopoverDropdown, { diff --git a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx index a3511e3cb83..d30d552974d 100644 --- a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx +++ b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { SyntheticEvent } from 'react'; -import { logging, t } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled, diff --git a/superset-frontend/src/dashboard/components/menu/HoverMenu.tsx b/superset-frontend/src/dashboard/components/menu/HoverMenu.tsx index 4ee784fd2ba..9e45c96b986 100644 --- a/superset-frontend/src/dashboard/components/menu/HoverMenu.tsx +++ b/superset-frontend/src/dashboard/components/menu/HoverMenu.tsx @@ -19,7 +19,7 @@ */ import { RefObject, ReactNode, PureComponent } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import cx from 'classnames'; interface HoverMenuProps { diff --git a/superset-frontend/src/dashboard/components/menu/MarkdownModeDropdown.tsx b/superset-frontend/src/dashboard/components/menu/MarkdownModeDropdown.tsx index 3cd434aaae4..8dccc4921df 100644 --- a/superset-frontend/src/dashboard/components/menu/MarkdownModeDropdown.tsx +++ b/superset-frontend/src/dashboard/components/menu/MarkdownModeDropdown.tsx @@ -17,7 +17,7 @@ * under the License. */ import { PureComponent } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import PopoverDropdown, { OnChangeHandler, diff --git a/superset-frontend/src/dashboard/components/menu/ShareMenuItems/index.tsx b/superset-frontend/src/dashboard/components/menu/ShareMenuItems/index.tsx index 42a321ebc0a..37f6ebf6c1f 100644 --- a/superset-frontend/src/dashboard/components/menu/ShareMenuItems/index.tsx +++ b/superset-frontend/src/dashboard/components/menu/ShareMenuItems/index.tsx @@ -18,7 +18,8 @@ */ import { ComponentProps, RefObject } from 'react'; import copyTextToClipboard from 'src/utils/copy'; -import { t, logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled, diff --git a/superset-frontend/src/dashboard/components/menu/WithPopoverMenu.tsx b/superset-frontend/src/dashboard/components/menu/WithPopoverMenu.tsx index 38f96477ae8..3fb061ed15b 100644 --- a/superset-frontend/src/dashboard/components/menu/WithPopoverMenu.tsx +++ b/superset-frontend/src/dashboard/components/menu/WithPopoverMenu.tsx @@ -19,7 +19,7 @@ import { ReactNode, CSSProperties, PureComponent } from 'react'; import cx from 'classnames'; import { addAlpha } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; type ShouldFocusContainer = HTMLDivElement & { contains: (event_target: EventTarget & HTMLElement) => boolean; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/ModalFooter.tsx b/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/ModalFooter.tsx index 5675c2ec807..133918665a6 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/ModalFooter.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/ModalFooter.tsx @@ -23,8 +23,9 @@ import { Icons, Flex, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { styled, css, useTheme, Alert } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { Alert } from '@apache-superset/core/components'; +import { styled, css, useTheme } from '@apache-superset/core/theme'; import { BaseExpandButtonWrapper } from './SharedStyles'; const StyledAlert = styled(Alert)` diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.tsx b/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.tsx index 51ee24051a3..8677cfa5bc8 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { Form, StyledModal } from '@superset-ui/core/components'; const MODAL_MARGIN = 16; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx index 24fe7a30a1e..d2cc5b8187c 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DataMaskState, DataMaskStateWithId, @@ -25,7 +25,7 @@ import { ChartCustomization, ChartCustomizationDivider, } from '@superset-ui/core'; -import { css, SupersetTheme, styled } from '@apache-superset/core/ui'; +import { css, SupersetTheme, styled } from '@apache-superset/core/theme'; import { Button } from '@superset-ui/core/components'; import { OPEN_FILTER_BAR_WIDTH } from 'src/dashboard/constants'; import tinycolor from 'tinycolor2'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilter.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilter.tsx index dfc40e11b80..fd43a6b4beb 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilter.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilter.tsx @@ -18,7 +18,7 @@ */ import { useCallback } from 'react'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { CrossFilterIndicator } from 'src/dashboard/components/nativeFilters/selectors'; import { useDispatch } from 'react-redux'; import { setDirectPathToChild } from 'src/dashboard/actions/dashboardState'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTag.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTag.tsx index eb81cd13b87..81b76579579 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTag.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTag.tsx @@ -18,7 +18,7 @@ */ import { getColumnLabel, useCSSTextTruncation } from '@superset-ui/core'; -import { styled, css, useTheme } from '@apache-superset/core/ui'; +import { styled, css, useTheme } from '@apache-superset/core/theme'; import { CrossFilterIndicator } from 'src/dashboard/components/nativeFilters/selectors'; import { Tag } from 'src/components/Tag'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx index dc97928471d..459551f125b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx @@ -17,9 +17,9 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useCSSTextTruncation } 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 { FilterBarOrientation } from 'src/dashboard/types'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ChartsScopingListPanel.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ChartsScopingListPanel.tsx index 58df9ddc141..9775de8022e 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ChartsScopingListPanel.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ChartsScopingListPanel.tsx @@ -18,8 +18,8 @@ */ import { ReactNode, useMemo } from 'react'; -import { t } from '@apache-superset/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { ChartConfiguration, DashboardLayout, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModal.tsx index 132f6319963..395c6a4e271 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModal.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isDefined, NativeFilterScope } from '@superset-ui/core'; import { Modal } from '@superset-ui/core/components'; import { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModalContent.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModalContent.tsx index 374a35690ab..41d2518c642 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModalContent.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModalContent.tsx @@ -17,7 +17,7 @@ * under the License. */ import { NativeFilterScope } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { ChartConfiguration } from 'src/dashboard/types'; import { ScopingTreePanel } from './ScopingTreePanel'; import { ChartsScopingListPanel } from './ChartsScopingListPanel'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingTreePanel.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingTreePanel.tsx index bb1a547c448..6140bbb8aaa 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingTreePanel.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingTreePanel.tsx @@ -18,9 +18,10 @@ */ import { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isDefined, NativeFilterScope } from '@superset-ui/core'; -import { css, styled, useTheme, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { Select, Tooltip } from '@superset-ui/core/components'; import { noOp } from 'src/utils/common'; import ScopingTree from 'src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/VerticalCollapse.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/VerticalCollapse.tsx index e2dcf047782..7389d70ede8 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/VerticalCollapse.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/VerticalCollapse.tsx @@ -18,8 +18,8 @@ */ import { useMemo, useState, useCallback } from 'react'; -import { t } from '@apache-superset/core'; -import { css, useTheme, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, useTheme, SupersetTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { FilterBarOrientation } from 'src/dashboard/types'; import CrossFilter from './CrossFilter'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/styles.ts b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/styles.ts index ccd7e2c5f45..1ba2f182917 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/styles.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/styles.ts @@ -17,7 +17,7 @@ * under the License. */ -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; export const ellipsisCss = css` white-space: nowrap; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CustomizationsOutOfScopeCollapsible/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CustomizationsOutOfScopeCollapsible/index.tsx index b548d6ac41d..42bbf4f387d 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CustomizationsOutOfScopeCollapsible/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CustomizationsOutOfScopeCollapsible/index.tsx @@ -17,12 +17,12 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ChartCustomization, ChartCustomizationDivider, } from '@superset-ui/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { Collapse } from '@superset-ui/core/components'; export interface CustomizationsOutOfScopeCollapsibleProps { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx index 6f1f9f0d521..199287e678d 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx @@ -19,8 +19,8 @@ import { useCallback, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; -import { styled, useTheme, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; import { MenuProps } from '@superset-ui/core/components/Menu'; import { FilterBarOrientation, RootState } from 'src/dashboard/types'; import { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControlShared.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControlShared.tsx index 6b42fde4d3c..e7e06439e87 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControlShared.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControlShared.tsx @@ -18,7 +18,7 @@ */ import { useMemo } from 'react'; import { truncationCSS } from '@superset-ui/core'; -import { styled, SupersetTheme } from '@apache-superset/core/ui'; +import { styled, SupersetTheme } from '@apache-superset/core/theme'; import { FormItem as StyledFormItem, Form, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx index 49ebc4b5866..35efda04623 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx @@ -26,7 +26,7 @@ import { useRef, useState, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DataMask, DataMaskStateWithId, @@ -38,7 +38,12 @@ import { isChartCustomizationDivider, ChartCustomizationDivider, } from '@superset-ui/core'; -import { css, SupersetTheme, useTheme, styled } from '@apache-superset/core/ui'; +import { + css, + SupersetTheme, + useTheme, + styled, +} from '@apache-superset/core/theme'; import { createHtmlPortalNode, InPortal, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.stories.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.stories.tsx index f80a74f0463..bf35dac079d 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.stories.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.stories.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { FilterBarOrientation } from 'src/dashboard/types'; import FilterDivider from './FilterDivider'; import { FilterDividerProps } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.tsx index 52ac346264d..22d32e64a4c 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.tsx @@ -18,7 +18,7 @@ */ import { useCSSTextTruncation, truncationCSS } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '@superset-ui/core/components'; import { FilterBarOrientation } from 'src/dashboard/types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx index f19ff75d73d..5a71656a958 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx @@ -26,7 +26,7 @@ import { useState, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ChartDataResponseResult, Behavior, @@ -41,7 +41,7 @@ import { getClientErrorObject, isChartCustomization, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { useDispatch, useSelector } from 'react-redux'; import { isEqual, isEqualWith } from 'lodash'; import { getChartDataRequest } from 'src/components/Chart/chartAction'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/GroupByFilterCard.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/GroupByFilterCard.tsx index 7145784699f..b079f133af9 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/GroupByFilterCard.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/GroupByFilterCard.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC, useCallback, useEffect, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DataMask, DataMaskStateWithId, @@ -28,7 +28,12 @@ import { Filters, NativeFilterType, } from '@superset-ui/core'; -import { styled, css, useTheme, SupersetTheme } from '@apache-superset/core/ui'; +import { + styled, + css, + useTheme, + SupersetTheme, +} from '@apache-superset/core/theme'; import { Typography, Select, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersDropdownContent/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersDropdownContent/index.tsx index c09e4d77833..07c3696eb8f 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersDropdownContent/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersDropdownContent/index.tsx @@ -19,7 +19,7 @@ import { ReactNode } from 'react'; import { Divider, Filter } from '@superset-ui/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { FilterBarOrientation } from 'src/dashboard/types'; import { FiltersOutOfScopeCollapsible } from '../FiltersOutOfScopeCollapsible'; import { CrossFilterIndicator } from '../../selectors'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersOutOfScopeCollapsible/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersOutOfScopeCollapsible/index.tsx index 63e86324b15..7c9a2262907 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersOutOfScopeCollapsible/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersOutOfScopeCollapsible/index.tsx @@ -17,9 +17,9 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Divider, Filter } from '@superset-ui/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { Collapse } from '@superset-ui/core/components'; export interface FiltersOutOfScopeCollapsibleProps { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx index b0c903c0300..6fae1d5c6ed 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx @@ -17,8 +17,8 @@ * under the License. */ /* eslint-disable no-param-reassign */ -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { memo, FC } from 'react'; import { Icons } from '@superset-ui/core/components/Icons'; import { Button } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx index 41799a9eeeb..96e05dddba5 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx @@ -18,9 +18,9 @@ */ import { FC, memo, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DataMaskStateWithId } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Loading } from '@superset-ui/core/components'; import { RootState } from 'src/dashboard/types'; import { useChartLayoutItems } from 'src/dashboard/util/useChartLayoutItems'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx index f6ea8e8883d..9db9b8b0579 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx @@ -31,8 +31,8 @@ import { } from 'react'; import { useSelector } from 'react-redux'; import cx from 'classnames'; -import { t } from '@apache-superset/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { RootState } from 'src/dashboard/types'; import { DataMaskStateWithId } from '@superset-ui/core'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx index 2db15214c64..7bb0987353d 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx @@ -41,7 +41,7 @@ import { ChartCustomization, ChartCustomizationDivider, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Constants } from '@superset-ui/core/components'; import { useHistory } from 'react-router-dom'; import { updateDataMask, removeDataMask } from 'src/dataMask/actions'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx index 9ba19fc15be..3dea16864d7 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx @@ -17,7 +17,7 @@ * under the License. */ import { SupersetClient } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { DashboardPermalinkValue } from 'src/dashboard/types'; const assembleEndpoint = ( diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx index b02102dfd6e..d2e6b4d8e13 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx @@ -18,9 +18,9 @@ */ import { memo, useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useTruncation } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { setDirectPathToChild } from 'src/dashboard/actions/dashboardState'; import { List } from '@superset-ui/core/components/List'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/NameRow.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/NameRow.tsx index 5e0f6c7678c..07292072cbf 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/NameRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/NameRow.tsx @@ -18,7 +18,7 @@ */ import { useSelector } from 'react-redux'; import { isChartCustomization, useTruncation } from '@superset-ui/core'; -import { css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { useFilterConfigModal } from 'src/dashboard/components/nativeFilters/FilterBar/FilterConfigurationLink/useFilterConfigModal'; import { RootState } from 'src/dashboard/types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/ScopeRow.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/ScopeRow.tsx index 3761e6ae04c..fdd9e5ddc94 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/ScopeRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/ScopeRow.tsx @@ -17,9 +17,9 @@ * under the License. */ import { memo, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useTruncation } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { List } from '@superset-ui/core/components/List'; import { useFilterScope } from './useFilterScope'; import { Row, RowLabel, RowTruncationCount, RowValue } from './Styles'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/Styles.ts b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/Styles.ts index 618937dbbee..c268a963f7a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/Styles.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/Styles.ts @@ -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 const Row = styled.div` ${({ theme }) => css` diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/TypeRow.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/TypeRow.tsx index 25b4b583bf9..fa6b7d83cdb 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/TypeRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/TypeRow.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getChartMetadataRegistry, isChartCustomization, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterScope.ts b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterScope.ts index 9b7cd356696..542ac07ed1a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterScope.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterScope.ts @@ -18,7 +18,7 @@ */ import { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Layout, LayoutItem, RootState } from 'src/dashboard/types'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; import { CHART_TYPE } from 'src/dashboard/util/componentTypes'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalContent/ConfigModalContent.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalContent/ConfigModalContent.tsx index 30c7471010c..156a710e498 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalContent/ConfigModalContent.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalContent/ConfigModalContent.tsx @@ -24,7 +24,7 @@ import { ChartCustomizationDivider, } from '@superset-ui/core'; import type { FormInstance } from '@superset-ui/core/components'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Flex } from '@superset-ui/core/components'; import FilterContentRenderer from './FilterContentRenderer'; import CustomizationContentRenderer from './CustomizationContentRenderer'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalSidebar/ConfigModalSidebar.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalSidebar/ConfigModalSidebar.tsx index a2b9fdc31d0..feb6ce87679 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalSidebar/ConfigModalSidebar.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalSidebar/ConfigModalSidebar.tsx @@ -17,9 +17,9 @@ * under the License. */ import { FC, ReactNode, useCallback, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { NativeFilterType, ChartCustomizationType } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Collapse, Flex } from '@superset-ui/core/components'; import type { DragEndEvent } from '@dnd-kit/core'; import { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DividerConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DividerConfigForm.tsx index da00b8dbe6c..11f511548cc 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DividerConfigForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DividerConfigForm.tsx @@ -18,9 +18,9 @@ */ import { FC } from 'react'; import { FormItem, Input } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { NativeFilterType, ChartCustomizationType } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { CHART_CUSTOMIZATION_DIVIDER_PREFIX } from './utils'; interface Props { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx index 170c22566db..4cb66c2ed65 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import type { CSSProperties, FC, ReactNode } from 'react'; import { useSortable } from '@dnd-kit/sortable'; import { CSS } from '@dnd-kit/utilities'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterConfigurePane.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterConfigurePane.tsx index 74567b95f76..d2ca28ef557 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterConfigurePane.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterConfigurePane.tsx @@ -18,7 +18,7 @@ */ import { FC, ReactNode } from 'react'; import { NativeFilterType } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import FilterTitlePane from './FilterTitlePane'; import { FilterRemoval } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx index a5414fd5b82..343be64c6f3 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx @@ -18,8 +18,8 @@ */ import { forwardRef, useCallback, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import type { DragEndEvent } from '@dnd-kit/core'; import { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx index c938f45c5dd..264398b9d45 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx @@ -18,9 +18,9 @@ */ import { useRef, FC } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { NativeFilterType } from '@superset-ui/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Button } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/CollapsibleControl.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/CollapsibleControl.tsx index e96203fea4e..0eb2f92de39 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/CollapsibleControl.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/CollapsibleControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactNode, useEffect, useState } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Checkbox, InfoTooltip } from '@superset-ui/core/components'; interface CollapsibleControlProps { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx index 133bef7d9f1..2e8f43bb21f 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useState, useMemo, useEffect } from 'react'; import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Column, ensureIsArray, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DatasetSelect.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DatasetSelect.tsx index 6b52b06ba03..f48e6dc039f 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DatasetSelect.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DatasetSelect.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useMemo, ReactNode } from 'react'; import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { JsonResponse, ClientErrorObject, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx index 1fd52107938..3d3d5e4d77f 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Behavior, SetDataMaskHook, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx index ac34c107d49..d3a4c010b92 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState, useEffect } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Select } from '@superset-ui/core/components'; import { CollapsibleControl } from './CollapsibleControl'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx index 3423fd46322..c212eef9de8 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/FilterScope.tsx @@ -19,7 +19,7 @@ import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import { NativeFilterScope } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { FormItem } from '@superset-ui/core/components'; import ScopingTree from './ScopingTree'; import { getDefaultScopeValue } from './utils'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx index 019c2da8cb0..82a1f5e0ce4 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/ScopingTree.tsx @@ -19,7 +19,7 @@ import { FC, useMemo, useState, memo } from 'react'; import { NativeFilterScope } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import Tree from '@superset-ui/core/components/Tree'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/state.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/state.ts index c015cd0db02..db0a7b0d70b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/state.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/state.ts @@ -18,7 +18,7 @@ */ import { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Charts, Layout, RootState } from 'src/dashboard/types'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; import { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts index 8864c256164..af62f19034b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts @@ -23,9 +23,9 @@ import { TAB_TYPE, } from 'src/dashboard/util/componentTypes'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { NativeFilterScope } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { BuildTreeLeafTitle, TreeItem } from './types'; export const isShowTypeInTree = ({ type }: LayoutItem) => diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx index e7800e583c0..c59eb1b20aa 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx @@ -18,7 +18,7 @@ */ /* eslint-disable react-hooks/rules-of-hooks */ import { ColumnMeta, Metric } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Behavior, ChartDataResponseResult, @@ -36,8 +36,8 @@ import { getClientErrorObject, getExtensionsRegistry, } from '@superset-ui/core'; -import { styled, useTheme, css } from '@apache-superset/core/ui'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; +import { GenericDataType } from '@apache-superset/core/common'; import { debounce, isEqual } from 'lodash'; import { forwardRef, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/RemovedFilter.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/RemovedFilter.tsx index 52f0fd83565..a861d980abc 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/RemovedFilter.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/RemovedFilter.tsx @@ -18,8 +18,8 @@ */ import { Button, type OnClickHandler } from '@superset-ui/core/components'; import { FC } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; const RemovedContent = styled.div` display: flex; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/constants.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/constants.ts index 52952a2d0f4..9fc2ce6dd91 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/constants.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/constants.ts @@ -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'; export const INPUT_HEIGHT = 32; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx index 35ec66ad90a..23348694fdf 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx @@ -25,13 +25,13 @@ import { Tooltip, type FormInstance, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Filter, ChartCustomization, getChartControlPanelRegistry, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { doesColumnMatchFilterType, getControlItems, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts index 34cb567e07c..3c339b07042 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts @@ -18,7 +18,7 @@ */ import { useEffect, useState } from 'react'; import type { FormInstance } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ChartCustomization, Filter } from '@superset-ui/core'; import { NativeFiltersForm, NativeFiltersFormItem } from '../types'; import { setNativeFilterFieldValues, useForceUpdate } from './utils'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.test.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.test.ts index 386eb87c718..65d5313d86e 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.test.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { Column } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ChartsState, DatasourcesState, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts index 82c3319660e..7c05f393cee 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts @@ -21,7 +21,7 @@ import type { FormInstance } from '@superset-ui/core/components'; import { useState, useCallback } from 'react'; import { CustomControlItem, Dataset } from '@superset-ui/chart-controls'; import { Column, ensureIsArray } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { DatasourcesState, ChartsState } from 'src/dashboard/types'; import { FILTER_SUPPORTED_TYPES } from './constants'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx index c5c2143b480..3cfe83434fe 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx @@ -18,9 +18,9 @@ */ import { memo, useEffect, useCallback, useMemo, useState, useRef } from 'react'; import { uniq, debounce } from 'lodash'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ChartCustomizationType, NativeFilterType } from '@superset-ui/core'; -import { styled, css, useTheme } from '@apache-superset/core/ui'; +import { styled, css, useTheme } from '@apache-superset/core/theme'; import { Constants, Form, Icons, Flex } from '@superset-ui/core/components'; import { ErrorBoundary } from 'src/components'; import { testWithId } from 'src/utils/testUtils'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/CancelConfirmationAlert.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/CancelConfirmationAlert.tsx index 05eaa30969a..4b2f7925ebf 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/CancelConfirmationAlert.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/CancelConfirmationAlert.tsx @@ -17,9 +17,9 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Button, type OnClickHandler } from '@superset-ui/core/components'; -import { Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; export interface ConfirmationAlertProps { title: string; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx index ce586b10c38..cdcc950b8ba 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx @@ -18,7 +18,7 @@ */ import { FC } from 'react'; import { Button, type OnClickHandler } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { CancelConfirmationAlert } from './CancelConfirmationAlert'; type FooterProps = { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ItemTitleContainer.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ItemTitleContainer.tsx index 70c4692e1e0..a75165226b3 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ItemTitleContainer.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ItemTitleContainer.tsx @@ -18,8 +18,8 @@ */ import { forwardRef, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { useDndMonitor } from '@dnd-kit/core'; import { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ItemTitlePane.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ItemTitlePane.tsx index 5b3a29265c9..88bf0295b40 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ItemTitlePane.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ItemTitlePane.tsx @@ -18,7 +18,7 @@ */ import { useRef, FC } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import ItemTitleContainer from './ItemTitleContainer'; import { FilterRemoval } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/NewItemDropdown.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/NewItemDropdown.tsx index 7c34ac0bdeb..beda6da35a9 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/NewItemDropdown.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/NewItemDropdown.tsx @@ -17,9 +17,9 @@ * under the License. */ import { FC } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { NativeFilterType, ChartCustomizationType } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { Button, Dropdown, Menu } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useFilterOperations.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useFilterOperations.ts index b0ad46eb437..b57143e8533 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useFilterOperations.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useFilterOperations.ts @@ -17,7 +17,7 @@ * under the License. */ import { useCallback } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Filter, Divider, NativeFilterType } from '@superset-ui/core'; import type { FormInstance } from '@superset-ui/core/components'; import { NativeFiltersForm } from '../types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useModalSaveLogic.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useModalSaveLogic.ts index f07cf0128d9..51f4e56ce45 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useModalSaveLogic.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useModalSaveLogic.ts @@ -18,7 +18,7 @@ */ import { useCallback, useMemo } from 'react'; import { isEqual, sortBy } from 'lodash'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Filter, Divider, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts index c69bf424303..d412349adc3 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts @@ -30,7 +30,7 @@ import { ChartCustomization, ChartCustomizationDivider, } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; import { ChartCustomizationsForm, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/utils.ts index de988be8e5a..7fc18f0aeab 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/utils.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/utils.ts @@ -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 { AdhocFilter, Behavior, diff --git a/superset-frontend/src/dashboard/components/resizable/ResizableContainer.tsx b/superset-frontend/src/dashboard/components/resizable/ResizableContainer.tsx index d9d6ea8d501..d76070458d5 100644 --- a/superset-frontend/src/dashboard/components/resizable/ResizableContainer.tsx +++ b/superset-frontend/src/dashboard/components/resizable/ResizableContainer.tsx @@ -19,7 +19,7 @@ import { useState, useCallback, useMemo } from 'react'; import { ResizeCallback, ResizeStartCallback, Resizable } from 're-resizable'; import cx from 'classnames'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { RightResizeHandle, diff --git a/superset-frontend/src/dashboard/containers/DashboardPage.tsx b/superset-frontend/src/dashboard/containers/DashboardPage.tsx index 6c9198ffc5f..e345f5a469d 100644 --- a/superset-frontend/src/dashboard/containers/DashboardPage.tsx +++ b/superset-frontend/src/dashboard/containers/DashboardPage.tsx @@ -19,8 +19,8 @@ import { createContext, lazy, FC, useEffect, useMemo, useRef } from 'react'; import { Global } from '@emotion/react'; import { useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { useDispatch, useSelector } from 'react-redux'; import { createSelector } from '@reduxjs/toolkit'; import { useToasts } from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts b/superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts index 0d52ccaec2f..df494bad20a 100644 --- a/superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts +++ b/superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts @@ -21,9 +21,9 @@ import { useSelector } from 'react-redux'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { last } from 'lodash'; import contentDisposition from 'content-disposition'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, SupersetApiError } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { LOG_ACTIONS_DASHBOARD_DOWNLOAD_AS_IMAGE, LOG_ACTIONS_DASHBOARD_DOWNLOAD_AS_PDF, diff --git a/superset-frontend/src/dashboard/reducers/sliceEntities.ts b/superset-frontend/src/dashboard/reducers/sliceEntities.ts index e3203fa6bed..3a7dc66e0c6 100644 --- a/superset-frontend/src/dashboard/reducers/sliceEntities.ts +++ b/superset-frontend/src/dashboard/reducers/sliceEntities.ts @@ -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 { FETCH_ALL_SLICES_FAILED, diff --git a/superset-frontend/src/dashboard/styles.ts b/superset-frontend/src/dashboard/styles.ts index e281094a3bf..ca456b5e239 100644 --- a/superset-frontend/src/dashboard/styles.ts +++ b/superset-frontend/src/dashboard/styles.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; export const headerStyles = (theme: SupersetTheme) => css` body { diff --git a/superset-frontend/src/dashboard/types.ts b/superset-frontend/src/dashboard/types.ts index 85df31047bc..49b05812468 100644 --- a/superset-frontend/src/dashboard/types.ts +++ b/superset-frontend/src/dashboard/types.ts @@ -29,7 +29,7 @@ import { NativeFilterTarget, ColumnOption, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { Dataset } from '@superset-ui/chart-controls'; import { chart } from 'src/components/Chart/chartReducer'; import componentTypes from 'src/dashboard/util/componentTypes'; diff --git a/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts b/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts index ea055846210..2151891f255 100644 --- a/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts +++ b/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts @@ -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 { BACKGROUND_TRANSPARENT, BACKGROUND_WHITE } from './constants'; export default [ diff --git a/superset-frontend/src/dashboard/util/getFilterFieldNodesTree.ts b/superset-frontend/src/dashboard/util/getFilterFieldNodesTree.ts index 21f84f4a129..8928f51ad51 100644 --- a/superset-frontend/src/dashboard/util/getFilterFieldNodesTree.ts +++ b/superset-frontend/src/dashboard/util/getFilterFieldNodesTree.ts @@ -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 { getDashboardFilterKey } from './getDashboardFilterKey'; import { ALL_FILTERS_ROOT } from './constants'; diff --git a/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.ts b/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.ts index e5bf06421fb..ec9dbe78f13 100644 --- a/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.ts +++ b/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.ts @@ -17,7 +17,7 @@ * under the License. */ import { isEmpty } from 'lodash'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { DASHBOARD_ROOT_ID } from './constants'; import { CHART_TYPE, DASHBOARD_ROOT_TYPE, TAB_TYPE } from './componentTypes'; diff --git a/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx b/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx index 1e2c10c9bfc..b266e23b151 100644 --- a/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx +++ b/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { detectOS } from 'src/utils/common'; export const getSliceHeaderTooltip = (sliceName: string | undefined) => { diff --git a/superset-frontend/src/dashboard/util/headerStyleOptions.ts b/superset-frontend/src/dashboard/util/headerStyleOptions.ts index 73afacb811c..d1f82290e47 100644 --- a/superset-frontend/src/dashboard/util/headerStyleOptions.ts +++ b/superset-frontend/src/dashboard/util/headerStyleOptions.ts @@ -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 { SMALL_HEADER, MEDIUM_HEADER, LARGE_HEADER } from './constants'; export default [ diff --git a/superset-frontend/src/dashboard/util/newComponentFactory.ts b/superset-frontend/src/dashboard/util/newComponentFactory.ts index 1e33cdfc064..2855d4a63f1 100644 --- a/superset-frontend/src/dashboard/util/newComponentFactory.ts +++ b/superset-frontend/src/dashboard/util/newComponentFactory.ts @@ -17,7 +17,7 @@ * under the License. */ import { nanoid } from 'nanoid'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { CHART_TYPE, diff --git a/superset-frontend/src/dashboard/util/updateComponentParentsList.ts b/superset-frontend/src/dashboard/util/updateComponentParentsList.ts index 5df87114efb..67499d642c6 100644 --- a/superset-frontend/src/dashboard/util/updateComponentParentsList.ts +++ b/superset-frontend/src/dashboard/util/updateComponentParentsList.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; interface LayoutComponent { id: string; diff --git a/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.ts b/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.ts index 9bcf9d5e25c..0a32b3be57e 100644 --- a/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.ts +++ b/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.ts @@ -18,7 +18,7 @@ */ import { useMemo } from 'react'; import { Filter, ChartCustomization } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { useSelector } from 'react-redux'; import { RootState } from 'src/dashboard/types'; import { useChartCustomizationFromRedux } from 'src/dashboard/components/nativeFilters/state'; diff --git a/superset-frontend/src/embedded/EmbeddedContextProviders.tsx b/superset-frontend/src/embedded/EmbeddedContextProviders.tsx index e233010e36d..9ea9c0744ab 100644 --- a/superset-frontend/src/embedded/EmbeddedContextProviders.tsx +++ b/superset-frontend/src/embedded/EmbeddedContextProviders.tsx @@ -26,7 +26,7 @@ import { DynamicPluginProvider } from 'src/components'; import { EmbeddedUiConfigProvider } from 'src/components/UiConfigContext'; import { SupersetThemeProvider } from 'src/theme/ThemeProvider'; import { ThemeController } from 'src/theme/ThemeController'; -import type { ThemeStorage } from '@apache-superset/core/ui'; +import { type ThemeStorage } from '@apache-superset/core/theme'; import { store } from 'src/views/store'; import querystring from 'query-string'; diff --git a/superset-frontend/src/embedded/index.tsx b/superset-frontend/src/embedded/index.tsx index 305b254e314..5609877f77c 100644 --- a/superset-frontend/src/embedded/index.tsx +++ b/superset-frontend/src/embedded/index.tsx @@ -21,10 +21,13 @@ import 'src/public-path'; import { lazy, Suspense } from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter as Router, Route } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { makeApi } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; -import { type SupersetThemeConfig, ThemeMode } from '@apache-superset/core/ui'; +import { logging } from '@apache-superset/core/utils'; +import { + type SupersetThemeConfig, + ThemeMode, +} from '@apache-superset/core/theme'; import Switchboard from '@superset-ui/switchboard'; import getBootstrapData, { applicationRoot } from 'src/utils/getBootstrapData'; import setupClient from 'src/setup/setupClient'; diff --git a/superset-frontend/src/embedded/utils.ts b/superset-frontend/src/embedded/utils.ts index 404c493962c..cc9e8612f03 100644 --- a/superset-frontend/src/embedded/utils.ts +++ b/superset-frontend/src/embedded/utils.ts @@ -22,7 +22,7 @@ import { JsonObject, QueryFormData, } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { isEmpty, isEqual } from 'lodash'; import { NATIVE_FILTER_PREFIX } from 'src/dashboard/components/nativeFilters/FiltersConfigModal/utils'; import { diff --git a/superset-frontend/src/explore/actions/exploreActions.ts b/superset-frontend/src/explore/actions/exploreActions.ts index 3855e3b93bf..cfcbd8a524e 100644 --- a/superset-frontend/src/explore/actions/exploreActions.ts +++ b/superset-frontend/src/explore/actions/exploreActions.ts @@ -19,7 +19,7 @@ /* eslint camelcase: 0 */ import rison from 'rison'; import { Dataset } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, QueryFormData } from '@superset-ui/core'; import { Dispatch } from 'redux'; import { diff --git a/superset-frontend/src/explore/actions/saveModalActions.ts b/superset-frontend/src/explore/actions/saveModalActions.ts index c09f8e9b408..7c1df6ec8b7 100644 --- a/superset-frontend/src/explore/actions/saveModalActions.ts +++ b/superset-frontend/src/explore/actions/saveModalActions.ts @@ -18,7 +18,7 @@ */ import rison from 'rison'; import { Dispatch } from 'redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DatasourceType, type QueryFormData, diff --git a/superset-frontend/src/explore/components/ChartPills.tsx b/superset-frontend/src/explore/components/ChartPills.tsx index 7794cf147d5..9531c8ba361 100644 --- a/superset-frontend/src/explore/components/ChartPills.tsx +++ b/superset-frontend/src/explore/components/ChartPills.tsx @@ -18,7 +18,7 @@ */ import { forwardRef, RefObject } from 'react'; import { QueryData } from '@superset-ui/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { CachedLabel, type LabelType, diff --git a/superset-frontend/src/explore/components/Control.tsx b/superset-frontend/src/explore/components/Control.tsx index f6eed7623f4..794525111e9 100644 --- a/superset-frontend/src/explore/components/Control.tsx +++ b/superset-frontend/src/explore/components/Control.tsx @@ -23,7 +23,7 @@ import { ControlComponentProps as BaseControlComponentProps, } from '@superset-ui/chart-controls'; import { JsonValue, QueryFormData, usePrevious } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { ErrorBoundary } from 'src/components'; import { ExploreActions } from 'src/explore/actions/exploreActions'; import controlMap from './controls'; diff --git a/superset-frontend/src/explore/components/ControlHeader.tsx b/superset-frontend/src/explore/components/ControlHeader.tsx index 8213bf6267c..d4563a8dbbd 100644 --- a/superset-frontend/src/explore/components/ControlHeader.tsx +++ b/superset-frontend/src/explore/components/ControlHeader.tsx @@ -17,8 +17,8 @@ * under the License. */ import { FC, ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { css, useTheme, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, useTheme, SupersetTheme } from '@apache-superset/core/theme'; import { FormLabel, InfoTooltip, Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx index 1945faae536..fe67e52eb6f 100644 --- a/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx +++ b/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx @@ -23,7 +23,7 @@ import { userEvent, waitFor, } from 'spec/helpers/testing-library'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DatasourceType, getChartControlPanelRegistry, diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx index a7450ed7b6f..fba0cc3c0fd 100644 --- a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx +++ b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx @@ -28,7 +28,7 @@ import { useRef, useState, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, getChartControlPanelRegistry, @@ -42,7 +42,12 @@ import { FeatureFlag, VizType, } from '@superset-ui/core'; -import { styled, css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { + styled, + css, + SupersetTheme, + useTheme, +} from '@apache-superset/core/theme'; import { ControlPanelSectionConfig, ControlState, diff --git a/superset-frontend/src/explore/components/DataTableControl/index.tsx b/superset-frontend/src/explore/components/DataTableControl/index.tsx index 2e9e11776d3..823da872857 100644 --- a/superset-frontend/src/explore/components/DataTableControl/index.tsx +++ b/superset-frontend/src/explore/components/DataTableControl/index.tsx @@ -17,10 +17,10 @@ * under the License. */ import { useMemo, useState, useEffect, useRef, RefObject } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getTimeFormatter, safeHtmlSpan, TimeFormats } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; +import { GenericDataType } from '@apache-superset/core/common'; import { Column } from 'react-table'; import { debounce } from 'lodash'; import { diff --git a/superset-frontend/src/explore/components/DataTableControl/useTableColumns.test.ts b/superset-frontend/src/explore/components/DataTableControl/useTableColumns.test.ts index acfb4987879..4304da6b748 100644 --- a/superset-frontend/src/explore/components/DataTableControl/useTableColumns.test.ts +++ b/superset-frontend/src/explore/components/DataTableControl/useTableColumns.test.ts @@ -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 { renderHook } from '@testing-library/react-hooks'; import { Constants } from '@superset-ui/core/components'; import { useTableColumns } from '.'; diff --git a/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx index 19300e29c57..22431227cb3 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useCallback, useEffect, useMemo, useState, MouseEvent } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import Tabs from '@superset-ui/core/components/Tabs'; import { diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx index 88125ef32aa..5206032b03b 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css } from '@apache-superset/core/ui'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { styled, css } from '@apache-superset/core/theme'; +import { GenericDataType } from '@apache-superset/core/common'; import { useMemo } from 'react'; import { zip } from 'lodash'; import { diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx index 196bed0b1d9..70e4f755ebc 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import Tabs from '@superset-ui/core/components/Tabs'; import { ResultTypes, ResultsPaneProps } from '../types'; import { useResultsPane } from './useResultsPane'; diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx index b48e19a44cc..1c58bd9ae69 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useState, useEffect, useMemo, useCallback } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { TableView, TableSize, @@ -27,7 +27,7 @@ import { Loading, EmptyWrapperType, } from '@superset-ui/core/components'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { useFilteredTableData, useTableColumns, diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx index 6e096182234..cf44d415538 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useCallback } from 'react'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import { TableView, TableSize, diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx index a25a7974101..9ba54e5b62e 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx @@ -18,13 +18,13 @@ */ import { useState, useEffect, ReactElement, useCallback } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, getChartMetadataRegistry, getClientErrorObject, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { EmptyState, Loading } from '@superset-ui/core/components'; import { getChartDataRequest } from 'src/components/Chart/chartAction'; import { ResultsPaneProps, QueryResultInterface } from '../types'; diff --git a/superset-frontend/src/explore/components/DataTablesPane/types.ts b/superset-frontend/src/explore/components/DataTablesPane/types.ts index 90ba2b98cb0..b0fdb987c9f 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/types.ts +++ b/superset-frontend/src/explore/components/DataTablesPane/types.ts @@ -17,7 +17,7 @@ * under the License. */ import { JsonObject, LatestQueryFormData } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import type { ChartStatus, Datasource } from 'src/explore/types'; export enum ResultTypes { diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx index 7540b235513..dad76da609d 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx @@ -19,7 +19,7 @@ import { RefObject } from 'react'; import { useDrag } from 'react-dnd'; import { Metric } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { ColumnMeta } from '@superset-ui/chart-controls'; import { DndItemType } from 'src/explore/components/DndItemType'; import { diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx index d97ada34d1b..c19753eaa3d 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx @@ -18,9 +18,9 @@ */ import { CSSProperties, ReactNode, useCallback } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useCSSTextTruncation } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '@superset-ui/core/components/Tooltip'; diff --git a/superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx b/superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx index 0c7825b9d98..39d200cba1b 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx @@ -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'; export const columns = [ { diff --git a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx index 1278a2282f1..74718ae3751 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx @@ -17,9 +17,10 @@ * under the License. */ import { useContext, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DatasourceType, Metric, QueryFormData } from '@superset-ui/core'; -import { css, styled, useTheme, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { ControlConfig } from '@superset-ui/chart-controls'; import AutoSizer from 'react-virtualized-auto-sizer'; diff --git a/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts b/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts index eb94823069a..32f2eba3d62 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts +++ b/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts @@ -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 { Metric } from '@superset-ui/core'; import { FoldersEditorItemType } from 'src/components/Datasource/types'; import { diff --git a/superset-frontend/src/explore/components/EmbedCodeContent.tsx b/superset-frontend/src/explore/components/EmbedCodeContent.tsx index 9d1ebb81bdf..deda9002a97 100644 --- a/superset-frontend/src/explore/components/EmbedCodeContent.tsx +++ b/superset-frontend/src/explore/components/EmbedCodeContent.tsx @@ -25,7 +25,8 @@ import { useState, } from 'react'; import { LatestQueryFormData } from '@superset-ui/core'; -import { css, t } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Input, Space, Typography } from '@superset-ui/core/components'; import { CopyToClipboard } from 'src/components'; import { URL_PARAMS } from 'src/constants'; diff --git a/superset-frontend/src/explore/components/ExploreAlert.tsx b/superset-frontend/src/explore/components/ExploreAlert.tsx index 6afbb056198..d4a8a4b4405 100644 --- a/superset-frontend/src/explore/components/ExploreAlert.tsx +++ b/superset-frontend/src/explore/components/ExploreAlert.tsx @@ -20,7 +20,7 @@ import { forwardRef, RefObject, MouseEvent } from 'react'; import { Button } from '@superset-ui/core/components'; import { ErrorAlert } from 'src/components'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; interface ControlPanelAlertProps { title: string; diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx index 8da1bd91569..a839fbfaab5 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx @@ -32,8 +32,9 @@ import { isMatrixifyEnabled, MatrixifyFormData, } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; -import { css, t, SupersetTheme } from '@apache-superset/core/ui'; +import { logging } from '@apache-superset/core/utils'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Icons } from '@superset-ui/core/components/Icons'; import PropertiesModal from 'src/explore/components/PropertiesModal'; import { sliceUpdated } from 'src/explore/actions/exploreActions'; diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx index 0b95f29bde6..20bfcfb849e 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@apache-superset/core'; -import { tn } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; +import { tn } from '@apache-superset/core/translation'; import MetadataBar, { MetadataType, } from '@superset-ui/core/components/MetadataBar'; diff --git a/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx b/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx index fd29a604383..c692e65bfd1 100644 --- a/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx +++ b/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx @@ -18,7 +18,7 @@ */ import { useState, useEffect, useCallback, useMemo, ReactNode } from 'react'; import Split from 'react-split'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DatasourceType, ensureIsArray, @@ -30,7 +30,8 @@ import { JsonObject, getExtensionsRegistry, } from '@superset-ui/core'; -import { css, styled, useTheme, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import ChartContainer from 'src/components/Chart/ChartContainer'; import { getItem, diff --git a/superset-frontend/src/explore/components/ExploreContainer/index.tsx b/superset-frontend/src/explore/components/ExploreContainer/index.tsx index 5cf714ea740..fbac64cf1f6 100644 --- a/superset-frontend/src/explore/components/ExploreContainer/index.tsx +++ b/superset-frontend/src/explore/components/ExploreContainer/index.tsx @@ -25,7 +25,7 @@ import { useReducer, } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { useDragDropManager } from 'react-dnd'; import { DatasourcePanelDndItem } from '../DatasourcePanel/types'; diff --git a/superset-frontend/src/explore/components/ExploreContentPopover.tsx b/superset-frontend/src/explore/components/ExploreContentPopover.tsx index 3a006601cc7..a0f97b7543e 100644 --- a/superset-frontend/src/explore/components/ExploreContentPopover.tsx +++ b/superset-frontend/src/explore/components/ExploreContentPopover.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; export const ExplorePopoverContent = styled.div` .edit-popover-resize { diff --git a/superset-frontend/src/explore/components/ExploreViewContainer/index.tsx b/superset-frontend/src/explore/components/ExploreViewContainer/index.tsx index 3fddda72aef..26110471a7f 100644 --- a/superset-frontend/src/explore/components/ExploreViewContainer/index.tsx +++ b/superset-frontend/src/explore/components/ExploreViewContainer/index.tsx @@ -41,8 +41,9 @@ import { ControlStateMapping, ControlPanelState, } from '@superset-ui/chart-controls'; -import { t, styled, css, useTheme } from '@apache-superset/core/ui'; -import { logging } from '@apache-superset/core'; +import { styled, css, useTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; +import { logging } from '@apache-superset/core/utils'; import { debounce, isEqual, isObjectLike, omit, pick } from 'lodash'; import { Resizable } from 're-resizable'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx index b182f6bc662..a2b09d64cd6 100644 --- a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx +++ b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx @@ -18,8 +18,8 @@ */ import { ReactChild, useCallback, Key } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Dropdown } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx index 675323a13a8..6e1ba30939f 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx @@ -26,7 +26,7 @@ import { type SelectValue, } from '@superset-ui/core/components'; import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, isFeatureEnabled, diff --git a/superset-frontend/src/explore/components/RunQueryButton/index.tsx b/superset-frontend/src/explore/components/RunQueryButton/index.tsx index 9e2e71e3bdb..22cf4782396 100644 --- a/superset-frontend/src/explore/components/RunQueryButton/index.tsx +++ b/superset-frontend/src/explore/components/RunQueryButton/index.tsx @@ -18,8 +18,8 @@ */ import { ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { Button } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/explore/components/SaveModal.tsx b/superset-frontend/src/explore/components/SaveModal.tsx index 91c27f90002..a78b4ce7dc1 100644 --- a/superset-frontend/src/explore/components/SaveModal.tsx +++ b/superset-frontend/src/explore/components/SaveModal.tsx @@ -36,15 +36,16 @@ import { Flex, TreeSelect, } from '@superset-ui/core/components'; -import { t, logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; import { DatasourceType, isDefined, SupersetClient } from '@superset-ui/core'; +import { Alert } from '@apache-superset/core/components'; import { css, styled, withTheme, - Alert, type SupersetTheme, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import { Radio } from '@superset-ui/core/components/Radio'; import { GRID_COLUMN_COUNT } from 'src/dashboard/util/constants'; import { canUserEditDashboard } from 'src/dashboard/util/permissionUtils'; diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx index e7b7494be01..c9f2904abc8 100644 --- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx +++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx @@ -34,12 +34,12 @@ import { VizType, type QueryFormColumn, } from '@superset-ui/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { styled, withTheme, type SupersetTheme, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import SelectControl from 'src/explore/components/controls/SelectControl'; import TextControl from 'src/explore/components/controls/TextControl'; import CheckboxControl from 'src/explore/components/controls/CheckboxControl'; diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts index 2c44a6fd97c..f4b9903f6d2 100644 --- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts +++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts @@ -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'; interface Annotation { sourceType?: string; diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx index 9339f7433fe..9538264b22a 100644 --- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx @@ -18,14 +18,14 @@ */ import { connect } from 'react-redux'; import { PureComponent } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { HandlerFunction, JsonObject, Payload, QueryFormData, } from '@superset-ui/core'; -import { SupersetTheme, withTheme } from '@apache-superset/core/ui'; +import { SupersetTheme, withTheme } from '@apache-superset/core/theme'; import { AsyncEsmComponent, List, diff --git a/superset-frontend/src/explore/components/controls/BoundsControl.tsx b/superset-frontend/src/explore/components/controls/BoundsControl.tsx index 788ba89aa23..6d132595258 100644 --- a/superset-frontend/src/explore/components/controls/BoundsControl.tsx +++ b/superset-frontend/src/explore/components/controls/BoundsControl.tsx @@ -18,8 +18,8 @@ */ import { useEffect, useRef, useState } from 'react'; import { InputNumber } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { debounce } from 'lodash'; import ControlHeader from 'src/explore/components/ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/CheckboxControl.tsx b/superset-frontend/src/explore/components/controls/CheckboxControl.tsx index f9120159e90..363ac67ed24 100644 --- a/superset-frontend/src/explore/components/controls/CheckboxControl.tsx +++ b/superset-frontend/src/explore/components/controls/CheckboxControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Component, type ReactNode } from 'react'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { Checkbox } from '@superset-ui/core/components'; import ControlHeader from '../ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx b/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx index 0243b669f2b..d21ffeecc69 100644 --- a/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx @@ -19,8 +19,8 @@ import React, { Component } from 'react'; import { IconTooltip, List } from '@superset-ui/core/components'; import { nanoid } from 'nanoid'; -import { t } from '@apache-superset/core'; -import { withTheme, type SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { withTheme, type SupersetTheme } from '@apache-superset/core/theme'; import { SortableContainer, SortableHandle, diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointOption.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointOption.tsx index afe467dda9b..fedee53bb83 100644 --- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointOption.tsx +++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointOption.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { ColorBreakpointOptionProps } from './types'; import ColorBreakpointPopoverTrigger from './ColorBreakpointPopoverTrigger'; import { DragContainer } from '../OptionControls'; diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx index fc6ef70c0b8..857f4c995c2 100644 --- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx +++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx @@ -18,9 +18,9 @@ */ import { useState, useMemo } from 'react'; import { Button, Row, Col, InputNumber } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { validateNumber } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import ControlHeader from '../../ControlHeader'; import ColorPickerControl from '../ColorPickerControl'; import { diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx index 8ef3cee64fd..ed49d3d4435 100644 --- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx @@ -18,8 +18,8 @@ */ import { useState, useEffect } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel'; import ColorBreakpointOption from './ColorBreakpointOption'; import { ColorBreakpointType, ColorBreakpointsControlProps } from './types'; diff --git a/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx index 46538f81817..60e0a190916 100644 --- a/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx +++ b/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { useRef, useState } from 'react'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx index 06777530c72..529136f1702 100644 --- a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx @@ -18,7 +18,7 @@ */ import { useMemo, ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ColorScheme, ColorSchemeGroup, @@ -26,7 +26,7 @@ import { getLabelsColorMap, CategoricalColorNamespace, } from '@superset-ui/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { sortBy } from 'lodash'; import ControlHeader from 'src/explore/components/ControlHeader'; import { diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx index 2fac42ba057..239deefaac7 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; +import { GenericDataType } from '@apache-superset/core/common'; import { COLUMN_NAME_ALIASES, ControlComponentProps, diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx index fac850c5cfd..1b4e6fa9955 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx @@ -17,7 +17,7 @@ * under the License. */ import { memo } from 'react'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Popover } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; import { ColumnTypeLabel } from '@superset-ui/chart-controls'; diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigPopover.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigPopover.tsx index 6b3f9fe38f6..c004e9939d2 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigPopover.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigPopover.tsx @@ -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 Tabs from '@superset-ui/core/components/Tabs'; import { SHARED_COLUMN_CONFIG_PROPS, diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/ControlFormItem.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/ControlFormItem.tsx index cd35882d5ed..3c9a5379f8e 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/ControlFormItem.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/ControlFormItem.tsx @@ -18,7 +18,7 @@ */ import { useState, FunctionComponentElement, ChangeEvent } from 'react'; import { JsonValue } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { ControlFormItemComponents } from './controls'; import ControlHeader, { ControlHeaderProps } from '../../../ControlHeader'; import { ControlFormItemDefaultSpec } from '../types'; diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx index f8d60b375c7..2b05b70ceac 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx @@ -23,7 +23,7 @@ import { useMemo, } from 'react'; import { JsonObject, JsonValue } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { Constants } from '@superset-ui/core/components'; import { debounce } from 'lodash'; import { ControlFormItemNode } from './ControlFormItem'; diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx index 088a06d8998..7668cf328c2 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx @@ -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 { validateNumber } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ControlFormItemSpec, D3_FORMAT_DOCS, diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts b/superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts index e7bf6b42159..c77a7fe408a 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts @@ -17,7 +17,7 @@ * under the License. */ import { JsonObject, StrictJsonValue } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ControlFormItemSpec } from '@superset-ui/chart-controls'; import { SHARED_COLUMN_CONFIG_PROPS, diff --git a/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx b/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx index aaa8d116bff..1273c1633ac 100644 --- a/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx +++ b/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx @@ -20,7 +20,7 @@ import { useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; import { isEmpty, isEqual, noop } from 'lodash'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { BinaryAdhocFilter, ensureIsArray, @@ -29,7 +29,7 @@ import { parseDttmToDate, SimpleAdhocFilter, } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import ControlHeader, { ControlHeaderProps, } from 'src/explore/components/ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx index 866e101699d..c476cc67772 100644 --- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx +++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css } from '@apache-superset/core/theme'; import { Comparator } from '@superset-ui/chart-controls'; import { Icons } from '@superset-ui/core/components/Icons'; import ControlHeader from 'src/explore/components/ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.test.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.test.tsx index 232661f627b..8f3838c92f8 100644 --- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.test.tsx +++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.test.tsx @@ -23,7 +23,7 @@ import { waitFor, } from 'spec/helpers/testing-library'; import { Comparator, ColorSchemeEnum } from '@superset-ui/chart-controls'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { FormattingPopoverContent } from './FormattingPopoverContent'; const mockOnChange = jest.fn(); diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx index 7331cfbb9a4..f7926929e2d 100644 --- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx +++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useMemo, useState, useEffect, useCallback } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; +import { GenericDataType } from '@apache-superset/core/common'; import { Comparator, MultipleValueComparators, diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/constants.ts b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/constants.ts index 7365b147e2a..4bc6ce6a76b 100644 --- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/constants.ts +++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/constants.ts @@ -17,7 +17,7 @@ * under the License. */ import { Comparator, ObjectFormattingEnum } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; export const operatorOptions = [ { value: Comparator.None, label: t('None') }, diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/types.ts b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/types.ts index 870a874c042..f2a58a162ed 100644 --- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/types.ts +++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/types.ts @@ -24,7 +24,7 @@ import { ControlComponentProps, ObjectFormattingEnum, } from '@superset-ui/chart-controls'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; export type ConditionalFormattingConfig = { operator?: Comparator; diff --git a/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx b/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx index e4e623c49a9..6916c2f7095 100644 --- a/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx +++ b/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx @@ -17,8 +17,8 @@ * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { ContourOptionProps } from './types'; import ContourPopoverTrigger from './ContourPopoverTrigger'; import OptionWrapper from '../DndColumnSelectControl/OptionWrapper'; diff --git a/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx b/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx index ae734d21cb7..472716cdb2f 100644 --- a/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx +++ b/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx @@ -19,9 +19,9 @@ import { useState, useEffect } from 'react'; import { Button, Row, Col } from '@superset-ui/core/components'; import Tabs from '@superset-ui/core/components/Tabs'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { legacyValidateInteger } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import ControlHeader from '../../ControlHeader'; import TextControl from '../TextControl'; import ColorPickerControl from '../ColorPickerControl'; diff --git a/superset-frontend/src/explore/components/controls/ContourControl/index.tsx b/superset-frontend/src/explore/components/controls/ContourControl/index.tsx index c8148071c91..37f915eaecb 100644 --- a/superset-frontend/src/explore/components/controls/ContourControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/ContourControl/index.tsx @@ -18,8 +18,8 @@ */ import { useState, useEffect } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel'; import ContourPopoverTrigger from './ContourPopoverTrigger'; import ContourOption from './ContourOption'; diff --git a/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx b/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx index 3da754330fd..c2a31de9ff7 100644 --- a/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx +++ b/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx @@ -18,9 +18,9 @@ */ import { useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Currency, ensureIsArray, getCurrencySymbol } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { CSSObject } from '@emotion/react'; import { Select, type SelectProps } from '@superset-ui/core/components'; import { ViewState } from 'src/views/types'; diff --git a/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx b/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx index a3c824aadbc..6c848cba55d 100644 --- a/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx +++ b/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx @@ -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 { List, type ListItemProps } from '@superset-ui/core/components'; export interface CustomListItemProps extends ListItemProps { diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx b/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx index 968c00d20a4..76136b8b483 100644 --- a/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx @@ -20,13 +20,13 @@ import React, { PureComponent } from 'react'; import { DatasourceType, SupersetClient, Datasource } from '@superset-ui/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { css, styled, withTheme, type SupersetTheme, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import { getTemporalColumns } from '@superset-ui/chart-controls'; import { getUrlParam } from 'src/utils/urlUtils'; import { diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx index b35530b0295..3aa6a1415d3 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx @@ -17,13 +17,18 @@ * under the License. */ import { ReactNode, useState, useEffect, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { NO_TIME_RANGE, useCSSTextTruncation, fetchTimeRange, } from '@superset-ui/core'; -import { css, styled, useTheme, SupersetTheme } from '@apache-superset/core/ui'; +import { + css, + styled, + useTheme, + SupersetTheme, +} from '@apache-superset/core/theme'; import { Button, Constants, diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx index e9f2b5aaf64..febdd725967 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx @@ -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 { SEPARATOR } from '@superset-ui/core'; import { Input, Icons, InfoTooltip } from '@superset-ui/core/components'; import { FrameComponentProps } from 'src/explore/components/controls/DateFilterControl/types'; diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CalendarFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CalendarFrame.tsx index 505e3a0ea65..dba14caf2d8 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CalendarFrame.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CalendarFrame.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Radio } from '@superset-ui/core/components/Radio'; import { CALENDAR_RANGE_OPTIONS, diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CommonFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CommonFrame.tsx index da14f0a9638..758f6d4cb9f 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CommonFrame.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CommonFrame.tsx @@ -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 { Radio } from '@superset-ui/core/components/Radio'; import { COMMON_RANGE_OPTIONS, diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx index 65d07c747d2..effc52860f9 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Radio } from '@superset-ui/core/components/Radio'; import { CURRENT_RANGE_OPTIONS, diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx index f7b8d932215..e2e0ccf61be 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx @@ -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 { customTimeRangeDecode } from '@superset-ui/core'; import { InfoTooltip, diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx index 94a867e8624..20289345032 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { Tooltip } from '@superset-ui/core/components'; import { ClassNames } from '@emotion/react'; diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx index 619c9624dc8..ee5d8a62ae3 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx @@ -19,8 +19,8 @@ import { forwardRef, MouseEvent, ReactNode, RefObject } from 'react'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; export type DateLabelProps = { diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts b/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts index 795e25cafc0..f1ad62b6ad4 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts @@ -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 { SelectOptionType, PreviousCalendarWeek, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx index f68c81248a2..f61fafe8bcb 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx @@ -27,7 +27,8 @@ import { useState, } from 'react'; import { useSelector } from 'react-redux'; -import { t, editors } from '@apache-superset/core'; +import { editors } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { AdhocColumn, isAdhocColumn, @@ -35,7 +36,7 @@ import { Metric, QueryFormMetric, } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { ColumnMeta, isSavedExpression } from '@superset-ui/chart-controls'; import Tabs from '@superset-ui/core/components/Tabs'; import { diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx index 7a706967388..cde8a498ec8 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx @@ -19,7 +19,7 @@ import { useCallback, useEffect, useMemo, useState, ReactNode } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { AdhocColumn, isAdhocColumn, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx index 5d4b4b206d6..857b098003b 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx @@ -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 { DndItemType } from 'src/explore/components/DndItemType'; import AdhocFilterPopoverTrigger from 'src/explore/components/controls/FilterControl/AdhocFilterPopoverTrigger'; import AdhocFilter from 'src/explore/components/controls/FilterControl/AdhocFilter'; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx index b7b8bd3d67a..126d699ddff 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useCallback, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { AdhocColumn, isAdhocColumn, @@ -27,7 +27,7 @@ import { QueryFormMetric, QueryFormData, } from '@superset-ui/core'; -import { tn } from '@apache-superset/core'; +import { tn } from '@apache-superset/core/translation'; import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls'; import { isString } from 'lodash'; import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel'; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx index 6f560d1ff19..6e474e552cf 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useCallback, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { AdhocColumn, QueryFormColumn, isAdhocColumn } from '@superset-ui/core'; -import { tn } from '@apache-superset/core'; +import { tn } from '@apache-superset/core/translation'; import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls'; import { isEmpty } from 'lodash'; import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel'; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx index 8189668907b..e836e202e10 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ChangeEvent, useCallback, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Input, Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.test.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.test.tsx index 3664e16c5bd..db1c341ab23 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.test.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.test.tsx @@ -24,7 +24,7 @@ import { QueryFormData, QueryFormMetric, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { ColumnMeta } from '@superset-ui/chart-controls'; import { fireEvent, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx index 9b1a9a371df..3f9c525e920 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { t, logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; import { Metric, QueryFormData, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx index aefdc781cdf..0dd1074acec 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx @@ -19,7 +19,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { nanoid } from 'nanoid'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, isAdhocMetricSimple, @@ -27,8 +27,8 @@ import { Metric, QueryFormMetric, } from '@superset-ui/core'; -import { tn } from '@apache-superset/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { tn } from '@apache-superset/core/translation'; +import { GenericDataType } from '@apache-superset/core/common'; import { ColumnMeta } from '@superset-ui/chart-controls'; import AdhocMetric from 'src/explore/components/controls/MetricControl/AdhocMetric'; import AdhocMetricPopoverTrigger from 'src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger'; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx index 153d97d6384..ba8ee28b9f0 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx @@ -18,7 +18,7 @@ */ import { ReactNode, useCallback, useContext, useEffect, useMemo } from 'react'; import { useDrop } from 'react-dnd'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import ControlHeader from 'src/explore/components/ControlHeader'; import { AddControlLabel, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx index f00eb3f2e50..9e5a715464f 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useCallback } from 'react'; -import { t } from '@apache-superset/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { Icons, InfoTooltip } from '@superset-ui/core/components'; import { CaretContainer, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx index a34046f9d5e..787638269cf 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx @@ -31,7 +31,7 @@ import { import { Tooltip } from '@superset-ui/core/components'; import { StyledColumnOption } from 'src/explore/components/optionRenderers'; import { isAdhocColumn } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { ColumnMeta } from '@superset-ui/chart-controls'; import Option from './Option'; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx index 65f61ed5425..c32826a106e 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx @@ -23,7 +23,7 @@ import { useState, MouseEvent as ReactMouseEvent, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { throttle } from 'lodash'; import { POPOVER_INITIAL_HEIGHT, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts index 574578983b8..d029d8b4851 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts @@ -17,7 +17,7 @@ * under the License. */ import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { AdhocColumn, ensureIsArray, diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx index 97d3295bd1b..f51da2fdc13 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx @@ -18,9 +18,9 @@ */ import { Component, ReactNode } from 'react'; import { SupersetClient, ensureIsArray } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; -import { t } from '@apache-superset/core'; -import { withTheme, type SupersetTheme } from '@apache-superset/core/ui'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; +import { withTheme, type SupersetTheme } from '@apache-superset/core/theme'; import ControlHeader from 'src/explore/components/ControlHeader'; import AdhocMetric, { diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx index 12d106a7319..97cb4bfb2f1 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx @@ -18,12 +18,12 @@ */ import type React from 'react'; import { createRef, Component, type RefObject } from 'react'; -import type { SupersetTheme } from '@apache-superset/core/ui'; +import { type SupersetTheme } from '@apache-superset/core/theme'; import { Button, Icons, Select } from '@superset-ui/core/components'; import { ErrorBoundary } from 'src/components'; import { SupersetClient } from '@superset-ui/core'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import Tabs from '@superset-ui/core/components/Tabs'; import AdhocFilter from 'src/explore/components/controls/FilterControl/AdhocFilter'; diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx index aff052566d4..ff9c4db9274 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx @@ -25,14 +25,14 @@ import { Tooltip, type SelectValue, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag, isDefined, SupersetClient, } from '@superset-ui/core'; -import { styled, useTheme, css } from '@apache-superset/core/ui'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; import { Operators, OPERATORS_OPTIONS, diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts index 44b2a4f5185..185a01f1216 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts @@ -17,7 +17,7 @@ * under the License. */ import { useCallback, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, SupersetClient } from '@superset-ui/core'; import { debounce } from 'lodash'; import rison from 'rison'; diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/index.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/index.tsx index 00032523033..7ca1c8dc304 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/index.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/index.tsx @@ -19,8 +19,8 @@ import { useEffect, useRef, useMemo } from 'react'; import type { editors } from '@apache-superset/core'; import { Select } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import sqlKeywords from 'src/SqlLab/utils/sqlKeywords'; import { getColumnKeywords } from 'src/explore/controlUtils/getColumnKeywords'; import AdhocFilter from 'src/explore/components/controls/FilterControl/AdhocFilter'; diff --git a/superset-frontend/src/explore/components/controls/FilterControl/utils/useDatePickerInAdhocFilter.tsx b/superset-frontend/src/explore/components/controls/FilterControl/utils/useDatePickerInAdhocFilter.tsx index 827f7eb87d5..41ec2df50db 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/utils/useDatePickerInAdhocFilter.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/utils/useDatePickerInAdhocFilter.tsx @@ -18,7 +18,7 @@ */ import { ReactElement } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getExtensionsRegistry } from '@superset-ui/core'; import { Dataset, isTemporalColumn } from '@superset-ui/chart-controls'; import DateFilterControl from 'src/explore/components/controls/DateFilterControl/DateFilterLabel'; diff --git a/superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.tsx b/superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.tsx index 74189cf91d9..110d214d2ab 100644 --- a/superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Component } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Collapse, Label } from '@superset-ui/core/components'; import TextControl from 'src/explore/components/controls/TextControl'; import MetricsControl from 'src/explore/components/controls/MetricControl/MetricsControl'; diff --git a/superset-frontend/src/explore/components/controls/JSEditorControl.tsx b/superset-frontend/src/explore/components/controls/JSEditorControl.tsx index f25d6419530..7cf4c252ac5 100644 --- a/superset-frontend/src/explore/components/controls/JSEditorControl.tsx +++ b/superset-frontend/src/explore/components/controls/JSEditorControl.tsx @@ -21,7 +21,7 @@ import AutoSizer from 'react-virtualized-auto-sizer'; import ControlHeader, { ControlHeaderProps, } from 'src/explore/components/ControlHeader'; -import { styled } from '@apache-superset/core'; +import { styled } from '@apache-superset/core/theme'; import { ControlComponentProps } from '@superset-ui/chart-controls'; import { safeParseEChartOptions, diff --git a/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx index 0dcae09d08e..949959c97d0 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx @@ -17,8 +17,8 @@ * under the License. */ import { Icons } from '@superset-ui/core/components/Icons'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { Button } from '@superset-ui/core/components'; import Tree, { TreeProps } from '@superset-ui/core/components/Tree'; import { forwardRef } from 'react'; diff --git a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsControl.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsControl.tsx index 7398784050d..789c1572d18 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsControl.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsControl.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ControlHeader } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { Popover } from '@superset-ui/core/components'; import { FC, useState } from 'react'; import { EditItem, LayerConf, LayerConfigsControlProps } from './types'; diff --git a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx index e094ff9cd11..1a8c761e925 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx @@ -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 { JsonValue } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; // eslint-disable-next-line no-restricted-imports import { Button } from '@superset-ui/core/components/Button'; import { Form } from '@superset-ui/core/components/Form'; diff --git a/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx b/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx index 5513f72b15c..3949b2cbf40 100644 --- a/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx +++ b/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Tag } from 'src/components'; import { FC } from 'react'; import { ExtentTagProps } from './types'; diff --git a/superset-frontend/src/explore/components/controls/MapViewControl/MapViewControl.tsx b/superset-frontend/src/explore/components/controls/MapViewControl/MapViewControl.tsx index 33c7ce23096..a3dda38a065 100644 --- a/superset-frontend/src/explore/components/controls/MapViewControl/MapViewControl.tsx +++ b/superset-frontend/src/explore/components/controls/MapViewControl/MapViewControl.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ControlHeader } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { Button, Popover } from '@superset-ui/core/components'; import { FC, useState } from 'react'; import { MapViewConfigs, MapViewConfigsControlProps } from './types'; diff --git a/superset-frontend/src/explore/components/controls/MapViewControl/MapViewPopoverContent.tsx b/superset-frontend/src/explore/components/controls/MapViewControl/MapViewPopoverContent.tsx index 2d1ec4d282d..1fddfc3e03d 100644 --- a/superset-frontend/src/explore/components/controls/MapViewControl/MapViewPopoverContent.tsx +++ b/superset-frontend/src/explore/components/controls/MapViewControl/MapViewPopoverContent.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { Button, Form } from '@superset-ui/core/components'; import { FC, useEffect, useState } from 'react'; import { MapViewConfigs, MapViewPopoverContentProps } from './types'; diff --git a/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.tsx b/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.tsx index 35face1e70c..3832b84d871 100644 --- a/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.tsx +++ b/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, useState, useRef, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, getColumnLabel } from '@superset-ui/core'; import { Select, Space } from '@superset-ui/core/components'; import ControlHeader from 'src/explore/components/ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx index 28f50d73dea..031248df0a0 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx @@ -19,9 +19,9 @@ /* eslint-disable camelcase */ import { PureComponent, createRef } from 'react'; import { isDefined, ensureIsArray, DatasourceType } from '@superset-ui/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import type { editors } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import Tabs from '@superset-ui/core/components/Tabs'; import { Button, diff --git a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx index 9fced1e3c40..2e52b23ebee 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx @@ -25,8 +25,8 @@ import { FC, } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Input, Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger.tsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger.tsx index b4f8e580974..b26346933b8 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger.tsx @@ -17,7 +17,7 @@ * under the License. */ import { PureComponent, ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Metric } from '@superset-ui/core'; import AdhocMetricEditPopoverTitle from 'src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle'; import { ExplorePopoverContent } from 'src/explore/components/ExploreContentPopover'; diff --git a/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.tsx b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.tsx index ce47960fcc7..a3cd9bad883 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.tsx @@ -18,7 +18,7 @@ */ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { ensureIsArray, usePrevious } from '@superset-ui/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isEqual } from 'lodash'; import ControlHeader from 'src/explore/components/ControlHeader'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/explore/components/controls/NumberControl/index.tsx b/superset-frontend/src/explore/components/controls/NumberControl/index.tsx index 45dd84f3f33..ec2eb7c9c6e 100644 --- a/superset-frontend/src/explore/components/controls/NumberControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/NumberControl/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useRef } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { InputNumber } from '@superset-ui/core/components/Input'; import ControlHeader, { ControlHeaderProps } from '../../ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/OptionControls/index.tsx b/superset-frontend/src/explore/components/controls/OptionControls/index.tsx index 03c6a3d30a9..7fb10d902bb 100644 --- a/superset-frontend/src/explore/components/controls/OptionControls/index.tsx +++ b/superset-frontend/src/explore/components/controls/OptionControls/index.tsx @@ -19,8 +19,8 @@ import { useRef, ReactNode } from 'react'; import { useDrag, useDrop, DropTargetMonitor } from 'react-dnd'; -import { t } from '@apache-superset/core'; -import { styled, useTheme, css, keyframes } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, useTheme, css, keyframes } from '@apache-superset/core/theme'; import { InfoTooltip, Icons, Tooltip } from '@superset-ui/core/components'; import { savedMetricType } from 'src/explore/components/controls/MetricControl/types'; import AdhocMetric from 'src/explore/components/controls/MetricControl/AdhocMetric'; diff --git a/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx b/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx index c9095b5899c..a21cdbabd50 100644 --- a/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, getClientErrorObject } from '@superset-ui/core'; import ControlHeader from 'src/explore/components/ControlHeader'; import { diff --git a/superset-frontend/src/explore/components/controls/SelectControl.tsx b/superset-frontend/src/explore/components/controls/SelectControl.tsx index f13164db204..f5b3e478b2a 100644 --- a/superset-frontend/src/explore/components/controls/SelectControl.tsx +++ b/superset-frontend/src/explore/components/controls/SelectControl.tsx @@ -18,8 +18,8 @@ */ import { PureComponent, type ReactNode } from 'react'; import { isEqualArray } from '@superset-ui/core'; -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 { Select } from '@superset-ui/core/components'; import ControlHeader from 'src/explore/components/ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/SpatialControl.tsx b/superset-frontend/src/explore/components/controls/SpatialControl.tsx index 6fec8797d15..1c4ad832f41 100644 --- a/superset-frontend/src/explore/components/controls/SpatialControl.tsx +++ b/superset-frontend/src/explore/components/controls/SpatialControl.tsx @@ -24,7 +24,7 @@ import { Label, Popover, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import PopoverSection from '@superset-ui/core/components/PopoverSection'; import ControlHeader from '../ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/TextAreaControl.tsx b/superset-frontend/src/explore/components/controls/TextAreaControl.tsx index 6b5c8a86b19..f1e5fbd138d 100644 --- a/superset-frontend/src/explore/components/controls/TextAreaControl.tsx +++ b/superset-frontend/src/explore/components/controls/TextAreaControl.tsx @@ -25,8 +25,8 @@ import { TextAreaEditor, ModalTrigger, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { withTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { withTheme } from '@apache-superset/core/theme'; import 'ace-builds/src-min-noconflict/mode-handlebars'; diff --git a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.tsx b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.tsx index 36aa566aba1..f7df206c478 100644 --- a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.tsx @@ -26,8 +26,8 @@ import { Row, Select, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import BoundsControl from '../BoundsControl'; import CheckboxControl from '../CheckboxControl'; diff --git a/superset-frontend/src/explore/components/controls/ViewQuery.tsx b/superset-frontend/src/explore/components/controls/ViewQuery.tsx index 77fc01a5daa..647b342c5c1 100644 --- a/superset-frontend/src/explore/components/controls/ViewQuery.tsx +++ b/superset-frontend/src/explore/components/controls/ViewQuery.tsx @@ -26,9 +26,9 @@ import { } from 'react'; import { useSelector } from 'react-redux'; import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Icons, Switch, diff --git a/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx b/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx index d3925f7d122..1517acd8661 100644 --- a/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx +++ b/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx @@ -18,13 +18,14 @@ */ import { FC, Fragment, useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ensureIsArray, getClientErrorObject, QueryFormData, } from '@superset-ui/core'; -import { styled, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { styled } from '@apache-superset/core/theme'; import { Loading } from '@superset-ui/core/components'; import { SupportedLanguage } from '@superset-ui/core/components/CodeSyntaxHighlighter'; import { getChartDataRequest } from 'src/components/Chart/chartAction'; diff --git a/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx b/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx index 2015b04efdf..fc8c7c948b2 100644 --- a/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx +++ b/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx @@ -18,7 +18,7 @@ */ import { FC } from 'react'; import { isObject } from 'lodash'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; import { Button } from '@superset-ui/core/components'; import { useHistory } from 'react-router-dom'; diff --git a/superset-frontend/src/explore/components/controls/ViewportControl.tsx b/superset-frontend/src/explore/components/controls/ViewportControl.tsx index 9ae1b1169a4..eacea2bff68 100644 --- a/superset-frontend/src/explore/components/controls/ViewportControl.tsx +++ b/superset-frontend/src/explore/components/controls/ViewportControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Component, type ReactNode } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Popover, FormLabel, Label } from '@superset-ui/core/components'; import { decimalToSexagesimal } from 'geolib'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx index b26e7fb1c7e..565853e906e 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx @@ -18,8 +18,8 @@ */ import { memo, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@apache-superset/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { Flex, Icons } from '@superset-ui/core/components'; import { getChartKey } from 'src/explore/exploreUtils'; import { ExplorePageState } from 'src/explore/types'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx index 27218fbf4f2..42b750e4925 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Tooltip } from '@superset-ui/core/components'; import { usePluginContext } from 'src/components'; import { VizTileProps } from './types'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index d1aa9929f8b..56de34befc0 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -29,7 +29,7 @@ import { import Fuse from 'fuse.js'; import cx from 'classnames'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { ChartMetadata, chartLabelWeight, @@ -41,7 +41,7 @@ import { SupersetTheme, useTheme, isThemeDark, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import { Input, Collapse, Tooltip, Label } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; import { nativeFilterGate } from 'src/dashboard/components/nativeFilters/utils'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx index 01c1d69ebb9..33558932857 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx @@ -18,7 +18,7 @@ */ import { ReactElement } from 'react'; import { VizType } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { VizMeta } from './types'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx index 352735265d5..a2e92b1dd75 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useCallback, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getChartMetadataRegistry } from '@superset-ui/core'; -import { css, styled, SupersetTheme } from '@apache-superset/core/ui'; +import { css, styled, SupersetTheme } from '@apache-superset/core/theme'; import { usePluginContext } from 'src/components'; import { Icons, Modal } from '@superset-ui/core/components'; import { noOp } from 'src/utils/common'; diff --git a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx index 1878846c20a..86af5b8d7c8 100644 --- a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx +++ b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ControlHeader } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { Form } from '@superset-ui/core/components'; import { Tag } from 'src/components'; import { FC, useState } from 'react'; diff --git a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigsChart.tsx b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigsChart.tsx index 92892b57291..25408fb72e6 100644 --- a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigsChart.tsx +++ b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigsChart.tsx @@ -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 { init as echartsInit } from 'echarts'; import { createRef, FC, useEffect } from 'react'; import { ZoomConfigsChartProps } from './types'; diff --git a/superset-frontend/src/explore/components/controls/withAsyncVerification.tsx b/superset-frontend/src/explore/components/controls/withAsyncVerification.tsx index 84836c4b5c0..a44b023c93e 100644 --- a/superset-frontend/src/explore/components/controls/withAsyncVerification.tsx +++ b/superset-frontend/src/explore/components/controls/withAsyncVerification.tsx @@ -21,7 +21,7 @@ import { ExtraControlProps, sharedControlComponents, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { JsonArray, JsonValue } from '@superset-ui/core'; import { ControlProps } from 'src/explore/components/Control'; import builtInControlComponents from 'src/explore/components/controls'; diff --git a/superset-frontend/src/explore/components/optionRenderers.tsx b/superset-frontend/src/explore/components/optionRenderers.tsx index 7a35bdf20f3..c8145584789 100644 --- a/superset-frontend/src/explore/components/optionRenderers.tsx +++ b/superset-frontend/src/explore/components/optionRenderers.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { MetricOption, ColumnOption, diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx index a4f99e506d8..fcd2454615c 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@apache-superset/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, useTheme } from '@apache-superset/core/theme'; import { MenuItem } from '@superset-ui/core/components/Menu'; import { Icons } from '@superset-ui/core/components/Icons'; import { Link } from 'react-router-dom'; diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx index db491c134ba..ed02bd183a7 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx @@ -35,7 +35,8 @@ import { QueryFormData, Behavior, } from '@superset-ui/core'; -import { css, styled, useTheme, t } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Icons, ModalTrigger, diff --git a/superset-frontend/src/explore/constants.ts b/superset-frontend/src/explore/constants.ts index ff7118c95c3..437c859232a 100644 --- a/superset-frontend/src/explore/constants.ts +++ b/superset-frontend/src/explore/constants.ts @@ -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'; export const AGGREGATES = { AVG: 'AVG', diff --git a/superset-frontend/src/explore/controlPanels/Separator.ts b/superset-frontend/src/explore/controlPanels/Separator.ts index 7e687e00d2a..721a7c4eab9 100644 --- a/superset-frontend/src/explore/controlPanels/Separator.ts +++ b/superset-frontend/src/explore/controlPanels/Separator.ts @@ -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 type { ControlPanelConfig, diff --git a/superset-frontend/src/explore/controlPanels/sections.tsx b/superset-frontend/src/explore/controlPanels/sections.tsx index 141c1d63dc0..816d3e18604 100644 --- a/superset-frontend/src/explore/controlPanels/sections.tsx +++ b/superset-frontend/src/explore/controlPanels/sections.tsx @@ -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 { ControlPanelSectionConfig, ControlSubSectionHeader, diff --git a/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx b/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx index a00523bad88..8b146e560fd 100644 --- a/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx +++ b/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx @@ -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 { DatasourceType, getChartControlPanelRegistry, diff --git a/superset-frontend/src/explore/controlUtils/getColumnKeywords.tsx b/superset-frontend/src/explore/controlUtils/getColumnKeywords.tsx index 584d91f02ff..a208115e303 100644 --- a/superset-frontend/src/explore/controlUtils/getColumnKeywords.tsx +++ b/superset-frontend/src/explore/controlUtils/getColumnKeywords.tsx @@ -18,7 +18,7 @@ */ import { ColumnMeta } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getTooltipHTML } from '@superset-ui/core/components/AsyncAceEditor'; import { COLUMN_AUTOCOMPLETE_SCORE } from 'src/SqlLab/constants'; diff --git a/superset-frontend/src/explore/controls.tsx b/superset-frontend/src/explore/controls.tsx index e49991ed343..91e91de6867 100644 --- a/superset-frontend/src/explore/controls.tsx +++ b/superset-frontend/src/explore/controls.tsx @@ -63,7 +63,7 @@ import { legacyValidateInteger, validateNonEmpty, } from '@superset-ui/core'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { formatSelectOptions } from 'src/explore/exploreUtils'; import { TIME_FILTER_LABELS } from './constants'; import { StyledColumnOption } from './components/optionRenderers'; diff --git a/superset-frontend/src/explore/fixtures.tsx b/superset-frontend/src/explore/fixtures.tsx index 3313d707fe0..588dd612e5a 100644 --- a/superset-frontend/src/explore/fixtures.tsx +++ b/superset-frontend/src/explore/fixtures.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DatasourceType, VizType } from '@superset-ui/core'; import { ColumnMeta, diff --git a/superset-frontend/src/extensions/ExtensionPlaceholder.tsx b/superset-frontend/src/extensions/ExtensionPlaceholder.tsx index 43a7f81e305..d80ad79f7b3 100644 --- a/superset-frontend/src/extensions/ExtensionPlaceholder.tsx +++ b/superset-frontend/src/extensions/ExtensionPlaceholder.tsx @@ -17,7 +17,7 @@ * under the License. */ import { EmptyState } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const ExtensionPlaceholder = ({ id }: { id: string }) => ( = ({ if (isFeatureEnabled(FeatureFlag.EnableExtensions)) { try { await ExtensionsLoader.getInstance().initializeExtensions(); - supersetCore.logging.info('Extensions initialized successfully.'); + supersetCore.utils.logging.info( + 'Extensions initialized successfully.', + ); } catch (error) { - supersetCore.logging.error('Error setting up extensions:', error); + supersetCore.utils.logging.error( + 'Error setting up extensions:', + error, + ); } } setInitialized(true); diff --git a/superset-frontend/src/features/alerts/AlertReportModal.tsx b/superset-frontend/src/features/alerts/AlertReportModal.tsx index cf91d3d0384..f23cb98015a 100644 --- a/superset-frontend/src/features/alerts/AlertReportModal.tsx +++ b/superset-frontend/src/features/alerts/AlertReportModal.tsx @@ -26,7 +26,7 @@ import { ReactNode, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag, @@ -34,7 +34,12 @@ import { VizType, getExtensionsRegistry, } from '@superset-ui/core'; -import { css, styled, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { + css, + styled, + SupersetTheme, + useTheme, +} from '@apache-superset/core/theme'; import rison from 'rison'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import withToasts from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/features/alerts/buildErrorTooltipMessage.tsx b/superset-frontend/src/features/alerts/buildErrorTooltipMessage.tsx index c20ee92cfe8..406f9557304 100644 --- a/superset-frontend/src/features/alerts/buildErrorTooltipMessage.tsx +++ b/superset-frontend/src/features/alerts/buildErrorTooltipMessage.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { List } from '@superset-ui/core/components'; import { ValidationObject } from './types'; import { TRANSLATIONS } from './AlertReportModal'; diff --git a/superset-frontend/src/features/alerts/components/AlertReportCronScheduler.tsx b/superset-frontend/src/features/alerts/components/AlertReportCronScheduler.tsx index f6cfbc8b800..d4f97e97ae2 100644 --- a/superset-frontend/src/features/alerts/components/AlertReportCronScheduler.tsx +++ b/superset-frontend/src/features/alerts/components/AlertReportCronScheduler.tsx @@ -18,8 +18,8 @@ */ import { useState, useCallback, FocusEvent, FC } from 'react'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { Input, diff --git a/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx b/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx index af9dbc31230..1d33fd2c6bb 100644 --- a/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx +++ b/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { SupersetTheme, useTheme, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { SupersetTheme, useTheme, css } from '@apache-superset/core/theme'; import { Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; import { AlertState } from '../types'; diff --git a/superset-frontend/src/features/alerts/components/NotificationMethod.tsx b/superset-frontend/src/features/alerts/components/NotificationMethod.tsx index fdf035d6a07..e7f69a5c7c8 100644 --- a/superset-frontend/src/features/alerts/components/NotificationMethod.tsx +++ b/superset-frontend/src/features/alerts/components/NotificationMethod.tsx @@ -25,14 +25,14 @@ import { } from 'react'; import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, JsonResponse, SupersetClient, isFeatureEnabled, } from '@superset-ui/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Input, Select } from '@superset-ui/core/components'; import RefreshLabel from '@superset-ui/core/components/RefreshLabel'; diff --git a/superset-frontend/src/features/alerts/components/RecipientIcon.tsx b/superset-frontend/src/features/alerts/components/RecipientIcon.tsx index 698363a6cfa..8e4dd26ee6d 100644 --- a/superset-frontend/src/features/alerts/components/RecipientIcon.tsx +++ b/superset-frontend/src/features/alerts/components/RecipientIcon.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { SupersetTheme, css } from '@apache-superset/core/ui'; +import { SupersetTheme, css } from '@apache-superset/core/theme'; import { ReactElement } from 'react'; import { Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx b/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx index f67285d07fc..78a9f146c2f 100644 --- a/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx +++ b/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx @@ -17,8 +17,8 @@ * under the License. */ import { extendedDayjs } from '@superset-ui/core/utils/dates'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { TableView, EmptyWrapperType, diff --git a/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx b/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx index 8074566362f..2585898c3b6 100644 --- a/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx +++ b/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx @@ -18,8 +18,8 @@ */ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; import { Typography } from '@superset-ui/core/components/Typography'; diff --git a/superset-frontend/src/features/annotations/AnnotationModal.tsx b/superset-frontend/src/features/annotations/AnnotationModal.tsx index 3e5ac70de48..e5e9d0c8121 100644 --- a/superset-frontend/src/features/annotations/AnnotationModal.tsx +++ b/superset-frontend/src/features/annotations/AnnotationModal.tsx @@ -18,8 +18,8 @@ */ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; import withToasts from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/features/charts/ChartCard.tsx b/superset-frontend/src/features/charts/ChartCard.tsx index a6c1b9d7f1d..3d48207aa2d 100644 --- a/superset-frontend/src/features/charts/ChartCard.tsx +++ b/superset-frontend/src/features/charts/ChartCard.tsx @@ -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 { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Link, useHistory } from 'react-router-dom'; import { ConfirmStatusChange, diff --git a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx index 45fe8498ec9..4d2ada88e9d 100644 --- a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx +++ b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx @@ -17,8 +17,8 @@ * under the License. */ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react'; -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; import withToasts from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/features/dashboards/DashboardCard.tsx b/superset-frontend/src/features/dashboards/DashboardCard.tsx index a80965787ab..5793e0e1bc0 100644 --- a/superset-frontend/src/features/dashboards/DashboardCard.tsx +++ b/superset-frontend/src/features/dashboards/DashboardCard.tsx @@ -18,7 +18,7 @@ */ import { useEffect, useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag, diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx index 8d37a59d743..c25d2f0351d 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { Switch } from '@superset-ui/core/components/Switch'; import { InfoTooltip, diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx index e508970528c..57c81cdae66 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState, useEffect } from 'react'; -import { t } from '@apache-superset/core'; -import { SupersetTheme, css } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { SupersetTheme, css } from '@apache-superset/core/theme'; import { Input, Button, diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/OAuth2ClientField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/OAuth2ClientField.tsx index 5340ef396c9..d120cc88cb6 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/OAuth2ClientField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/OAuth2ClientField.tsx @@ -18,7 +18,7 @@ */ import { useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Input, Collapse, FormItem } from '@superset-ui/core/components'; import { CustomParametersChangeType, FieldPropTypes } from '../../types'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx index 4aafa84137d..87456f34244 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { css, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, SupersetTheme } from '@apache-superset/core/theme'; import { FormLabel, LabeledErrorBoundInput as ValidatedInput, diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx index f5447758f5d..3ab666de2f5 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx @@ -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 { LabeledErrorBoundInput as ValidatedInput } from '@superset-ui/core/components'; import { DatabaseParameters, FieldPropTypes } from '../../types'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/index.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/index.tsx index 90a2ebeb072..f7d531ab19c 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/index.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/index.tsx @@ -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 { Form } from '@superset-ui/core/components'; import { FormFieldOrder, FORM_FIELD_MAP } from './constants'; import { formScrollableStyles, validatedFormStyles } from '../styles'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx index 1847a7e35d0..f0c47a8c468 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx @@ -23,7 +23,7 @@ import { screen, waitFor, } from 'spec/helpers/testing-library'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import * as ace from 'ace-builds'; import ExtraOptions from './ExtraOptions'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx index 44818e3ce3c..b86a45f0d8e 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx @@ -18,13 +18,13 @@ */ import { ChangeEvent, EventHandler, useState, useEffect } from 'react'; import cx from 'classnames'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { DatabaseConnectionExtension, isFeatureEnabled, FeatureFlag, } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { Input, Checkbox, diff --git a/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx b/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx index 7139ebd1bc7..733514c37d0 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getDatabaseDocumentationLinks } from 'src/views/CRUD/hooks'; import { UploadFile } from '@superset-ui/core/components/Upload'; import { Typography } from '@superset-ui/core/components/Typography'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx index 439fc62c0b3..ed47ed1952e 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Form, FormLabel, diff --git a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx index 0b469489e07..0fa7cb9dc53 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { Switch } from '@superset-ui/core/components/Switch'; import { InfoTooltip } from '@superset-ui/core/components'; import { isEmpty } from 'lodash'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/SqlAlchemyForm.tsx b/superset-frontend/src/features/databases/DatabaseModal/SqlAlchemyForm.tsx index 4774821a2e0..450a55c7d6c 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/SqlAlchemyForm.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/SqlAlchemyForm.tsx @@ -17,8 +17,8 @@ * under the License. */ import { EventHandler, ChangeEvent, MouseEvent, ReactNode } from 'react'; -import { t } from '@apache-superset/core'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { SupersetTheme } from '@apache-superset/core/theme'; import SupersetText from 'src/utils/textUtils'; import { Input, Button } from '@superset-ui/core/components'; import { StyledInputContainer, wideButton, marginBottom } from './styles'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/index.tsx b/superset-frontend/src/features/databases/DatabaseModal/index.tsx index dd94b7f7fb3..2d3111a2c9a 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/index.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/index.tsx @@ -16,9 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getExtensionsRegistry } from '@superset-ui/core'; -import { styled, SupersetTheme, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { styled, SupersetTheme } from '@apache-superset/core/theme'; import { FunctionComponent, diff --git a/superset-frontend/src/features/databases/DatabaseModal/styles.ts b/superset-frontend/src/features/databases/DatabaseModal/styles.ts index b35ec74730a..c8e37d93412 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/styles.ts +++ b/superset-frontend/src/features/databases/DatabaseModal/styles.ts @@ -17,7 +17,7 @@ * under the License. */ -import { css, styled, SupersetTheme } from '@apache-superset/core/ui'; +import { css, styled, SupersetTheme } from '@apache-superset/core/theme'; import { Button, JsonEditor } from '@superset-ui/core/components'; const CTAS_CVAS_SCHEMA_FORM_HEIGHT = 108; diff --git a/superset-frontend/src/features/databases/UploadDataModel/ColumnsPreview.tsx b/superset-frontend/src/features/databases/UploadDataModel/ColumnsPreview.tsx index b0bb3236a14..b079d39c525 100644 --- a/superset-frontend/src/features/databases/UploadDataModel/ColumnsPreview.tsx +++ b/superset-frontend/src/features/databases/UploadDataModel/ColumnsPreview.tsx @@ -17,8 +17,8 @@ * under the License. */ import { FC } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Typography } from '@superset-ui/core/components'; import { type TagType, TagsList } from 'src/components'; diff --git a/superset-frontend/src/features/databases/UploadDataModel/index.tsx b/superset-frontend/src/features/databases/UploadDataModel/index.tsx index aa9e0d65cc1..728365bb8d0 100644 --- a/superset-frontend/src/features/databases/UploadDataModel/index.tsx +++ b/superset-frontend/src/features/databases/UploadDataModel/index.tsx @@ -25,9 +25,9 @@ import { FC, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getClientErrorObject, SupersetClient } from '@superset-ui/core'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { Button, Collapse, diff --git a/superset-frontend/src/features/databases/UploadDataModel/styles.ts b/superset-frontend/src/features/databases/UploadDataModel/styles.ts index bb841d61516..403036b9b25 100644 --- a/superset-frontend/src/features/databases/UploadDataModel/styles.ts +++ b/superset-frontend/src/features/databases/UploadDataModel/styles.ts @@ -17,7 +17,7 @@ * under the License. */ import { FormItem } from '@superset-ui/core/components'; -import { css, styled, SupersetTheme } from '@apache-superset/core/ui'; +import { css, styled, SupersetTheme } from '@apache-superset/core/theme'; const MODAL_BODY_HEIGHT = 180.5; diff --git a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx index 21b9d4fb90d..ea0b0815076 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx @@ -16,8 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled, Alert } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { Alert } from '@apache-superset/core/components'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Loading } from '@superset-ui/core/components'; import Table, { diff --git a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx index 48add4bc273..960703408fa 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx @@ -17,8 +17,8 @@ * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { EmptyState } from '@superset-ui/core/components'; import { Link } from 'react-router-dom'; diff --git a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/index.tsx b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/index.tsx index 5ce5eb0a248..661650b720c 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/index.tsx @@ -17,9 +17,9 @@ * under the License. */ import { useEffect, useState, useRef } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { DatasetObject } from 'src/features/datasets/AddDataset/types'; import { addDangerToast } from 'src/components/MessageToasts/actions'; import { toQueryString } from 'src/utils/urlUtils'; diff --git a/superset-frontend/src/features/datasets/AddDataset/EditDataset/index.tsx b/superset-frontend/src/features/datasets/AddDataset/EditDataset/index.tsx index 833e1e07fb3..e0438cee0bd 100644 --- a/superset-frontend/src/features/datasets/AddDataset/EditDataset/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/EditDataset/index.tsx @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import useGetDatasetRelatedCounts from 'src/features/datasets/hooks/useGetDatasetRelatedCounts'; import { Badge } from '@superset-ui/core/components'; import Tabs from '@superset-ui/core/components/Tabs'; diff --git a/superset-frontend/src/features/datasets/AddDataset/Footer/index.tsx b/superset-frontend/src/features/datasets/AddDataset/Footer/index.tsx index 0cbea661151..2ed2aabbcd2 100644 --- a/superset-frontend/src/features/datasets/AddDataset/Footer/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/Footer/index.tsx @@ -23,8 +23,8 @@ import { Menu, Flex, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { useTheme } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { logEvent } from 'src/logger/actions'; diff --git a/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx b/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx index c2e3cf57b92..9f8b1f26bab 100644 --- a/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Dispatch } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { PageHeaderWithActions } from '@superset-ui/core/components/PageHeaderWithActions'; import { Button } from '@superset-ui/core/components'; import { TooltipPlacement } from '@superset-ui/core/components/Tooltip/types'; diff --git a/superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx b/superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx index fa0c84b07c8..ee47bf18af5 100644 --- a/superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useEffect, SetStateAction, Dispatch, useCallback } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import TableSelector, { TableOption } from 'src/components/TableSelector'; import { EmptyState } from '@superset-ui/core/components'; import { type DatabaseObject } from 'src/components'; diff --git a/superset-frontend/src/features/datasets/AddDataset/RightPanel/index.tsx b/superset-frontend/src/features/datasets/AddDataset/RightPanel/index.tsx index 946d88ddfe4..03ca7bb747f 100644 --- a/superset-frontend/src/features/datasets/AddDataset/RightPanel/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/RightPanel/index.tsx @@ -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'; export default function RightPanel() { return
{t('Right Panel')}
; diff --git a/superset-frontend/src/features/datasets/DatasetLayout/index.tsx b/superset-frontend/src/features/datasets/DatasetLayout/index.tsx index 2e126c43311..ef9dec5c5e3 100644 --- a/superset-frontend/src/features/datasets/DatasetLayout/index.tsx +++ b/superset-frontend/src/features/datasets/DatasetLayout/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactElement, JSXElementConstructor } from 'react'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import ResizableSidebar from 'src/components/ResizableSidebar'; import { diff --git a/superset-frontend/src/features/datasets/DatasetSelectLabel/index.tsx b/superset-frontend/src/features/datasets/DatasetSelectLabel/index.tsx index ba8ec7a32d6..e1a0c957a5a 100644 --- a/superset-frontend/src/features/datasets/DatasetSelectLabel/index.tsx +++ b/superset-frontend/src/features/datasets/DatasetSelectLabel/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { Tooltip } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; type Database = { database_name: string; diff --git a/superset-frontend/src/features/datasets/DuplicateDatasetModal.test.tsx b/superset-frontend/src/features/datasets/DuplicateDatasetModal.test.tsx index 849bf5f9ad9..148c61ee82e 100644 --- a/superset-frontend/src/features/datasets/DuplicateDatasetModal.test.tsx +++ b/superset-frontend/src/features/datasets/DuplicateDatasetModal.test.tsx @@ -18,7 +18,7 @@ */ import { render, screen, waitFor } from 'spec/helpers/testing-library'; import userEvent from '@testing-library/user-event'; -import { ThemeProvider, supersetTheme } from '@apache-superset/core'; +import { ThemeProvider, supersetTheme } from '@apache-superset/core/theme'; import DuplicateDatasetModal from './DuplicateDatasetModal'; // Test-only fixture type that includes all fields from API responses diff --git a/superset-frontend/src/features/datasets/DuplicateDatasetModal.tsx b/superset-frontend/src/features/datasets/DuplicateDatasetModal.tsx index 38d4bd77362..340110031c5 100644 --- a/superset-frontend/src/features/datasets/DuplicateDatasetModal.tsx +++ b/superset-frontend/src/features/datasets/DuplicateDatasetModal.tsx @@ -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 { FunctionComponent, useEffect, useState, ChangeEvent } from 'react'; import { Input, FormLabel, Modal, Icons } from '@superset-ui/core/components'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; diff --git a/superset-frontend/src/features/datasets/constants.ts b/superset-frontend/src/features/datasets/constants.ts index bd8172ae12b..93f117b9a41 100644 --- a/superset-frontend/src/features/datasets/constants.ts +++ b/superset-frontend/src/features/datasets/constants.ts @@ -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'; export const PAGE_SIZE = 25; export const SORT_BY = [{ id: 'changed_on_delta_humanized', desc: true }]; diff --git a/superset-frontend/src/features/datasets/hooks/useDatasetLists.ts b/superset-frontend/src/features/datasets/hooks/useDatasetLists.ts index 1709f92d448..96241fe5b61 100644 --- a/superset-frontend/src/features/datasets/hooks/useDatasetLists.ts +++ b/superset-frontend/src/features/datasets/hooks/useDatasetLists.ts @@ -17,9 +17,9 @@ * under the License. */ import { useState, useEffect, useCallback, useMemo } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import rison from 'rison'; import { addDangerToast } from 'src/components/MessageToasts/actions'; import { DatasetObject } from 'src/features/datasets/AddDataset/types'; diff --git a/superset-frontend/src/features/datasets/hooks/useGetDatasetRelatedCounts.ts b/superset-frontend/src/features/datasets/hooks/useGetDatasetRelatedCounts.ts index 4d882cedc88..085bdddaad4 100644 --- a/superset-frontend/src/features/datasets/hooks/useGetDatasetRelatedCounts.ts +++ b/superset-frontend/src/features/datasets/hooks/useGetDatasetRelatedCounts.ts @@ -17,9 +17,9 @@ * under the License. */ import { useState, useEffect, useCallback } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { addDangerToast } from 'src/components/MessageToasts/actions'; const useGetDatasetRelatedCounts = (id: string) => { diff --git a/superset-frontend/src/features/datasets/metadataBar/DatasetMetadataBar.skipped-stories.tsx b/superset-frontend/src/features/datasets/metadataBar/DatasetMetadataBar.skipped-stories.tsx index 7fd8240ce6d..bc35af2e7a7 100644 --- a/superset-frontend/src/features/datasets/metadataBar/DatasetMetadataBar.skipped-stories.tsx +++ b/superset-frontend/src/features/datasets/metadataBar/DatasetMetadataBar.skipped-stories.tsx @@ -18,7 +18,7 @@ */ import { useResizeDetector } from 'react-resize-detector'; import { SupersetClient } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { useDatasetMetadataBar } from './useDatasetMetadataBar'; export default { diff --git a/superset-frontend/src/features/datasets/metadataBar/useDatasetMetadataBar.tsx b/superset-frontend/src/features/datasets/metadataBar/useDatasetMetadataBar.tsx index d28c0973ed3..45cb2e86977 100644 --- a/superset-frontend/src/features/datasets/metadataBar/useDatasetMetadataBar.tsx +++ b/superset-frontend/src/features/datasets/metadataBar/useDatasetMetadataBar.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@apache-superset/core'; -import { css, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, useTheme } from '@apache-superset/core/theme'; import { Dataset } from 'src/components/Chart/types'; import MetadataBar from '@superset-ui/core/components/MetadataBar'; import { diff --git a/superset-frontend/src/features/datasets/styles.ts b/superset-frontend/src/features/datasets/styles.ts index 105e6cfc1c6..c7346409e25 100644 --- a/superset-frontend/src/features/datasets/styles.ts +++ b/superset-frontend/src/features/datasets/styles.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled, css, SupersetTheme } from '@apache-superset/core/ui'; +import { styled, css, SupersetTheme } from '@apache-superset/core/theme'; export const StyledLayoutWrapper = styled.div` flex-grow: 1; diff --git a/superset-frontend/src/features/groups/GroupListModal.tsx b/superset-frontend/src/features/groups/GroupListModal.tsx index 79484647ba8..f133555faa8 100644 --- a/superset-frontend/src/features/groups/GroupListModal.tsx +++ b/superset-frontend/src/features/groups/GroupListModal.tsx @@ -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 { useToasts } from 'src/components/MessageToasts/withToasts'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; import { Actions } from 'src/constants'; diff --git a/superset-frontend/src/features/groups/utils.ts b/superset-frontend/src/features/groups/utils.ts index a340de06a38..05268f2f658 100644 --- a/superset-frontend/src/features/groups/utils.ts +++ b/superset-frontend/src/features/groups/utils.ts @@ -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 { SupersetClient } from '@superset-ui/core'; import rison from 'rison'; import { FormValues } from './types'; diff --git a/superset-frontend/src/features/home/ActivityTable.tsx b/superset-frontend/src/features/home/ActivityTable.tsx index a2f53a23b8d..52a3714b6bf 100644 --- a/superset-frontend/src/features/home/ActivityTable.tsx +++ b/superset-frontend/src/features/home/ActivityTable.tsx @@ -18,8 +18,8 @@ */ import { useEffect, useState } from 'react'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { setItem, LocalStorageKeys } from 'src/utils/localStorageHelpers'; import { Link } from 'react-router-dom'; import { ListViewCard } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/home/ChartTable.tsx b/superset-frontend/src/features/home/ChartTable.tsx index 9da1e91962a..013128f71c8 100644 --- a/superset-frontend/src/features/home/ChartTable.tsx +++ b/superset-frontend/src/features/home/ChartTable.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useChartEditModal, useFavoriteStatus, diff --git a/superset-frontend/src/features/home/DashboardTable.tsx b/superset-frontend/src/features/home/DashboardTable.tsx index 61013e8dba5..7993900f833 100644 --- a/superset-frontend/src/features/home/DashboardTable.tsx +++ b/superset-frontend/src/features/home/DashboardTable.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; import { useFavoriteStatus, useListViewResource } from 'src/views/CRUD/hooks'; import { Dashboard, DashboardTableProps, TableTab } from 'src/views/CRUD/types'; diff --git a/superset-frontend/src/features/home/EmptyState.tsx b/superset-frontend/src/features/home/EmptyState.tsx index a8f443e2c97..119fd6596ce 100644 --- a/superset-frontend/src/features/home/EmptyState.tsx +++ b/superset-frontend/src/features/home/EmptyState.tsx @@ -21,8 +21,8 @@ import { EmptyState as EmptyStateComponent, } from '@superset-ui/core/components'; import { TableTab } from 'src/views/CRUD/types'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { navigateTo } from 'src/utils/navigationUtils'; import { makeUrl } from 'src/utils/pathUtils'; import { WelcomeTable } from './types'; diff --git a/superset-frontend/src/features/home/LanguagePicker.tsx b/superset-frontend/src/features/home/LanguagePicker.tsx index c311d1dfca6..82bf482a0f4 100644 --- a/superset-frontend/src/features/home/LanguagePicker.tsx +++ b/superset-frontend/src/features/home/LanguagePicker.tsx @@ -18,8 +18,8 @@ */ import { useMemo } from 'react'; import { MenuItem } from '@superset-ui/core/components/Menu'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Icons } from '@superset-ui/core/components/Icons'; import { Typography } from '@superset-ui/core/components/Typography'; diff --git a/superset-frontend/src/features/home/Menu.tsx b/superset-frontend/src/features/home/Menu.tsx index 96270b03ecc..b7eacb65cf4 100644 --- a/superset-frontend/src/features/home/Menu.tsx +++ b/superset-frontend/src/features/home/Menu.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useEffect } from 'react'; -import { styled, css, useTheme } from '@apache-superset/core/ui'; +import { styled, css, useTheme } from '@apache-superset/core/theme'; import { ensureStaticPrefix } from 'src/utils/assetUrl'; import { ensureAppRoot } from 'src/utils/pathUtils'; import { getUrlParam } from 'src/utils/urlUtils'; diff --git a/superset-frontend/src/features/home/RightMenu.tsx b/superset-frontend/src/features/home/RightMenu.tsx index 553908f2550..28c25498642 100644 --- a/superset-frontend/src/features/home/RightMenu.tsx +++ b/superset-frontend/src/features/home/RightMenu.tsx @@ -22,14 +22,19 @@ import { useSelector } from 'react-redux'; import { Link } from 'react-router-dom'; import { useQueryParams, BooleanParam } from 'use-query-params'; import { isEmpty } from 'lodash'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, getExtensionsRegistry, isFeatureEnabled, FeatureFlag, } from '@superset-ui/core'; -import { styled, css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; +import { + styled, + css, + SupersetTheme, + useTheme, +} from '@apache-superset/core/theme'; import { Tag, Tooltip, diff --git a/superset-frontend/src/features/home/SavedQueries.tsx b/superset-frontend/src/features/home/SavedQueries.tsx index cf20c49265c..5e977dd8c7c 100644 --- a/superset-frontend/src/features/home/SavedQueries.tsx +++ b/superset-frontend/src/features/home/SavedQueries.tsx @@ -18,9 +18,9 @@ */ import { useCallback, useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { styled, useTheme, css } from '@apache-superset/core/ui'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; import CodeSyntaxHighlighter, { preloadLanguages, } from '@superset-ui/core/components/CodeSyntaxHighlighter'; diff --git a/superset-frontend/src/features/home/SubMenu.tsx b/superset-frontend/src/features/home/SubMenu.tsx index 107700a2539..f71892fb501 100644 --- a/superset-frontend/src/features/home/SubMenu.tsx +++ b/superset-frontend/src/features/home/SubMenu.tsx @@ -19,8 +19,13 @@ import { ReactNode, useState, useEffect, FunctionComponent } from 'react'; import { Link, useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; -import { styled, SupersetTheme, css, useTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { + styled, + SupersetTheme, + css, + useTheme, +} from '@apache-superset/core/theme'; import cx from 'classnames'; import { debounce } from 'lodash'; import { Menu, MenuMode, MainNav } from '@superset-ui/core/components/Menu'; diff --git a/superset-frontend/src/features/home/commonMenuData.ts b/superset-frontend/src/features/home/commonMenuData.ts index 3a8c5c6260e..3be22c951bf 100644 --- a/superset-frontend/src/features/home/commonMenuData.ts +++ b/superset-frontend/src/features/home/commonMenuData.ts @@ -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'; /** * Shared popup offset configuration for navbar menu dropdowns. diff --git a/superset-frontend/src/features/owners/OwnerSelectLabel/index.tsx b/superset-frontend/src/features/owners/OwnerSelectLabel/index.tsx index ad1db260f0e..9416b982126 100644 --- a/superset-frontend/src/features/owners/OwnerSelectLabel/index.tsx +++ b/superset-frontend/src/features/owners/OwnerSelectLabel/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; const StyledLabelContainer = styled.div` overflow: hidden; diff --git a/superset-frontend/src/features/queries/QueryPreviewModal.tsx b/superset-frontend/src/features/queries/QueryPreviewModal.tsx index 85a670f8704..9e00d309c2a 100644 --- a/superset-frontend/src/features/queries/QueryPreviewModal.tsx +++ b/superset-frontend/src/features/queries/QueryPreviewModal.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import cx from 'classnames'; import { Button, Modal } from '@superset-ui/core/components'; import withToasts, { diff --git a/superset-frontend/src/features/queries/SavedQueryPreviewModal.tsx b/superset-frontend/src/features/queries/SavedQueryPreviewModal.tsx index d88db6558a6..3e6e45871b8 100644 --- a/superset-frontend/src/features/queries/SavedQueryPreviewModal.tsx +++ b/superset-frontend/src/features/queries/SavedQueryPreviewModal.tsx @@ -17,8 +17,8 @@ * under the License. */ import { FunctionComponent } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Button, Modal } from '@superset-ui/core/components'; import SyntaxHighlighterCopy from 'src/features/queries/SyntaxHighlighterCopy'; import withToasts, { diff --git a/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx b/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx index f3368fed23e..1daecd6d594 100644 --- a/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx +++ b/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useEffect } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import CodeSyntaxHighlighter, { SupportedLanguage, CodeSyntaxHighlighterProps, diff --git a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx index b017033f76a..be5c90fcdfd 100644 --- a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx +++ b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx @@ -18,14 +18,14 @@ */ import { useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled, getExtensionsRegistry, usePrevious, } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { MenuItem } from '@superset-ui/core/components/Menu'; import { Checkbox } from '@superset-ui/core/components'; import { noOp } from 'src/utils/common'; diff --git a/superset-frontend/src/features/reports/ReportModal/actions.ts b/superset-frontend/src/features/reports/ReportModal/actions.ts index 2579d44c660..db28f9360ec 100644 --- a/superset-frontend/src/features/reports/ReportModal/actions.ts +++ b/superset-frontend/src/features/reports/ReportModal/actions.ts @@ -18,7 +18,7 @@ */ /* eslint camelcase: 0 */ import { SupersetClient } from '@superset-ui/core'; -import { t } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; import rison from 'rison'; import { addDangerToast, diff --git a/superset-frontend/src/features/reports/ReportModal/index.tsx b/superset-frontend/src/features/reports/ReportModal/index.tsx index 53edec67dfd..425867ced55 100644 --- a/superset-frontend/src/features/reports/ReportModal/index.tsx +++ b/superset-frontend/src/features/reports/ReportModal/index.tsx @@ -25,9 +25,10 @@ import { ChangeEvent, } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getClientErrorObject, VizType } from '@superset-ui/core'; -import { SupersetTheme, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { useDispatch, useSelector } from 'react-redux'; import { addReport, diff --git a/superset-frontend/src/features/reports/ReportModal/styles.tsx b/superset-frontend/src/features/reports/ReportModal/styles.tsx index 1bc6a37febb..14acc3e0012 100644 --- a/superset-frontend/src/features/reports/ReportModal/styles.tsx +++ b/superset-frontend/src/features/reports/ReportModal/styles.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { styled, css, SupersetTheme } from '@apache-superset/core/ui'; +import { styled, css, SupersetTheme } from '@apache-superset/core/theme'; import { Button, CronPicker, Modal } from '@superset-ui/core/components'; import { Radio } from '@superset-ui/core/components/Radio'; diff --git a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx index b362eb2282e..d38725c0234 100644 --- a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx +++ b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx @@ -17,9 +17,9 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; import { diff --git a/superset-frontend/src/features/rls/constants.ts b/superset-frontend/src/features/rls/constants.ts index d35ff7bcb95..0b5f1584760 100644 --- a/superset-frontend/src/features/rls/constants.ts +++ b/superset-frontend/src/features/rls/constants.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; export const FILTER_OPTIONS = [ { diff --git a/superset-frontend/src/features/roles/RoleFormItems.tsx b/superset-frontend/src/features/roles/RoleFormItems.tsx index 2be776bcbd7..0d0b5e9dde9 100644 --- a/superset-frontend/src/features/roles/RoleFormItems.tsx +++ b/superset-frontend/src/features/roles/RoleFormItems.tsx @@ -22,7 +22,7 @@ import { Select, AsyncSelect, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FC } from 'react'; import { GroupObject } from 'src/pages/GroupsList'; import { FormattedPermission } from './types'; diff --git a/superset-frontend/src/features/roles/RoleListAddModal.tsx b/superset-frontend/src/features/roles/RoleListAddModal.tsx index 4a2e5f724e9..cc5fc06b03f 100644 --- a/superset-frontend/src/features/roles/RoleListAddModal.tsx +++ b/superset-frontend/src/features/roles/RoleListAddModal.tsx @@ -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 { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { FormModal, Icons } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/roles/RoleListDuplicateModal.tsx b/superset-frontend/src/features/roles/RoleListDuplicateModal.tsx index 429dda315f8..b7b5a3050bd 100644 --- a/superset-frontend/src/features/roles/RoleListDuplicateModal.tsx +++ b/superset-frontend/src/features/roles/RoleListDuplicateModal.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { RoleObject } from 'src/pages/RolesList'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { FormModal, Icons } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/roles/RoleListEditModal.tsx b/superset-frontend/src/features/roles/RoleListEditModal.tsx index 7159c83f98e..ac078260a9d 100644 --- a/superset-frontend/src/features/roles/RoleListEditModal.tsx +++ b/superset-frontend/src/features/roles/RoleListEditModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, useRef, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import Tabs from '@superset-ui/core/components/Tabs'; import { RoleObject } from 'src/pages/RolesList'; import { diff --git a/superset-frontend/src/features/tags/BulkTagModal.tsx b/superset-frontend/src/features/tags/BulkTagModal.tsx index 70810f94a43..76ce8730cf9 100644 --- a/superset-frontend/src/features/tags/BulkTagModal.tsx +++ b/superset-frontend/src/features/tags/BulkTagModal.tsx @@ -18,9 +18,9 @@ */ import { useState, useEffect, FC } from 'react'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { FormLabel, AsyncSelect, diff --git a/superset-frontend/src/features/tags/TagCard.tsx b/superset-frontend/src/features/tags/TagCard.tsx index 8f2a737539a..6158acc119c 100644 --- a/superset-frontend/src/features/tags/TagCard.tsx +++ b/superset-frontend/src/features/tags/TagCard.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Link } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { CardStyles } from 'src/views/CRUD/utils'; import { diff --git a/superset-frontend/src/features/tags/TagModal.tsx b/superset-frontend/src/features/tags/TagModal.tsx index 7109f6e3646..53b059a4425 100644 --- a/superset-frontend/src/features/tags/TagModal.tsx +++ b/superset-frontend/src/features/tags/TagModal.tsx @@ -28,9 +28,9 @@ import { Input, Modal, } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { styled, useTheme } from '@apache-superset/core/ui'; +import { styled, useTheme } from '@apache-superset/core/theme'; import { Tag } from 'src/views/CRUD/types'; import { fetchObjectsByTagIds } from 'src/features/tags/tags'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; diff --git a/superset-frontend/src/features/tasks/TaskPayloadPopover.tsx b/superset-frontend/src/features/tasks/TaskPayloadPopover.tsx index eaa27b900ad..b8276327e57 100644 --- a/superset-frontend/src/features/tasks/TaskPayloadPopover.tsx +++ b/superset-frontend/src/features/tasks/TaskPayloadPopover.tsx @@ -18,7 +18,7 @@ */ import { useState } from 'react'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { Popover } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/features/tasks/TaskStackTracePopover.tsx b/superset-frontend/src/features/tasks/TaskStackTracePopover.tsx index caacf6b633b..18b7c725132 100644 --- a/superset-frontend/src/features/tasks/TaskStackTracePopover.tsx +++ b/superset-frontend/src/features/tasks/TaskStackTracePopover.tsx @@ -18,8 +18,8 @@ */ import { useState, useCallback } from 'react'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { Popover, Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; import { useToasts } from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/features/tasks/TaskStatusIcon.tsx b/superset-frontend/src/features/tasks/TaskStatusIcon.tsx index 182afdcbf44..abb2bd99d28 100644 --- a/superset-frontend/src/features/tasks/TaskStatusIcon.tsx +++ b/superset-frontend/src/features/tasks/TaskStatusIcon.tsx @@ -18,7 +18,8 @@ */ import React from 'react'; -import { useTheme, SupersetTheme, t } from '@apache-superset/core/ui'; +import { useTheme, SupersetTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '@superset-ui/core/components'; import { TaskStatus } from './types'; diff --git a/superset-frontend/src/features/themes/ThemeModal.tsx b/superset-frontend/src/features/themes/ThemeModal.tsx index 335d346360a..59d843d1d90 100644 --- a/superset-frontend/src/features/themes/ThemeModal.tsx +++ b/superset-frontend/src/features/themes/ThemeModal.tsx @@ -26,8 +26,9 @@ import { } from 'react'; import { omit } from 'lodash'; -import { t } from '@apache-superset/core'; -import { css, styled, useTheme, Alert } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { Alert } from '@apache-superset/core/components'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { useThemeContext } from 'src/theme/ThemeProvider'; import { useBeforeUnload } from 'src/hooks/useBeforeUnload'; diff --git a/superset-frontend/src/features/userInfo/UserInfoModal.tsx b/superset-frontend/src/features/userInfo/UserInfoModal.tsx index 7d27a0a0f56..1baeab7c68c 100644 --- a/superset-frontend/src/features/userInfo/UserInfoModal.tsx +++ b/superset-frontend/src/features/userInfo/UserInfoModal.tsx @@ -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 { SupersetClient } from '@superset-ui/core'; import { FormModal, FormItem, Input } from '@superset-ui/core/components'; import { useToasts } from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/features/users/UserListModal.tsx b/superset-frontend/src/features/users/UserListModal.tsx index bc9ee0dc56d..9b01a79e62a 100644 --- a/superset-frontend/src/features/users/UserListModal.tsx +++ b/superset-frontend/src/features/users/UserListModal.tsx @@ -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 { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { diff --git a/superset-frontend/src/features/users/utils.ts b/superset-frontend/src/features/users/utils.ts index d5cb04883e9..40d6719922a 100644 --- a/superset-frontend/src/features/users/utils.ts +++ b/superset-frontend/src/features/users/utils.ts @@ -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 { SupersetClient } from '@superset-ui/core'; import { SelectOption } from 'src/components/ListView'; import { FormValues } from './types'; diff --git a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.stories.tsx b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.stories.tsx index 0cc92cfc191..bac40972416 100644 --- a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.stories.tsx +++ b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.stories.tsx @@ -18,7 +18,7 @@ */ import { action } from '@storybook/addon-actions'; import { SuperChart, getChartTransformPropsRegistry } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import RangeFilterPlugin from './index'; import transformProps from './transformProps'; diff --git a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.test.tsx b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.test.tsx index 6843bdbd3e7..9e41a1802d4 100644 --- a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.test.tsx +++ b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.test.tsx @@ -17,7 +17,7 @@ * under the License. */ import { AppSection } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import userEvent from '@testing-library/user-event'; import { render, screen } from 'spec/helpers/testing-library'; import RangeFilterPlugin from './RangeFilterPlugin'; diff --git a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx index e53c3ae27f2..f2db6168408 100644 --- a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx @@ -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, getColumnLabel, @@ -24,7 +24,7 @@ import { isEqualArray, NumberFormats, } from '@superset-ui/core'; -import { styled, useTheme, css } from '@apache-superset/core/ui'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; import { useCallback, useEffect, useMemo, useState, useRef } from 'react'; import { FilterBarOrientation } from 'src/dashboard/types'; // import Metadata from '@superset-ui/core/components/Metadata'; diff --git a/superset-frontend/src/filters/components/Range/buildQuery.ts b/superset-frontend/src/filters/components/Range/buildQuery.ts index cdbebeccc8e..1ba7aa9da7c 100644 --- a/superset-frontend/src/filters/components/Range/buildQuery.ts +++ b/superset-frontend/src/filters/components/Range/buildQuery.ts @@ -17,7 +17,7 @@ * under the License. */ import { buildQueryContext, QueryFormData } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; /** * The buildQuery function is used to create an instance of QueryContext that's diff --git a/superset-frontend/src/filters/components/Range/controlPanel.ts b/superset-frontend/src/filters/components/Range/controlPanel.ts index c4603159232..2b02bbb6495 100644 --- a/superset-frontend/src/filters/components/Range/controlPanel.ts +++ b/superset-frontend/src/filters/components/Range/controlPanel.ts @@ -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, sharedControls, diff --git a/superset-frontend/src/filters/components/Range/index.ts b/superset-frontend/src/filters/components/Range/index.ts index 51cbbf2d6ad..b772cdbb93f 100644 --- a/superset-frontend/src/filters/components/Range/index.ts +++ b/superset-frontend/src/filters/components/Range/index.ts @@ -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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx index 58cbfc5dceb..3127b26bbc0 100644 --- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx @@ -18,7 +18,7 @@ */ /* eslint-disable no-param-reassign */ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { AppSection, DataMask, @@ -28,9 +28,9 @@ import { JsonObject, finestTemporalGrainFormatter, } from '@superset-ui/core'; -import { tn } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { tn } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; +import { GenericDataType } from '@apache-superset/core/common'; import { debounce, isUndefined } from 'lodash'; import { useImmerReducer } from 'use-immer'; import { diff --git a/superset-frontend/src/filters/components/Select/buildQuery.test.ts b/superset-frontend/src/filters/components/Select/buildQuery.test.ts index 20e4956c5fe..5839b063fc5 100644 --- a/superset-frontend/src/filters/components/Select/buildQuery.test.ts +++ b/superset-frontend/src/filters/components/Select/buildQuery.test.ts @@ -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 buildQuery from './buildQuery'; import { PluginFilterSelectQueryFormData } from './types'; diff --git a/superset-frontend/src/filters/components/Select/buildQuery.ts b/superset-frontend/src/filters/components/Select/buildQuery.ts index 07b514fc56b..1e80a32483a 100644 --- a/superset-frontend/src/filters/components/Select/buildQuery.ts +++ b/superset-frontend/src/filters/components/Select/buildQuery.ts @@ -24,7 +24,7 @@ import { QueryObjectFilterClause, BuildQuery, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { DEFAULT_FORM_DATA, PluginFilterSelectQueryFormData } from './types'; const buildQuery: BuildQuery = ( diff --git a/superset-frontend/src/filters/components/Select/controlPanel.ts b/superset-frontend/src/filters/components/Select/controlPanel.ts index 828e5952b30..b170d0b2ec8 100644 --- a/superset-frontend/src/filters/components/Select/controlPanel.ts +++ b/superset-frontend/src/filters/components/Select/controlPanel.ts @@ -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, diff --git a/superset-frontend/src/filters/components/Select/index.ts b/superset-frontend/src/filters/components/Select/index.ts index 193c78a1455..55d1d7a6a0c 100644 --- a/superset-frontend/src/filters/components/Select/index.ts +++ b/superset-frontend/src/filters/components/Select/index.ts @@ -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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/src/filters/components/Select/transformProps.ts b/superset-frontend/src/filters/components/Select/transformProps.ts index ab6083922a3..2e0bdfd69c7 100644 --- a/superset-frontend/src/filters/components/Select/transformProps.ts +++ b/superset-frontend/src/filters/components/Select/transformProps.ts @@ -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 { noOp } from 'src/utils/common'; import { DEFAULT_FORM_DATA, PluginFilterSelectChartProps } from './types'; diff --git a/superset-frontend/src/filters/components/Select/types.ts b/superset-frontend/src/filters/components/Select/types.ts index 9a850877473..001facd11e3 100644 --- a/superset-frontend/src/filters/components/Select/types.ts +++ b/superset-frontend/src/filters/components/Select/types.ts @@ -25,7 +25,7 @@ import { QueryFormData, ChartDataResponseResult, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { RefObject } from 'react'; import { FilterBarOrientation } from 'src/dashboard/types'; import { PluginFilterHooks, PluginFilterStylesProps } from '../types'; diff --git a/superset-frontend/src/filters/components/Time/TimeFilterPlugin.tsx b/superset-frontend/src/filters/components/Time/TimeFilterPlugin.tsx index 9b6543678bd..f2f88f67621 100644 --- a/superset-frontend/src/filters/components/Time/TimeFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/Time/TimeFilterPlugin.tsx @@ -17,7 +17,7 @@ * under the License. */ import { NO_TIME_RANGE, getExtensionsRegistry } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { useCallback, useEffect } from 'react'; import DateFilterControl from 'src/explore/components/controls/DateFilterControl'; import { PluginFilterTimeProps } from './types'; diff --git a/superset-frontend/src/filters/components/Time/controlPanel.ts b/superset-frontend/src/filters/components/Time/controlPanel.ts index 44b19a550a8..775106dadaf 100644 --- a/superset-frontend/src/filters/components/Time/controlPanel.ts +++ b/superset-frontend/src/filters/components/Time/controlPanel.ts @@ -20,7 +20,7 @@ import { ControlPanelConfig, sharedControls, } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const config: ControlPanelConfig = { // For control input types, see: superset-frontend/src/explore/components/controls/index.js diff --git a/superset-frontend/src/filters/components/Time/index.ts b/superset-frontend/src/filters/components/Time/index.ts index 9a2fab7b126..7b7dab2bfb3 100644 --- a/superset-frontend/src/filters/components/Time/index.ts +++ b/superset-frontend/src/filters/components/Time/index.ts @@ -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 controlPanel from './controlPanel'; import transformProps from './transformProps'; diff --git a/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx b/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx index 6c94bc52335..1cbc77849ac 100644 --- a/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -import { t, tn } from '@apache-superset/core'; +import { t, tn } from '@apache-superset/core/translation'; import { ensureIsArray, ExtraFormData } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { useEffect, useState } from 'react'; import { FormItem, diff --git a/superset-frontend/src/filters/components/TimeColumn/controlPanel.ts b/superset-frontend/src/filters/components/TimeColumn/controlPanel.ts index cef113e3865..119a992ab89 100644 --- a/superset-frontend/src/filters/components/TimeColumn/controlPanel.ts +++ b/superset-frontend/src/filters/components/TimeColumn/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const config: ControlPanelConfig = { controlPanelSections: [ diff --git a/superset-frontend/src/filters/components/TimeColumn/index.ts b/superset-frontend/src/filters/components/TimeColumn/index.ts index 59182011f00..a7c857b45f0 100644 --- a/superset-frontend/src/filters/components/TimeColumn/index.ts +++ b/superset-frontend/src/filters/components/TimeColumn/index.ts @@ -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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx b/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx index 1a376b1e9e8..4b011a2e170 100644 --- a/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx @@ -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 { ensureIsArray, ExtraFormData, TimeGranularity, } from '@superset-ui/core'; -import { tn } from '@apache-superset/core'; +import { tn } from '@apache-superset/core/translation'; import { useEffect, useMemo, useState } from 'react'; import { FormItem, diff --git a/superset-frontend/src/filters/components/TimeGrain/controlPanel.ts b/superset-frontend/src/filters/components/TimeGrain/controlPanel.ts index cef113e3865..119a992ab89 100644 --- a/superset-frontend/src/filters/components/TimeGrain/controlPanel.ts +++ b/superset-frontend/src/filters/components/TimeGrain/controlPanel.ts @@ -17,7 +17,7 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const config: ControlPanelConfig = { controlPanelSections: [ diff --git a/superset-frontend/src/filters/components/TimeGrain/index.ts b/superset-frontend/src/filters/components/TimeGrain/index.ts index c4f67379e4b..eb89b8a07eb 100644 --- a/superset-frontend/src/filters/components/TimeGrain/index.ts +++ b/superset-frontend/src/filters/components/TimeGrain/index.ts @@ -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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/src/filters/components/common.ts b/superset-frontend/src/filters/components/common.ts index 38d98a5ae09..01725ccb18e 100644 --- a/superset-frontend/src/filters/components/common.ts +++ b/superset-frontend/src/filters/components/common.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { FormItem } from '@superset-ui/core/components'; import { PluginFilterStylesProps } from './types'; diff --git a/superset-frontend/src/filters/utils.test.ts b/superset-frontend/src/filters/utils.test.ts index 226adab8485..7da20af89ad 100644 --- a/superset-frontend/src/filters/utils.test.ts +++ b/superset-frontend/src/filters/utils.test.ts @@ -23,7 +23,7 @@ import { NumberFormats, TimeFormats, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { getDataRecordFormatter, getRangeExtraFormData, diff --git a/superset-frontend/src/filters/utils.ts b/superset-frontend/src/filters/utils.ts index 038fee7d16e..451cdec2256 100644 --- a/superset-frontend/src/filters/utils.ts +++ b/superset-frontend/src/filters/utils.ts @@ -23,7 +23,7 @@ import { TimeFormatter, ExtraFormData, } from '@superset-ui/core'; -import { GenericDataType } from '@apache-superset/core/api/core'; +import { GenericDataType } from '@apache-superset/core/common'; import { FALSE_STRING, NULL_STRING, TRUE_STRING } from 'src/utils/common'; import { Clauses, diff --git a/superset-frontend/src/hooks/apiResources/datasets.ts b/superset-frontend/src/hooks/apiResources/datasets.ts index e5f633091a2..2594858e02b 100644 --- a/superset-frontend/src/hooks/apiResources/datasets.ts +++ b/superset-frontend/src/hooks/apiResources/datasets.ts @@ -24,7 +24,7 @@ import { getExtensionsRegistry, QueryFormData, } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import { useEffect, useState } from 'react'; import { Dataset } from 'src/components/Chart/types'; import { diff --git a/superset-frontend/src/hooks/useConfirmModal/useConfirmModal.test.tsx b/superset-frontend/src/hooks/useConfirmModal/useConfirmModal.test.tsx index b2c88d00606..8c0a3f87a9b 100644 --- a/superset-frontend/src/hooks/useConfirmModal/useConfirmModal.test.tsx +++ b/superset-frontend/src/hooks/useConfirmModal/useConfirmModal.test.tsx @@ -18,7 +18,7 @@ */ import { render, screen, userEvent, waitFor } from '@superset-ui/core/spec'; import { renderHook } from '@testing-library/react-hooks'; -import { ThemeProvider, supersetTheme } from '@apache-superset/core/ui'; +import { ThemeProvider, supersetTheme } from '@apache-superset/core/theme'; import { useConfirmModal } from '.'; const renderWithTheme = (component: React.ReactElement) => diff --git a/superset-frontend/src/hooks/useJsonTreeTheme.ts b/superset-frontend/src/hooks/useJsonTreeTheme.ts index f74baa79cc1..7f174e30825 100644 --- a/superset-frontend/src/hooks/useJsonTreeTheme.ts +++ b/superset-frontend/src/hooks/useJsonTreeTheme.ts @@ -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'; export const useJsonTreeTheme = () => { const theme = useTheme(); diff --git a/superset-frontend/src/hooks/useThemeMenuItems.test.tsx b/superset-frontend/src/hooks/useThemeMenuItems.test.tsx index 6e1a3f48eed..0eb49e38571 100644 --- a/superset-frontend/src/hooks/useThemeMenuItems.test.tsx +++ b/superset-frontend/src/hooks/useThemeMenuItems.test.tsx @@ -23,7 +23,7 @@ import { waitFor, within, } from 'spec/helpers/testing-library'; -import { ThemeMode } from '@apache-superset/core/ui'; +import { ThemeMode } from '@apache-superset/core/theme'; import { Menu } from '@superset-ui/core/components'; import { ThemeSubMenuProps, useThemeMenuItems } from './useThemeMenuItems'; diff --git a/superset-frontend/src/hooks/useThemeMenuItems.tsx b/superset-frontend/src/hooks/useThemeMenuItems.tsx index 3af77482f29..a4e27a0e879 100644 --- a/superset-frontend/src/hooks/useThemeMenuItems.tsx +++ b/superset-frontend/src/hooks/useThemeMenuItems.tsx @@ -19,8 +19,8 @@ import { useMemo } from 'react'; import { Icons, Tooltip } from '@superset-ui/core/components'; import type { MenuItem } from '@superset-ui/core/components/Menu'; -import { t } from '@apache-superset/core'; -import { ThemeMode, ThemeAlgorithm } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { ThemeMode, ThemeAlgorithm } from '@apache-superset/core/theme'; import { NAVBAR_MENU_POPUP_OFFSET } from 'src/features/home/commonMenuData'; export interface ThemeSubMenuOption { diff --git a/superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts b/superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts index 331a4fba22d..50204693aab 100644 --- a/superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts +++ b/superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts @@ -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 { getClientErrorObject } from '@superset-ui/core'; import { useEffect, useRef, useCallback, useState } from 'react'; import { useHistory } from 'react-router-dom'; diff --git a/superset-frontend/src/middleware/asyncEvent.ts b/superset-frontend/src/middleware/asyncEvent.ts index 303051ec4f1..08fbdecf4ca 100644 --- a/superset-frontend/src/middleware/asyncEvent.ts +++ b/superset-frontend/src/middleware/asyncEvent.ts @@ -26,7 +26,7 @@ import { parseErrorJson, SupersetError, } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import getBootstrapData from 'src/utils/getBootstrapData'; type AsyncEvent = { diff --git a/superset-frontend/src/pages/ActionLog/index.tsx b/superset-frontend/src/pages/ActionLog/index.tsx index e213fe228bc..8b07c880f90 100644 --- a/superset-frontend/src/pages/ActionLog/index.tsx +++ b/superset-frontend/src/pages/ActionLog/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useMemo } 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 SubMenu, { SubMenuProps } from 'src/features/home/SubMenu'; import { useListViewResource } from 'src/views/CRUD/hooks'; import { useToasts } from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/pages/AlertReportList/index.tsx b/superset-frontend/src/pages/AlertReportList/index.tsx index 6f8060bd2dd..c457b74617f 100644 --- a/superset-frontend/src/pages/AlertReportList/index.tsx +++ b/superset-frontend/src/pages/AlertReportList/index.tsx @@ -19,13 +19,13 @@ import { useState, useMemo, useEffect, useCallback } from 'react'; import { useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, makeApi, getExtensionsRegistry, } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; import { Tooltip, diff --git a/superset-frontend/src/pages/AllEntities/index.tsx b/superset-frontend/src/pages/AllEntities/index.tsx index 5f1e4b2666f..2cb68d93ead 100644 --- a/superset-frontend/src/pages/AllEntities/index.tsx +++ b/superset-frontend/src/pages/AllEntities/index.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; -import { styled, css, SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled, css, SupersetTheme } from '@apache-superset/core/theme'; import { NumberParam, useQueryParam } from 'use-query-params'; import AllEntitiesTable from 'src/features/allEntities/AllEntitiesTable'; import { Button, Loading } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/pages/AnnotationLayerList/index.tsx b/superset-frontend/src/pages/AnnotationLayerList/index.tsx index 4b57dc11968..07ae8a48b88 100644 --- a/superset-frontend/src/pages/AnnotationLayerList/index.tsx +++ b/superset-frontend/src/pages/AnnotationLayerList/index.tsx @@ -19,7 +19,7 @@ import { useMemo, useState } from 'react'; import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; import { Link, useHistory } from 'react-router-dom'; import { useListViewResource } from 'src/views/CRUD/hooks'; diff --git a/superset-frontend/src/pages/AnnotationList/index.tsx b/superset-frontend/src/pages/AnnotationList/index.tsx index 6b0e0775167..68011f38772 100644 --- a/superset-frontend/src/pages/AnnotationList/index.tsx +++ b/superset-frontend/src/pages/AnnotationList/index.tsx @@ -19,9 +19,9 @@ import { useMemo, useState, useEffect, useCallback } from 'react'; import { useParams, Link, useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, getClientErrorObject } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; import rison from 'rison'; diff --git a/superset-frontend/src/pages/Chart/index.tsx b/superset-frontend/src/pages/Chart/index.tsx index 26926a1c8d6..9f04ade2328 100644 --- a/superset-frontend/src/pages/Chart/index.tsx +++ b/superset-frontend/src/pages/Chart/index.tsx @@ -19,7 +19,7 @@ import { useEffect, useRef, useState } from 'react'; import { useDispatch } from 'react-redux'; import { useLocation } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { getLabelsColorMap, isDefined, diff --git a/superset-frontend/src/pages/ChartCreation/ChartCreation.test.tsx b/superset-frontend/src/pages/ChartCreation/ChartCreation.test.tsx index 58fb5fad213..f3e1fc231c9 100644 --- a/superset-frontend/src/pages/ChartCreation/ChartCreation.test.tsx +++ b/superset-frontend/src/pages/ChartCreation/ChartCreation.test.tsx @@ -27,7 +27,7 @@ import fetchMock from 'fetch-mock'; import { createMemoryHistory } from 'history'; import { ChartCreation } from 'src/pages/ChartCreation'; import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; jest.mock('src/components/DynamicPlugins', () => ({ usePluginContext: () => ({ diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx b/superset-frontend/src/pages/ChartCreation/index.tsx index 2c61fc59d53..bea1756ab53 100644 --- a/superset-frontend/src/pages/ChartCreation/index.tsx +++ b/superset-frontend/src/pages/ChartCreation/index.tsx @@ -18,9 +18,9 @@ */ import { PureComponent, ReactNode } from 'react'; import rison from 'rison'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isDefined, JsonResponse, SupersetClient } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { withTheme, Theme } from '@emotion/react'; import { getUrlParam } from 'src/utils/urlUtils'; import { FilterPlugins, URL_PARAMS } from 'src/constants'; diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx index 50573e005cb..dc91a9028b7 100644 --- a/superset-frontend/src/pages/ChartList/index.tsx +++ b/superset-frontend/src/pages/ChartList/index.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, SupersetTheme } from '@apache-superset/core'; +import { SupersetTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag, @@ -25,7 +26,7 @@ import { SupersetClient, isMatrixifyEnabled, } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled } from '@apache-superset/core/theme'; import { useState, useMemo, useCallback } from 'react'; import rison from 'rison'; import { uniqBy } from 'lodash'; diff --git a/superset-frontend/src/pages/CssTemplateList/index.tsx b/superset-frontend/src/pages/CssTemplateList/index.tsx index 2c3e8944ada..1326ebaf26e 100644 --- a/superset-frontend/src/pages/CssTemplateList/index.tsx +++ b/superset-frontend/src/pages/CssTemplateList/index.tsx @@ -18,7 +18,7 @@ */ import { useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; import rison from 'rison'; diff --git a/superset-frontend/src/pages/DashboardList/index.tsx b/superset-frontend/src/pages/DashboardList/index.tsx index 8c5a31f6552..4bdc3183d4b 100644 --- a/superset-frontend/src/pages/DashboardList/index.tsx +++ b/superset-frontend/src/pages/DashboardList/index.tsx @@ -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 { isFeatureEnabled, FeatureFlag, SupersetClient, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { useSelector } from 'react-redux'; import { useState, useMemo, useCallback } from 'react'; import { Link } from 'react-router-dom'; diff --git a/superset-frontend/src/pages/DatabaseList/index.tsx b/superset-frontend/src/pages/DatabaseList/index.tsx index e8bf7ab29c2..d382cb6f496 100644 --- a/superset-frontend/src/pages/DatabaseList/index.tsx +++ b/superset-frontend/src/pages/DatabaseList/index.tsx @@ -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 { getExtensionsRegistry, SupersetClient } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { useState, useMemo, useEffect, useCallback } from 'react'; import rison from 'rison'; import { useSelector } from 'react-redux'; diff --git a/superset-frontend/src/pages/DatasetList/index.tsx b/superset-frontend/src/pages/DatasetList/index.tsx index 39684dd9ca7..a71bdece01d 100644 --- a/superset-frontend/src/pages/DatasetList/index.tsx +++ b/superset-frontend/src/pages/DatasetList/index.tsx @@ -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 { getExtensionsRegistry, SupersetClient } from '@superset-ui/core'; -import { styled, useTheme, css } from '@apache-superset/core/ui'; +import { styled, useTheme, css } from '@apache-superset/core/theme'; import { FunctionComponent, useState, useMemo, useCallback, Key } from 'react'; import { Link, useHistory } from 'react-router-dom'; import rison from 'rison'; diff --git a/superset-frontend/src/pages/ExecutionLogList/index.tsx b/superset-frontend/src/pages/ExecutionLogList/index.tsx index 06b425f4f96..997eae32fb0 100644 --- a/superset-frontend/src/pages/ExecutionLogList/index.tsx +++ b/superset-frontend/src/pages/ExecutionLogList/index.tsx @@ -17,8 +17,8 @@ * under the License. */ -import { t } from '@apache-superset/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { css, styled } from '@apache-superset/core/theme'; import { extendedDayjs as dayjs, fDuration, diff --git a/superset-frontend/src/pages/FileHandler/index.tsx b/superset-frontend/src/pages/FileHandler/index.tsx index 4f33decb7ce..589db966f74 100644 --- a/superset-frontend/src/pages/FileHandler/index.tsx +++ b/superset-frontend/src/pages/FileHandler/index.tsx @@ -18,7 +18,7 @@ */ import { useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { Loading } from '@superset-ui/core/components'; import UploadDataModal from 'src/features/databases/UploadDataModel'; import withToasts from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/pages/GroupsList/index.tsx b/superset-frontend/src/pages/GroupsList/index.tsx index b19fe494eb4..d4f9c67b471 100644 --- a/superset-frontend/src/pages/GroupsList/index.tsx +++ b/superset-frontend/src/pages/GroupsList/index.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useListViewResource } from 'src/views/CRUD/hooks'; import SubMenu, { SubMenuProps } from 'src/features/home/SubMenu'; import { ActionsBar, ActionProps } from 'src/components/ListView/ActionsBar'; diff --git a/superset-frontend/src/pages/Home/index.tsx b/superset-frontend/src/pages/Home/index.tsx index 42a4b3be15d..e270fd9872c 100644 --- a/superset-frontend/src/pages/Home/index.tsx +++ b/superset-frontend/src/pages/Home/index.tsx @@ -17,14 +17,14 @@ * under the License. */ import { useEffect, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag, getExtensionsRegistry, JsonObject, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import rison from 'rison'; import { Collapse, ListViewCard } from '@superset-ui/core/components'; import { User } from 'src/types/bootstrapTypes'; diff --git a/superset-frontend/src/pages/Login/index.tsx b/superset-frontend/src/pages/Login/index.tsx index 1dee883cf5b..47cb3eba22d 100644 --- a/superset-frontend/src/pages/Login/index.tsx +++ b/superset-frontend/src/pages/Login/index.tsx @@ -17,9 +17,9 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { Button, Card, diff --git a/superset-frontend/src/pages/QueryHistoryList/index.tsx b/superset-frontend/src/pages/QueryHistoryList/index.tsx index 53a20882576..b11ae6631e6 100644 --- a/superset-frontend/src/pages/QueryHistoryList/index.tsx +++ b/superset-frontend/src/pages/QueryHistoryList/index.tsx @@ -18,9 +18,9 @@ */ import { useMemo, useState, useCallback, ReactElement, useEffect } from 'react'; import { Link, useHistory } from 'react-router-dom'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { QueryState, SupersetClient } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { css, styled, useTheme } from '@apache-superset/core/theme'; import { createFetchRelated, createFetchDistinct, diff --git a/superset-frontend/src/pages/Register/index.tsx b/superset-frontend/src/pages/Register/index.tsx index 5e67b4b37e8..cb962687de1 100644 --- a/superset-frontend/src/pages/Register/index.tsx +++ b/superset-frontend/src/pages/Register/index.tsx @@ -17,9 +17,9 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css } from '@apache-superset/core/theme'; import { Button, Card, diff --git a/superset-frontend/src/pages/RolesList/index.tsx b/superset-frontend/src/pages/RolesList/index.tsx index af309fdbfb9..36b5af59953 100644 --- a/superset-frontend/src/pages/RolesList/index.tsx +++ b/superset-frontend/src/pages/RolesList/index.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; import { useListViewResource } from 'src/views/CRUD/hooks'; import RoleListAddModal from 'src/features/roles/RoleListAddModal'; diff --git a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx index 724cadf2bc7..6f54fc8c72e 100644 --- a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx +++ b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx @@ -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 { SupersetClient } from '@superset-ui/core'; import { useCallback, useMemo, useState } from 'react'; import { ConfirmStatusChange, Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx index 5101963951c..65797e69b96 100644 --- a/superset-frontend/src/pages/SavedQueryList/index.tsx +++ b/superset-frontend/src/pages/SavedQueryList/index.tsx @@ -17,13 +17,13 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { FeatureFlag, isFeatureEnabled, SupersetClient, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import { useCallback, useMemo, useState, MouseEvent } from 'react'; import { Link, useHistory } from 'react-router-dom'; import rison from 'rison'; diff --git a/superset-frontend/src/pages/SqlLab/index.tsx b/superset-frontend/src/pages/SqlLab/index.tsx index e3637547b54..ada9c250ed0 100644 --- a/superset-frontend/src/pages/SqlLab/index.tsx +++ b/superset-frontend/src/pages/SqlLab/index.tsx @@ -19,7 +19,7 @@ import { useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { useSqlLabInitialState } from 'src/hooks/apiResources/sqlLab'; import type { InitialState } from 'src/hooks/apiResources/sqlLab'; import { resetState } from 'src/SqlLab/actions/sqlLab'; diff --git a/superset-frontend/src/pages/Tags/index.tsx b/superset-frontend/src/pages/Tags/index.tsx index 67b8140a127..bb45bf1cab3 100644 --- a/superset-frontend/src/pages/Tags/index.tsx +++ b/superset-frontend/src/pages/Tags/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { Actions, diff --git a/superset-frontend/src/pages/TaskList/index.tsx b/superset-frontend/src/pages/TaskList/index.tsx index 31590001eae..205dc0e3f8d 100644 --- a/superset-frontend/src/pages/TaskList/index.tsx +++ b/superset-frontend/src/pages/TaskList/index.tsx @@ -22,7 +22,8 @@ import { isFeatureEnabled, SupersetClient, } from '@superset-ui/core'; -import { t, useTheme } from '@apache-superset/core'; +import { useTheme } from '@apache-superset/core/theme'; +import { t } from '@apache-superset/core/translation'; import { useMemo, useCallback, useState } from 'react'; import { Tooltip, Label, Modal, Checkbox } from '@superset-ui/core/components'; import { diff --git a/superset-frontend/src/pages/ThemeList/index.tsx b/superset-frontend/src/pages/ThemeList/index.tsx index d0c84adf4be..739157fee61 100644 --- a/superset-frontend/src/pages/ThemeList/index.tsx +++ b/superset-frontend/src/pages/ThemeList/index.tsx @@ -18,9 +18,10 @@ */ import { useCallback, useMemo, useState, useEffect } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { styled, Alert } from '@apache-superset/core/ui'; +import { Alert } from '@apache-superset/core/components'; +import { styled } from '@apache-superset/core/theme'; import { Tag, DeleteModal, diff --git a/superset-frontend/src/pages/UserInfo/index.tsx b/superset-frontend/src/pages/UserInfo/index.tsx index 04e5e93a91d..92a54ad0e7d 100644 --- a/superset-frontend/src/pages/UserInfo/index.tsx +++ b/superset-frontend/src/pages/UserInfo/index.tsx @@ -18,9 +18,9 @@ */ import { useCallback, useEffect, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; -import { css, useTheme, styled } from '@apache-superset/core/ui'; +import { css, useTheme, styled } from '@apache-superset/core/theme'; import SubMenu, { SubMenuProps } from 'src/features/home/SubMenu'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { Descriptions } from 'src/components/Descriptions'; diff --git a/superset-frontend/src/pages/UserRegistrations/index.tsx b/superset-frontend/src/pages/UserRegistrations/index.tsx index 0906f613ce6..07fa3b51c5b 100644 --- a/superset-frontend/src/pages/UserRegistrations/index.tsx +++ b/superset-frontend/src/pages/UserRegistrations/index.tsx @@ -18,7 +18,7 @@ */ import { useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; import { useListViewResource } from 'src/views/CRUD/hooks'; import { useToasts } from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/pages/UsersList/index.tsx b/superset-frontend/src/pages/UsersList/index.tsx index 7a71490bc3b..80bf8d73148 100644 --- a/superset-frontend/src/pages/UsersList/index.tsx +++ b/superset-frontend/src/pages/UsersList/index.tsx @@ -18,7 +18,7 @@ */ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { useListViewResource } from 'src/views/CRUD/hooks'; import SubMenu, { SubMenuProps } from 'src/features/home/SubMenu'; import { ActionsBar, ActionProps } from 'src/components/ListView/ActionsBar'; diff --git a/superset-frontend/src/preamble.ts b/superset-frontend/src/preamble.ts index 97c3f5c2ade..57874fb537e 100644 --- a/superset-frontend/src/preamble.ts +++ b/superset-frontend/src/preamble.ts @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { configure, LanguagePack } from '@apache-superset/core/ui'; -import { logging } from '@apache-superset/core'; +import { configure, LanguagePack } from '@apache-superset/core/translation'; +import { logging } from '@apache-superset/core/utils'; import { makeApi, initFeatureFlags } from '@superset-ui/core'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; import setupClient from './setup/setupClient'; diff --git a/superset-frontend/src/setup/setupClient.ts b/superset-frontend/src/setup/setupClient.ts index 3f61dec2963..d80dbffd125 100644 --- a/superset-frontend/src/setup/setupClient.ts +++ b/superset-frontend/src/setup/setupClient.ts @@ -17,7 +17,7 @@ * under the License. */ import { SupersetClient, ClientConfig } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import parseCookie from 'src/utils/parseCookie'; import getBootstrapData from 'src/utils/getBootstrapData'; diff --git a/superset-frontend/src/theme/ThemeController.ts b/superset-frontend/src/theme/ThemeController.ts index 91f318279e0..fafbe784914 100644 --- a/superset-frontend/src/theme/ThemeController.ts +++ b/superset-frontend/src/theme/ThemeController.ts @@ -26,7 +26,7 @@ import { ThemeMode, themeObject as supersetThemeObject, normalizeThemeConfig, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import { makeApi } from '@superset-ui/core'; import type { BootstrapThemeData, @@ -252,7 +252,7 @@ export class ThemeController { if (themeConfig) { // Controller creates and owns the dashboard theme - const { Theme } = await import('@apache-superset/core/ui'); + const { Theme } = await import('@apache-superset/core/theme'); const normalizedConfig = this.normalizeTheme(themeConfig); // Determine if this is a dark theme and get appropriate base diff --git a/superset-frontend/src/theme/ThemeProvider.tsx b/superset-frontend/src/theme/ThemeProvider.tsx index 68dae34635b..64d8a2930d2 100644 --- a/superset-frontend/src/theme/ThemeProvider.tsx +++ b/superset-frontend/src/theme/ThemeProvider.tsx @@ -30,7 +30,7 @@ import { type ThemeContextType, Theme, ThemeMode, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import { ThemeController } from './ThemeController'; const ThemeContext = createContext(null); diff --git a/superset-frontend/src/theme/hooks/useThemeValidation.ts b/superset-frontend/src/theme/hooks/useThemeValidation.ts index 4b8b5bd0b61..d6b7134489a 100644 --- a/superset-frontend/src/theme/hooks/useThemeValidation.ts +++ b/superset-frontend/src/theme/hooks/useThemeValidation.ts @@ -19,7 +19,7 @@ import { useMemo, useState, useEffect } from 'react'; import { useJsonValidation } from '@superset-ui/core/components/AsyncAceEditor'; import type { JsonValidationAnnotation } from '@superset-ui/core/components/AsyncAceEditor'; -import type { AnyThemeConfig } from '@apache-superset/core/ui'; +import { type AnyThemeConfig } from '@apache-superset/core/theme'; import { validateTheme } from '../utils/themeStructureValidation'; /** diff --git a/superset-frontend/src/theme/tests/ThemeController.test.ts b/superset-frontend/src/theme/tests/ThemeController.test.ts index 278d85f8c26..b6a68a3a11a 100644 --- a/superset-frontend/src/theme/tests/ThemeController.test.ts +++ b/superset-frontend/src/theme/tests/ThemeController.test.ts @@ -24,7 +24,7 @@ import { Theme, ThemeAlgorithm, ThemeMode, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import type { BootstrapThemeDataConfig, CommonBootstrapData, diff --git a/superset-frontend/src/theme/tests/ThemeProvider.test.tsx b/superset-frontend/src/theme/tests/ThemeProvider.test.tsx index 7f45e64dfbd..eeabdfbe0b2 100644 --- a/superset-frontend/src/theme/tests/ThemeProvider.test.tsx +++ b/superset-frontend/src/theme/tests/ThemeProvider.test.tsx @@ -21,7 +21,7 @@ import { type ThemeContextType, Theme, ThemeMode, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import { act, render, screen } from '@superset-ui/core/spec'; import { renderHook } from '@testing-library/react-hooks'; import { SupersetThemeProvider, useThemeContext } from '../ThemeProvider'; diff --git a/superset-frontend/src/theme/utils/themeStructureValidation.test.ts b/superset-frontend/src/theme/utils/themeStructureValidation.test.ts index 80e4edf32b4..4b6ccae5670 100644 --- a/superset-frontend/src/theme/utils/themeStructureValidation.test.ts +++ b/superset-frontend/src/theme/utils/themeStructureValidation.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { AnyThemeConfig } from '@apache-superset/core/ui'; +import { type AnyThemeConfig } from '@apache-superset/core/theme'; import { validateTheme } from './themeStructureValidation'; test('validateTheme validates a valid theme with standard tokens', () => { diff --git a/superset-frontend/src/theme/utils/themeStructureValidation.ts b/superset-frontend/src/theme/utils/themeStructureValidation.ts index affb884609d..e91f6ff6801 100644 --- a/superset-frontend/src/theme/utils/themeStructureValidation.ts +++ b/superset-frontend/src/theme/utils/themeStructureValidation.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { AnyThemeConfig } from '@apache-superset/core/ui'; +import { type AnyThemeConfig } from '@apache-superset/core/theme'; import { isValidTokenName } from './antdTokenNames'; /** diff --git a/superset-frontend/src/types/bootstrapTypes.ts b/superset-frontend/src/types/bootstrapTypes.ts index 44de2bd84ae..daf8f46bacc 100644 --- a/superset-frontend/src/types/bootstrapTypes.ts +++ b/superset-frontend/src/types/bootstrapTypes.ts @@ -20,10 +20,10 @@ import { FormatLocaleDefinition } from 'd3-format'; import { TimeLocaleDefinition } from 'd3-time-format'; import { isPlainObject } from 'lodash'; import { Languages } from 'src/features/home/LanguagePicker'; -import type { +import { AnyThemeConfig, SerializableThemeConfig, -} from '@apache-superset/core/ui'; +} from '@apache-superset/core/theme'; import type { ColorSchemeConfig, FeatureFlagMap, @@ -31,7 +31,10 @@ import type { SequentialSchemeConfig, } from '@superset-ui/core'; -import type { LanguagePack, Locale } from '@apache-superset/core/ui'; +import { + type LanguagePack, + type Locale, +} from '@apache-superset/core/translation'; export type User = { createdOn?: string; diff --git a/superset-frontend/src/utils/downloadAsImage.tsx b/superset-frontend/src/utils/downloadAsImage.tsx index e525b8c3d67..ceea0f47325 100644 --- a/superset-frontend/src/utils/downloadAsImage.tsx +++ b/superset-frontend/src/utils/downloadAsImage.tsx @@ -20,8 +20,8 @@ import { SyntheticEvent } from 'react'; import domToImage from 'dom-to-image-more'; import { kebabCase } from 'lodash'; // eslint-disable-next-line no-restricted-imports -import { t } from '@apache-superset/core'; -import { SupersetTheme } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { SupersetTheme } from '@apache-superset/core/theme'; import { addWarningToast } from 'src/components/MessageToasts/actions'; const IMAGE_DOWNLOAD_QUALITY = 0.95; diff --git a/superset-frontend/src/utils/downloadAsPdf.ts b/superset-frontend/src/utils/downloadAsPdf.ts index b6560071982..43c67996dc1 100644 --- a/superset-frontend/src/utils/downloadAsPdf.ts +++ b/superset-frontend/src/utils/downloadAsPdf.ts @@ -19,8 +19,8 @@ import { SyntheticEvent } from 'react'; import domToPdf from 'dom-to-pdf'; import { kebabCase } from 'lodash'; -import { t } from '@apache-superset/core'; -import { logging } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; +import { logging } from '@apache-superset/core/utils'; import { addWarningToast } from 'src/components/MessageToasts/actions'; import getBootstrapData from 'src/utils/getBootstrapData'; diff --git a/superset-frontend/src/utils/export.test.ts b/superset-frontend/src/utils/export.test.ts index 1a0f96be716..e45155a3958 100644 --- a/superset-frontend/src/utils/export.test.ts +++ b/superset-frontend/src/utils/export.test.ts @@ -17,7 +17,7 @@ * under the License. */ import { SupersetClient } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import contentDisposition from 'content-disposition'; import handleResourceExport from './export'; @@ -28,7 +28,7 @@ jest.mock('@superset-ui/core', () => ({ }, })); -jest.mock('@apache-superset/core', () => ({ +jest.mock('@apache-superset/core/utils', () => ({ logging: { warn: jest.fn(), error: jest.fn(), diff --git a/superset-frontend/src/utils/export.ts b/superset-frontend/src/utils/export.ts index cabbc493723..d63574d56c9 100644 --- a/superset-frontend/src/utils/export.ts +++ b/superset-frontend/src/utils/export.ts @@ -17,7 +17,7 @@ * under the License. */ import { SupersetClient } from '@superset-ui/core'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import rison from 'rison'; import contentDisposition from 'content-disposition'; diff --git a/superset-frontend/src/utils/fetchOptions.ts b/superset-frontend/src/utils/fetchOptions.ts index 3dde8b0daab..d9ac7b067ed 100644 --- a/superset-frontend/src/utils/fetchOptions.ts +++ b/superset-frontend/src/utils/fetchOptions.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient } from '@superset-ui/core'; import rison from 'rison'; import { Dispatch, SetStateAction } from 'react'; diff --git a/superset-frontend/src/utils/getChartRequiredFieldsMissingMessage.ts b/superset-frontend/src/utils/getChartRequiredFieldsMissingMessage.ts index 421e2b36226..5bccf653e5e 100644 --- a/superset-frontend/src/utils/getChartRequiredFieldsMissingMessage.ts +++ b/superset-frontend/src/utils/getChartRequiredFieldsMissingMessage.ts @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; const CREATE_CHART_TEXT = t('Create chart'); const UPDATE_CHART_TEXT = t('Update chart'); diff --git a/superset-frontend/src/views/App.tsx b/superset-frontend/src/views/App.tsx index 6784305350e..270a344d817 100644 --- a/superset-frontend/src/views/App.tsx +++ b/superset-frontend/src/views/App.tsx @@ -24,7 +24,7 @@ import { useLocation, } from 'react-router-dom'; import { bindActionCreators } from 'redux'; -import { css } from '@apache-superset/core/ui'; +import { css } from '@apache-superset/core/theme'; import { Layout, Loading } from '@superset-ui/core/components'; import { setupAGGridModules } from '@superset-ui/core/components/ThemedAgGridReact'; import { ErrorBoundary } from 'src/components'; diff --git a/superset-frontend/src/views/CRUD/hooks.ts b/superset-frontend/src/views/CRUD/hooks.ts index 6d85d3d8e5f..caad7beef47 100644 --- a/superset-frontend/src/views/CRUD/hooks.ts +++ b/superset-frontend/src/views/CRUD/hooks.ts @@ -18,7 +18,7 @@ */ import rison from 'rison'; import { useState, useEffect, useCallback, useRef } from 'react'; -import { t } from '@apache-superset/core'; +import { t } from '@apache-superset/core/translation'; import { makeApi, SupersetClient, diff --git a/superset-frontend/src/views/CRUD/utils.tsx b/superset-frontend/src/views/CRUD/utils.tsx index e01cc60487b..0f53e3492da 100644 --- a/superset-frontend/src/views/CRUD/utils.tsx +++ b/superset-frontend/src/views/CRUD/utils.tsx @@ -17,14 +17,15 @@ * under the License. */ -import { t, logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; +import { t } from '@apache-superset/core/translation'; import { SupersetClient, SupersetClientResponse, getClientErrorObject, lruCache, } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { styled } from '@apache-superset/core/theme'; import Chart from 'src/types/Chart'; import { intersection } from 'lodash'; import rison from 'rison'; diff --git a/superset-frontend/src/views/index.tsx b/superset-frontend/src/views/index.tsx index c96528c9f79..e3dd3f80bfa 100644 --- a/superset-frontend/src/views/index.tsx +++ b/superset-frontend/src/views/index.tsx @@ -19,7 +19,7 @@ import 'src/public-path'; import ReactDOM from 'react-dom'; -import { logging } from '@apache-superset/core'; +import { logging } from '@apache-superset/core/utils'; import initPreamble from 'src/preamble'; const appMountPoint = document.getElementById('app'); diff --git a/superset-frontend/src/views/menu.tsx b/superset-frontend/src/views/menu.tsx index cfcf4601996..fc1fc2ff793 100644 --- a/superset-frontend/src/views/menu.tsx +++ b/superset-frontend/src/views/menu.tsx @@ -27,7 +27,8 @@ import { CacheProvider } from '@emotion/react'; import { QueryParamProvider } from 'use-query-params'; import { ReactRouter5Adapter } from 'use-query-params/adapters/react-router-5'; import createCache from '@emotion/cache'; -import { ThemeProvider, theme } from '@apache-superset/core/ui'; +import { ThemeProvider } from '@apache-superset/core/theme'; +import { theme } from '@apache-superset/core/theme'; import Menu from 'src/features/home/Menu'; import getBootstrapData from 'src/utils/getBootstrapData'; import { setupStore } from './store'; diff --git a/superset-frontend/src/visualizations/TimeTable/TimeTable.tsx b/superset-frontend/src/visualizations/TimeTable/TimeTable.tsx index 9b179d1a8b2..31f4e6e47e4 100644 --- a/superset-frontend/src/visualizations/TimeTable/TimeTable.tsx +++ b/superset-frontend/src/visualizations/TimeTable/TimeTable.tsx @@ -18,8 +18,8 @@ */ import { useMemo, ReactNode } from 'react'; import { InfoTooltip, TableView } from '@superset-ui/core/components'; -import { t } from '@apache-superset/core'; -import { styled } from '@apache-superset/core/ui'; +import { t } from '@apache-superset/core/translation'; +import { styled } from '@apache-superset/core/theme'; import { sortNumberWithMixedTypes, processTimeTableData } from './utils'; import { ValueCell, LeftCell, Sparkline } from './components'; import type { TimeTableProps } from './types'; diff --git a/superset-frontend/src/visualizations/TimeTable/components/SparklineCell/SparklineCell.tsx b/superset-frontend/src/visualizations/TimeTable/components/SparklineCell/SparklineCell.tsx index e5d358d6523..4b89c035780 100644 --- a/superset-frontend/src/visualizations/TimeTable/components/SparklineCell/SparklineCell.tsx +++ b/superset-frontend/src/visualizations/TimeTable/components/SparklineCell/SparklineCell.tsx @@ -18,7 +18,7 @@ */ import { ReactElement, useMemo } from 'react'; import { formatNumber, formatTime } from '@superset-ui/core'; -import { useTheme } from '@apache-superset/core/ui'; +import { useTheme } from '@apache-superset/core/theme'; import { GridRows } from '@visx/grid'; import { scaleLinear } from '@visx/scale'; import { diff --git a/superset-frontend/src/visualizations/TimeTable/config/controlPanel/controlPanel.ts b/superset-frontend/src/visualizations/TimeTable/config/controlPanel/controlPanel.ts index 98c81221fc5..ade90d32668 100644 --- a/superset-frontend/src/visualizations/TimeTable/config/controlPanel/controlPanel.ts +++ b/superset-frontend/src/visualizations/TimeTable/config/controlPanel/controlPanel.ts @@ -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, diff --git a/superset-frontend/src/visualizations/TimeTable/config/transformProps/transformProps.test.ts b/superset-frontend/src/visualizations/TimeTable/config/transformProps/transformProps.test.ts index a0dce74dbc1..c52700fb7fb 100644 --- a/superset-frontend/src/visualizations/TimeTable/config/transformProps/transformProps.test.ts +++ b/superset-frontend/src/visualizations/TimeTable/config/transformProps/transformProps.test.ts @@ -22,7 +22,7 @@ import { Behavior, Metric, } from '@superset-ui/core'; -import { supersetTheme } from '@apache-superset/core/ui'; +import { supersetTheme } from '@apache-superset/core/theme'; import { transformProps, TableChartProps } from './transformProps'; interface ExtendedMetric extends Omit { diff --git a/superset-frontend/src/visualizations/TimeTable/constants.ts b/superset-frontend/src/visualizations/TimeTable/constants.ts index 71b966478a3..ee890f4d802 100644 --- a/superset-frontend/src/visualizations/TimeTable/constants.ts +++ b/superset-frontend/src/visualizations/TimeTable/constants.ts @@ -17,7 +17,7 @@ * under the License. */ -import { SupersetTheme } from '@apache-superset/core/ui'; +import { SupersetTheme } from '@apache-superset/core/theme'; export const getAccessibleColorBounds = (theme: SupersetTheme): string[] => [ theme.colorError, // Red variant for negative/danger diff --git a/superset-frontend/src/visualizations/TimeTable/index.ts b/superset-frontend/src/visualizations/TimeTable/index.ts index bc6a5e23f39..3dcf0f3cb4f 100644 --- a/superset-frontend/src/visualizations/TimeTable/index.ts +++ b/superset-frontend/src/visualizations/TimeTable/index.ts @@ -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, controlPanel } from './config'; import thumbnail from './images/thumbnail.png'; diff --git a/superset-frontend/src/visualizations/dashboardComponents/ExampleComponent/ExampleComponent.tsx b/superset-frontend/src/visualizations/dashboardComponents/ExampleComponent/ExampleComponent.tsx index 23045052c42..fe3dc665a71 100644 --- a/superset-frontend/src/visualizations/dashboardComponents/ExampleComponent/ExampleComponent.tsx +++ b/superset-frontend/src/visualizations/dashboardComponents/ExampleComponent/ExampleComponent.tsx @@ -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 { DashboardComponentMetadata } from '@superset-ui/core'; // TODO: POC only component can be removed after PR approved diff --git a/superset/commands/tasks/cancel.py b/superset/commands/tasks/cancel.py index befe6074242..cbc07dc889e 100644 --- a/superset/commands/tasks/cancel.py +++ b/superset/commands/tasks/cancel.py @@ -22,7 +22,7 @@ from typing import TYPE_CHECKING from uuid import UUID from flask import current_app -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset.commands.base import BaseCommand from superset.commands.tasks.exceptions import ( diff --git a/superset/commands/tasks/internal_update.py b/superset/commands/tasks/internal_update.py index fc177a0cee6..e011e23914c 100644 --- a/superset/commands/tasks/internal_update.py +++ b/superset/commands/tasks/internal_update.py @@ -33,7 +33,7 @@ from functools import partial from typing import Any from uuid import UUID -from superset_core.api.tasks import TaskProperties, TaskStatus +from superset_core.tasks.types import TaskProperties, TaskStatus from superset.commands.base import BaseCommand from superset.commands.tasks.exceptions import TaskUpdateFailedError diff --git a/superset/commands/tasks/prune.py b/superset/commands/tasks/prune.py index cf59e182cbe..9bc52965c52 100644 --- a/superset/commands/tasks/prune.py +++ b/superset/commands/tasks/prune.py @@ -19,7 +19,7 @@ import time from datetime import datetime, timedelta import sqlalchemy as sa -from superset_core.api.tasks import TaskStatus +from superset_core.tasks.types import TaskStatus from superset import db from superset.commands.base import BaseCommand diff --git a/superset/commands/tasks/submit.py b/superset/commands/tasks/submit.py index a4caeade09f..69f4388b5f0 100644 --- a/superset/commands/tasks/submit.py +++ b/superset/commands/tasks/submit.py @@ -23,7 +23,7 @@ from typing import Any, TYPE_CHECKING from flask import current_app from marshmallow import ValidationError -from superset_core.api.tasks import TaskScope +from superset_core.tasks.types import TaskScope from superset.commands.base import BaseCommand from superset.commands.tasks.exceptions import ( diff --git a/superset/commands/tasks/update.py b/superset/commands/tasks/update.py index 29ba0509ea6..e2a377e6746 100644 --- a/superset/commands/tasks/update.py +++ b/superset/commands/tasks/update.py @@ -22,7 +22,7 @@ from functools import partial from typing import Any, TYPE_CHECKING from uuid import UUID -from superset_core.api.tasks import TaskProperties +from superset_core.tasks.types import TaskProperties from superset import security_manager from superset.commands.base import BaseCommand diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index ddd31e78fa7..1514a944e98 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -66,7 +66,7 @@ from sqlalchemy.sql.elements import ColumnClause, TextClause from sqlalchemy.sql.expression import Label from sqlalchemy.sql.selectable import Alias, TableClause from sqlalchemy.types import JSON -from superset_core.api.models import Dataset as CoreDataset +from superset_core.common.models import Dataset as CoreDataset from superset import db, is_feature_enabled, security_manager from superset.commands.dataset.exceptions import DatasetNotFoundError diff --git a/superset/core/api/core_api_injection.py b/superset/core/api/core_api_injection.py index 6744faded8e..34aa998bd54 100644 --- a/superset/core/api/core_api_injection.py +++ b/superset/core/api/core_api_injection.py @@ -30,8 +30,8 @@ from sqlalchemy.orm import scoped_session from superset.extensions.context import get_current_extension_context if TYPE_CHECKING: - from superset_core.api.models import Database - from superset_core.api.rest_api import RestApi + from superset_core.common.models import Database + from superset_core.rest_api.api import RestApi __all__ = ["initialize_core_api_dependencies"] @@ -39,10 +39,12 @@ __all__ = ["initialize_core_api_dependencies"] def inject_dao_implementations() -> None: """ - Replace abstract DAO classes in superset_core.api.daos with concrete - implementations from Superset. + Replace abstract DAO classes in superset_core common/queries/tasks daos with + concrete implementations from Superset. """ - import superset_core.api.daos as core_dao_module + import superset_core.common.daos as core_common_dao_module + import superset_core.queries.daos as core_queries_dao_module + import superset_core.tasks.daos as core_tasks_dao_module from superset.daos.chart import ChartDAO as HostChartDAO from superset.daos.dashboard import DashboardDAO as HostDashboardDAO @@ -57,27 +59,33 @@ def inject_dao_implementations() -> None: from superset.daos.tasks import TaskDAO as HostTaskDAO from superset.daos.user import UserDAO as HostUserDAO - # Replace abstract classes with concrete implementations - core_dao_module.DatasetDAO = HostDatasetDAO # type: ignore[assignment,misc] - core_dao_module.DatabaseDAO = HostDatabaseDAO # type: ignore[assignment,misc] - core_dao_module.ChartDAO = HostChartDAO # type: ignore[assignment,misc] - core_dao_module.DashboardDAO = HostDashboardDAO # type: ignore[assignment,misc] - core_dao_module.UserDAO = HostUserDAO # type: ignore[assignment,misc] - core_dao_module.QueryDAO = HostQueryDAO # type: ignore[assignment,misc] - core_dao_module.SavedQueryDAO = HostSavedQueryDAO # type: ignore[assignment,misc] - core_dao_module.TagDAO = HostTagDAO # type: ignore[assignment,misc] - core_dao_module.KeyValueDAO = HostKeyValueDAO # type: ignore[assignment,misc] - core_dao_module.TaskDAO = HostTaskDAO # type: ignore[assignment,misc] + # Replace abstract classes in common.daos with concrete implementations + core_common_dao_module.DatasetDAO = HostDatasetDAO # type: ignore[assignment,misc] + core_common_dao_module.DatabaseDAO = HostDatabaseDAO # type: ignore[assignment,misc] + core_common_dao_module.ChartDAO = HostChartDAO # type: ignore[assignment,misc] + core_common_dao_module.DashboardDAO = HostDashboardDAO # type: ignore[assignment,misc] + core_common_dao_module.UserDAO = HostUserDAO # type: ignore[assignment,misc] + core_common_dao_module.TagDAO = HostTagDAO # type: ignore[assignment,misc] + core_common_dao_module.KeyValueDAO = HostKeyValueDAO # type: ignore[assignment,misc] + + # Replace abstract classes in queries.daos + core_queries_dao_module.QueryDAO = HostQueryDAO # type: ignore[assignment,misc] + core_queries_dao_module.SavedQueryDAO = HostSavedQueryDAO # type: ignore[assignment,misc] + + # Replace abstract classes in tasks.daos + core_tasks_dao_module.TaskDAO = HostTaskDAO # type: ignore[assignment,misc] def inject_model_implementations() -> None: """ - Replace abstract model classes in superset_core.api.models with concrete - implementations from Superset. + Replace abstract model classes in superset_core common/queries/tasks models with + concrete implementations from Superset. Uses in-place replacement to maintain single import location for extensions. """ - import superset_core.api.models as core_models_module + import superset_core.common.models as core_common_models_module + import superset_core.queries.models as core_queries_models_module + import superset_core.tasks.models as core_tasks_models_module from flask_appbuilder.security.sqla.models import User as HostUser from superset.connectors.sqla.models import SqlaTable as HostDataset @@ -89,25 +97,29 @@ def inject_model_implementations() -> None: from superset.models.tasks import Task as HostTask from superset.tags.models import Tag as HostTag - # In-place replacement - extensions will import concrete implementations - core_models_module.Database = HostDatabase # type: ignore[misc] - core_models_module.Dataset = HostDataset # type: ignore[misc] - core_models_module.Chart = HostChart # type: ignore[misc] - core_models_module.Dashboard = HostDashboard # type: ignore[misc] - core_models_module.User = HostUser # type: ignore[misc] - core_models_module.Query = HostQuery # type: ignore[misc] - core_models_module.SavedQuery = HostSavedQuery # type: ignore[misc] - core_models_module.Tag = HostTag # type: ignore[misc] - core_models_module.KeyValue = HostKeyValue # type: ignore[misc] - core_models_module.Task = HostTask # type: ignore[misc] + # In-place replacement in common.models + core_common_models_module.Database = HostDatabase # type: ignore[misc] + core_common_models_module.Dataset = HostDataset # type: ignore[misc] + core_common_models_module.Chart = HostChart # type: ignore[misc] + core_common_models_module.Dashboard = HostDashboard # type: ignore[misc] + core_common_models_module.User = HostUser # type: ignore[misc] + core_common_models_module.Tag = HostTag # type: ignore[misc] + core_common_models_module.KeyValue = HostKeyValue # type: ignore[misc] + + # In-place replacement in queries.models + core_queries_models_module.Query = HostQuery # type: ignore[misc] + core_queries_models_module.SavedQuery = HostSavedQuery # type: ignore[misc] + + # In-place replacement in tasks.models + core_tasks_models_module.Task = HostTask # type: ignore[misc] def inject_query_implementations() -> None: """ - Replace abstract query functions in superset_core.api.query with concrete + Replace abstract query functions in superset_core.queries.query with concrete implementations from Superset. """ - import superset_core.api.query as core_query_module + import superset_core.queries.query as core_query_module from superset.sql.parse import SQLGLOT_DIALECTS @@ -122,27 +134,28 @@ def inject_query_implementations() -> None: def inject_task_implementations() -> None: """ - Replace abstract task functions in superset_core.api.tasks with concrete - implementations from Superset. + Replace abstract task functions in superset_core tasks.types and tasks.decorators + with concrete implementations from Superset. """ - import superset_core.api.tasks as core_tasks_module + import superset_core.tasks.decorators as core_tasks_decorators_module + import superset_core.tasks.types as core_tasks_types_module from superset.tasks.ambient_context import get_context from superset.tasks.context import TaskContext from superset.tasks.decorators import task # Replace abstract classes and functions with concrete implementations - core_tasks_module.TaskContext = TaskContext # type: ignore[assignment,misc] - core_tasks_module.task = task # type: ignore[assignment] - core_tasks_module.get_context = get_context + core_tasks_types_module.TaskContext = TaskContext # type: ignore[assignment,misc] + core_tasks_decorators_module.task = task # type: ignore[assignment] + core_tasks_decorators_module.get_context = get_context def inject_rest_api_implementations() -> None: """ - Replace abstract REST API functions and decorators in superset_core.api.rest_api + Replace abstract REST API decorators in superset_core.rest_api.decorators with concrete implementations from Superset. """ - import superset_core.api.rest_api as core_rest_api_module + import superset_core.rest_api.decorators as core_rest_api_module from superset.extensions import appbuilder @@ -203,10 +216,10 @@ def inject_rest_api_implementations() -> None: def inject_model_session_implementation() -> None: """ - Replace abstract get_session function in superset_core.api.models with concrete + Replace abstract get_session function in superset_core.common.models with concrete implementation from Superset. """ - import superset_core.api.models as core_models_module + import superset_core.common.models as core_models_module def get_session() -> scoped_session: from superset import db diff --git a/superset/core/mcp/core_mcp_injection.py b/superset/core/mcp/core_mcp_injection.py index b580e13e280..f37ae6e48f1 100644 --- a/superset/core/mcp/core_mcp_injection.py +++ b/superset/core/mcp/core_mcp_injection.py @@ -254,10 +254,10 @@ def initialize_core_mcp_dependencies() -> None: try: # Replace the abstract decorators with concrete implementations - import superset_core.api.mcp + import superset_core.mcp.decorators - superset_core.api.mcp.tool = create_tool_decorator - superset_core.api.mcp.prompt = create_prompt_decorator + superset_core.mcp.decorators.tool = create_tool_decorator + superset_core.mcp.decorators.prompt = create_prompt_decorator logger.info("MCP dependency injection initialized successfully") diff --git a/superset/daos/base.py b/superset/daos/base.py index 136184304b5..2e5290776e3 100644 --- a/superset/daos/base.py +++ b/superset/daos/base.py @@ -41,8 +41,8 @@ from sqlalchemy.exc import SQLAlchemyError, StatementError from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.inspection import inspect from sqlalchemy.orm import ColumnProperty, joinedload, Query, RelationshipProperty -from superset_core.api.daos import BaseDAO as CoreBaseDAO -from superset_core.api.models import CoreModel +from superset_core.common.daos import BaseDAO as CoreBaseDAO +from superset_core.common.models import CoreModel from superset.daos.exceptions import ( DAOFindFailedError, diff --git a/superset/daos/tasks.py b/superset/daos/tasks.py index c8b92cd948a..8e2e74370f4 100644 --- a/superset/daos/tasks.py +++ b/superset/daos/tasks.py @@ -21,7 +21,7 @@ from datetime import datetime, timezone from typing import Any from uuid import UUID -from superset_core.api.tasks import TaskProperties, TaskScope, TaskStatus +from superset_core.tasks.types import TaskProperties, TaskScope, TaskStatus from superset.daos.base import BaseDAO from superset.daos.exceptions import DAODeleteFailedError diff --git a/superset/key_value/models.py b/superset/key_value/models.py index cddf09c70bb..42b1694fd14 100644 --- a/superset/key_value/models.py +++ b/superset/key_value/models.py @@ -18,7 +18,7 @@ from datetime import datetime from sqlalchemy import Column, DateTime, ForeignKey, Integer, LargeBinary, String from sqlalchemy.orm import relationship -from superset_core.api.models import KeyValue as CoreKeyValue +from superset_core.common.models import KeyValue as CoreKeyValue from superset import security_manager from superset.models.helpers import AuditMixinNullable, ImportExportMixin diff --git a/superset/mcp_service/chart/prompts/create_chart_guided.py b/superset/mcp_service/chart/prompts/create_chart_guided.py index b3fdf2a6f44..46ec65f6b66 100644 --- a/superset/mcp_service/chart/prompts/create_chart_guided.py +++ b/superset/mcp_service/chart/prompts/create_chart_guided.py @@ -19,7 +19,7 @@ Chart prompts for visualization guidance """ -from superset_core.api.mcp import prompt +from superset_core.mcp.decorators import prompt @prompt("create_chart_guided") diff --git a/superset/mcp_service/chart/tool/generate_chart.py b/superset/mcp_service/chart/tool/generate_chart.py index 70259381de8..181a59a4fc5 100644 --- a/superset/mcp_service/chart/tool/generate_chart.py +++ b/superset/mcp_service/chart/tool/generate_chart.py @@ -23,7 +23,7 @@ import time from urllib.parse import parse_qs, urlparse from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.commands.exceptions import CommandException from superset.extensions import event_logger diff --git a/superset/mcp_service/chart/tool/get_chart_data.py b/superset/mcp_service/chart/tool/get_chart_data.py index 26af5310d50..eaa50ca6b45 100644 --- a/superset/mcp_service/chart/tool/get_chart_data.py +++ b/superset/mcp_service/chart/tool/get_chart_data.py @@ -25,7 +25,7 @@ from typing import Any, Dict, List, TYPE_CHECKING from fastmcp import Context from flask import current_app -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool if TYPE_CHECKING: from superset.models.slice import Slice diff --git a/superset/mcp_service/chart/tool/get_chart_info.py b/superset/mcp_service/chart/tool/get_chart_info.py index 08e2850cba8..95d0af23ff3 100644 --- a/superset/mcp_service/chart/tool/get_chart_info.py +++ b/superset/mcp_service/chart/tool/get_chart_info.py @@ -23,7 +23,7 @@ import logging from fastmcp import Context from sqlalchemy.orm import subqueryload -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.commands.exceptions import CommandException from superset.commands.explore.form_data.parameters import CommandParameters diff --git a/superset/mcp_service/chart/tool/get_chart_preview.py b/superset/mcp_service/chart/tool/get_chart_preview.py index 0b8a51753c9..ee7c70a481b 100644 --- a/superset/mcp_service/chart/tool/get_chart_preview.py +++ b/superset/mcp_service/chart/tool/get_chart_preview.py @@ -23,7 +23,7 @@ import logging from typing import Any, Dict, List, Protocol from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.commands.exceptions import CommandException from superset.exceptions import SupersetException diff --git a/superset/mcp_service/chart/tool/list_charts.py b/superset/mcp_service/chart/tool/list_charts.py index 60d8368d069..a3a72ad8166 100644 --- a/superset/mcp_service/chart/tool/list_charts.py +++ b/superset/mcp_service/chart/tool/list_charts.py @@ -23,7 +23,7 @@ import logging from typing import cast, TYPE_CHECKING from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool if TYPE_CHECKING: from superset.models.slice import Slice diff --git a/superset/mcp_service/chart/tool/update_chart.py b/superset/mcp_service/chart/tool/update_chart.py index b8739f37a98..b0a099888e1 100644 --- a/superset/mcp_service/chart/tool/update_chart.py +++ b/superset/mcp_service/chart/tool/update_chart.py @@ -23,7 +23,7 @@ import logging import time from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.chart.chart_utils import ( diff --git a/superset/mcp_service/chart/tool/update_chart_preview.py b/superset/mcp_service/chart/tool/update_chart_preview.py index bf8a98854dd..7ff3d2bc84a 100644 --- a/superset/mcp_service/chart/tool/update_chart_preview.py +++ b/superset/mcp_service/chart/tool/update_chart_preview.py @@ -24,7 +24,7 @@ import time from typing import Any, Dict from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.chart.chart_utils import ( diff --git a/superset/mcp_service/dashboard/tool/add_chart_to_existing_dashboard.py b/superset/mcp_service/dashboard/tool/add_chart_to_existing_dashboard.py index dc35ba6cea9..48b21790465 100644 --- a/superset/mcp_service/dashboard/tool/add_chart_to_existing_dashboard.py +++ b/superset/mcp_service/dashboard/tool/add_chart_to_existing_dashboard.py @@ -25,7 +25,7 @@ import logging from typing import Any, Dict from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.dashboard.constants import ( diff --git a/superset/mcp_service/dashboard/tool/generate_dashboard.py b/superset/mcp_service/dashboard/tool/generate_dashboard.py index c2743b374b9..a34c21beafb 100644 --- a/superset/mcp_service/dashboard/tool/generate_dashboard.py +++ b/superset/mcp_service/dashboard/tool/generate_dashboard.py @@ -25,7 +25,7 @@ import logging from typing import Any, Dict, List from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.dashboard.constants import ( diff --git a/superset/mcp_service/dashboard/tool/get_dashboard_info.py b/superset/mcp_service/dashboard/tool/get_dashboard_info.py index 1ea9cac43c8..de688ee8d8d 100644 --- a/superset/mcp_service/dashboard/tool/get_dashboard_info.py +++ b/superset/mcp_service/dashboard/tool/get_dashboard_info.py @@ -27,7 +27,7 @@ from datetime import datetime, timezone from fastmcp import Context from sqlalchemy.orm import subqueryload -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.dashboards.permalink.exceptions import DashboardPermalinkGetFailedError from superset.dashboards.permalink.types import DashboardPermalinkValue diff --git a/superset/mcp_service/dashboard/tool/list_dashboards.py b/superset/mcp_service/dashboard/tool/list_dashboards.py index 2c503ea8c3e..eaab375d6c8 100644 --- a/superset/mcp_service/dashboard/tool/list_dashboards.py +++ b/superset/mcp_service/dashboard/tool/list_dashboards.py @@ -26,7 +26,7 @@ import logging from typing import TYPE_CHECKING from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool if TYPE_CHECKING: from superset.models.dashboard import Dashboard diff --git a/superset/mcp_service/dataset/tool/get_dataset_info.py b/superset/mcp_service/dataset/tool/get_dataset_info.py index 07a5cf4c09f..07333e837a5 100644 --- a/superset/mcp_service/dataset/tool/get_dataset_info.py +++ b/superset/mcp_service/dataset/tool/get_dataset_info.py @@ -27,7 +27,7 @@ from datetime import datetime, timezone from fastmcp import Context from sqlalchemy.orm import joinedload, subqueryload -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.dataset.schemas import ( diff --git a/superset/mcp_service/dataset/tool/list_datasets.py b/superset/mcp_service/dataset/tool/list_datasets.py index 93f65bf8841..9404b93179d 100644 --- a/superset/mcp_service/dataset/tool/list_datasets.py +++ b/superset/mcp_service/dataset/tool/list_datasets.py @@ -26,7 +26,7 @@ import logging from typing import TYPE_CHECKING from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool if TYPE_CHECKING: from superset.connectors.sqla.models import SqlaTable diff --git a/superset/mcp_service/explore/tool/generate_explore_link.py b/superset/mcp_service/explore/tool/generate_explore_link.py index e2a61ac6393..81e12974824 100644 --- a/superset/mcp_service/explore/tool/generate_explore_link.py +++ b/superset/mcp_service/explore/tool/generate_explore_link.py @@ -26,7 +26,7 @@ from typing import Any, Dict from urllib.parse import parse_qs, urlparse from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.chart.chart_utils import ( diff --git a/superset/mcp_service/sql_lab/tool/execute_sql.py b/superset/mcp_service/sql_lab/tool/execute_sql.py index 3afe7d5d361..b9a79b54b28 100644 --- a/superset/mcp_service/sql_lab/tool/execute_sql.py +++ b/superset/mcp_service/sql_lab/tool/execute_sql.py @@ -28,8 +28,13 @@ import logging from typing import Any from fastmcp import Context -from superset_core.api.mcp import tool -from superset_core.api.types import CacheOptions, QueryOptions, QueryResult, QueryStatus +from superset_core.mcp.decorators import tool +from superset_core.queries.types import ( + CacheOptions, + QueryOptions, + QueryResult, + QueryStatus, +) from superset.errors import ErrorLevel, SupersetError, SupersetErrorType from superset.exceptions import SupersetErrorException, SupersetSecurityException diff --git a/superset/mcp_service/sql_lab/tool/open_sql_lab_with_context.py b/superset/mcp_service/sql_lab/tool/open_sql_lab_with_context.py index 440ed94dc07..cfedc72bd93 100644 --- a/superset/mcp_service/sql_lab/tool/open_sql_lab_with_context.py +++ b/superset/mcp_service/sql_lab/tool/open_sql_lab_with_context.py @@ -25,7 +25,7 @@ import logging from urllib.parse import urlencode from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.sql_lab.schemas import ( diff --git a/superset/mcp_service/system/prompts/quickstart.py b/superset/mcp_service/system/prompts/quickstart.py index d6d729a69bc..4427527029c 100644 --- a/superset/mcp_service/system/prompts/quickstart.py +++ b/superset/mcp_service/system/prompts/quickstart.py @@ -20,7 +20,7 @@ System prompts for general guidance """ from flask import current_app -from superset_core.api.mcp import prompt +from superset_core.mcp.decorators import prompt def _get_app_name() -> str: diff --git a/superset/mcp_service/system/tool/get_instance_info.py b/superset/mcp_service/system/tool/get_instance_info.py index c3a60949442..668b5e44845 100644 --- a/superset/mcp_service/system/tool/get_instance_info.py +++ b/superset/mcp_service/system/tool/get_instance_info.py @@ -23,7 +23,7 @@ InstanceInfoCore for flexible, extensible metrics calculation. import logging from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.mcp_core import InstanceInfoCore diff --git a/superset/mcp_service/system/tool/get_schema.py b/superset/mcp_service/system/tool/get_schema.py index 79c83124ac5..e76ca73d668 100644 --- a/superset/mcp_service/system/tool/get_schema.py +++ b/superset/mcp_service/system/tool/get_schema.py @@ -27,7 +27,7 @@ import logging from typing import Callable, Literal from fastmcp import Context -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.common.schema_discovery import ( diff --git a/superset/mcp_service/system/tool/health_check.py b/superset/mcp_service/system/tool/health_check.py index ed41b225f46..f5393d7cfb7 100644 --- a/superset/mcp_service/system/tool/health_check.py +++ b/superset/mcp_service/system/tool/health_check.py @@ -22,7 +22,7 @@ import logging import platform from flask import current_app -from superset_core.api.mcp import tool +from superset_core.mcp.decorators import tool from superset.extensions import event_logger from superset.mcp_service.system.schemas import HealthCheckResponse diff --git a/superset/models/core.py b/superset/models/core.py index 0a954b36742..612ad6aaf37 100755 --- a/superset/models/core.py +++ b/superset/models/core.py @@ -60,7 +60,7 @@ from sqlalchemy.orm import relationship from sqlalchemy.pool import NullPool from sqlalchemy.schema import UniqueConstraint from sqlalchemy.sql import ColumnElement, expression, Select -from superset_core.api.models import Database as CoreDatabase +from superset_core.common.models import Database as CoreDatabase from superset import db, db_engine_specs, is_feature_enabled from superset.commands.database.exceptions import DatabaseInvalidError @@ -95,7 +95,7 @@ metadata = Model.metadata # pylint: disable=no-member logger = logging.getLogger(__name__) if TYPE_CHECKING: - from superset_core.api.types import AsyncQueryHandle, QueryOptions, QueryResult + from superset_core.queries.types import AsyncQueryHandle, QueryOptions, QueryResult from superset.models.sql_lab import Query diff --git a/superset/models/dashboard.py b/superset/models/dashboard.py index abd477e2045..f38d801719e 100644 --- a/superset/models/dashboard.py +++ b/superset/models/dashboard.py @@ -41,7 +41,7 @@ from sqlalchemy.engine.base import Connection from sqlalchemy.orm import relationship, subqueryload from sqlalchemy.orm.mapper import Mapper from sqlalchemy.sql.elements import BinaryExpression -from superset_core.api.models import Dashboard as CoreDashboard +from superset_core.common.models import Dashboard as CoreDashboard from superset import db, is_feature_enabled, security_manager from superset.connectors.sqla.models import BaseDatasource, SqlaTable diff --git a/superset/models/slice.py b/superset/models/slice.py index dc2450df311..5fce86d79e2 100644 --- a/superset/models/slice.py +++ b/superset/models/slice.py @@ -38,7 +38,7 @@ from sqlalchemy.engine.base import Connection from sqlalchemy.orm import relationship from sqlalchemy.orm.mapper import Mapper from sqlalchemy.sql.elements import BinaryExpression -from superset_core.api.models import Chart as CoreChart +from superset_core.common.models import Chart as CoreChart from superset import db, is_feature_enabled, security_manager from superset.legacy import update_time_range diff --git a/superset/models/sql_lab.py b/superset/models/sql_lab.py index 956d33053bc..7a6b246990d 100644 --- a/superset/models/sql_lab.py +++ b/superset/models/sql_lab.py @@ -46,7 +46,10 @@ from sqlalchemy import ( from sqlalchemy.engine.url import URL from sqlalchemy.orm import backref, relationship from sqlalchemy.sql.elements import ColumnElement, literal_column -from superset_core.api.models import Query as CoreQuery, SavedQuery as CoreSavedQuery +from superset_core.queries.models import ( + Query as CoreQuery, + SavedQuery as CoreSavedQuery, +) from superset import security_manager from superset.exceptions import SupersetParseError, SupersetSecurityException diff --git a/superset/models/task_subscribers.py b/superset/models/task_subscribers.py index 509f5fd17f6..d069c7f3b00 100644 --- a/superset/models/task_subscribers.py +++ b/superset/models/task_subscribers.py @@ -21,7 +21,7 @@ from datetime import datetime, timezone from flask_appbuilder import Model from sqlalchemy import Column, DateTime, ForeignKey, Integer, UniqueConstraint from sqlalchemy.orm import relationship -from superset_core.api.models import TaskSubscriber as CoreTaskSubscriber +from superset_core.tasks.models import TaskSubscriber as CoreTaskSubscriber from superset.models.helpers import AuditMixinNullable diff --git a/superset/models/tasks.py b/superset/models/tasks.py index e7c3992f2bb..679f950aa2b 100644 --- a/superset/models/tasks.py +++ b/superset/models/tasks.py @@ -32,8 +32,8 @@ from sqlalchemy import ( ) from sqlalchemy.orm import relationship from sqlalchemy_utils import UUIDType -from superset_core.api.models import Task as CoreTask -from superset_core.api.tasks import TaskProperties, TaskStatus +from superset_core.tasks.models import Task as CoreTask +from superset_core.tasks.types import TaskProperties, TaskStatus from superset.models.helpers import AuditMixinNullable from superset.models.task_subscribers import TaskSubscriber diff --git a/superset/sql/execution/executor.py b/superset/sql/execution/executor.py index e021920023d..87d9fa671c5 100644 --- a/superset/sql/execution/executor.py +++ b/superset/sql/execution/executor.py @@ -77,7 +77,7 @@ from superset.sql.parse import SQLScript from superset.utils import core as utils if TYPE_CHECKING: - from superset_core.api.types import ( + from superset_core.queries.types import ( AsyncQueryHandle, QueryOptions, QueryResult, @@ -212,7 +212,7 @@ class SQLExecutor: See superset_core.api.models.Database.execute() for full documentation. """ - from superset_core.api.types import ( + from superset_core.queries.types import ( QueryOptions as QueryOptionsType, QueryResult as QueryResultType, QueryStatus, @@ -335,7 +335,7 @@ class SQLExecutor: See superset_core.api.models.Database.execute_async() for full documentation. """ - from superset_core.api.types import ( + from superset_core.queries.types import ( QueryOptions as QueryOptionsType, QueryResult as QueryResultType, QueryStatus, @@ -357,7 +357,7 @@ class SQLExecutor: # DRY RUN: Return transformed SQL as completed async handle if opts.dry_run: - from superset_core.api.types import StatementResult + from superset_core.queries.types import StatementResult original_sqls = [stmt.format() for stmt in original_script.statements] transformed_sqls = [stmt.format() for stmt in transformed_script.statements] @@ -504,7 +504,7 @@ class SQLExecutor: :param query: Query model for progress tracking :returns: List of StatementResult objects """ - from superset_core.api.types import StatementResult + from superset_core.queries.types import StatementResult # Get original statement strings original_sqls = [stmt.format() for stmt in original_script.statements] @@ -601,7 +601,7 @@ class SQLExecutor: statements before the failure :returns: QueryResult with error status """ - from superset_core.api.types import QueryResult as QueryResultType + from superset_core.queries.types import QueryResult as QueryResultType return QueryResultType( status=status, @@ -787,7 +787,7 @@ class SQLExecutor: :param opts: Query options :returns: Cached QueryResult if found, None otherwise """ - from superset_core.api.types import ( + from superset_core.queries.types import ( QueryResult as QueryResultType, QueryStatus, StatementResult, @@ -827,7 +827,7 @@ class SQLExecutor: :param sql: SQL query (for cache key) :param opts: Query options """ - from superset_core.api.types import QueryStatus + from superset_core.queries.types import QueryStatus if result.status != QueryStatus.SUCCESS: return @@ -916,7 +916,7 @@ class SQLExecutor: :param query_id: ID of the Query model :returns: AsyncQueryHandle with configured methods """ - from superset_core.api.types import ( + from superset_core.queries.types import ( AsyncQueryHandle as AsyncQueryHandleType, QueryResult as QueryResultType, QueryStatus, @@ -955,7 +955,7 @@ class SQLExecutor: :param cached_result: The cached QueryResult :returns: AsyncQueryHandle that returns the cached data """ - from superset_core.api.types import ( + from superset_core.queries.types import ( AsyncQueryHandle as AsyncQueryHandleType, QueryResult as QueryResultType, QueryStatus, @@ -986,7 +986,7 @@ class SQLExecutor: @staticmethod def _get_async_query_status(query_id: int) -> Any: """Get the current status of an async query.""" - from superset_core.api.types import QueryStatus as QueryStatusType + from superset_core.queries.types import QueryStatus as QueryStatusType from superset.models.sql_lab import Query as QueryModel @@ -1008,7 +1008,7 @@ class SQLExecutor: def _get_async_query_result(query_id: int) -> Any: """Get the result of an async query.""" import pandas as pd - from superset_core.api.types import ( + from superset_core.queries.types import ( QueryResult as QueryResultType, QueryStatus as QueryStatusType, StatementResult, diff --git a/superset/tags/models.py b/superset/tags/models.py index 879f81c9bc7..25d02e89bf0 100644 --- a/superset/tags/models.py +++ b/superset/tags/models.py @@ -36,7 +36,7 @@ from sqlalchemy.engine.base import Connection from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy.orm.mapper import Mapper from sqlalchemy.schema import UniqueConstraint -from superset_core.api.models import Tag as CoreTag +from superset_core.common.models import Tag as CoreTag from superset import security_manager from superset.models.helpers import AuditMixinNullable diff --git a/superset/tasks/constants.py b/superset/tasks/constants.py index 231859e23cd..b2390c62d79 100644 --- a/superset/tasks/constants.py +++ b/superset/tasks/constants.py @@ -16,7 +16,7 @@ # under the License. """Constants for the Global Task Framework (GTF).""" -from superset_core.api.tasks import TaskStatus +from superset_core.tasks.types import TaskStatus # Terminal states: Task execution has ended and dedup_key slot is freed TERMINAL_STATES: frozenset[str] = frozenset( diff --git a/superset/tasks/context.py b/superset/tasks/context.py index 1bce61462b2..4120edb5524 100644 --- a/superset/tasks/context.py +++ b/superset/tasks/context.py @@ -23,7 +23,7 @@ import traceback from typing import Any, Callable, cast, TYPE_CHECKING, TypeVar from flask import current_app -from superset_core.api.tasks import ( +from superset_core.tasks.types import ( TaskContext as CoreTaskContext, TaskProperties, TaskStatus, diff --git a/superset/tasks/decorators.py b/superset/tasks/decorators.py index fd795af35d5..0e29f84c102 100644 --- a/superset/tasks/decorators.py +++ b/superset/tasks/decorators.py @@ -22,7 +22,7 @@ import inspect import logging from typing import Any, Callable, cast, Generic, ParamSpec, TYPE_CHECKING, TypeVar -from superset_core.api.tasks import TaskOptions, TaskScope, TaskStatus +from superset_core.tasks.types import TaskOptions, TaskScope, TaskStatus from superset import is_feature_enabled from superset.commands.tasks.exceptions import GlobalTaskFrameworkDisabledError diff --git a/superset/tasks/manager.py b/superset/tasks/manager.py index def7bf1e0c1..08dcdc26b99 100644 --- a/superset/tasks/manager.py +++ b/superset/tasks/manager.py @@ -25,7 +25,7 @@ from typing import Any, Callable, TYPE_CHECKING from uuid import UUID import redis -from superset_core.api.tasks import TaskProperties, TaskScope +from superset_core.tasks.types import TaskProperties, TaskScope from superset.async_events.cache_backend import ( RedisCacheBackend, diff --git a/superset/tasks/scheduler.py b/superset/tasks/scheduler.py index 1462850755a..5b38048adf1 100644 --- a/superset/tasks/scheduler.py +++ b/superset/tasks/scheduler.py @@ -25,7 +25,7 @@ from celery import Task from celery.exceptions import SoftTimeLimitExceeded from celery.signals import task_failure from flask import current_app -from superset_core.api.tasks import TaskStatus +from superset_core.tasks.types import TaskStatus from superset import is_feature_enabled from superset.commands.exceptions import CommandException diff --git a/superset/tasks/utils.py b/superset/tasks/utils.py index 5316e7334cf..e853c4a4419 100644 --- a/superset/tasks/utils.py +++ b/superset/tasks/utils.py @@ -26,7 +26,7 @@ from uuid import UUID, uuid4 from celery.utils.log import get_task_logger from flask import g -from superset_core.api.tasks import TaskProperties, TaskScope +from superset_core.tasks.types import TaskProperties, TaskScope from superset.tasks.exceptions import ExecutorNotFoundError, InvalidExecutorError from superset.tasks.types import ( diff --git a/tests/integration_tests/tasks/api_tests.py b/tests/integration_tests/tasks/api_tests.py index 37e96a60bc3..6744a9140a8 100644 --- a/tests/integration_tests/tasks/api_tests.py +++ b/tests/integration_tests/tasks/api_tests.py @@ -20,7 +20,7 @@ from contextlib import contextmanager from typing import Generator import prison -from superset_core.api.tasks import TaskStatus +from superset_core.tasks.types import TaskStatus from superset import db from superset.models.tasks import Task @@ -49,7 +49,7 @@ class TestTaskApi(SupersetTestCase): # Use tasks in test # Cleanup happens automatically even if test fails """ - from superset_core.api.tasks import TaskScope + from superset_core.tasks.types import TaskScope from superset.daos.tasks import TaskDAO diff --git a/tests/integration_tests/tasks/commands/test_cancel.py b/tests/integration_tests/tasks/commands/test_cancel.py index 7d0aa06a485..d914153d940 100644 --- a/tests/integration_tests/tasks/commands/test_cancel.py +++ b/tests/integration_tests/tasks/commands/test_cancel.py @@ -19,7 +19,7 @@ from unittest.mock import patch from uuid import UUID, uuid4 import pytest -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset import db from superset.commands.tasks.cancel import CancelTaskCommand diff --git a/tests/integration_tests/tasks/commands/test_internal_update.py b/tests/integration_tests/tasks/commands/test_internal_update.py index b4c8ee56c93..65ca37951c8 100644 --- a/tests/integration_tests/tasks/commands/test_internal_update.py +++ b/tests/integration_tests/tasks/commands/test_internal_update.py @@ -18,7 +18,7 @@ from uuid import UUID -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset import db from superset.commands.tasks.internal_update import ( diff --git a/tests/integration_tests/tasks/commands/test_prune.py b/tests/integration_tests/tasks/commands/test_prune.py index 0706319951d..5143ce8f07f 100644 --- a/tests/integration_tests/tasks/commands/test_prune.py +++ b/tests/integration_tests/tasks/commands/test_prune.py @@ -19,7 +19,7 @@ from datetime import datetime, timezone from unittest.mock import patch from freezegun import freeze_time -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset import db from superset.commands.tasks import TaskPruneCommand diff --git a/tests/integration_tests/tasks/commands/test_submit.py b/tests/integration_tests/tasks/commands/test_submit.py index 35290e12c2f..286701e9c28 100644 --- a/tests/integration_tests/tasks/commands/test_submit.py +++ b/tests/integration_tests/tasks/commands/test_submit.py @@ -17,7 +17,7 @@ import pytest -from superset_core.api.tasks import TaskStatus +from superset_core.tasks.types import TaskStatus from superset import db from superset.commands.tasks import SubmitTaskCommand diff --git a/tests/integration_tests/tasks/commands/test_update.py b/tests/integration_tests/tasks/commands/test_update.py index 8ace6360efc..63264bf717e 100644 --- a/tests/integration_tests/tasks/commands/test_update.py +++ b/tests/integration_tests/tasks/commands/test_update.py @@ -18,7 +18,7 @@ from uuid import UUID import pytest -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset import db from superset.commands.tasks import UpdateTaskCommand diff --git a/tests/integration_tests/tasks/test_event_handlers.py b/tests/integration_tests/tasks/test_event_handlers.py index 7c7aacd15ed..72ff4c55258 100644 --- a/tests/integration_tests/tasks/test_event_handlers.py +++ b/tests/integration_tests/tasks/test_event_handlers.py @@ -26,7 +26,7 @@ from __future__ import annotations import uuid from typing import Any -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset.commands.tasks.cancel import CancelTaskCommand from superset.daos.tasks import TaskDAO diff --git a/tests/integration_tests/tasks/test_subscription_visibility.py b/tests/integration_tests/tasks/test_subscription_visibility.py index e60ff20c4b9..6efcdd37114 100644 --- a/tests/integration_tests/tasks/test_subscription_visibility.py +++ b/tests/integration_tests/tasks/test_subscription_visibility.py @@ -18,7 +18,7 @@ from uuid import uuid4 -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset import db from superset.commands.tasks import SubmitTaskCommand diff --git a/tests/integration_tests/tasks/test_sync_join_wait.py b/tests/integration_tests/tasks/test_sync_join_wait.py index ff00958cf5e..2483c57cd85 100644 --- a/tests/integration_tests/tasks/test_sync_join_wait.py +++ b/tests/integration_tests/tasks/test_sync_join_wait.py @@ -19,7 +19,7 @@ import time -from superset_core.api.tasks import TaskStatus +from superset_core.tasks.types import TaskStatus from superset import db from superset.commands.tasks import SubmitTaskCommand diff --git a/tests/integration_tests/tasks/test_throttling.py b/tests/integration_tests/tasks/test_throttling.py index a0e77ba041b..68303228b8b 100644 --- a/tests/integration_tests/tasks/test_throttling.py +++ b/tests/integration_tests/tasks/test_throttling.py @@ -26,7 +26,7 @@ from __future__ import annotations import time import uuid -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset.daos.tasks import TaskDAO from superset.extensions import db diff --git a/tests/integration_tests/tasks/test_timeout.py b/tests/integration_tests/tasks/test_timeout.py index efd92ffd80e..5236e723b97 100644 --- a/tests/integration_tests/tasks/test_timeout.py +++ b/tests/integration_tests/tasks/test_timeout.py @@ -30,7 +30,7 @@ import uuid from typing import Any import pytest -from superset_core.api.tasks import TaskScope, TaskStatus +from superset_core.tasks.types import TaskScope, TaskStatus from superset.commands.tasks.cancel import CancelTaskCommand from superset.daos.tasks import TaskDAO diff --git a/tests/unit_tests/dao/base_dao_test.py b/tests/unit_tests/dao/base_dao_test.py index eb7d20adfd0..26eadee9a7a 100644 --- a/tests/unit_tests/dao/base_dao_test.py +++ b/tests/unit_tests/dao/base_dao_test.py @@ -25,7 +25,7 @@ import pytest from sqlalchemy import Boolean, Column, Integer, String from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.ext.declarative import declarative_base -from superset_core.api.models import CoreModel +from superset_core.common.models import CoreModel from superset.daos.base import BaseDAO, ColumnOperatorEnum from superset.daos.exceptions import DAOFindFailedError diff --git a/tests/unit_tests/daos/test_tasks.py b/tests/unit_tests/daos/test_tasks.py index 8d767a17373..8a5d77c69ed 100644 --- a/tests/unit_tests/daos/test_tasks.py +++ b/tests/unit_tests/daos/test_tasks.py @@ -20,7 +20,7 @@ from uuid import UUID import pytest from sqlalchemy.orm.session import Session -from superset_core.api.tasks import TaskProperties, TaskScope, TaskStatus +from superset_core.tasks.types import TaskProperties, TaskScope, TaskStatus from superset.commands.tasks.exceptions import TaskNotAbortableError from superset.models.tasks import Task diff --git a/tests/unit_tests/mcp_service/sql_lab/tool/test_execute_sql.py b/tests/unit_tests/mcp_service/sql_lab/tool/test_execute_sql.py index 77f7f18d82a..c9d01def8f9 100644 --- a/tests/unit_tests/mcp_service/sql_lab/tool/test_execute_sql.py +++ b/tests/unit_tests/mcp_service/sql_lab/tool/test_execute_sql.py @@ -30,7 +30,7 @@ import pandas as pd import pytest from fastmcp import Client from fastmcp.exceptions import ToolError -from superset_core.api.types import QueryResult, QueryStatus, StatementResult +from superset_core.queries.types import QueryResult, QueryStatus, StatementResult from superset.mcp_service.app import mcp diff --git a/tests/unit_tests/sql/execution/test_executor.py b/tests/unit_tests/sql/execution/test_executor.py index 8cfd87e2ead..18b814a54d9 100644 --- a/tests/unit_tests/sql/execution/test_executor.py +++ b/tests/unit_tests/sql/execution/test_executor.py @@ -37,7 +37,7 @@ import pandas as pd import pytest from flask import current_app from pytest_mock import MockerFixture -from superset_core.api.types import ( +from superset_core.queries.types import ( CacheOptions, QueryOptions, QueryStatus, @@ -1907,7 +1907,7 @@ def test_store_in_cache_with_failed_status( mocker: MockerFixture, database: Database, app_context: None ) -> None: """Test that failed queries are not cached.""" - from superset_core.api.types import QueryResult as QueryResultType + from superset_core.queries.types import QueryResult as QueryResultType from superset.sql.execution.executor import SQLExecutor @@ -1930,7 +1930,10 @@ def test_store_in_cache_with_no_data( mocker: MockerFixture, database: Database, app_context: None ) -> None: """Test that DML queries (with no data) are cached.""" - from superset_core.api.types import QueryResult as QueryResultType, StatementResult + from superset_core.queries.types import ( + QueryResult as QueryResultType, + StatementResult, + ) from superset.sql.execution.executor import SQLExecutor @@ -1960,7 +1963,10 @@ def test_create_cached_async_result_cancel( mocker: MockerFixture, database: Database, app_context: None ) -> None: """Test that cached async result cancel returns False.""" - from superset_core.api.types import QueryResult as QueryResultType, StatementResult + from superset_core.queries.types import ( + QueryResult as QueryResultType, + StatementResult, + ) from superset.sql.execution.executor import SQLExecutor @@ -2144,7 +2150,10 @@ def test_cached_async_result_get_result_returns_cached( mocker: MockerFixture, database: Database, app_context: None ) -> None: """Test that cached async result returns the original cached result.""" - from superset_core.api.types import QueryResult as QueryResultType, StatementResult + from superset_core.queries.types import ( + QueryResult as QueryResultType, + StatementResult, + ) from superset.sql.execution.executor import SQLExecutor diff --git a/tests/unit_tests/tasks/test_decorators.py b/tests/unit_tests/tasks/test_decorators.py index e998fbeeada..9e0818b6576 100644 --- a/tests/unit_tests/tasks/test_decorators.py +++ b/tests/unit_tests/tasks/test_decorators.py @@ -20,7 +20,7 @@ from unittest.mock import MagicMock, patch from uuid import UUID import pytest -from superset_core.api.tasks import TaskOptions, TaskScope +from superset_core.tasks.types import TaskOptions, TaskScope from superset.commands.tasks.exceptions import GlobalTaskFrameworkDisabledError from superset.tasks.decorators import task, TaskWrapper diff --git a/tests/unit_tests/tasks/test_handlers.py b/tests/unit_tests/tasks/test_handlers.py index 7c29a961a89..9e50e82ea7b 100644 --- a/tests/unit_tests/tasks/test_handlers.py +++ b/tests/unit_tests/tasks/test_handlers.py @@ -23,7 +23,7 @@ from uuid import UUID import pytest from freezegun import freeze_time -from superset_core.api.tasks import TaskStatus +from superset_core.tasks.types import TaskStatus from superset.tasks.context import TaskContext diff --git a/tests/unit_tests/tasks/test_timeout.py b/tests/unit_tests/tasks/test_timeout.py index 002166fc370..f66d55e5a17 100644 --- a/tests/unit_tests/tasks/test_timeout.py +++ b/tests/unit_tests/tasks/test_timeout.py @@ -21,7 +21,7 @@ from unittest.mock import MagicMock, patch from uuid import UUID import pytest -from superset_core.api.tasks import TaskOptions, TaskScope +from superset_core.tasks.types import TaskOptions, TaskScope from superset.tasks.context import TaskContext from superset.tasks.decorators import TaskWrapper diff --git a/tests/unit_tests/tasks/test_utils.py b/tests/unit_tests/tasks/test_utils.py index bd5fb828244..e0ca86b107c 100644 --- a/tests/unit_tests/tasks/test_utils.py +++ b/tests/unit_tests/tasks/test_utils.py @@ -22,7 +22,7 @@ from typing import Any, Optional, Union import pytest from flask_appbuilder.security.sqla.models import User -from superset_core.api.tasks import TaskScope +from superset_core.tasks.types import TaskScope from superset.tasks.exceptions import ExecutorNotFoundError, InvalidExecutorError from superset.tasks.types import Executor, ExecutorType, FixedExecutor