mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore(superset-core): move ui to new core (#35308)
This commit is contained in:
committed by
GitHub
parent
728bc2c632
commit
9546ee37e5
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
import { Global } from '@emotion/react';
|
||||
import { css } from '@superset-ui/core';
|
||||
import { css } from '@apache-superset/core/ui';
|
||||
|
||||
export const SqlLabGlobalStyles = () => (
|
||||
<Global
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import type { IAceEditor } from 'react-ace/lib/types';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import { css, usePrevious, useTheme } from '@superset-ui/core';
|
||||
import { usePrevious } from '@superset-ui/core';
|
||||
import { css, useTheme } from '@apache-superset/core/ui';
|
||||
import { Global } from '@emotion/react';
|
||||
|
||||
import { SQL_EDITOR_LEFTBAR_WIDTH } from 'src/SqlLab/constants';
|
||||
|
||||
@@ -20,7 +20,8 @@ import { PureComponent } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
import Mousetrap from 'mousetrap';
|
||||
import { css, styled, t } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { css, styled } from '@apache-superset/core/ui';
|
||||
import { throttle } from 'lodash';
|
||||
import {
|
||||
LOCALSTORAGE_MAX_USAGE_KB,
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
*/
|
||||
import { ReactNode } from 'react';
|
||||
import { ClassNames } from '@emotion/react';
|
||||
import { styled, useTheme, t } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { styled, useTheme } from '@apache-superset/core/ui';
|
||||
import { Flex, Tooltip } from '@superset-ui/core/components';
|
||||
|
||||
const StyledTooltip = (props: any) => {
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
*/
|
||||
import { useMemo } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { css, styled, t } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { css, styled, Alert } from '@apache-superset/core/ui';
|
||||
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
Loading,
|
||||
ModalTrigger,
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { FC } from 'react';
|
||||
import { styled, t, css } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { styled, css } from '@apache-superset/core/ui';
|
||||
import { ModalTrigger } from '@superset-ui/core/components';
|
||||
import { detectOS } from 'src/utils/common';
|
||||
|
||||
|
||||
@@ -21,14 +21,8 @@ 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,
|
||||
styled,
|
||||
css,
|
||||
FeatureFlag,
|
||||
isFeatureEnabled,
|
||||
useTheme,
|
||||
} from '@superset-ui/core';
|
||||
import { t, FeatureFlag, isFeatureEnabled } from '@superset-ui/core';
|
||||
import { styled, css, useTheme } from '@apache-superset/core/ui';
|
||||
import QueryTable from 'src/SqlLab/components/QueryTable';
|
||||
import { SqlLabRootState } from 'src/SqlLab/types';
|
||||
import { useEditorQueriesQuery } from 'src/hooks/apiResources/queries';
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
*/
|
||||
import { Label } from '@superset-ui/core/components';
|
||||
import { STATE_TYPE_MAP, STATE_TYPE_MAP_LOCALIZED } from 'src/SqlLab/constants';
|
||||
import { styled, Query } from '@superset-ui/core';
|
||||
import { Query } from '@superset-ui/core';
|
||||
import { styled } from '@apache-superset/core/ui';
|
||||
|
||||
interface QueryStateLabelProps {
|
||||
query: Pick<Query, 'state'>;
|
||||
|
||||
@@ -27,7 +27,8 @@ import {
|
||||
TableView,
|
||||
} from '@superset-ui/core/components';
|
||||
import ProgressBar from '@superset-ui/core/components/ProgressBar';
|
||||
import { t, useTheme, QueryResponse } from '@superset-ui/core';
|
||||
import { t, QueryResponse } from '@superset-ui/core';
|
||||
import { useTheme } from '@apache-superset/core/ui';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
|
||||
import {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { styled, css } from '@superset-ui/core';
|
||||
import { styled, css } from '@apache-superset/core/ui';
|
||||
import { IconTooltip } from '@superset-ui/core/components';
|
||||
|
||||
export const StaticPosition = css`
|
||||
|
||||
@@ -30,7 +30,6 @@ import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { pick } from 'lodash';
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
ButtonGroup,
|
||||
Tooltip,
|
||||
@@ -47,16 +46,14 @@ import {
|
||||
import { nanoid } from 'nanoid';
|
||||
import {
|
||||
QueryState,
|
||||
styled,
|
||||
t,
|
||||
tn,
|
||||
useTheme,
|
||||
usePrevious,
|
||||
css,
|
||||
getNumberFormatter,
|
||||
getExtensionsRegistry,
|
||||
ErrorTypeEnum,
|
||||
} from '@superset-ui/core';
|
||||
import { styled, useTheme, css, Alert } from '@apache-superset/core/ui';
|
||||
import {
|
||||
ISaveableDatasource,
|
||||
ISimpleColumn,
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
*/
|
||||
import { useMemo, FC, ReactElement } from 'react';
|
||||
|
||||
import { t, styled, useTheme, SupersetTheme } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { styled, useTheme, SupersetTheme } from '@apache-superset/core/ui';
|
||||
|
||||
import { Button, DropdownButton } from '@superset-ui/core/components';
|
||||
import { IconType, Icons } from '@superset-ui/core/components/Icons';
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { t, useTheme } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { useTheme } from '@apache-superset/core/ui';
|
||||
import { Icons } from '@superset-ui/core/components/Icons';
|
||||
import { Button, DropdownButton } from '@superset-ui/core/components';
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ import {
|
||||
Flex,
|
||||
} from '@superset-ui/core/components';
|
||||
import {
|
||||
styled,
|
||||
t,
|
||||
SupersetClient,
|
||||
JsonResponse,
|
||||
@@ -43,6 +42,7 @@ import {
|
||||
isFeatureEnabled,
|
||||
getClientErrorObject,
|
||||
} from '@superset-ui/core';
|
||||
import { styled } from '@apache-superset/core/ui';
|
||||
import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates';
|
||||
import { useSelector, useDispatch } from 'react-redux';
|
||||
import rison from 'rison';
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
*/
|
||||
import { useState, useEffect, useMemo, ChangeEvent } from 'react';
|
||||
import type { DatabaseObject } from 'src/features/databases/types';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { styled } from '@apache-superset/core/ui';
|
||||
import {
|
||||
Input,
|
||||
Button,
|
||||
|
||||
@@ -21,7 +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, styled } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { styled } from '@apache-superset/core/ui';
|
||||
import { parseDate } from 'chrono-node';
|
||||
import {
|
||||
ModalTrigger,
|
||||
|
||||
@@ -16,12 +16,8 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import {
|
||||
t,
|
||||
getClientErrorObject,
|
||||
SupersetClient,
|
||||
css,
|
||||
} from '@superset-ui/core';
|
||||
import { t, getClientErrorObject, SupersetClient } from '@superset-ui/core';
|
||||
import { css } from '@apache-superset/core/ui';
|
||||
import { Button } from '@superset-ui/core/components';
|
||||
import { CopyToClipboard } from 'src/components';
|
||||
import { Icons } from '@superset-ui/core/components/Icons';
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
*/
|
||||
import { FC } from 'react';
|
||||
import { shallowEqual, useSelector } from 'react-redux';
|
||||
import { Alert, EmptyState } from '@superset-ui/core/components';
|
||||
import { FeatureFlag, styled, t, isFeatureEnabled } from '@superset-ui/core';
|
||||
import { EmptyState } from '@superset-ui/core/components';
|
||||
import { FeatureFlag, t, isFeatureEnabled } from '@superset-ui/core';
|
||||
import { styled, Alert } from '@apache-superset/core/ui';
|
||||
|
||||
import { SqlLabRootState } from 'src/SqlLab/types';
|
||||
import ResultSet from '../ResultSet';
|
||||
|
||||
@@ -20,7 +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 { css, styled, t, useTheme } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { css, styled, useTheme } from '@apache-superset/core/ui';
|
||||
|
||||
import { removeTables, setActiveSouthPaneTab } from 'src/SqlLab/actions/sqlLab';
|
||||
|
||||
|
||||
@@ -33,16 +33,14 @@ import useEffectEvent from 'src/hooks/useEffectEvent';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import AutoSizer from 'react-virtualized-auto-sizer';
|
||||
import {
|
||||
css,
|
||||
FeatureFlag,
|
||||
isFeatureEnabled,
|
||||
styled,
|
||||
t,
|
||||
useTheme,
|
||||
getExtensionsRegistry,
|
||||
QueryResponse,
|
||||
Query,
|
||||
} from '@superset-ui/core';
|
||||
import { css, styled, useTheme, Alert } from '@apache-superset/core/ui';
|
||||
import type {
|
||||
QueryEditor,
|
||||
SqlLabRootState,
|
||||
@@ -52,7 +50,6 @@ import type { DatabaseObject } from 'src/features/databases/types';
|
||||
import { debounce, isEmpty, noop } from 'lodash';
|
||||
import Mousetrap from 'mousetrap';
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
Dropdown,
|
||||
EmptyState,
|
||||
|
||||
@@ -34,7 +34,8 @@ import {
|
||||
} from 'src/SqlLab/actions/sqlLab';
|
||||
import { Button, EmptyState, Icons } from '@superset-ui/core/components';
|
||||
import { type DatabaseObject } from 'src/components';
|
||||
import { t, styled, css } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { styled, css } from '@apache-superset/core/ui';
|
||||
import { TableSelectorMultiple } from 'src/components/TableSelector';
|
||||
import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor';
|
||||
import {
|
||||
|
||||
@@ -22,14 +22,8 @@ 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 {
|
||||
styled,
|
||||
css,
|
||||
t,
|
||||
QueryState,
|
||||
SupersetTheme,
|
||||
useTheme,
|
||||
} from '@superset-ui/core';
|
||||
import { t, QueryState } from '@superset-ui/core';
|
||||
import { styled, css, SupersetTheme, useTheme } from '@apache-superset/core/ui';
|
||||
import {
|
||||
removeQueryEditor,
|
||||
removeAllOtherQueryEditors,
|
||||
|
||||
@@ -22,13 +22,8 @@ import { EditableTabs } from '@superset-ui/core/components/Tabs';
|
||||
import { connect } from 'react-redux';
|
||||
import URI from 'urijs';
|
||||
import type { QueryEditor, SqlLabRootState } from 'src/SqlLab/types';
|
||||
import {
|
||||
FeatureFlag,
|
||||
styled,
|
||||
t,
|
||||
isFeatureEnabled,
|
||||
css,
|
||||
} from '@superset-ui/core';
|
||||
import { FeatureFlag, t, isFeatureEnabled } from '@superset-ui/core';
|
||||
import { styled, css } from '@apache-superset/core/ui';
|
||||
import { Logger } from 'src/logger/LogUtils';
|
||||
import { EmptyState, Tooltip } from '@superset-ui/core/components';
|
||||
import { detectOS } from 'src/utils/common';
|
||||
|
||||
@@ -31,7 +31,8 @@ import {
|
||||
type CollapseProps,
|
||||
} from '@superset-ui/core/components';
|
||||
import { CopyToClipboard } from 'src/components';
|
||||
import { t, styled, useTheme } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { styled, useTheme } from '@apache-superset/core/ui';
|
||||
import { debounce } from 'lodash';
|
||||
|
||||
import {
|
||||
|
||||
@@ -19,17 +19,10 @@
|
||||
import { type FC, useCallback, useMemo, useRef, useState } from 'react';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import { nanoid } from 'nanoid';
|
||||
import {
|
||||
ClientErrorObject,
|
||||
css,
|
||||
getExtensionsRegistry,
|
||||
styled,
|
||||
t,
|
||||
useTheme,
|
||||
} from '@superset-ui/core';
|
||||
import { ClientErrorObject, getExtensionsRegistry, t } from '@superset-ui/core';
|
||||
import { css, styled, Alert, useTheme } from '@apache-superset/core/ui';
|
||||
import {
|
||||
SafeMarkdown,
|
||||
Alert,
|
||||
Breadcrumb,
|
||||
Card,
|
||||
Skeleton,
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { useState, useEffect } from 'react';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { styled } from '@apache-superset/core/ui';
|
||||
import { debounce } from 'lodash';
|
||||
import {
|
||||
Badge,
|
||||
|
||||
Reference in New Issue
Block a user