mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
refactor: move translations and logging to new core (#36929)
This commit is contained in:
committed by
GitHub
parent
0294c30c9e
commit
e9b6791ffb
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { styled } from '@apache-superset/core/ui';
|
||||
import { SafeMarkdown } from '@superset-ui/core/components';
|
||||
import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates';
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
ControlPanelConfig,
|
||||
getStandardizedControls,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { allColumnsControlSetItem } from './controls/columns';
|
||||
import { groupByControlSetItem } from './controls/groupBy';
|
||||
import { handlebarsTemplateControlSetItem } from './controls/handlebarTemplate';
|
||||
|
||||
@@ -23,7 +23,8 @@ import {
|
||||
Dataset,
|
||||
ColumnMeta,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { ensureIsArray, t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { ensureIsArray } from '@superset-ui/core';
|
||||
import { getQueryMode, isRawMode } from './shared';
|
||||
|
||||
const dndAllColumns: typeof sharedControls.groupby = {
|
||||
|
||||
@@ -21,7 +21,8 @@ import {
|
||||
CustomControlConfig,
|
||||
sharedControls,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { t, validateNonEmpty } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { validateNonEmpty } from '@superset-ui/core';
|
||||
import { useTheme } from '@apache-superset/core/ui';
|
||||
import { InfoTooltip, SafeMarkdown } from '@superset-ui/core/components';
|
||||
import { CodeEditor } from '../../components/CodeEditor/CodeEditor';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { ControlSetItem } from '@superset-ui/chart-controls';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { isAggMode } from './shared';
|
||||
|
||||
export const includeTimeControlSetItem: ControlSetItem = {
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
ColumnMeta,
|
||||
defineSavedMetrics,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { getQueryMode, isAggMode, validateAggControlValues } from './shared';
|
||||
|
||||
const percentMetrics: typeof sharedControls.metrics = {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { ControlSetItem, Dataset } from '@superset-ui/chart-controls';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { isAggMode, isRawMode } from './shared';
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ import {
|
||||
ControlSetItem,
|
||||
QueryModeLabel,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { QueryMode, t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { QueryMode } from '@superset-ui/core';
|
||||
import { getQueryMode } from './shared';
|
||||
|
||||
const queryMode: ControlConfig<'RadioButtonControl'> = {
|
||||
|
||||
@@ -20,12 +20,8 @@ import {
|
||||
ControlPanelsContainerProps,
|
||||
ControlStateMapping,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import {
|
||||
ensureIsArray,
|
||||
QueryFormColumn,
|
||||
QueryMode,
|
||||
t,
|
||||
} from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { ensureIsArray, QueryFormColumn, QueryMode } from '@superset-ui/core';
|
||||
|
||||
export function getQueryMode(controls: ControlStateMapping): QueryMode {
|
||||
const mode = controls?.query_mode?.value;
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
CustomControlConfig,
|
||||
sharedControls,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { useTheme } from '@apache-superset/core/ui';
|
||||
import { InfoTooltip } from '@superset-ui/core/components';
|
||||
import { CodeEditor } from '../../components/CodeEditor/CodeEditor';
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { ChartMetadata, ChartPlugin, t } from '@superset-ui/core';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { ChartMetadata, ChartPlugin } from '@superset-ui/core';
|
||||
import thumbnail from '../images/thumbnail.png';
|
||||
import thumbnailDark from '../images/thumbnail-dark.png';
|
||||
import example1 from '../images/example1.jpg';
|
||||
|
||||
Reference in New Issue
Block a user