diff --git a/superset-frontend/packages/superset-core/package.json b/superset-frontend/packages/superset-core/package.json index f7d31223e81f..fd900b2f5598 100644 --- a/superset-frontend/packages/superset-core/package.json +++ b/superset-frontend/packages/superset-core/package.json @@ -43,7 +43,8 @@ "react-loadable": "^5.5.0", "tinycolor2": "*", "lodash": "^4.17.21", - "antd": "^5.26.0" + "antd": "^5.26.0", + "jed": "^1.1.1" }, "scripts": { "clean": "rm -rf lib tsconfig.tsbuildinfo", diff --git a/superset-frontend/packages/superset-core/src/index.ts b/superset-frontend/packages/superset-core/src/index.ts index e570f52292a8..b02156449f21 100644 --- a/superset-frontend/packages/superset-core/src/index.ts +++ b/superset-frontend/packages/superset-core/src/index.ts @@ -18,3 +18,4 @@ */ export * from './api'; export * from './ui'; +export * from './utils'; diff --git a/superset-frontend/packages/superset-core/src/spec/utils/logging.test.ts b/superset-frontend/packages/superset-core/src/spec/utils/logging.test.ts new file mode 100644 index 000000000000..024889ce5e7c --- /dev/null +++ b/superset-frontend/packages/superset-core/src/spec/utils/logging.test.ts @@ -0,0 +1,69 @@ +/** + * 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. + */ +beforeEach(() => { + jest.resetModules(); + jest.resetAllMocks(); +}); + +it('should pipe to `console` methods', () => { + const { logging } = require('@apache-superset/core'); + + jest.spyOn(logging, 'debug').mockImplementation(); + jest.spyOn(logging, 'log').mockImplementation(); + jest.spyOn(logging, 'info').mockImplementation(); + expect(() => { + logging.debug(); + logging.log(); + logging.info(); + }).not.toThrow(); + + jest.spyOn(logging, 'warn').mockImplementation(() => { + throw new Error('warn'); + }); + expect(() => logging.warn()).toThrow('warn'); + + jest.spyOn(logging, 'error').mockImplementation(() => { + throw new Error('error'); + }); + expect(() => logging.error()).toThrow('error'); + + jest.spyOn(logging, 'trace').mockImplementation(() => { + throw new Error('Trace:'); + }); + expect(() => logging.trace()).toThrow('Trace:'); +}); + +it('should use noop functions when console unavailable', () => { + Object.assign(window, { console: undefined }); + const { logging } = require('@apache-superset/core'); + + expect(() => { + logging.debug(); + logging.log(); + logging.info(); + logging.warn('warn'); + logging.error('error'); + logging.trace(); + logging.table([ + [1, 2], + [3, 4], + ]); + }).not.toThrow(); + Object.assign(window, { console }); +}); diff --git a/superset-frontend/packages/superset-core/src/ui/index.ts b/superset-frontend/packages/superset-core/src/ui/index.ts index 82cb0634d5e4..ba78535d95de 100644 --- a/superset-frontend/packages/superset-core/src/ui/index.ts +++ b/superset-frontend/packages/superset-core/src/ui/index.ts @@ -18,3 +18,4 @@ */ export * from './theme'; export * from './components'; +export * from './translation'; diff --git a/superset-frontend/packages/superset-ui-core/src/translation/README.md b/superset-frontend/packages/superset-core/src/ui/translation/README.md similarity index 100% rename from superset-frontend/packages/superset-ui-core/src/translation/README.md rename to superset-frontend/packages/superset-core/src/ui/translation/README.md diff --git a/superset-frontend/packages/superset-ui-core/src/translation/Translator.ts b/superset-frontend/packages/superset-core/src/ui/translation/Translator.ts similarity index 98% rename from superset-frontend/packages/superset-ui-core/src/translation/Translator.ts rename to superset-frontend/packages/superset-core/src/ui/translation/Translator.ts index bf27ec7ce4fb..52283a7294e4 100644 --- a/superset-frontend/packages/superset-ui-core/src/translation/Translator.ts +++ b/superset-frontend/packages/superset-core/src/ui/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-ui-core/src/translation/TranslatorSingleton.ts b/superset-frontend/packages/superset-core/src/ui/translation/TranslatorSingleton.ts similarity index 100% rename from superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts rename to superset-frontend/packages/superset-core/src/ui/translation/TranslatorSingleton.ts diff --git a/superset-frontend/packages/superset-ui-core/src/translation/index.ts b/superset-frontend/packages/superset-core/src/ui/translation/index.ts similarity index 94% rename from superset-frontend/packages/superset-ui-core/src/translation/index.ts rename to superset-frontend/packages/superset-core/src/ui/translation/index.ts index 216bf5847595..c9efc51d0cb6 100644 --- a/superset-frontend/packages/superset-ui-core/src/translation/index.ts +++ b/superset-frontend/packages/superset-core/src/ui/translation/index.ts @@ -19,6 +19,7 @@ export * from './TranslatorSingleton'; export * from './types'; +export { default as Translator } from './Translator'; export default {}; diff --git a/superset-frontend/packages/superset-ui-core/src/translation/types/index.ts b/superset-frontend/packages/superset-core/src/ui/translation/types/index.ts similarity index 100% rename from superset-frontend/packages/superset-ui-core/src/translation/types/index.ts rename to superset-frontend/packages/superset-core/src/ui/translation/types/index.ts diff --git a/superset-frontend/packages/superset-ui-core/src/translation/types/jed.ts b/superset-frontend/packages/superset-core/src/ui/translation/types/jed.ts similarity index 100% rename from superset-frontend/packages/superset-ui-core/src/translation/types/jed.ts rename to superset-frontend/packages/superset-core/src/ui/translation/types/jed.ts diff --git a/superset-frontend/packages/superset-ui-core/test/translation/languagePacks/zh.ts b/superset-frontend/packages/superset-core/src/utils/index.ts similarity index 68% rename from superset-frontend/packages/superset-ui-core/test/translation/languagePacks/zh.ts rename to superset-frontend/packages/superset-core/src/utils/index.ts index 420a2bda1e41..724adae62495 100644 --- a/superset-frontend/packages/superset-ui-core/test/translation/languagePacks/zh.ts +++ b/superset-frontend/packages/superset-core/src/utils/index.ts @@ -1,4 +1,4 @@ -/* +/** * 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 @@ -17,21 +17,4 @@ * under the License. */ -import { LanguagePack } from '@superset-ui/core'; - -const languagePack: LanguagePack = { - domain: 'superset', - locale_data: { - superset: { - '': { - domain: 'superset', - plural_forms: 'nplurals=1; plural=0;', - lang: 'zh', - }, - second: ['秒'], - 'Copy of %s': ['%s 的副本'], - }, - }, -}; - -export default languagePack; +export { default as logging } from './logging'; diff --git a/superset-frontend/packages/superset-ui-core/src/utils/logging.ts b/superset-frontend/packages/superset-core/src/utils/logging.ts similarity index 95% rename from superset-frontend/packages/superset-ui-core/src/utils/logging.ts rename to superset-frontend/packages/superset-core/src/utils/logging.ts index 929c4d0fb9a3..230dbdf2bddd 100644 --- a/superset-frontend/packages/superset-ui-core/src/utils/logging.ts +++ b/superset-frontend/packages/superset-core/src/utils/logging.ts @@ -31,7 +31,7 @@ const logger = { }; /** - * Superset frontend logger, currently just an alias to console. + * Superset logger, currently just an alias to console. * This may be extended to support numerous console operations safely * i.e.: https://developer.mozilla.org/en-US/docs/Web/API/Console */ diff --git a/superset-frontend/packages/superset-ui-core/types/external.d.ts b/superset-frontend/packages/superset-core/types/external.d.ts similarity index 100% rename from superset-frontend/packages/superset-ui-core/types/external.d.ts rename to superset-frontend/packages/superset-core/types/external.d.ts 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 55ddae91e9c1..82de6b7cecc0 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,7 +17,7 @@ * under the License. */ import { kebabCase } from 'lodash'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme, styled } from '@apache-superset/core/ui'; import { Tooltip } from '@superset-ui/core/components'; 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 94984be48880..8487b865f45a 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,7 +18,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { GenericDataType } from '@apache-superset/core/api/core'; import { 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 d725dcb9efba..009d3bc35c22 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,7 +17,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css } from '@apache-superset/core/ui'; import { InfoTooltip, Tooltip, Icons } from '@superset-ui/core/components'; 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 09cbc387723f..68ef3fbbed06 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,7 +22,7 @@ import { SQLEditor, } from '@superset-ui/core/components'; import { CalculatorOutlined } from '@ant-design/icons'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; const StyledCalculatorIcon = styled(CalculatorOutlined)` 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 edf17053380e..8a4fb2a745e8 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,7 +18,7 @@ */ import { ReactNode, RefObject } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { ColumnMeta, Metric } from '@superset-ui/chart-controls'; 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 278526a48209..d467f1c522bd 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/constants.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/constants.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { DTTM_ALIAS, QueryColumn, QueryMode, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { DTTM_ALIAS, QueryColumn, QueryMode } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { ColumnMeta, SortSeriesData, SortSeriesType } from './types'; 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 606abbb759aa..12bb52af9e45 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, RollingType, ComparisonType } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { RollingType, ComparisonType } from '@superset-ui/core'; import { ControlSubSectionHeader } from '../components/ControlSubSectionHeader'; import { ControlPanelSectionConfig } from '../types'; 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 caabdfc9be72..97ec274ac584 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 1cbca5a86492..f828f083db3d 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 7a15bbfc9ab5..17cc5b73b7d1 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 67c64725c0a9..a3a874a15dc4 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,11 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { - legacyValidateInteger, - legacyValidateNumber, - t, -} from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +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 f70df487fad7..c92e8f911c65 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 a338f6e76bb4..d5bd0ee2a370 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 901c34abc850..aacdbbe16d2f 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ComparisonType } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ComparisonType } from '@superset-ui/core'; import { ControlPanelSectionConfig, 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 dadc5285233e..bd2e32e136fc 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,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { JsonValue, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { JsonValue } from '@superset-ui/core'; import { Radio } 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 4a9bdfc04315..fc8f16ee88e5 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,6 +17,7 @@ * under the License. */ +import { t } from '@apache-superset/core'; import { ContributionType, ensureIsArray, @@ -24,7 +25,6 @@ import { getMetricLabel, QueryFormColumn, QueryFormMetric, - t, } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { 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 9ba1b944f583..bc8c0b0c774a 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,7 +17,8 @@ * specific language governing permissions and limitations * under the License. */ -import { QueryColumn, t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { QueryColumn, validateNonEmpty } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { ExtraControlProps, 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 39c32e7b8df3..ab77740d4281 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,8 @@ * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { SharedControlConfig } from '../types'; import { dndAdhocMetricControl } from './dndControls'; import { defineSavedMetrics } from '../utils'; 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 6830d01974ce..19310b83c821 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,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { ensureIsArray, NO_TIME_RANGE, QueryFormData, - t, validateNonEmpty, } from '@superset-ui/core'; import { 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 a3fbaa4a0e79..0dc760c3cb5a 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,8 +33,8 @@ * control interface. */ import { isEmpty } from 'lodash'; +import { t } from '@apache-superset/core'; import { - t, getCategoricalSchemeRegistry, getSequentialSchemeRegistry, SequentialScheme, 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 3ff8fb9c1e20..7c43cef3b333 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,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { - t, SMART_DATE_ID, NumberFormats, getNumberFormatter, 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 3671ba37d547..68a06e2d15aa 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 '@superset-ui/core'; +import { configure } from '@apache-superset/core'; import { Comparator, getOpacity, 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 ece0f3879fe1..6955af4798c6 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,7 +17,7 @@ * under the License. */ -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { SupersetTheme } from '@apache-superset/core/ui'; import { FallbackPropsWithDimension } from './SuperChart'; 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 63c33638c4fb..90fcbb4d6a5a 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,8 +18,7 @@ */ import { CSSProperties } from 'react'; -import { css, styled } from '@apache-superset/core/ui'; -import { t } from '../../translation'; +import { css, styled, t } from '@apache-superset/core/ui'; const MESSAGE_STYLES: CSSProperties = { maxWidth: 800 }; const MIN_WIDTH_FOR_BODY = 250; 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 3f847ea4b572..9fea3c3153a3 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { createSelector } from 'reselect'; import getChartComponentRegistry from '../registries/ChartComponentRegistrySingleton'; import getChartTransformPropsRegistry from '../registries/ChartTransformPropsRegistrySingleton'; 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 470e2aa4a509..4874f50a7760 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 f55a0dfc0d9c..b370ad7f6b4f 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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/CertifiedBadge/CertifiedBadge.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/CertifiedBadge/CertifiedBadge.stories.tsx index 92df41a4690b..c340a2c2ed7d 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 '@superset-ui/core'; +import { configure as configureTranslation } from '@apache-superset/core'; 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 03413e906d41..47e1abc84d51 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,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 { useTheme } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '../Tooltip'; 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 51fb11395b61..bb9d1cc5a41c 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 @@ -17,7 +17,7 @@ * under the License. */ import { styled } from '@apache-superset/core/ui'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 15df60cb250c..f329e090dcb7 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,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 ReactCronPicker from 'react-js-cron'; import type { Locale, CronProps } from './types'; 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 2c5efd2f8734..3b3e27b466d7 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,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 { useState, useRef, useEffect, ChangeEvent } from 'react'; import { FormLabel } from '../Form'; 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 475a58d9fe22..14df91f4cf14 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,7 +30,8 @@ import { } from 'react'; import { Global } from '@emotion/react'; -import { t, usePrevious } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { usePrevious } from '@superset-ui/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { useResizeDetector } from 'react-resize-detector'; import { Badge, Icons, Button, Tooltip, Popover } from '..'; 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 7a6ac61669fe..3f4bc6e5e85a 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,7 +25,7 @@ import { useLayoutEffect, useState, } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; import { useResizeDetector } from 'react-resize-detector'; import { Tooltip } from '../Tooltip'; 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 30b298f02dde..1c955deaa723 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,7 +17,7 @@ * under the License. */ -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { useEffect, useState, useRef } from 'react'; import cx from 'classnames'; 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 3d8d3d43a73d..330563566c21 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,7 +17,7 @@ * under the License. */ import { ReactNode, SyntheticEvent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css, SupersetTheme } from '@apache-superset/core/ui'; // Importing svg images 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 b3c3e3794605..504341f60d0c 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,7 +19,7 @@ import { useCallback, useEffect, MouseEvent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { Tooltip } from '../Tooltip'; 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 b8f1dc1ef49b..1506ecde1e77 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,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 { Button, Icons, InfoTooltip, Tooltip, Flex } from '..'; import { Input } from '../Input'; 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 b2268c22e23b..553ac193084d 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,7 +19,7 @@ import { KeyboardEvent, useMemo } from 'react'; import { SerializedStyles, CSSObject } from '@emotion/react'; import { kebabCase } from 'lodash'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, useTheme, getFontSize } from '@apache-superset/core/ui'; import { CloseCircleOutlined, 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 eb3866aa73c8..d8567d93b2a2 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,7 +17,7 @@ * under the License. */ import { Icons } from '@superset-ui/core/components/Icons'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { Label } from '..'; 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 ecb0977f1d1d..86a80ed2fcd5 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,7 +17,7 @@ * under the License. */ import { Icons } from '@superset-ui/core/components/Icons'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { Label } from '..'; 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 b989b1ad66fa..1816f2310eb8 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,7 +18,7 @@ */ import { useEffect, useState, FunctionComponent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css, useTheme } from '@apache-superset/core/ui'; import { Dayjs } from 'dayjs'; import { extendedDayjs } from '../../utils/dates'; 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 20c67c5cdcb0..b2ba05300090 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,7 +18,7 @@ */ import { useEffect, useState, DetailedHTMLProps, HTMLAttributes } from 'react'; -import { logging } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; export type BackgroundPosition = 'top' | 'bottom'; 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 6a88d8113622..a4a9f14f40c8 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,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ensureIsArray, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsArray } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { ContentType, MetadataType } from '.'; 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 9c9ea61f4134..d4581e380c71 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 1788dc95b24b..021341808e07 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,7 +18,7 @@ */ import { isValidElement, cloneElement, useMemo, useRef, useState } from 'react'; import { isNil } from 'lodash'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { Modal as AntdModal, ModalProps as AntdModalProps } from 'antd'; import { Resizable } from 're-resizable'; 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 cd523ea6eae8..469d9598f99d 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,7 +17,7 @@ * under the License. */ import { ReactNode, ReactElement } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import type { DropdownProps } from '../Dropdown/types'; 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 f48f101e07a9..bfa2e801a301 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,9 +31,9 @@ import { ClipboardEvent, } from 'react'; +import { t } from '@apache-superset/core'; import { ensureIsArray, - t, usePrevious, getClientErrorObject, } from '@superset-ui/core'; 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 e8300f6eb39d..0c6a32a7047f 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,8 @@ import { ReactElement, } from 'react'; -import { ensureIsArray, t, usePrevious } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsArray, usePrevious } from '@superset-ui/core'; import { Constants } from '@superset-ui/core/components'; import { LabeledValue as AntdLabeledValue, 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 dd2797b4a581..950ae40ec728 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { rankedSearchCompare } from '../../utils/rankedSearchCompare'; import { RawValue } from './types'; 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 a5e405942a38..234fba49c9d0 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ensureIsArray, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsArray } from '@superset-ui/core'; import { ReactElement, RefObject } from 'react'; import { Icons } from '@superset-ui/core/components/Icons'; import { LabeledValue as AntdLabeledValue, SELECT_ALL_VALUE } from '.'; 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 00fa54615052..e84aaf0487ea 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 '@superset-ui/core'; +import { logging } from '@apache-superset/core'; export interface NumericCellProps { /** 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 ce6b01d1ecd5..084bea375303 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,7 +21,8 @@ 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, logging } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { logging } from '@apache-superset/core'; import { useTheme, styled } from '@apache-superset/core/ui'; import { Loading } from '@superset-ui/core/components'; import { RowSelectionType } from 'antd/es/table/interface'; 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 21622b6d7963..8b2dd2c18fff 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 @@ -20,12 +20,12 @@ 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 themeUtils from '@apache-superset/core/ui/theme/utils/themeUtils'; +import * as uiModule from '@apache-superset/core/ui'; import { ThemedAgGridReact } from './index'; // Mock useThemeMode hook -jest.mock('@apache-superset/core/ui/theme/utils/themeUtils', () => ({ - ...jest.requireActual('@apache-superset/core/ui/theme/utils/themeUtils'), +jest.mock('@apache-superset/core/ui', () => ({ + ...jest.requireActual('@apache-superset/core/ui'), useThemeMode: jest.fn(() => false), // Default to light mode })); @@ -68,7 +68,7 @@ const mockColumnDefs = [ beforeEach(() => { jest.clearAllMocks(); // Reset to light mode by default - (themeUtils.useThemeMode as jest.Mock).mockReturnValue(false); + (uiModule.useThemeMode as jest.Mock).mockReturnValue(false); }); test('renders the AgGridReact component', () => { @@ -101,7 +101,7 @@ test('applies light theme when background is light', () => { test('applies dark theme when background is dark', () => { // Mock dark mode - (themeUtils.useThemeMode as jest.Mock).mockReturnValue(true); + (uiModule.useThemeMode as jest.Mock).mockReturnValue(true); const darkTheme = { ...supersetTheme, 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 ab7ef4fae56f..7eef109a3a25 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 { useEffect, useMemo } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { Select } from '@superset-ui/core/components'; import { isDST, extendedDayjs } from '../../utils/dates'; 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 22622ff97502..e0fc92f37dac 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,7 +19,8 @@ import { ReactNode, Key, useMemo } from 'react'; -import { t, useTruncation } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { useTruncation } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { Tooltip } from '@superset-ui/core/components'; 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 5ad85960a7f9..55f7a51bf835 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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/constants.ts b/superset-frontend/packages/superset-ui-core/src/components/constants.ts index 05b681c28f46..3999febd7456 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 '..'; +import { t } from '@apache-superset/core/ui/translation'; export const Constants = { FAST_DEBOUNCE: 250, diff --git a/superset-frontend/packages/superset-ui-core/src/index.ts b/superset-frontend/packages/superset-ui-core/src/index.ts index 5c0e70e31f4a..29d7d8154dfd 100644 --- a/superset-frontend/packages/superset-ui-core/src/index.ts +++ b/superset-frontend/packages/superset-ui-core/src/index.ts @@ -20,7 +20,6 @@ export * from './models'; export * from './utils'; export * from './types'; -export * from './translation'; export * from './connection'; export * from './dynamic-plugins'; export * from './query'; 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 6cb0af8eec8e..d544b8fd14e9 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 '../translation'; +import { t } from '@apache-superset/core'; 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 8097134e6d67..78cdf2bde694 100644 --- a/superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts +++ b/superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { COMMON_ERR_MESSAGES, JsonObject, SupersetClientResponse, - t, SupersetError, ErrorTypeEnum, isProbablyHTML, 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 f5e38905ad57..c892037984db 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 logger from './logging'; +import { logging as logger } from '@apache-superset/core'; // 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/index.ts b/superset-frontend/packages/superset-ui-core/src/utils/index.ts index bb099c9bf820..426af7e9f3fb 100644 --- a/superset-frontend/packages/superset-ui-core/src/utils/index.ts +++ b/superset-frontend/packages/superset-ui-core/src/utils/index.ts @@ -24,7 +24,6 @@ export { default as isRequired } from './isRequired'; export { default as isEqualArray } from './isEqualArray'; export { default as makeSingleton } from './makeSingleton'; export { default as promiseTimeout } from './promiseTimeout'; -export { default as logging } from './logging'; export { default as removeDuplicates } from './removeDuplicates'; export { lruCache } from './lruCache'; export { getSelectedText } from './getSelectedText'; 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 59d5b08bb52a..2ca22fcd79d7 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 '../translation'; +import { t } from '@apache-superset/core'; 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 7034e58ca531..972fdf855dac 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 '../translation'; +import { t } from '@apache-superset/core'; /** * 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 3b63f12840a2..d6a7b337f0d0 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 '../translation'; +import { t } from '@apache-superset/core'; /** * 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 1677f0ecf9b8..bea18dca9d78 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 '../translation'; +import { t } from '@apache-superset/core'; export default function validateInteger(v: unknown) { 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 89ec2c738392..facbc149aefc 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 '../translation'; +import { t } from '@apache-superset/core'; 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 27f6d0a590a9..bb7e6c052b3a 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 '../translation'; +import { t } from '@apache-superset/core'; export default function validateMaxValue(v: unknown, max: number) { if (Number(v) > +max) { 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 af4173cd4462..835c433fe2e6 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 '../translation'; +import { t } from '@apache-superset/core'; export default function validateNonEmpty(v: unknown) { 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 3775a56cb5c5..ce8db32cd28b 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 '../translation'; +import { t } from '@apache-superset/core'; export default function validateInteger(v: any) { 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 202ca9539900..1907a8198c5f 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 '../translation'; +import { t } from '@apache-superset/core'; 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 c639ec6cafb6..b362757db12b 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 '../translation'; +import { t } from '@apache-superset/core'; 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 f34c4b84e84b..b1c879cc221e 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 @@ -23,13 +23,13 @@ import { SupersetClient, buildQueryContext, QueryFormData, - configure as configureTranslation, ChartClient, getChartBuildQueryRegistry, getChartMetadataRegistry, ChartMetadata, VizType, } from '@superset-ui/core'; +import { configure as configureTranslation } from '@apache-superset/core'; import { LOGIN_GLOB } from '../fixtures/constants'; import { sankeyFormData } from '../fixtures/formData'; 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 4e290137167c..b6e5257701b4 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 @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { configure, QueryMode } from '@superset-ui/core'; +import { QueryMode } from '@superset-ui/core'; +import { configure } from '@apache-superset/core'; import extractQueryFields from '../../src/query/extractQueryFields'; import { NUM_METRIC } from '../fixtures'; diff --git a/superset-frontend/packages/superset-ui-core/test/translation/Translator.test.ts b/superset-frontend/packages/superset-ui-core/test/translation/Translator.test.ts deleted file mode 100644 index df718afe4159..000000000000 --- a/superset-frontend/packages/superset-ui-core/test/translation/Translator.test.ts +++ /dev/null @@ -1,201 +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. - */ - -import { - logging, - configure, - t, - tn, - addLocaleData, - addTranslation, - addTranslations, -} from '@superset-ui/core'; -import Translator from '../../src/translation/Translator'; -import languagePackZh from './languagePacks/zh'; -import languagePackEn from './languagePacks/en'; - -configure({ - languagePack: languagePackEn, -}); - -describe('Translator', () => { - const spy = jest.spyOn(logging, 'warn'); - - beforeAll(() => { - spy.mockImplementation((info: any) => { - throw new Error(info); - }); - process.env.WEBPACK_MODE = 'production'; - }); - - afterAll(() => { - spy.mockRestore(); - process.env.WEBPACK_MODE = 'test'; - }); - - describe('new Translator(config)', () => { - it('initializes when config is not specified', () => { - expect(new Translator()).toBeInstanceOf(Translator); - }); - it('initializes when config is an empty object', () => { - expect(new Translator({})).toBeInstanceOf(Translator); - }); - it('initializes when config is specified', () => { - expect( - new Translator({ - languagePack: languagePackZh, - }), - ).toBeInstanceOf(Translator); - }); - }); - describe('.translate(input, ...args)', () => { - const translator = new Translator({ - languagePack: languagePackZh, - }); - it('returns original text for unknown text', () => { - expect(translator.translate('abc')).toEqual('abc'); - }); - it('translates simple text', () => { - expect(translator.translate('second')).toEqual('秒'); - }); - it('translates template text with an argument', () => { - expect(translator.translate('Copy of %s', 1)).toEqual('1 的副本'); - expect(translator.translate('Copy of %s', 2)).toEqual('2 的副本'); - }); - it('translates template text with multiple arguments', () => { - expect(translator.translate('test %d %d', 1, 2)).toEqual('test 1 2'); - }); - }); - describe('.translateWithNumber(singular, plural, num, ...args)', () => { - const translator = new Translator({ - languagePack: languagePackZh, - }); - it('returns original text for unknown text', () => { - expect(translator.translateWithNumber('fish', 'fishes', 1)).toEqual( - 'fish', - ); - }); - it('uses 0 as default value', () => { - expect(translator.translateWithNumber('box', 'boxes')).toEqual('boxes'); - }); - it('translates simple text', () => { - expect(translator.translateWithNumber('second', 'seconds', 1)).toEqual( - '秒', - ); - }); - it('translates template text with an argument', () => { - expect( - translator.translateWithNumber('Copy of %s', 'Copies of %s', 12, 12), - ).toEqual('12 的副本'); - }); - it('translates template text with multiple arguments', () => { - expect( - translator.translateWithNumber( - '%d glass %s', - '%d glasses %s', - 3, - 3, - 'abc', - ), - ).toEqual('3 glasses abc'); - }); - }); - describe('.translateWithNumber(key, num, ...args)', () => { - const translator = new Translator({ - languagePack: languagePackEn, - }); - it('translates template text with an argument', () => { - expect(translator.translateWithNumber('%s copies', 1)).toEqual('1 copy'); - expect(translator.translateWithNumber('%s copies', 2)).toEqual( - '2 copies', - ); - }); - }); - - // Extending language pack - describe('.addTranslation(...)', () => { - it('can add new translation', () => { - addTranslation('haha', ['Hahaha']); - expect(t('haha')).toEqual('Hahaha'); - }); - }); - - describe('.addTranslations(...)', () => { - it('can add new translations', () => { - addTranslations({ - foo: ['bar', '%s bars'], - bar: ['foo'], - }); - // previous translation still exists - expect(t('haha')).toEqual('Hahaha'); - // new translations work as expected - expect(tn('foo', 1)).toEqual('bar'); - expect(tn('foo', 2)).toEqual('2 bars'); - expect(tn('bar', 2)).toEqual('bar'); - }); - it('throw warning on invalid arguments', () => { - expect(() => addTranslations(undefined as never)).toThrow( - 'Invalid translations', - ); - expect(tn('bar', '2 foo', 2)).toEqual('2 foo'); - }); - it('throw warning on duplicates', () => { - expect(() => { - addTranslations({ - haha: ['this is duplicate'], - }); - }).toThrow('Duplicate translation key "haha"'); - expect(t('haha')).toEqual('Hahaha'); - }); - }); - - describe('.addLocaleData(...)', () => { - it('can add new translations for language', () => { - addLocaleData({ - en: { - yes: ['ok'], - }, - }); - expect(t('yes')).toEqual('ok'); - }); - it('throw on unknown locale', () => { - expect(() => { - addLocaleData({ - zh: { - haha: ['yes'], - }, - }); - }).toThrow('Invalid locale data'); - }); - it('missing locale falls back to English', () => { - configure({ - languagePack: languagePackZh, - }); - // expect and error because zh is not current locale - expect(() => { - addLocaleData({ - en: { - yes: ['OK'], - }, - }); - }).not.toThrow(); - expect(t('yes')).toEqual('OK'); - }); - }); -}); diff --git a/superset-frontend/packages/superset-ui-core/test/translation/TranslatorSingleton.test.ts b/superset-frontend/packages/superset-ui-core/test/translation/TranslatorSingleton.test.ts deleted file mode 100644 index 2aa78faeed26..000000000000 --- a/superset-frontend/packages/superset-ui-core/test/translation/TranslatorSingleton.test.ts +++ /dev/null @@ -1,86 +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. - */ - -/* eslint no-console: 0 */ -import mockConsole from 'jest-mock-console'; -import { configure, resetTranslation, t, tn } from '@superset-ui/core'; -import Translator from '../../src/translation/Translator'; - -import languagePackEn from './languagePacks/en'; -import languagePackZh from './languagePacks/zh'; - -describe('TranslatorSingleton', () => { - describe('before configure()', () => { - beforeAll(() => { - resetTranslation(); - }); - - describe('t()', () => { - it('returns untranslated input and issues a warning', () => { - const restoreConsole = mockConsole(); - expect(t('second')).toEqual('second'); - expect(console.warn).toHaveBeenCalled(); - restoreConsole(); - }); - }); - describe('tn()', () => { - it('returns untranslated input and issues a warning', () => { - const restoreConsole = mockConsole(); - expect(tn('ox', 'oxen', 2)).toEqual('oxen'); - expect(console.warn).toHaveBeenCalled(); - restoreConsole(); - }); - }); - }); - describe('after configure()', () => { - describe('configure()', () => { - it('creates and returns a translator', () => { - expect(configure()).toBeInstanceOf(Translator); - }); - }); - describe('t()', () => { - it('after configure() returns translated text', () => { - configure({ - languagePack: languagePackZh, - }); - expect(t('second')).toEqual('秒'); - }); - }); - describe('tn()', () => { - it('after configure() returns translated text with singular/plural', () => { - configure({ - languagePack: languagePackEn, - }); - expect(tn('ox', 'oxen', 2)).toEqual('oxen'); - }); - }); - }); - it('should be reset translation setting', () => { - configure(); - expect(t('second')).toEqual('second'); - - resetTranslation(); - const restoreConsole = mockConsole(); - expect(t('second')).toEqual('second'); - resetTranslation(); - expect(t('second')).toEqual('second'); - expect(console.warn).toHaveBeenCalledTimes(2); - restoreConsole(); - }); -}); diff --git a/superset-frontend/packages/superset-ui-core/test/translation/index.test.ts b/superset-frontend/packages/superset-ui-core/test/translation/index.test.ts deleted file mode 100644 index 2c0f0d6f92d5..000000000000 --- a/superset-frontend/packages/superset-ui-core/test/translation/index.test.ts +++ /dev/null @@ -1,35 +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. - */ - -import { configure, t, tn } from '@superset-ui/core'; - -describe('index', () => { - it('exports configure()', () => { - expect(configure).toBeDefined(); - expect(configure).toBeInstanceOf(Function); - }); - it('exports t()', () => { - expect(t).toBeDefined(); - expect(t).toBeInstanceOf(Function); - }); - it('exports tn()', () => { - expect(tn).toBeDefined(); - expect(tn).toBeInstanceOf(Function); - }); -}); diff --git a/superset-frontend/packages/superset-ui-core/test/translation/languagePacks/en.ts b/superset-frontend/packages/superset-ui-core/test/translation/languagePacks/en.ts deleted file mode 100644 index 00d52be8a272..000000000000 --- a/superset-frontend/packages/superset-ui-core/test/translation/languagePacks/en.ts +++ /dev/null @@ -1,37 +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. - */ - -import { LanguagePack } from '@superset-ui/core'; - -const languagePack: LanguagePack = { - domain: 'superset', - locale_data: { - superset: { - '': { - domain: 'superset', - plural_forms: 'nplurals=2; plural=(n != 1)', - lang: 'en', - }, - second: [''], - '%s copies': ['%s copy', '%s copies'], - }, - }, -}; - -export default languagePack; 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 b3c68f7e71d0..0bdfae3ddc30 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 @@ -16,13 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -import * as uiCore from '@superset-ui/core'; +import { + FeatureFlag, + initFeatureFlags, + isFeatureEnabled, +} from '@superset-ui/core'; +import * as uiCore from '@apache-superset/core'; test('initializes feature flags', () => { Object.defineProperty(window, 'featureFlags', { value: undefined, }); - uiCore.initFeatureFlags(); + initFeatureFlags(); expect(window.featureFlags).toEqual({}); }); @@ -33,7 +38,7 @@ test('initializes feature flags with predefined values', () => { const featureFlags = { DRILL_BY: false, }; - uiCore.initFeatureFlags(featureFlags); + initFeatureFlags(featureFlags); expect(window.featureFlags).toEqual(featureFlags); }); @@ -42,7 +47,7 @@ test('does nothing if feature flags are already initialized', () => { Object.defineProperty(window, 'featureFlags', { value: featureFlags, }); - uiCore.initFeatureFlags({ DRILL_BY: true }); + initFeatureFlags({ DRILL_BY: true }); expect(window.featureFlags).toEqual(featureFlags); }); @@ -51,7 +56,7 @@ test('returns false and raises console error if feature flags have not been init Object.defineProperty(window, 'featureFlags', { value: undefined, }); - expect(uiCore.isFeatureEnabled(uiCore.FeatureFlag.DrillBy)).toEqual(false); + expect(isFeatureEnabled(FeatureFlag.DrillBy)).toEqual(false); expect(uiCore.logging.error).toHaveBeenCalled(); expect(logging).toHaveBeenCalledWith('Failed to query feature flag DRILL_BY'); }); @@ -60,7 +65,7 @@ test('returns false for unset feature flag', () => { Object.defineProperty(window, 'featureFlags', { value: {}, }); - expect(uiCore.isFeatureEnabled(uiCore.FeatureFlag.DrillBy)).toEqual(false); + expect(isFeatureEnabled(FeatureFlag.DrillBy)).toEqual(false); }); test('returns true for set feature flag', () => { @@ -69,5 +74,5 @@ test('returns true for set feature flag', () => { DRILL_BY: true, }, }); - expect(uiCore.isFeatureEnabled(uiCore.FeatureFlag.DrillBy)).toEqual(true); + expect(isFeatureEnabled(FeatureFlag.DrillBy)).toEqual(true); }); diff --git a/superset-frontend/packages/superset-ui-core/test/utils/logging.test.ts b/superset-frontend/packages/superset-ui-core/test/utils/logging.test.ts deleted file mode 100644 index b1f0dc5f31ea..000000000000 --- a/superset-frontend/packages/superset-ui-core/test/utils/logging.test.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -/* eslint-disable global-require */ -/** - * 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. - */ -describe('logging', () => { - beforeEach(() => { - jest.resetModules(); - jest.resetAllMocks(); - }); - - const { console } = window; - afterAll(() => { - Object.assign(window, { console }); - }); - - it('should pipe to `console` methods', () => { - const { logging } = require('@superset-ui/core'); - - jest.spyOn(logging, 'debug').mockImplementation(); - jest.spyOn(logging, 'log').mockImplementation(); - jest.spyOn(logging, 'info').mockImplementation(); - expect(() => { - logging.debug(); - logging.log(); - logging.info(); - }).not.toThrow(); - - jest.spyOn(logging, 'warn').mockImplementation(() => { - throw new Error('warn'); - }); - expect(() => logging.warn()).toThrow('warn'); - - jest.spyOn(logging, 'error').mockImplementation(() => { - throw new Error('error'); - }); - expect(() => logging.error()).toThrow('error'); - - jest.spyOn(logging, 'trace').mockImplementation(() => { - throw new Error('Trace:'); - }); - expect(() => logging.trace()).toThrow('Trace:'); - }); - - it('should use noop functions when console unavailable', () => { - Object.assign(window, { console: undefined }); - const { logging } = require('@superset-ui/core'); - - expect(() => { - logging.debug(); - logging.log(); - logging.info(); - logging.warn('warn'); - logging.error('error'); - logging.trace(); - logging.table([ - [1, 2], - [3, 4], - ]); - }).not.toThrow(); - Object.assign(window, { console }); - }); -}); 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 ca4a8311375d..5196a4517298 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 '@superset-ui/core'; +import { configure as configureTranslation } from '@apache-superset/core'; configureTranslation(); diff --git a/superset-frontend/packages/superset-ui-demo/storybook/shared/components/VerifyCORS.tsx b/superset-frontend/packages/superset-ui-demo/storybook/shared/components/VerifyCORS.tsx index ca3b580730ac..bbc3e115bf6e 100644 --- a/superset-frontend/packages/superset-ui-demo/storybook/shared/components/VerifyCORS.tsx +++ b/superset-frontend/packages/superset-ui-demo/storybook/shared/components/VerifyCORS.tsx @@ -18,12 +18,12 @@ */ import { Component, ReactNode } from 'react'; +import { t } from '@apache-superset/core'; import { SupersetClient, Method, makeApi, SupersetApiError, - t, } from '@superset-ui/core'; import { Button } from '@superset-ui/core/components'; import ErrorMessage from './ErrorMessage'; diff --git a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.js b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.js index 904579867b3a..4103411f6e49 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.js +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.js @@ -19,7 +19,8 @@ import PropTypes from 'prop-types'; import { extent as d3Extent, range as d3Range } from 'd3-array'; import { select as d3Select } from 'd3-selection'; -import { getSequentialSchemeRegistry, t } from '@superset-ui/core'; +import { getSequentialSchemeRegistry } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; import CalHeatMap from './vendor/cal-heatmap'; const propTypes = { 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 6cdd79162bae..33780f5ef214 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, legacyValidateInteger } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { legacyValidateInteger } from '@superset-ui/core'; import { ControlPanelConfig, D3_FORMAT_DOCS, diff --git a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/index.js index 1a8bdb5c8a0a..e83b45b2a8d0 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; 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.js b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.js index 482a31539267..3240dd7b741e 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.js +++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.js @@ -9,7 +9,8 @@ /* eslint-disable */ import d3tip from 'd3-tip'; -import { getContrastingColor, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +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/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-chord/src/controlPanel.ts index 031382a45ef8..f4469e8d1733 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ensureIsArray, t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsArray, validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, getStandardizedControls, diff --git a/superset-frontend/plugins/legacy-plugin-chart-chord/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-chord/src/index.js index 5f28a8798158..7da9d07b1c9f 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-chord/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-chord/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import example from './images/chord.jpg'; import exampleDark from './images/chord-dark.jpg'; 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 944bf9ded739..eed4fe0f088d 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, D3_FORMAT_OPTIONS, diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js index ad4ed7c79729..0478dc122f84 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import exampleUsa from './images/exampleUsa.jpg'; import exampleUsaDark from './images/exampleUsa-dark.jpg'; 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 51a43a450e11..880051fda297 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig, formatSelectOptions, diff --git a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/index.js index 24ef052a9b71..20564d19576d 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-horizon/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-horizon/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import example from './images/Horizon_Chart.jpg'; import exampleDark from './images/Horizon_Chart-dark.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 fec1b6fb6a38..58a3f327eb52 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateMapboxStylesUrl } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateMapboxStylesUrl } from '@superset-ui/core'; import { columnChoices, ControlPanelConfig, diff --git a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/index.js index 6da02227012d..af58b4e70b12 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example1 from './images/MapBox.jpg'; 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 1fc693dc1724..e3fb8b46e7b7 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig } from '@superset-ui/chart-controls'; const config: ControlPanelConfig = { diff --git a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.js index 2bed314393c3..1fefb490678f 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; 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-parallel-coordinates/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/controlPanel.ts index 1f18d4e4e38e..782a8cacc0a5 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig } from '@superset-ui/chart-controls'; const config: ControlPanelConfig = { diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js index fa276bcc7414..641d9a8af63a 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; 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 29f85126fe71..537da7a89548 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { ColumnMeta, ControlPanelConfig, diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.js index 11b891b25867..ef30851d9334 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; 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 9807929f9921..fe0c7da0bd87 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig, ControlSubSectionHeader, diff --git a/superset-frontend/plugins/legacy-plugin-chart-rose/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-rose/src/index.js index 01f70c098cce..8e005b5d454b 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-rose/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-rose/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; 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 f75764e9f5ef..29cb36806610 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig, formatSelectOptions, diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js index 5e2c78cc5ae4..0a8d12bfe6c3 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; 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 f56b4eb9ec05..eaf990e07a5e 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { viewport, mapboxStyle } from '../utilities/Shared_DeckGL'; export default { 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 290d338e2115..9777b6fe5bb8 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } 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 example from './images/example.png'; 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 89d666dd934b..9cf7a1d08eec 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,8 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; -import { t, validateNonEmpty, legacyValidateInteger } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty, legacyValidateInteger } from '@superset-ui/core'; import timeGrainSqlaAnimationOverrides, { columnChoices, PRIMARY_COLOR, 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 364e57c469cc..b3dcabb03de9 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.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 42af03b68652..11a67569f6c6 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 e920f07ed76c..9e9d92b46f2f 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,8 @@ import { ControlPanelConfig, getStandardizedControls, } 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 { autozoom, filterNulls, 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 7d220b1ac024..223fa2fa5295 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.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 88c5a1a41892..889af60f0941 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,8 +17,8 @@ * under the License. */ import { ControlPanelConfig } from '@superset-ui/chart-controls'; +import { t } from '@apache-superset/core'; import { - t, legacyValidateInteger, isFeatureEnabled, FeatureFlag, 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 5b56c576bf07..587dcf181d11 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.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 fef74f6fe655..6d59561bac0f 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,8 @@ import { ControlPanelConfig, getStandardizedControls, } 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 { filterNulls, autozoom, 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 18144934acab..f3326b1bda00 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.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 03e163ea0001..194906b50d9d 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,8 +18,8 @@ */ import { HeatmapLayer } from '@deck.gl/aggregation-layers'; import { Position } from '@deck.gl/core'; +import { t } from '@apache-superset/core'; import { - t, getSequentialSchemeRegistry, JsonObject, QueryFormData, 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 fa30977f7ea2..21f1dbe85141 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,8 +20,8 @@ import { ControlPanelConfig, formatSelectOptions, } from '@superset-ui/chart-controls'; +import { t } from '@apache-superset/core'; import { - t, validateNonEmpty, legacyValidateNumber, legacyValidateInteger, 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 23fc2ad58a87..95dd519f992c 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.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 7779fa1c75d5..580769f9a152 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 fda3cff9b40a..eacfa9957992 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.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 658e7c014a1a..916ad8d7daa4 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 0c5ea4b42107..a3c4f44bb17e 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.png'; 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 69c21e9079bf..e85c694b54af 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,6 +22,7 @@ /* eslint no-underscore-dangle: ["error", { "allow": ["", "__timestamp"] }] */ import { memo, useCallback, useEffect, useRef, useState } from 'react'; +import { t } from '@apache-superset/core'; import { ContextMenuFilters, FilterState, @@ -30,7 +31,6 @@ import { JsonValue, QueryFormData, SetDataMaskHook, - t, } from '@superset-ui/core'; import { PolygonLayer } from '@deck.gl/layers'; 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 9aec653e05b9..67a398c8a9c4 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 fa89cc4474b2..b7499e27e381 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.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 2b722316263b..20545763a653 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,8 @@ * under the License. */ import { ScatterplotLayer } from '@deck.gl/layers'; -import { JsonObject, QueryFormData, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { JsonObject, QueryFormData } from '@superset-ui/core'; import { isPointInBonds } from '../../utilities/utils'; import { commonLayerProps } from '../common'; import { createCategoricalDeckGLComponent, GetLayerType } from '../../factory'; 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 f3c369ef3474..7438dcd003f5 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,8 @@ * under the License. */ import { ControlPanelConfig } 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 timeGrainSqlaAnimationOverrides from '../../utilities/controls'; import { filterNulls, 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 cef908989a33..c0a99d61fe3a 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.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 c2facd80242e..e78561d3edb2 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,11 +19,11 @@ import { ScreenGridLayer } from '@deck.gl/aggregation-layers'; import { Color } from '@deck.gl/core'; +import { t } from '@apache-superset/core'; import { JsonObject, QueryFormData, CategoricalColorNamespace, - t, } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { 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 32cc050305c0..288841445063 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,8 @@ import { ControlPanelConfig, getStandardizedControls, } 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 timeGrainSqlaAnimationOverrides from '../../utilities/controls'; import { filterNulls, 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 87758e37cf75..04458664eb77 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin, Behavior } from '@superset-ui/core'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; import example from './images/example.png'; 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 805ed682672c..7666ec314417 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,7 +17,8 @@ * under the License. */ import { useEffect, useState, memo, useMemo } from 'react'; -import { t, sanitizeHtml } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { sanitizeHtml } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; import Handlebars from 'handlebars'; 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 a40b7734c3ff..55c1cb83668b 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,10 +17,10 @@ * under the License. */ +import { t } from '@apache-superset/core'; import { FeatureFlag, isFeatureEnabled, - t, validateNonEmpty, validateMapboxStylesUrl, getCategoricalSchemeRegistry, 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 dd3e39040f8f..5c03826029d8 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,7 +19,7 @@ import { useCallback } from 'react'; import { debounce } from 'lodash'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { InfoTooltip, Constants } from '@superset-ui/core/components'; import { ControlHeader } from '@superset-ui/chart-controls'; 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 30ffd27287ad..21909c6de0ef 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 95b08d71c318..994e34e014f0 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,8 @@ * under the License. */ -import { t, JsonObject, QueryFormData } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { JsonObject, QueryFormData } from '@superset-ui/core'; import { useMemo, memo } from 'react'; import { HandlebarsRenderer } from './HandlebarsRenderer'; import TooltipRow from '../TooltipRow'; 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 8763f467f9f0..03b56e727b2b 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig, formatSelectOptions, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/index.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/index.js index 18af4e41a20f..41c7baa83400 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/index.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bubble/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core'; import transformProps from '../transformProps'; import example from './images/example.jpg'; import exampleDark from './images/example-dark.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 17d5e7a88edb..22ca87718782 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig } from '@superset-ui/chart-controls'; const config: ControlPanelConfig = { diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/index.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/index.js index ed175c357990..4f6091424bdf 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/index.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Bullet/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from '../transformProps'; import example from './images/example.jpg'; import exampleDark from './images/example-dark.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 fcae6dd39793..139a2c79b0ee 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig, getStandardizedControls, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.js index 47914b5a31ba..b33682bdd8e8 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core'; import transformProps from '../transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.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 1ab7736981bb..756959d73c2a 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelSectionConfig, ControlSubSectionHeader, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js index db67811f374a..1b1bd1fedf36 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js @@ -30,9 +30,9 @@ import { isDefined, NumberFormats, SMART_DATE_VERBOSE_ID, - t, VizType, } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; 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/TimePivot/controlPanel.ts b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/controlPanel.ts index 595d5d4b7211..fef611203d56 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig, D3_FORMAT_OPTIONS, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.js index 57c33db3bb10..48851a88ecd9 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.js @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from '../transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.js index 6a91617c5afc..e9ff8299fb71 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.js @@ -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/ui'; 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 11401c772003..b1ae8231fe39 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 } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons'; import FilterIcon from './Filter'; import KebabMenu from './KebabMenu'; 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 1a81b7f264c5..267a0d59d6aa 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 4546c5439135..067b8845f2dc 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 af997c021e91..23a029051265 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,12 +42,12 @@ import { CellClickedEvent, IMenuActionParams, } from '@superset-ui/core/components/ThemedAgGridReact'; +import { t } from '@apache-superset/core'; import { AgGridChartState, DataRecordValue, DataRecord, JsonObject, - t, } from '@superset-ui/core'; import { SearchOutlined } from '@ant-design/icons'; import { debounce, isEqual } from 'lodash'; 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 41ce3fdb69f8..add287c6f05e 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,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { DataRecord, DataRecordValue, getTimeFormatterForGranularity, - t, } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { useCallback, useEffect, useState, useMemo } from 'react'; 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 731985a6e011..ef0204805e00 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 @@ -40,6 +40,7 @@ import { isRegularMetric, isPercentMetric, } from '@superset-ui/chart-controls'; +import { t } from '@apache-superset/core'; import { ensureIsArray, FeatureFlag, @@ -50,7 +51,6 @@ import { QueryFormColumn, QueryMode, SMART_DATE_ID, - t, validateMaxValue, validateServerPagination, } from '@superset-ui/core'; 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 a4135dc69e5e..6818ad020dee 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior, ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; 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 d71d1ee1bc84..88e7bc236932 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,8 @@ * under the License. */ -import { isProbablyHTML, sanitizeHtml, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isProbablyHTML, sanitizeHtml } from '@superset-ui/core'; import { InfoCircleOutlined } from '@ant-design/icons'; import { Tooltip } from '@superset-ui/core/components'; import { CellRendererProps } from '../types'; 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 c4e714a54b18..465f744425a6 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,6 +17,7 @@ * under the License. */ import memoizeOne from 'memoize-one'; +import { t } from '@apache-superset/core'; import { ComparisonType, Currency, @@ -33,7 +34,6 @@ import { NumberFormats, QueryMode, SMART_DATE_ID, - t, TimeFormats, TimeFormatter, } from '@superset-ui/core'; 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 163d9defd362..7bb5d2e186b9 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +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 2b916739ef72..34c3dcb56d8c 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 567aecf530a1..a2ae810858ce 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig } from '@superset-ui/chart-controls'; /** 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 22bc336402b4..170fa2619076 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,11 +17,11 @@ * under the License. */ import { useEffect, useMemo, useState } from 'react'; +import { t } from '@apache-superset/core'; import { ensureIsArray, fetchTimeRange, getTimeOffset, - t, } from '@superset-ui/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { Tooltip } from '@superset-ui/core/components'; 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 efd018dc43a4..51571de05d64 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,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 { GenericDataType } from '@apache-superset/core/api/core'; import { ControlPanelConfig, 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 35962b845f2f..03f53fe18f05 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 d895dc921052..603fbcf9040c 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,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SMART_DATE_ID, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SMART_DATE_ID } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { ControlPanelConfig, 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 3af09913f026..bfda10d90284 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; import buildQuery from './buildQuery'; 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 04fca3c945e0..01402741137e 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useState, useEffect, useRef, MouseEvent } from 'react'; +import { t } from '@apache-superset/core'; import { - t, getNumberFormatter, getTimeFormatter, SMART_DATE_VERBOSE_ID, 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 7c65baf33469..2928f5323122 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SMART_DATE_ID, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SMART_DATE_ID } from '@superset-ui/core'; import { aggregationControl, ControlPanelConfig, 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 1dba8ac4dd2c..d76f7a3d48ad 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; import buildQuery from './buildQuery'; 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 e4b45d304105..c9f18207d964 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,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { extractTimegrain, getNumberFormatter, @@ -24,7 +25,6 @@ import { getXAxisLabel, Metric, getValueFormatter, - t, tooltipHtml, } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; 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 9610497382d7..d57d998d6993 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 40b2697accdc..64611323f3e6 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/controlPanel.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BoxPlot/controlPanel.ts @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { ensureIsArray, isAdhocColumn, isPhysicalColumn, - t, validateNonEmpty, } from '@superset-ui/core'; import { 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 b1c0588a38ad..b28e2db187f0 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 c22264e2d1e7..5d2775aee2f5 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 37f834df8d5a..7d55a84eb5e8 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,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 transformProps from './transformProps'; 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 71b7114dcf49..09adc2dbe6b7 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 a9534978fa92..2fbf81aa270d 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 bf8aa4e65fd9..f914b7f4ace8 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 71bfa74a43f5..8db566d038e0 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/controlPanel.tsx @@ -22,7 +22,7 @@ import { sections, sharedControls, } from '@superset-ui/chart-controls'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { legendSection, 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 736f9ffe2cd2..998b8e49e97d 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import transformProps from './transformProps'; import controlPanel from './controlPanel'; import buildQuery from './buildQuery'; 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 5d6522498c15..62893e1cbd98 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts @@ -24,6 +24,7 @@ import { EChartsCoreOption, LineSeriesOption, } from 'echarts'; +import { t } from '@apache-superset/core'; import { AxisType, CategoricalColorNamespace, @@ -31,7 +32,6 @@ import { DataRecordValue, getColumnLabel, getNumberFormatter, - t, tooltipHtml, } from '@superset-ui/core'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; 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 5d6df447ac77..b4aeafacdfa5 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 0e39f3be292c..dd7d9d5e39b2 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; 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 6407084029eb..d792dc786699 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 f50170246a58..a4e7bc25b759 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; 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 7a3d95c7e688..12fd9bda0433 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, formatSelectOptionsForRange, 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 0fa02a3f37ab..39b113af7b34 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import buildQuery from './buildQuery'; import example1 from './images/example1.png'; 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 3061511b4c02..211b1170c630 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts @@ -24,12 +24,12 @@ import { getSequentialSchemeRegistry, getTimeFormatter, getValueFormatter, - logging, rgbToHex, addAlpha, tooltipHtml, DataRecordValue, } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import memoizeOne from 'memoize-one'; import { maxBy, minBy } from 'lodash'; 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 85604c9b3283..978b1427d6d9 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/controlPanel.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateInteger, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateInteger, validateNonEmpty } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { ControlPanelConfig, 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 aef87b4db161..f399c62e88a4 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,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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 a4b0ca7c42cb..0ec6080c50f0 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ensureIsArray, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsArray } from '@superset-ui/core'; import { cloneDeep } from 'lodash'; import { ControlPanelsContainerProps, 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 86d4b834cdc6..108d41396a96 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { AnnotationType, Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AnnotationType, Behavior } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 4f93c0ed2cbf..e44ee3dddd90 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ensureIsInt, t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsInt, validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, ControlPanelsContainerProps, 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 a2ef43352d01..d1e208179165 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 e6fee12248e5..fa2972383a1a 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { CategoricalColorNamespace, getColumnLabel, @@ -23,7 +24,6 @@ import { getNumberFormatter, getTimeFormatter, NumberFormats, - t, ValueFormatter, getValueFormatter, tooltipHtml, 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 683116f2ef8e..0c7dbc852297 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { ChartDataResponseResult, QueryFormMetric, - t, validateNumber, } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; 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 7b9d1293b780..732bc039530f 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 05a7ac57cf61..ec5681a96db1 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, dndGroupByControl, 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 9e78fe14879e..8ff643616fbf 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,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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 8f1b486e331e..7269eee8967c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 ee18c0279337..cd0205ac4eff 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.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 22da9e02ce73..6c5614e042ad 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { CategoricalColorNamespace, DataRecordValue, @@ -26,7 +27,6 @@ import { getTimeFormatter, getValueFormatter, NumberFormats, - t, tooltipHtml, ValueFormatter, } from '@superset-ui/core'; 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 5b51242490db..56048de1d235 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 d49897c30bc4..f8e134f38fe8 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, AnnotationType, Behavior } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AnnotationType, Behavior } from '@superset-ui/core'; import buildQuery from '../buildQuery'; import controlPanel from './controlPanel'; import transformProps from '../transformProps'; 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 894c6e51efda..6fffbc8e5852 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ensureIsArray, JsonArray, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsArray, JsonArray } from '@superset-ui/core'; import { ControlPanelConfig, ControlPanelsContainerProps, 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 8e846784c2cf..69a1cc703eaf 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { AnnotationType, Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AnnotationType, Behavior } from '@superset-ui/core'; import { EchartsTimeseriesChartProps, EchartsTimeseriesFormData, 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 05d7e8cca1e6..1a45e7d23dd9 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 b74a879ed843..1be5d44d99a0 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { AnnotationType, Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AnnotationType, Behavior } from '@superset-ui/core'; import { EchartsTimeseriesChartProps, EchartsTimeseriesFormData, 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 a081b850360c..99702e13b396 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 55cdf7362cb4..0d431e249628 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { AnnotationType, Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AnnotationType, Behavior } from '@superset-ui/core'; import { EchartsTimeseriesChartProps, EchartsTimeseriesFormData, 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 00ea73742fde..62f805531b25 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 8681530d66a6..bebc8f471990 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { AnnotationType, Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AnnotationType, Behavior } from '@superset-ui/core'; import { EchartsTimeseriesChartProps, EchartsTimeseriesFormData, 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 cf2a8598e1a9..c31d2a7604a5 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 19bb8019e1d8..31a53a665679 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { AnnotationType, Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AnnotationType, Behavior } from '@superset-ui/core'; import { EchartsTimeseriesChartProps, EchartsTimeseriesFormData } from '../..'; import buildQuery from '../buildQuery'; import controlPanel from './controlPanel'; 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 5aac81dc7f1c..e00f62b15a68 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 3e9b17817700..c65110c52c63 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { AnnotationType, Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AnnotationType, Behavior } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './Regular/Line/controlPanel'; import transformProps from './transformProps'; 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 0a0e08e761c4..d1675454fee1 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts @@ -18,6 +18,7 @@ */ /* eslint-disable camelcase */ import { invert } from 'lodash'; +import { t } from '@apache-superset/core'; import { AnnotationLayer, AxisType, @@ -36,7 +37,6 @@ import { isIntervalAnnotationLayer, isPhysicalColumn, isTimeseriesAnnotationLayer, - t, TimeseriesChartDataResponseResult, NumberFormats, } from '@superset-ui/core'; 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 8ff20ffe5875..f72355ad0443 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 c72655ec658e..9df35c632a7c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 1e1dc4757685..712d5698d975 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 cd9fc63447fb..24f0f6e4ea1a 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; 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 17b7861f80ad..4f41b53bafc9 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 63824974e29d..475f219a775d 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 e66a86e70abc..b04293dca6b0 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,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 buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts b/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts index 938378aff669..9b04c75b3daf 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts @@ -17,7 +17,8 @@ * under the License. */ -import { JsonValue, t, TimeGranularity } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { JsonValue, TimeGranularity } from '@superset-ui/core'; import { ReactNode } from 'react'; import { LabelPositionEnum, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx index 04764d4b4336..1d407c6a607b 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, VizType } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { VizType } from '@superset-ui/core'; import { ControlPanelsContainerProps, ControlSetItem, 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 771fbb95a76a..006409c6ec99 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,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'; 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 f4bf43092d3e..d23f575ba505 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 9189c75e68a3..fe8ee183083e 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,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 = { 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 8e810e4c265d..d7edc7f73a11 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,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'; 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 9525cc1acf2d..d3e1a2b2d9a9 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 dd1516098a53..0c866213f667 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 d2f52e8e9b1d..84feb76ebd23 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 87178cc466b7..d2d1e80ace33 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,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'> = { 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 2c65c478012e..d6bd318e812c 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,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; 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 e2aade89af78..74c60fdcc39a 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,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'; 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 556a51ca2102..612e3fb19f48 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,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'; 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 a08f96a8ad93..09e62069fc48 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx @@ -18,6 +18,7 @@ */ import { useCallback, useMemo } from 'react'; import { MinusSquareOutlined, PlusSquareOutlined } from '@ant-design/icons'; +import { t } from '@apache-superset/core'; import { AdhocMetric, BinaryQueryObjectFilterClause, @@ -31,7 +32,6 @@ import { isFeatureEnabled, isPhysicalColumn, NumberFormatter, - t, } from '@superset-ui/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import { aggregatorTemplates, PivotTable, sortAs } from './react-pivottable'; 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 0febff106a02..30b81a1e5f33 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,13 +23,13 @@ import { getStandardizedControls, sharedControls, } from '@superset-ui/chart-controls'; +import { t } from '@apache-superset/core'; import { ensureIsArray, isAdhocColumn, isPhysicalColumn, QueryFormMetric, SMART_DATE_ID, - t, validateNonEmpty, } from '@superset-ui/core'; import { MetricsLayoutEnum } from '../types'; 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 e1b5a497e063..a5378b45a795 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,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { Behavior, ChartMetadata, ChartPlugin, ChartProps, QueryFormData, - t, } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx index 60ea1e68f6be..13a983ecc3c1 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx @@ -18,7 +18,8 @@ */ import { Component } from 'react'; -import { t, safeHtmlSpan } from '@superset-ui/core'; +import { safeHtmlSpan } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; import PropTypes from 'prop-types'; import { PivotData, flatKey } from './utilities'; import { Styles } from './Styles'; diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.js b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.js index 2c75e5fff2db..17f33a7ea86f 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.js +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.js @@ -18,7 +18,7 @@ */ import PropTypes from 'prop-types'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; const addSeparators = function (nStr, thousandsSep, decimalSep) { const x = String(nStr).split('.'); 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 0434a6c22e67..2572e9596e98 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,7 +17,7 @@ * under the License. */ import { memo } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css } from '@apache-superset/core/ui'; import { formatSelectOptions } from '@superset-ui/chart-controls'; import { RawAntdSelect } from '@superset-ui/core/components'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 964ab72d4739..a4c20bb8dfd8 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -47,11 +47,16 @@ import { getSelectedText, getTimeFormatterForGranularity, BinaryQueryObjectFilterClause, - t, - tn, extractTextFromHTML, } from '@superset-ui/core'; -import { styled, css, useTheme, SupersetTheme } from '@apache-superset/core/ui'; +import { + styled, + css, + useTheme, + SupersetTheme, + t, + tn, +} from '@apache-superset/core/ui'; import { GenericDataType } from '@apache-superset/core/api/core'; import { Input, diff --git a/superset-frontend/plugins/plugin-chart-table/src/consts.ts b/superset-frontend/plugins/plugin-chart-table/src/consts.ts index e8836228f863..7f2136767b13 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 ba00d26e05e3..cdff93eb8e70 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx @@ -41,6 +41,7 @@ import { isPercentMetric, ConditionalFormattingConfig, } from '@superset-ui/chart-controls'; +import { t } from '@apache-superset/core'; import { ensureIsArray, isAdhocColumn, @@ -49,7 +50,6 @@ import { QueryFormColumn, QueryMode, SMART_DATE_ID, - t, validateMaxValue, validateServerPagination, } from '@superset-ui/core'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/index.ts b/superset-frontend/plugins/plugin-chart-table/src/index.ts index 0518281d9cf2..48712ebfc2fa 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/index.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/index.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior, ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index ef634e01b86b..0e80b9eb8176 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -17,6 +17,7 @@ * under the License. */ import memoizeOne from 'memoize-one'; +import { t } from '@apache-superset/core'; import { ComparisonType, CurrencyFormatter, @@ -30,7 +31,6 @@ import { getTimeFormatterForGranularity, NumberFormats, QueryMode, - t, SMART_DATE_ID, TimeFormats, TimeFormatter, 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 a4d7d689e7c0..6408c07b2e8a 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, getStandardizedControls, 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 22983ca28629..7400b5358a37 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,11 +18,11 @@ */ import { useMemo, ReactNode } from 'react'; +import { t } from '@apache-superset/core'; import { ColorScheme, ColorSchemeGroup, SequentialScheme, - t, getLabelsColorMap, CategoricalColorNamespace, } from '@superset-ui/core'; 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 5c2ea5557793..464312ae479a 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 d7cb0ebdfa66..a8305489dc61 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,8 @@ * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import transformProps from './transformProps'; import buildQuery from './buildQuery'; import { WordCloudFormData } from '../types'; diff --git a/superset-frontend/spec/helpers/shim.tsx b/superset-frontend/spec/helpers/shim.tsx index 9ce86bf14f4c..112b0256f849 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 '../../packages/superset-ui-core/src/translation'; +import { configure as configureTranslation } from '@apache-superset/core/ui'; import { Worker } from './Worker'; import { IntersectionObserver } from './IntersectionObserver'; import { ResizeObserver } from './ResizeObserver'; diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.ts b/superset-frontend/src/SqlLab/actions/sqlLab.ts index 5d9bb391cb00..bd1fabd7c7d0 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.ts +++ b/superset-frontend/src/SqlLab/actions/sqlLab.ts @@ -23,11 +23,11 @@ import type { QueryColumn, SupersetError } from '@superset-ui/core'; import { FeatureFlag, SupersetClient, - t, isFeatureEnabled, COMMON_ERR_MESSAGES, getClientErrorObject, } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { invert, mapKeys } from 'lodash'; import { now } from '@superset-ui/core/utils/dates'; diff --git a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.ts b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.ts index c64605c39583..0b4196be2955 100644 --- a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.ts +++ b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useAnnotations.ts @@ -18,7 +18,8 @@ */ import { useSelector } from 'react-redux'; -import { COMMON_ERR_MESSAGES, ClientErrorObject, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { COMMON_ERR_MESSAGES, ClientErrorObject } from '@superset-ui/core'; import { SqlLabRootState } from 'src/SqlLab/types'; import { VALIDATION_DEBOUNCE_MS } from 'src/SqlLab/constants'; import { diff --git a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.ts b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.ts index 4ab5a31964be..19801df7e38e 100644 --- a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.ts +++ b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.ts @@ -18,7 +18,8 @@ */ import { useEffect, useMemo, useRef } from 'react'; import { useSelector, useDispatch, shallowEqual, useStore } from 'react-redux'; -import { getExtensionsRegistry, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getExtensionsRegistry } from '@superset-ui/core'; import type { Editor } from '@superset-ui/core/components'; import sqlKeywords from 'src/SqlLab/utils/sqlKeywords'; diff --git a/superset-frontend/src/SqlLab/components/App/index.tsx b/superset-frontend/src/SqlLab/components/App/index.tsx index 7e19359a03ff..efe9597c9f72 100644 --- a/superset-frontend/src/SqlLab/components/App/index.tsx +++ b/superset-frontend/src/SqlLab/components/App/index.tsx @@ -20,7 +20,7 @@ import { PureComponent } from 'react'; import { connect } from 'react-redux'; import { Redirect } from 'react-router-dom'; import Mousetrap from 'mousetrap'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { throttle } from 'lodash'; import { diff --git a/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx b/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx index 6a22a39fc024..eba788e1ab44 100644 --- a/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx +++ b/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx @@ -18,7 +18,7 @@ */ import { ReactNode } from 'react'; import { ClassNames } from '@emotion/react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import { Flex, Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/SqlLab/components/EditorAutoSync/EditorAutoSync.test.tsx b/superset-frontend/src/SqlLab/components/EditorAutoSync/EditorAutoSync.test.tsx index 3ac654173a45..2116340b7754 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 '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import EditorAutoSync, { INTERVAL } from '.'; -jest.mock('@superset-ui/core', () => ({ - ...jest.requireActual('@superset-ui/core'), +jest.mock('@apache-superset/core', () => ({ + ...jest.requireActual('@apache-superset/core'), 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 e6ef2f4bad00..567842350bfa 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 '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { SqlLabRootState, QueryEditor, diff --git a/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx b/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx index 242cd3dfa68f..227ff354ea1a 100644 --- a/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx @@ -18,7 +18,7 @@ */ import { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, Alert } from '@apache-superset/core/ui'; import { diff --git a/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton/index.tsx b/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton/index.tsx index 8d8bc7b1cb42..ee4a0f048606 100644 --- a/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/ExploreCtasResultsButton/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useSelector, useDispatch } from 'react-redux'; -import { t, JsonObject, VizType } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { JsonObject, VizType } from '@superset-ui/core'; import { createCtasDatasource, addInfoToast, diff --git a/superset-frontend/src/SqlLab/components/ExploreResultsButton/index.tsx b/superset-frontend/src/SqlLab/components/ExploreResultsButton/index.tsx index 415b5beb3ef4..c48530251064 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 b0c864927bcc..2617babf0dbd 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 b17d8e15deec..c3188f9efa2e 100644 --- a/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/KeyboardShortcutButton/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css } from '@apache-superset/core/ui'; 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 9884c1bb2068..d3e37a3586da 100644 --- a/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx @@ -21,7 +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, FeatureFlag, isFeatureEnabled } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { FeatureFlag, isFeatureEnabled } from '@superset-ui/core'; import { styled, css } from '@apache-superset/core/ui'; import QueryTable from 'src/SqlLab/components/QueryTable'; import { SqlLabRootState } from 'src/SqlLab/types'; diff --git a/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx b/superset-frontend/src/SqlLab/components/QueryLimitSelect/index.tsx index c1c2f8718d6e..59e9ba93bfbe 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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/QueryTable/index.tsx b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx index 344a0cb51356..9f7c4aaf17ee 100644 --- a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx @@ -27,7 +27,8 @@ import { TableView, } from '@superset-ui/core/components'; import ProgressBar from '@superset-ui/core/components/ProgressBar'; -import { t, QueryResponse, QueryState } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { QueryResponse, QueryState } from '@superset-ui/core'; import { useTheme } from '@apache-superset/core/ui'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx index b52a7804885d..def05372e70f 100644 --- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx +++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx @@ -44,15 +44,15 @@ import { ErrorMessageWithStackTrace, } from 'src/components'; import { nanoid } from 'nanoid'; +import { t } from '@apache-superset/core'; import { QueryState, - t, - tn, usePrevious, getNumberFormatter, getExtensionsRegistry, ErrorTypeEnum, } from '@superset-ui/core'; +import { tn } from '@apache-superset/core'; import { styled, useTheme, css, Alert } from '@apache-superset/core/ui'; import { ISaveableDatasource, diff --git a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx index 5b86830e9fc2..5c2e8fa6f56a 100644 --- a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx @@ -18,7 +18,7 @@ */ import { useMemo, FC, ReactElement } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme, SupersetTheme } from '@apache-superset/core/ui'; import { Button, DropdownButton } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx index ada65239f8ff..e1891b77fce2 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { Button, DropdownButton } 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 048486bcdbd7..490f35e67251 100644 --- a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx +++ b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx @@ -30,8 +30,8 @@ import { Icons, Flex, } from '@superset-ui/core/components'; +import { t } from '@apache-superset/core'; import { - t, SupersetClient, JsonResponse, JsonObject, diff --git a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx index bdaa4fa3407a..6aad652ead95 100644 --- a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx +++ b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx @@ -18,7 +18,7 @@ */ import { useState, useEffect, useMemo, ChangeEvent } from 'react'; import type { DatabaseObject } from 'src/features/databases/types'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Input, diff --git a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx index 48c0a51a25f5..a65416818b3c 100644 --- a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx +++ b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx @@ -21,7 +21,7 @@ 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { parseDate } from 'chrono-node'; import { diff --git a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx index 97f25e67a969..28e93f662bdc 100644 --- a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx +++ b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/index.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, getClientErrorObject, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { 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'; diff --git a/superset-frontend/src/SqlLab/components/SouthPane/Results.tsx b/superset-frontend/src/SqlLab/components/SouthPane/Results.tsx index d7a2b0c44f6c..661efb7171d4 100644 --- a/superset-frontend/src/SqlLab/components/SouthPane/Results.tsx +++ b/superset-frontend/src/SqlLab/components/SouthPane/Results.tsx @@ -19,7 +19,8 @@ import { FC } from 'react'; import { shallowEqual, useSelector } from 'react-redux'; import { EmptyState } from '@superset-ui/core/components'; -import { FeatureFlag, t, isFeatureEnabled } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { FeatureFlag, isFeatureEnabled } from '@superset-ui/core'; import { styled, Alert } from '@apache-superset/core/ui'; import { SqlLabRootState } from 'src/SqlLab/types'; diff --git a/superset-frontend/src/SqlLab/components/SouthPane/index.tsx b/superset-frontend/src/SqlLab/components/SouthPane/index.tsx index 84256491ec0b..529cdaec778f 100644 --- a/superset-frontend/src/SqlLab/components/SouthPane/index.tsx +++ b/superset-frontend/src/SqlLab/components/SouthPane/index.tsx @@ -20,7 +20,7 @@ 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; 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 b3d3c75cfda0..792cc0a9adc1 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx @@ -32,10 +32,10 @@ import type AceEditor from 'react-ace'; 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 { FeatureFlag, isFeatureEnabled, - t, getExtensionsRegistry, QueryResponse, Query, diff --git a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx index 060ea2c6afe6..7d9a025864e1 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx @@ -35,7 +35,7 @@ import { } from 'src/SqlLab/actions/sqlLab'; import { Button, EmptyState, Icons } from '@superset-ui/core/components'; import { type DatabaseObject } from 'src/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css } from '@apache-superset/core/ui'; import { TableSelectorMultiple } from 'src/components/TableSelector'; import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor'; diff --git a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx index be3854553dd6..e63da7ad2877 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx @@ -22,7 +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 { t, QueryState } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { QueryState } from '@superset-ui/core'; import { styled, css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; import { removeQueryEditor, diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx index 53ed449784c8..9a78a116bb0d 100644 --- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx +++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx @@ -20,7 +20,8 @@ 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 { FeatureFlag, t, isFeatureEnabled } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { FeatureFlag, 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'; diff --git a/superset-frontend/src/SqlLab/components/TableElement/index.tsx b/superset-frontend/src/SqlLab/components/TableElement/index.tsx index 0923db10f8e5..6aa508902f02 100644 --- a/superset-frontend/src/SqlLab/components/TableElement/index.tsx +++ b/superset-frontend/src/SqlLab/components/TableElement/index.tsx @@ -31,7 +31,7 @@ import { type CollapseProps, } from '@superset-ui/core/components'; import { CopyToClipboard } from 'src/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import { debounce } from 'lodash'; diff --git a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx index 5ac6b7c13b18..119fb2e1ed25 100644 --- a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx +++ b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx @@ -19,7 +19,8 @@ import { type FC, useCallback, useMemo, useRef, useState } from 'react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { nanoid } from 'nanoid'; -import { ClientErrorObject, getExtensionsRegistry, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ClientErrorObject, getExtensionsRegistry } from '@superset-ui/core'; import { css, styled, Alert, useTheme } from '@apache-superset/core/ui'; import { SafeMarkdown, diff --git a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx index 67e4f4d4d4de..402097d0a778 100644 --- a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx +++ b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useEffect } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { debounce } from 'lodash'; import { diff --git a/superset-frontend/src/SqlLab/constants.ts b/superset-frontend/src/SqlLab/constants.ts index 4422e4eac5ef..3b656c3a46bd 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 '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; import type { LabelType } from '@superset-ui/core/components'; export const STATE_TYPE_MAP: Record = { diff --git a/superset-frontend/src/SqlLab/reducers/getInitialState.ts b/superset-frontend/src/SqlLab/reducers/getInitialState.ts index 7d9f0fddacad..d614622dfff1 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 55981f0aa5ab..a63a34b2eea9 100644 --- a/superset-frontend/src/SqlLab/reducers/sqlLab.ts +++ b/superset-frontend/src/SqlLab/reducers/sqlLab.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { normalizeTimestamp, QueryState, t } from '@superset-ui/core'; +import { normalizeTimestamp, QueryState } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 ac0728339c93..94f71559579c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { QueryEditor } from '../types'; const untitledQueryRegex = /^Untitled Query (\d+)$/; // Literal notation isn't recompiled diff --git a/superset-frontend/src/components/AlteredSliceTag/index.tsx b/superset-frontend/src/components/AlteredSliceTag/index.tsx index b9025fd2d260..2ad313bbd69c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 2bb34906e237..503dbf17cb6b 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { Tooltip } from '@superset-ui/core/components'; import type { ModifiedInfoProps } from './types'; diff --git a/superset-frontend/src/components/Chart/Chart.tsx b/superset-frontend/src/components/Chart/Chart.tsx index 12522b531496..0b1ad8793b5e 100644 --- a/superset-frontend/src/components/Chart/Chart.tsx +++ b/superset-frontend/src/components/Chart/Chart.tsx @@ -17,13 +17,12 @@ * under the License. */ import { PureComponent } from 'react'; +import { t, logging } from '@apache-superset/core'; import { ensureIsArray, FeatureFlag, isFeatureEnabled, - logging, QueryFormData, - t, SqlaFormData, ClientErrorObject, type JsonObject, diff --git a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx index 172f5c60681a..945657278e67 100644 --- a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx +++ b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx @@ -28,6 +28,7 @@ import { } from 'react'; import ReactDOM from 'react-dom'; import { useDispatch, useSelector } from 'react-redux'; +import { t } from '@apache-superset/core'; import { Behavior, BinaryQueryObjectFilterClause, @@ -39,7 +40,6 @@ import { getExtensionsRegistry, isFeatureEnabled, QueryFormData, - t, } from '@superset-ui/core'; import { useTheme } from '@apache-superset/core/ui'; import { RootState } from 'src/dashboard/types'; diff --git a/superset-frontend/src/components/Chart/ChartRenderer.jsx b/superset-frontend/src/components/Chart/ChartRenderer.jsx index 61cf48fdb5a9..bad557f8852a 100644 --- a/superset-frontend/src/components/Chart/ChartRenderer.jsx +++ b/superset-frontend/src/components/Chart/ChartRenderer.jsx @@ -21,14 +21,14 @@ import PropTypes from 'prop-types'; import { createRef, Component } from 'react'; import { SuperChart, - logging, Behavior, - t, getChartMetadataRegistry, VizType, isFeatureEnabled, FeatureFlag, } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; +import { t } from '@apache-superset/core/ui'; 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/DrillBy/DrillByModal.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx index eec8fd8ce5b2..6245945de45e 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx @@ -18,6 +18,7 @@ */ import { useCallback, useContext, useEffect, useMemo, useState } from 'react'; +import { t } from '@apache-superset/core'; import { BinaryQueryObjectFilterClause, BaseFormData, @@ -25,7 +26,6 @@ import { QueryData, ensureIsArray, isDefined, - t, ContextMenuFilters, AdhocFilter, } from '@superset-ui/core'; diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx index 642fb42ab381..9e3ebde3a074 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx @@ -26,6 +26,7 @@ import { useRef, useState, } from 'react'; +import { t } from '@apache-superset/core'; import { BaseFormData, Behavior, @@ -33,7 +34,6 @@ import { ContextMenuFilters, ensureIsArray, getChartMetadataRegistry, - t, } from '@superset-ui/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { diff --git a/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx b/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx index 38c38ca2d0d3..8676d9fdb838 100644 --- a/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/useDisplayModeToggle.tsx @@ -18,7 +18,7 @@ */ import { useMemo, useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, SupersetTheme } from '@apache-superset/core/ui'; 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 7b2b85052c65..da9d99ef91a7 100644 --- a/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { isDefined, QueryData, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isDefined, QueryData } from '@superset-ui/core'; import { css, styled } from '@apache-superset/core/ui'; 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 faea69a624fd..89b61ecf42fb 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx @@ -19,10 +19,10 @@ import { useCallback, useContext, useMemo } from 'react'; import { useHistory } from 'react-router-dom'; +import { t } from '@apache-superset/core'; import { BinaryQueryObjectFilterClause, QueryFormData, - t, } from '@superset-ui/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { Button, Modal } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx index bcc05abb304b..a07f58a7147f 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx @@ -26,12 +26,12 @@ import { useState, } from 'react'; import { useSelector } from 'react-redux'; +import { t } from '@apache-superset/core'; import { BinaryQueryObjectFilterClause, ensureIsArray, JsonObject, QueryFormData, - t, } from '@superset-ui/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { GenericDataType } from '@apache-superset/core/api/core'; diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx index 0e0f0f934681..9f4b2bd0c762 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailTableControls.tsx @@ -19,10 +19,10 @@ import { useCallback, useMemo } from 'react'; import { Tag } from 'src/components/Tag'; +import { t } from '@apache-superset/core'; import { BinaryQueryObjectFilterClause, isAdhocColumn, - t, } from '@superset-ui/core'; import { css, useTheme } from '@apache-superset/core/ui'; import RowCountLabel from 'src/components/RowCountLabel'; diff --git a/superset-frontend/src/components/Chart/chartAction.js b/superset-frontend/src/components/Chart/chartAction.js index d8ad30d79396..5c2453bedafa 100644 --- a/superset-frontend/src/components/Chart/chartAction.js +++ b/superset-frontend/src/components/Chart/chartAction.js @@ -21,10 +21,10 @@ import { FeatureFlag, isDefined, SupersetClient, - t, isFeatureEnabled, getClientErrorObject, } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; import { getControlsState } from 'src/explore/store'; import { getAnnotationJsonUrl, diff --git a/superset-frontend/src/components/Chart/chartReducer.ts b/superset-frontend/src/components/Chart/chartReducer.ts index 081bd4154724..b4f089feae5d 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 02988969e926..13c64f1550db 100644 --- a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/index.tsx +++ b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/index.tsx @@ -25,6 +25,7 @@ import { useMemo, } from 'react'; import { isEmpty } from 'lodash'; +import { t } from '@apache-superset/core'; import { Behavior, BinaryQueryObjectFilterClause, @@ -32,7 +33,6 @@ import { getChartMetadataRegistry, QueryFormData, removeHTMLTags, - t, } from '@superset-ui/core'; import { css, styled } from '@apache-superset/core/ui'; import { useSelector } from 'react-redux'; diff --git a/superset-frontend/src/components/CopyToClipboard/index.tsx b/superset-frontend/src/components/CopyToClipboard/index.tsx index d822fee9f88c..976f0059c30a 100644 --- a/superset-frontend/src/components/CopyToClipboard/index.tsx +++ b/superset-frontend/src/components/CopyToClipboard/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Component, cloneElement, ReactElement } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, SupersetTheme } from '@apache-superset/core/ui'; import copyTextToClipboard from 'src/utils/copy'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/DatabaseSelector/index.tsx b/superset-frontend/src/components/DatabaseSelector/index.tsx index 6fc50b3e5574..f1c953479130 100644 --- a/superset-frontend/src/components/DatabaseSelector/index.tsx +++ b/superset-frontend/src/components/DatabaseSelector/index.tsx @@ -24,7 +24,8 @@ import { useRef, useCallback, } from 'react'; -import { SupersetClient, SupersetError, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient, SupersetError } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import rison from 'rison'; import RefreshLabel from '@superset-ui/core/components/RefreshLabel'; diff --git a/superset-frontend/src/components/Datasource/ChangeDatasourceModal/index.tsx b/superset-frontend/src/components/Datasource/ChangeDatasourceModal/index.tsx index 3f95a756ad24..ea1e1e56298d 100644 --- a/superset-frontend/src/components/Datasource/ChangeDatasourceModal/index.tsx +++ b/superset-frontend/src/components/Datasource/ChangeDatasourceModal/index.tsx @@ -25,7 +25,8 @@ import { ChangeEvent, } from 'react'; -import { SupersetClient, t, getClientErrorObject } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient, getClientErrorObject } from '@superset-ui/core'; import { styled, Alert } from '@apache-superset/core/ui'; import { Button, diff --git a/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx b/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx index 96e271f9e59b..413ddbd577dd 100644 --- a/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx +++ b/superset-frontend/src/components/Datasource/DatasourceModal/index.tsx @@ -18,10 +18,10 @@ */ import { FunctionComponent, useState, useEffect, useCallback } from 'react'; import { useSelector } from 'react-redux'; +import { t } from '@apache-superset/core'; import { SupersetClient, getClientErrorObject, - t, SupersetError, } from '@superset-ui/core'; import { styled, useTheme, css, Alert } from '@apache-superset/core/ui'; diff --git a/superset-frontend/src/components/Datasource/components/CollectionTable/index.tsx b/superset-frontend/src/components/Datasource/components/CollectionTable/index.tsx index 2f010b02a321..aacc72dfead9 100644 --- a/superset-frontend/src/components/Datasource/components/CollectionTable/index.tsx +++ b/superset-frontend/src/components/Datasource/components/CollectionTable/index.tsx @@ -18,7 +18,7 @@ */ import { PureComponent, ReactNode } from 'react'; import { nanoid } from 'nanoid'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css, SupersetTheme } from '@apache-superset/core/ui'; import { Icons, Button, InfoTooltip } from '@superset-ui/core/components'; import { FilterValue } from 'react-table'; diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx index 82b0c626648d..1412b4cedf6c 100644 --- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx +++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx @@ -27,7 +27,6 @@ import { ensureIsArray, FeatureFlag, SupersetClient, - t, getClientErrorObject, getExtensionsRegistry, } from '@superset-ui/core'; @@ -37,6 +36,7 @@ import { themeObject, Alert, withTheme, + t, } from '@apache-superset/core/ui'; import Tabs from '@superset-ui/core/components/Tabs'; import WarningIconWithTooltip from '@superset-ui/core/components/WarningIconWithTooltip'; 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 ec1778324d46..05bd1aa65d7f 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,7 +17,7 @@ * under the License. */ import { useState, useEffect, useMemo, useCallback, useRef } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css } from '@apache-superset/core/ui'; import { CertifiedBadge, InfoTooltip } from '@superset-ui/core/components'; import Table, { diff --git a/superset-frontend/src/components/Datasource/utils/index.js b/superset-frontend/src/components/Datasource/utils/index.js index 4c38d07f1e2d..94c2db124462 100644 --- a/superset-frontend/src/components/Datasource/utils/index.js +++ b/superset-frontend/src/components/Datasource/utils/index.js @@ -18,7 +18,8 @@ */ import { Children, cloneElement } from 'react'; import { nanoid } from 'nanoid'; -import { SupersetClient, tn } from '@superset-ui/core'; +import { SupersetClient } from '@superset-ui/core'; +import { tn } from '@apache-superset/core/ui'; import rison from 'rison'; export function recurseReactClone(children, type, propExtender) { diff --git a/superset-frontend/src/components/Datasource/utils/utils.test.tsx b/superset-frontend/src/components/Datasource/utils/utils.test.tsx index 84ca08f4616d..047eaeba461f 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 '@superset-ui/core'; +import { tn } from '@apache-superset/core'; 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 28538a53ea37..f1170480a8b1 100644 --- a/superset-frontend/src/components/DynamicPlugins/index.tsx +++ b/superset-frontend/src/components/DynamicPlugins/index.tsx @@ -24,9 +24,9 @@ import { isFeatureEnabled, FeatureFlag, getChartMetadataRegistry, - logging, makeApi, } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; 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 1550f5e4f0cb..8dcef63b4066 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ErrorAlert } from '../ErrorMessage'; import type { ErrorBoundaryProps, ErrorBoundaryState } from './types'; diff --git a/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx index f139703a4983..3125ca92162f 100644 --- a/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx @@ -17,7 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { t, tn } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { tn } from '@apache-superset/core'; 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 0da2973796af..f0f279e4a22c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 f907d4837fca..97c6ed70471b 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme, Alert } from '@apache-superset/core/ui'; import { Icons, diff --git a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx index 7884babc7025..b969caa3446b 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx @@ -17,7 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { ErrorSource, t, SupersetError } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ErrorSource, SupersetError } from '@superset-ui/core'; import { Typography } from '@superset-ui/core/components'; import { getErrorMessageComponentRegistry } from './getErrorMessageComponentRegistry'; import { ErrorAlert } from './ErrorAlert'; diff --git a/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/FrontendNetworkErrorMessage.tsx index 11a32a9682c6..98338af13c73 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 7ce24c6d5e9c..b7eb1135227b 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import type { ErrorMessageComponentProps } from './types'; import { ErrorAlert } from './ErrorAlert'; diff --git a/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx index 19823f72f680..871c4eef3941 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 0c5073dd57d3..cb0e22b9873c 100644 --- a/superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.tsx @@ -25,7 +25,8 @@ 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 { QueryResponse, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { QueryResponse } from '@superset-ui/core'; import type { ErrorMessageComponentProps } from './types'; import { ErrorAlert } from './ErrorAlert'; diff --git a/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx index 56ac4f049d85..2e4dbf23d9e2 100644 --- a/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx @@ -17,7 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { t, tn } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { tn } from '@apache-superset/core'; 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 64d3e48ff755..d9e5a26093d9 100644 --- a/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx @@ -17,7 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { t, tn } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { tn } from '@apache-superset/core'; 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 c0c8b576657c..9eae059b28d1 100644 --- a/superset-frontend/src/components/FilterableTable/utils.tsx +++ b/superset-frontend/src/components/FilterableTable/utils.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, safeHtmlSpan } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { safeHtmlSpan } from '@superset-ui/core'; import { JsonModal } from '../JsonModal'; import { safeJsonObjectParse } from '../JsonModal/utils'; import { NULL_STRING, CellDataType } from './useCellContentParser'; diff --git a/superset-frontend/src/components/GridTable/Header.tsx b/superset-frontend/src/components/GridTable/Header.tsx index afbb7e6d2e55..5b6e341fc0ce 100644 --- a/superset-frontend/src/components/GridTable/Header.tsx +++ b/superset-frontend/src/components/GridTable/Header.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useCallback, useEffect, useRef, useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import type { Column, GridApi } from 'ag-grid-community'; diff --git a/superset-frontend/src/components/GridTable/HeaderMenu.tsx b/superset-frontend/src/components/GridTable/HeaderMenu.tsx index c9425ef3de90..fbf517619e13 100644 --- a/superset-frontend/src/components/GridTable/HeaderMenu.tsx +++ b/superset-frontend/src/components/GridTable/HeaderMenu.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useCallback } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import type { Column, ColumnPinnedType, GridApi } from 'ag-grid-community'; diff --git a/superset-frontend/src/components/ImportModal/ErrorAlert.tsx b/superset-frontend/src/components/ImportModal/ErrorAlert.tsx index a7eecee14c74..571d7bd9a5d3 100644 --- a/superset-frontend/src/components/ImportModal/ErrorAlert.tsx +++ b/superset-frontend/src/components/ImportModal/ErrorAlert.tsx @@ -18,7 +18,7 @@ */ import { FunctionComponent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { SupersetTheme, Alert } from '@apache-superset/core/ui'; import { getDatabaseDocumentationLinks } from 'src/views/CRUD/hooks'; diff --git a/superset-frontend/src/components/ImportModal/ImportErrorAlert.tsx b/superset-frontend/src/components/ImportModal/ImportErrorAlert.tsx index f835f6d97330..a485aecb5e6c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 6418d40b6a82..dd43e57b1789 100644 --- a/superset-frontend/src/components/ImportModal/index.tsx +++ b/superset-frontend/src/components/ImportModal/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FunctionComponent, useEffect, useState, ChangeEvent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css } from '@apache-superset/core/ui'; import { useImportResource } from 'src/views/CRUD/hooks'; import { diff --git a/superset-frontend/src/components/ListView/CardSortSelect.tsx b/superset-frontend/src/components/ListView/CardSortSelect.tsx index 2dfb6c504446..5ec2a001b31a 100644 --- a/superset-frontend/src/components/ListView/CardSortSelect.tsx +++ b/superset-frontend/src/components/ListView/CardSortSelect.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useMemo } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { FormLabel, Select } from '@superset-ui/core/components'; import { SELECT_WIDTH } from './utils'; diff --git a/superset-frontend/src/components/ListView/CrossLinksTooltip.tsx b/superset-frontend/src/components/ListView/CrossLinksTooltip.tsx index 069f9c56388d..88504e45e925 100644 --- a/superset-frontend/src/components/ListView/CrossLinksTooltip.tsx +++ b/superset-frontend/src/components/ListView/CrossLinksTooltip.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Link } from 'react-router-dom'; import { Tooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/ListView/Filters/DateRange.tsx b/superset-frontend/src/components/ListView/Filters/DateRange.tsx index 9a6117bb4f3b..00703f63bb2b 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 40cc0b961afa..11efbad1b5ef 100644 --- a/superset-frontend/src/components/ListView/Filters/NumericalRange.tsx +++ b/superset-frontend/src/components/ListView/Filters/NumericalRange.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, forwardRef, useImperativeHandle, RefObject } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { InputNumber } from '@superset-ui/core/components/Input'; import { FormLabel } from '@superset-ui/core/components/Form'; diff --git a/superset-frontend/src/components/ListView/Filters/Search.tsx b/superset-frontend/src/components/ListView/Filters/Search.tsx index c512b0aa2b77..9655a29b6c5c 100644 --- a/superset-frontend/src/components/ListView/Filters/Search.tsx +++ b/superset-frontend/src/components/ListView/Filters/Search.tsx @@ -24,7 +24,7 @@ import { ChangeEvent, } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { Input, diff --git a/superset-frontend/src/components/ListView/Filters/Select.tsx b/superset-frontend/src/components/ListView/Filters/Select.tsx index c7d4451159de..0d309b1b2559 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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/ListView.tsx b/superset-frontend/src/components/ListView/ListView.tsx index 22db6196a3a8..bfc0731924ad 100644 --- a/superset-frontend/src/components/ListView/ListView.tsx +++ b/superset-frontend/src/components/ListView/ListView.tsx @@ -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, Alert } from '@apache-superset/core/ui'; import { useCallback, useEffect, useRef, useState, ReactNode } from 'react'; import cx from 'classnames'; diff --git a/superset-frontend/src/components/Modal/StandardModal.tsx b/superset-frontend/src/components/Modal/StandardModal.tsx index dd60ee97d34f..97e4f8d638ef 100644 --- a/superset-frontend/src/components/Modal/StandardModal.tsx +++ b/superset-frontend/src/components/Modal/StandardModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; 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 5d62901bfb36..4c3ab352cde3 100644 --- a/superset-frontend/src/components/Modal/useModalValidation.tsx +++ b/superset-frontend/src/components/Modal/useModalValidation.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useCallback, useMemo, ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css } from '@apache-superset/core/ui'; import { List } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/components/RowCountLabel/index.tsx b/superset-frontend/src/components/RowCountLabel/index.tsx index 0e644c5c4f4b..8b60b02f583c 100644 --- a/superset-frontend/src/components/RowCountLabel/index.tsx +++ b/superset-frontend/src/components/RowCountLabel/index.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { getNumberFormatter, t, tn } from '@superset-ui/core'; +import { t, tn } from '@apache-superset/core'; +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 9885370e7f14..61e020d1bc68 100644 --- a/superset-frontend/src/components/SQLEditorWithValidation/index.tsx +++ b/superset-frontend/src/components/SQLEditorWithValidation/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useCallback, useState, useEffect, forwardRef } from 'react'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { SQLEditor, diff --git a/superset-frontend/src/components/StreamingExportModal/StreamingExportModal.tsx b/superset-frontend/src/components/StreamingExportModal/StreamingExportModal.tsx index 4e2c31a29fc1..995bcc53f646 100644 --- a/superset-frontend/src/components/StreamingExportModal/StreamingExportModal.tsx +++ b/superset-frontend/src/components/StreamingExportModal/StreamingExportModal.tsx @@ -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, useTheme } from '@apache-superset/core/ui'; import { Modal, diff --git a/superset-frontend/src/components/TableSelector/index.tsx b/superset-frontend/src/components/TableSelector/index.tsx index f9e0482b8f92..60c6171e6dfa 100644 --- a/superset-frontend/src/components/TableSelector/index.tsx +++ b/superset-frontend/src/components/TableSelector/index.tsx @@ -25,11 +25,8 @@ import { } from 'react'; import type { SelectValue } from '@superset-ui/core/components'; -import { - t, - getClientErrorMessage, - getClientErrorObject, -} from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getClientErrorMessage, getClientErrorObject } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { CertifiedBadge, Select } from '@superset-ui/core/components'; import { DatabaseSelector } from 'src/components'; diff --git a/superset-frontend/src/components/Tag/utils.tsx b/superset-frontend/src/components/Tag/utils.tsx index b2756988687d..bcb913f54a16 100644 --- a/superset-frontend/src/components/Tag/utils.tsx +++ b/superset-frontend/src/components/Tag/utils.tsx @@ -17,11 +17,11 @@ * under the License. */ +import { t } from '@apache-superset/core'; import { ClientErrorObject, getClientErrorObject, SupersetClient, - t, } from '@superset-ui/core'; import type { TagType } from 'src/types/TagType'; diff --git a/superset-frontend/src/core/commands/index.ts b/superset-frontend/src/core/commands/index.ts index 362218123bb1..7eccc80b405d 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 '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { commands as commandsApi } from '@apache-superset/core'; import { Disposable } from '../models'; diff --git a/superset-frontend/src/dashboard/actions/chartCustomizationActions.ts b/superset-frontend/src/dashboard/actions/chartCustomizationActions.ts index 309bd3c3c04a..b81fe8182504 100644 --- a/superset-frontend/src/dashboard/actions/chartCustomizationActions.ts +++ b/superset-frontend/src/dashboard/actions/chartCustomizationActions.ts @@ -18,7 +18,8 @@ */ import { AnyAction } from 'redux'; import { ThunkAction, ThunkDispatch } from 'redux-thunk'; -import { makeApi, t, getClientErrorObject, DataMask } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { makeApi, getClientErrorObject, DataMask } from '@superset-ui/core'; import { addDangerToast } from 'src/components/MessageToasts/actions'; import { DashboardInfo, RootState } from 'src/dashboard/types'; import { diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts index 63570638ea9e..e65b7143fb70 100644 --- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts +++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts @@ -17,7 +17,8 @@ * under the License. */ import { Dispatch } from 'redux'; -import { makeApi, t, getClientErrorObject } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { makeApi, getClientErrorObject } from '@superset-ui/core'; import { addDangerToast } from 'src/components/MessageToasts/actions'; import { ChartConfiguration, diff --git a/superset-frontend/src/dashboard/actions/dashboardLayout.js b/superset-frontend/src/dashboard/actions/dashboardLayout.js index 42759a8e9c47..ec320b4b76b3 100644 --- a/superset-frontend/src/dashboard/actions/dashboardLayout.js +++ b/superset-frontend/src/dashboard/actions/dashboardLayout.js @@ -17,7 +17,7 @@ * under the License. */ import { ActionCreators as UndoActionCreators } from 'redux-undo'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; import { addWarningToast } from 'src/components/MessageToasts/actions'; import { TABS_TYPE, ROW_TYPE } from 'src/dashboard/util/componentTypes'; import { diff --git a/superset-frontend/src/dashboard/actions/dashboardState.js b/superset-frontend/src/dashboard/actions/dashboardState.js index 18b567e20f51..353877a3c047 100644 --- a/superset-frontend/src/dashboard/actions/dashboardState.js +++ b/superset-frontend/src/dashboard/actions/dashboardState.js @@ -24,9 +24,7 @@ import { isFeatureEnabled, FeatureFlag, getLabelsColorMap, - logging, SupersetClient, - t, getClientErrorObject, getCategoricalSchemeRegistry, promiseTimeout, @@ -36,6 +34,8 @@ import { removeChart, refreshChart, } from 'src/components/Chart/chartAction'; +import { logging } from '@apache-superset/core'; +import { t } from '@apache-superset/core/ui'; 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 de48b7f59eed..d9ca57232749 100644 --- a/superset-frontend/src/dashboard/actions/sliceEntities.ts +++ b/superset-frontend/src/dashboard/actions/sliceEntities.ts @@ -17,10 +17,10 @@ * under the License. */ import rison from 'rison'; +import { t } from '@apache-superset/core'; import { DatasourceType, SupersetClient, - t, getClientErrorObject, } from '@superset-ui/core'; import { addDangerToast } from 'src/components/MessageToasts/actions'; diff --git a/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx b/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx index a677e1a64eb9..e49b3b93a732 100644 --- a/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx +++ b/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.tsx @@ -29,7 +29,8 @@ import { FC, } from 'react'; -import { t, isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { css } from '@apache-superset/core/ui'; import { Tooltip, ImageLoader } from '@superset-ui/core/components'; import { GenericLink, usePluginContext } from 'src/components'; diff --git a/superset-frontend/src/dashboard/components/AnchorLink/index.tsx b/superset-frontend/src/dashboard/components/AnchorLink/index.tsx index 837444412aa7..9412085db9d9 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import URLShortLinkButton, { URLShortLinkButtonProps, diff --git a/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx b/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx index be5ecd076eaa..bf48c8ed33d8 100644 --- a/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx +++ b/superset-frontend/src/dashboard/components/BuilderComponentPane/index.tsx @@ -19,7 +19,7 @@ /* eslint-env browser */ import tinycolor from 'tinycolor2'; import Tabs from '@superset-ui/core/components/Tabs'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, SupersetTheme } from '@apache-superset/core/ui'; import SliceAdder from 'src/dashboard/containers/SliceAdder'; import dashboardComponents from 'src/visualizations/presets/dashboardComponents'; diff --git a/superset-frontend/src/dashboard/components/ColorSchemeControlWrapper.tsx b/superset-frontend/src/dashboard/components/ColorSchemeControlWrapper.tsx index 42e3b0bca512..e6f116f12e09 100644 --- a/superset-frontend/src/dashboard/components/ColorSchemeControlWrapper.tsx +++ b/superset-frontend/src/dashboard/components/ColorSchemeControlWrapper.tsx @@ -17,7 +17,8 @@ * under the License. */ /* eslint-env browser */ -import { getCategoricalSchemeRegistry, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +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 357957a916c2..a6fb1b25d0fd 100644 --- a/superset-frontend/src/dashboard/components/ColorSchemeSelect.tsx +++ b/superset-frontend/src/dashboard/components/ColorSchemeSelect.tsx @@ -17,10 +17,10 @@ * under the License. */ import { ReactNode, useMemo } from 'react'; +import { t } from '@apache-superset/core'; import { ColorScheme, ColorSchemeGroup, - t, getCategoricalSchemeRegistry, CategoricalScheme, } from '@superset-ui/core'; diff --git a/superset-frontend/src/dashboard/components/Dashboard.jsx b/superset-frontend/src/dashboard/components/Dashboard.jsx index 4b47b3408141..3c56dbbebc03 100644 --- a/superset-frontend/src/dashboard/components/Dashboard.jsx +++ b/superset-frontend/src/dashboard/components/Dashboard.jsx @@ -18,7 +18,7 @@ */ import { PureComponent } from 'react'; import PropTypes from 'prop-types'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; import { Loading } from '@superset-ui/core/components'; import { PluginContext } from 'src/components'; diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 38f0dcac2b15..c45563616a44 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -19,7 +19,8 @@ /* eslint-env browser */ import cx from 'classnames'; import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { addAlpha, JsonObject, t, useElementOnScreen } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { addAlpha, JsonObject, useElementOnScreen } from '@superset-ui/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { useDispatch, useSelector } from 'react-redux'; import { EmptyState, Loading } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/DashboardGrid.jsx b/superset-frontend/src/dashboard/components/DashboardGrid.jsx index 1ea7fec11d89..1ce30c6d5e03 100644 --- a/superset-frontend/src/dashboard/components/DashboardGrid.jsx +++ b/superset-frontend/src/dashboard/components/DashboardGrid.jsx @@ -20,8 +20,8 @@ import { PureComponent, Fragment } from 'react'; import { withTheme } from '@emotion/react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import { addAlpha, t } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { addAlpha } from '@superset-ui/core'; +import { css, styled, t } from '@apache-superset/core/ui'; 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 c9c88ded8a17..44d35ef96798 100644 --- a/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx +++ b/superset-frontend/src/dashboard/components/EmbeddedModal/index.tsx @@ -17,10 +17,10 @@ * under the License. */ import { useCallback, useEffect, useState } from 'react'; +import { t } from '@apache-superset/core'; import { makeApi, SupersetApiError, - t, getExtensionsRegistry, } from '@superset-ui/core'; import { styled, css, Alert } from '@apache-superset/core/ui'; diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx index efaca53d51c4..86bada7dc230 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx @@ -19,7 +19,7 @@ import { RefObject, useEffect, useRef, KeyboardEvent } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { List, Popover } from '@superset-ui/core/components'; import { diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx index aad602403369..013797e106e9 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx +++ b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx @@ -29,11 +29,11 @@ import { import { useDispatch, useSelector } from 'react-redux'; import { uniqWith } from 'lodash'; import cx from 'classnames'; +import { t } from '@apache-superset/core'; import { DataMaskStateWithId, Filters, JsonObject, - t, usePrevious, } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; diff --git a/superset-frontend/src/dashboard/components/GroupByBadge/index.tsx b/superset-frontend/src/dashboard/components/GroupByBadge/index.tsx index f73608666e7b..ad44c17d649b 100644 --- a/superset-frontend/src/dashboard/components/GroupByBadge/index.tsx +++ b/superset-frontend/src/dashboard/components/GroupByBadge/index.tsx @@ -19,7 +19,7 @@ import { memo, useMemo, useState, useRef } from 'react'; import { useSelector } from 'react-redux'; import { createSelector } from '@reduxjs/toolkit'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import { Icons, Badge, Tooltip, Tag } from '@superset-ui/core/components'; import { getFilterValueForDisplay } from '../nativeFilters/utils'; diff --git a/superset-frontend/src/dashboard/components/Header/index.jsx b/superset-frontend/src/dashboard/components/Header/index.jsx index 16bec548f9e9..eb1c437e4f7e 100644 --- a/superset-frontend/src/dashboard/components/Header/index.jsx +++ b/superset-frontend/src/dashboard/components/Header/index.jsx @@ -22,10 +22,9 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { isFeatureEnabled, FeatureFlag, - t, getExtensionsRegistry, } from '@superset-ui/core'; -import { styled, css } from '@apache-superset/core/ui'; +import { styled, css, t } from '@apache-superset/core/ui'; 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 3379607f84b5..d5819a14faa5 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 99d7a0c0a8ed..331fb2d97d74 100644 --- a/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx +++ b/superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx @@ -20,7 +20,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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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/MissingChart.tsx b/superset-frontend/src/dashboard/components/MissingChart.tsx index 5332836b33e9..6ff520af789c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 42d88d6643c9..39f27192ab9d 100644 --- a/superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx +++ b/superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx @@ -27,7 +27,7 @@ import { saveDashboardRequest, setOverrideConfirm, } from 'src/dashboard/actions/dashboardState'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { SAVE_TYPE_OVERWRITE_CONFIRMED } from 'src/dashboard/util/constants'; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx index 52de57b5a8a4..f047db719e8a 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx @@ -26,6 +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 PropertiesModal from '.'; // Increase timeout for CI environment @@ -453,8 +454,7 @@ describe('PropertiesModal', () => { const props = createProps(); const propsWithDashboardInfo = { ...props, dashboardInfo }; - const getSelect = () => - screen.getByRole('combobox', { name: SupersetCore.t('Roles') }); + const getSelect = () => screen.getByRole('combobox', { name: t('Roles') }); const open = () => waitFor(() => userEvent.click(getSelect())); const getElementsByClassName = (className: string) => @@ -488,7 +488,7 @@ describe('PropertiesModal', () => { const comboboxes = screen.getAllByRole('combobox'); expect(comboboxes.length).toBeGreaterThanOrEqual(3); expect( - screen.getByRole('combobox', { name: SupersetCore.t('Roles') }), + screen.getByRole('combobox', { name: t('Roles') }), ).toBeInTheDocument(); }, { timeout: 5000 }, @@ -512,8 +512,7 @@ describe('PropertiesModal', () => { const props = createProps(); const propsWithDashboardInfo = { ...props, dashboardInfo }; - const getSelect = () => - screen.getByRole('combobox', { name: SupersetCore.t('Owners') }); + const getSelect = () => screen.getByRole('combobox', { name: t('Owners') }); const open = () => waitFor(() => userEvent.click(getSelect())); const getElementsByClassName = (className: string) => @@ -549,7 +548,7 @@ describe('PropertiesModal', () => { const comboboxes = screen.getAllByRole('combobox'); expect(comboboxes.length).toBeGreaterThanOrEqual(3); expect( - screen.getByRole('combobox', { name: SupersetCore.t('Owners') }), + screen.getByRole('combobox', { name: t('Owners') }), ).toBeInTheDocument(); }, { timeout: 5000 }, @@ -569,8 +568,7 @@ describe('PropertiesModal', () => { const props = createProps(); const propsWithDashboardInfo = { ...props, dashboardInfo }; - const getSelect = () => - screen.getByRole('combobox', { name: SupersetCore.t('Owners') }); + const getSelect = () => screen.getByRole('combobox', { name: t('Owners') }); const open = () => waitFor(() => userEvent.click(getSelect())); const getElementsByClassName = (className: string) => document.querySelectorAll(className)! as NodeListOf; @@ -603,7 +601,7 @@ describe('PropertiesModal', () => { await waitFor( () => { expect( - screen.getByRole('combobox', { name: SupersetCore.t('Owners') }), + screen.getByRole('combobox', { name: t('Owners') }), ).toBeInTheDocument(); }, { timeout: 5000 }, diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx index 267c347d1cad..891fa19090d8 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx @@ -28,13 +28,13 @@ 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 { ensureIsArray, isFeatureEnabled, FeatureFlag, getCategoricalSchemeRegistry, SupersetClient, - t, getClientErrorObject, } from '@superset-ui/core'; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx index 68aae0299b13..1798625cec75 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useMemo } from 'react'; -import { isFeatureEnabled, FeatureFlag, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { AsyncSelect } from '@superset-ui/core/components'; import { type TagType } from 'src/components'; import { loadTags } from 'src/components/Tag/utils'; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx index 970d584cdef6..da1f1d990fbc 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx @@ -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 { JsonEditor } from '@superset-ui/core/components'; 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 43047725bee2..1da89e8534a4 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 66c704493413..c5ceaeacad4d 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 5fa7c50a6686..5c4264fefc22 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 95e16def7689..7766e7cef11e 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.tsx @@ -17,8 +17,8 @@ * under the License. */ import { useCallback, useEffect, useState } from 'react'; +import { t } from '@apache-superset/core'; import { - t, SupersetClient, isFeatureEnabled, FeatureFlag, diff --git a/superset-frontend/src/dashboard/components/PublishedStatus/index.tsx b/superset-frontend/src/dashboard/components/PublishedStatus/index.tsx index daa4bc2a34d0..b05cd30bf3b8 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { Tooltip, PublishedLabel } from '@superset-ui/core/components'; import { HeaderProps, HeaderDropdownProps } from '../Header/types'; diff --git a/superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx b/superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx index 6accfe10060f..453a063ed66c 100644 --- a/superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx +++ b/superset-frontend/src/dashboard/components/RefreshFrequency/RefreshFrequencySelect.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Radio, Input } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx b/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx index 0478246becfe..fec8821f7349 100644 --- a/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx +++ b/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, Alert } from '@apache-superset/core/ui'; import { Form } from '@superset-ui/core/components'; import { StandardModal } from 'src/components/Modal'; diff --git a/superset-frontend/src/dashboard/components/SaveModal.tsx b/superset-frontend/src/dashboard/components/SaveModal.tsx index a449b3bf1090..4daf944df694 100644 --- a/superset-frontend/src/dashboard/components/SaveModal.tsx +++ b/superset-frontend/src/dashboard/components/SaveModal.tsx @@ -27,7 +27,7 @@ import { Divider, Flex, } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { diff --git a/superset-frontend/src/dashboard/components/SliceAdder.tsx b/superset-frontend/src/dashboard/components/SliceAdder.tsx index 650521b0baa3..a79a300c6451 100644 --- a/superset-frontend/src/dashboard/components/SliceAdder.tsx +++ b/superset-frontend/src/dashboard/components/SliceAdder.tsx @@ -22,7 +22,7 @@ import AutoSizer from 'react-virtualized-auto-sizer'; import { FixedSizeList as List } from 'react-window'; // @ts-ignore import { createFilter } from 'react-search-input'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css } from '@apache-superset/core/ui'; import { Button, diff --git a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx index b9c0293534fc..c107ec82c619 100644 --- a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx @@ -24,7 +24,8 @@ import { useRef, useState, } from 'react'; -import { getExtensionsRegistry, QueryData, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getExtensionsRegistry, QueryData } from '@superset-ui/core'; import { css, styled, SupersetTheme, useTheme } from '@apache-superset/core/ui'; import { useUiConfig } from 'src/components/UiConfigContext'; import { isEmbedded } from 'src/dashboard/util/isEmbedded'; diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/ViewResultsModalTrigger.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/ViewResultsModalTrigger.tsx index 849522e7e19b..c7295ce8be4b 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls/ViewResultsModalTrigger.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/ViewResultsModalTrigger.tsx @@ -18,7 +18,7 @@ */ import { ReactChild, RefObject, useCallback } from 'react'; import { useHistory } from 'react-router-dom'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { Button, ModalTrigger } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx index 564a4fb745a4..a9f60ab4af46 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx @@ -27,12 +27,12 @@ import { import { RouteComponentProps, useHistory } from 'react-router-dom'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; +import { t } from '@apache-superset/core'; import { Behavior, isFeatureEnabled, FeatureFlag, getChartMetadataRegistry, - t, VizType, BinaryQueryObjectFilterClause, QueryFormData, diff --git a/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx b/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx index 152a514a4dfa..c32346ac0a18 100644 --- a/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx +++ b/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useState } from 'react'; -import { getClientErrorObject, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getClientErrorObject } from '@superset-ui/core'; import { useTheme } from '@apache-superset/core/ui'; import { Button, diff --git a/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.jsx b/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.jsx index 14b9c2118513..c54769d8a08b 100644 --- a/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.jsx +++ b/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.jsx @@ -20,8 +20,7 @@ import { PureComponent } from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { Button, Input } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { css, styled, t } from '@apache-superset/core/ui'; import buildFilterScopeTreeEntry from 'src/dashboard/util/buildFilterScopeTreeEntry'; import getFilterScopeNodesTree from 'src/dashboard/util/getFilterScopeNodesTree'; diff --git a/superset-frontend/src/dashboard/components/filterscope/treeIcons.tsx b/superset-frontend/src/dashboard/components/filterscope/treeIcons.tsx index 6ed6ced87041..294faf968ba3 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import 'react-checkbox-tree/lib/react-checkbox-tree.css'; import { diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.jsx index 37e24b99f633..f84376d1d3ae 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.jsx @@ -19,8 +19,8 @@ import cx from 'classnames'; import { useCallback, useEffect, useRef, useMemo, useState, memo } from 'react'; import PropTypes from 'prop-types'; -import { t, logging } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { logging } from '@apache-superset/core'; +import { styled, t } from '@apache-superset/core/ui'; import { debounce } from 'lodash'; import { useHistory } from 'react-router-dom'; import { bindActionCreators } from 'redux'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Column/Column.jsx b/superset-frontend/src/dashboard/components/gridComponents/Column/Column.jsx index acdd5cbb3e45..d8047d08c3d2 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Column/Column.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Column/Column.jsx @@ -19,8 +19,7 @@ import { Fragment, useCallback, useState, useMemo, memo } from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; -import { t } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t, css, styled } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import DashboardComponent from 'src/dashboard/containers/DashboardComponent'; import DeleteComponentButton from 'src/dashboard/components/DeleteComponentButton'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/DynamicComponent/DynamicComponent.tsx b/superset-frontend/src/dashboard/components/gridComponents/DynamicComponent/DynamicComponent.tsx index df50ed37b35d..f990d16b1b75 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/DynamicComponent/DynamicComponent.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/DynamicComponent/DynamicComponent.tsx @@ -17,7 +17,8 @@ * under the License. */ import { FC, Suspense } from 'react'; -import { DashboardComponentMetadata, JsonObject, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { DashboardComponentMetadata, JsonObject } from '@superset-ui/core'; import backgroundStyleOptions from 'src/dashboard/util/backgroundStyleOptions'; import cx from 'classnames'; import { shallowEqual, useSelector } from 'react-redux'; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.jsx b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.jsx index 87628dfde661..3bded7c80218 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.jsx @@ -21,8 +21,7 @@ import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import cx from 'classnames'; -import { t } from '@superset-ui/core'; -import { css, styled } from '@apache-superset/core/ui'; +import { t, css, styled } from '@apache-superset/core/ui'; import { SafeMarkdown, MarkdownEditor } from '@superset-ui/core/components'; 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 e4a6915ba110..28a274c49bbe 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx @@ -27,12 +27,8 @@ import { RefObject, } from 'react'; import cx from 'classnames'; -import { - FeatureFlag, - isFeatureEnabled, - t, - JsonObject, -} from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { FeatureFlag, isFeatureEnabled, JsonObject } from '@superset-ui/core'; import { css, styled, SupersetTheme } from '@apache-superset/core/ui'; import { Icons, Constants } from '@superset-ui/core/components'; import { diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.jsx b/superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.jsx index 8902e84a4675..1b5045c128a8 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.jsx @@ -20,8 +20,7 @@ import { Fragment, useCallback, memo, useEffect } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { useDispatch, useSelector } from 'react-redux'; -import { t } from '@superset-ui/core'; -import { styled } from '@apache-superset/core/ui'; +import { t, styled } from '@apache-superset/core/ui'; 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.jsx b/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.jsx index 6beb76db7219..cc087af6ef98 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.jsx @@ -18,8 +18,8 @@ */ import { useCallback, useEffect, useMemo, useState, memo } from 'react'; import PropTypes from 'prop-types'; -import { t, usePrevious } from '@superset-ui/core'; -import { useTheme, styled } from '@apache-superset/core/ui'; +import { usePrevious } from '@superset-ui/core'; +import { t, useTheme, styled } from '@apache-superset/core/ui'; 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/new/NewColumn.tsx b/superset-frontend/src/dashboard/components/gridComponents/new/NewColumn.tsx index b7e09e45ba22..11f38b468b93 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 8d3a745bb810..b95fa1c30b53 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 ceb74dafba39..0513cb6fa58d 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 100f3f383335..96dedf76880f 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 ce18f7a50ac9..c8a87fabb7ce 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 237dfb96b45c..711455504920 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 ed032b398634..6c20491a5c0b 100644 --- a/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx +++ b/superset-frontend/src/dashboard/components/menu/BackgroundStyleDropdown.tsx @@ -18,7 +18,7 @@ */ import { PureComponent } from 'react'; import cx from 'classnames'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import backgroundStyleOptions from 'src/dashboard/util/backgroundStyleOptions'; diff --git a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx index b3f66cce8bae..d27b10364ccc 100644 --- a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx +++ b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx @@ -17,7 +17,9 @@ * under the License. */ import { SyntheticEvent } from 'react'; -import { FeatureFlag, isFeatureEnabled, logging, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { FeatureFlag, isFeatureEnabled } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { MenuItem } from '@superset-ui/core/components/Menu'; import { useDownloadScreenshot } from 'src/dashboard/hooks/useDownloadScreenshot'; import { MenuKeys } from 'src/dashboard/types'; diff --git a/superset-frontend/src/dashboard/components/menu/MarkdownModeDropdown.tsx b/superset-frontend/src/dashboard/components/menu/MarkdownModeDropdown.tsx index e0c7b2cc0ec9..3cd434aaae4a 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 984635f03db5..f2b0ab526ab4 100644 --- a/superset-frontend/src/dashboard/components/menu/ShareMenuItems/index.tsx +++ b/superset-frontend/src/dashboard/components/menu/ShareMenuItems/index.tsx @@ -18,9 +18,8 @@ */ import { ComponentProps, RefObject } from 'react'; import copyTextToClipboard from 'src/utils/copy'; +import { t, logging } from '@apache-superset/core'; import { - t, - logging, FeatureFlag, isFeatureEnabled, LatestQueryFormData, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx index ffd13db90843..277ad9e6c774 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx @@ -26,7 +26,7 @@ import { ReactNode, } from 'react'; import { useSelector } from 'react-redux'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css, useTheme } from '@apache-superset/core/ui'; import { debounce } from 'lodash'; import { DatasourcesState, ChartsState, RootState } from 'src/dashboard/types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationModal.tsx index fc19e7ffdf8a..415cc023f1a3 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationModal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useEffect, useMemo, useCallback, memo } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { useSelector } from 'react-redux'; import { isEmpty, isEqual, sortBy, debounce } from 'lodash'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationTitleContainer.tsx b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationTitleContainer.tsx index ca6e0bf67307..70cec6e06844 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationTitleContainer.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationTitleContainer.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC, forwardRef, MouseEvent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css, useTheme } from '@apache-superset/core/ui'; import { Icons, Flex } from '@superset-ui/core/components'; import { ChartCustomizationItem } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationTitlePane.tsx b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationTitlePane.tsx index cd6488a58bec..d25fc769c49b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationTitlePane.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationTitlePane.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC, useRef } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import { Button, Icons } from '@superset-ui/core/components'; import ChartCustomizationTitleContainer from './ChartCustomizationTitleContainer'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx index e465a5eb78d8..37a585b5a45b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/GroupByFilterCard.tsx @@ -17,7 +17,8 @@ * under the License. */ import { FC, useCallback, useEffect, useMemo, useState } from 'react'; -import { t, DataMaskStateWithId, useTruncation } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { DataMaskStateWithId, useTruncation } from '@superset-ui/core'; import { styled, css, useTheme } from '@apache-superset/core/ui'; import { Typography, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/utils.ts index 094ff5d39780..1ac7b1eb000d 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/utils.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/utils.ts @@ -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 { ChartCustomizationItem, GroupByCustomization } from './types'; export function generateGroupById(): string { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/ModalFooter.tsx b/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/ModalFooter.tsx index a1baa96c1bce..5675c2ec8071 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/ModalFooter.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/ModalFooter.tsx @@ -23,7 +23,7 @@ import { Icons, Flex, } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css, useTheme, Alert } from '@apache-superset/core/ui'; import { BaseExpandButtonWrapper } from './SharedStyles'; 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 61859b3dd7ab..3055b3ec15d7 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx @@ -17,10 +17,10 @@ * under the License. */ import { useMemo } from 'react'; +import { t } from '@apache-superset/core'; import { DataMaskState, DataMaskStateWithId, - t, isDefined, } from '@superset-ui/core'; import { css, SupersetTheme, styled } from '@apache-superset/core/ui'; 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 429c36e9ac0a..dc97928471dc 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/CrossFilterTitle.tsx @@ -17,7 +17,8 @@ * under the License. */ -import { t, useCSSTextTruncation } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { useCSSTextTruncation } from '@superset-ui/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { Tooltip } from '@superset-ui/core/components'; import { FilterBarOrientation } from 'src/dashboard/types'; 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 a58f3c2888aa..58df9ddc1419 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,7 +18,7 @@ */ import { ReactNode, useMemo } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { ChartConfiguration, 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 1757f2a5ccd8..132f63199633 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,8 @@ */ import { useCallback, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { isDefined, NativeFilterScope, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isDefined, NativeFilterScope } from '@superset-ui/core'; import { Modal } from '@superset-ui/core/components'; import { ChartConfiguration, 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 34ac3c066133..bb1a547c448e 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,7 +18,8 @@ */ import { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { isDefined, NativeFilterScope, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isDefined, NativeFilterScope } from '@superset-ui/core'; import { css, styled, useTheme, Alert } from '@apache-superset/core/ui'; import { Select, Tooltip } from '@superset-ui/core/components'; import { noOp } from 'src/utils/common'; 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 938a56c760fe..e2dcf047782e 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/VerticalCollapse.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CrossFilters/VerticalCollapse.tsx @@ -18,7 +18,7 @@ */ import { useMemo, useState, useCallback } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, useTheme, SupersetTheme } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { FilterBarOrientation } from 'src/dashboard/types'; 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 1262e5bcd75b..4d7401ab3ab7 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx @@ -19,7 +19,7 @@ import { useCallback, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme, css } from '@apache-superset/core/ui'; import { MenuProps } from '@superset-ui/core/components/Menu'; import { FilterBarOrientation, RootState } from 'src/dashboard/types'; 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 9275de76da18..407ca540964e 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx @@ -26,12 +26,12 @@ import { useRef, useState, } from 'react'; +import { t } from '@apache-superset/core'; import { DataMask, DataMaskStateWithId, Filter, Divider, - t, isNativeFilterWithDataMask, } from '@superset-ui/core'; import { css, SupersetTheme, useTheme, styled } from '@apache-superset/core/ui'; 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 4c465e6e2ddf..2c1233d757bc 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx @@ -26,6 +26,7 @@ import { useState, } from 'react'; +import { t } from '@apache-superset/core'; import { ChartDataResponseResult, Behavior, @@ -36,7 +37,6 @@ import { JsonObject, QueryFormData, SuperChart, - t, ClientErrorObject, getClientErrorObject, } from '@superset-ui/core'; 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 b8eb7da9b567..63e86324b15b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersOutOfScopeCollapsible/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FiltersOutOfScopeCollapsible/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { ReactNode } from 'react'; -import { Divider, Filter, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Divider, Filter } from '@superset-ui/core'; import { css, SupersetTheme } from '@apache-superset/core/ui'; import { Collapse } from '@superset-ui/core/components'; 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 47c192d655e4..40668e5e5296 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx @@ -17,7 +17,7 @@ * under the License. */ /* eslint-disable no-param-reassign */ -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { memo, FC } from 'react'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx index dd610eda6191..ef2ad2563f45 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx @@ -18,7 +18,8 @@ */ import { FC, memo, useMemo } from 'react'; -import { DataMaskStateWithId, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { DataMaskStateWithId } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { Loading } from '@superset-ui/core/components'; import { RootState } from 'src/dashboard/types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx index 3a3bf0d66b84..b2c4a77b8417 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx @@ -31,7 +31,7 @@ import { } from 'react'; import { useSelector } from 'react-redux'; import cx from 'classnames'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import { RootState } from 'src/dashboard/types'; import { DataMaskStateWithId } from '@superset-ui/core'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx index 4de029226146..9ba19fc15be5 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SupersetClient, logging } from '@superset-ui/core'; +import { SupersetClient } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; 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 70c8f23ffe70..b02102dfd6e0 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/DependenciesRow.tsx @@ -18,7 +18,8 @@ */ import { memo, useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; -import { t, useTruncation } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { useTruncation } from '@superset-ui/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { setDirectPathToChild } from 'src/dashboard/actions/dashboardState'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/ScopeRow.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/ScopeRow.tsx index 95326b186f9f..3761e6ae04c7 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/ScopeRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/ScopeRow.tsx @@ -17,7 +17,8 @@ * under the License. */ import { memo, useMemo } from 'react'; -import { t, useTruncation } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { useTruncation } from '@superset-ui/core'; import { css } from '@apache-superset/core/ui'; import { List } from '@superset-ui/core/components/List'; import { useFilterScope } from './useFilterScope'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/TypeRow.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/TypeRow.tsx index 5cde4a214f16..ec0dc1353cff 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/TypeRow.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/TypeRow.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useMemo } from 'react'; -import { getChartMetadataRegistry, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getChartMetadataRegistry } from '@superset-ui/core'; import { Row, RowLabel, RowValue } from './Styles'; import { FilterCardRowProps } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterScope.ts b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterScope.ts index dd11eca7f601..f0f4e33b30d5 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterScope.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterScope.ts @@ -18,7 +18,8 @@ */ import { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { Filter, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Filter } from '@superset-ui/core'; 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/DividerConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DividerConfigForm.tsx index 62bc0f8f9e38..8429c6ef360b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DividerConfigForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DividerConfigForm.tsx @@ -18,7 +18,8 @@ */ import { FC } from 'react'; import { FormItem, Input } from '@superset-ui/core/components'; -import { NativeFilterType, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { NativeFilterType } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; interface Props { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx index 23e652ca0835..36afa216e49a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitleContainer.tsx @@ -18,7 +18,7 @@ */ import { forwardRef, ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { FilterRemoval } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx index 3c49ededfff8..c938f45c5dd5 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterTitlePane.tsx @@ -18,7 +18,8 @@ */ import { useRef, FC } from 'react'; -import { NativeFilterType, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { NativeFilterType } from '@superset-ui/core'; import { styled, useTheme } from '@apache-superset/core/ui'; 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/ColumnSelect.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx index 148cfa441976..133bef7d9f1c 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.tsx @@ -18,10 +18,10 @@ */ import { useCallback, useState, useMemo, useEffect } from 'react'; import rison from 'rison'; +import { t } from '@apache-superset/core'; import { Column, ensureIsArray, - t, useChangeEffect, getClientErrorObject, } from '@superset-ui/core'; 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 1ee3114d9638..19869c6dcb29 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DatasetSelect.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DatasetSelect.tsx @@ -18,8 +18,8 @@ */ import { useCallback, useMemo, ReactNode } from 'react'; import rison from 'rison'; +import { t } from '@apache-superset/core'; import { - t, JsonResponse, ClientErrorObject, getClientErrorObject, 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 341df0489d46..08e6c1f09438 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx @@ -17,12 +17,12 @@ * under the License. */ import { FC } from 'react'; +import { t } from '@apache-superset/core'; import { Behavior, SetDataMaskHook, SuperChart, AppSection, - t, } from '@superset-ui/core'; import { Loading, type FormInstance } from '@superset-ui/core/components'; import { NativeFiltersForm } from '../types'; 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 347809f74713..ac34c107d494 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useEffect } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { Select } 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 f89cd6e918eb..13f0eb906971 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { Charts, Layout, RootState, Slice } 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 0594e0fcc79e..432be5d8eb53 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,7 +23,9 @@ import { TAB_TYPE, } from 'src/dashboard/util/componentTypes'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; -import { logging, NativeFilterScope, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { NativeFilterScope } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; 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 26162db2d15a..aa4c1efcb70e 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx @@ -18,6 +18,7 @@ */ /* eslint-disable react-hooks/rules-of-hooks */ import { ColumnMeta, Metric } from '@superset-ui/chart-controls'; +import { t } from '@apache-superset/core'; import { Behavior, ChartDataResponseResult, @@ -29,7 +30,6 @@ import { JsonResponse, NativeFilterType, SupersetApiError, - t, ClientErrorObject, getClientErrorObject, getExtensionsRegistry, 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 680d09f009ec..52f0fd83565a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/RemovedFilter.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/RemovedFilter.tsx @@ -18,7 +18,7 @@ */ import { Button, type OnClickHandler } from '@superset-ui/core/components'; import { FC } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; const RemovedContent = styled.div` 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 441ae95902e4..42ce770a81f5 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx @@ -25,7 +25,8 @@ import { Tooltip, type FormInstance, } from '@superset-ui/core/components'; -import { Filter, getChartControlPanelRegistry, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Filter, getChartControlPanelRegistry } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { doesColumnMatchFilterType, 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 ac558d1f6230..3374c1180ea3 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,8 @@ */ import { useEffect, useState } from 'react'; import type { FormInstance } from '@superset-ui/core/components'; -import { Filter, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { 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/FiltersConfigModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx index ad5c154fc518..b2bebc9da1ec 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx @@ -18,7 +18,8 @@ */ import { memo, useEffect, useCallback, useMemo, useState, useRef } from 'react'; import { uniq, isEqual, sortBy, debounce, isEmpty } from 'lodash'; -import { Filter, NativeFilterType, Divider, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Filter, NativeFilterType, Divider } from '@superset-ui/core'; import { styled, css, useTheme } from '@apache-superset/core/ui'; import { useDispatch } from 'react-redux'; import { Constants, Form, Icons } from '@superset-ui/core/components'; 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 5ed3b2302f1a..05eaa30969ae 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/CancelConfirmationAlert.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/CancelConfirmationAlert.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { Button, type OnClickHandler } from '@superset-ui/core/components'; import { Alert } from '@apache-superset/core/ui'; 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 1fe1a977bc6c..ce586b10c386 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { CancelConfirmationAlert } from './CancelConfirmationAlert'; type FooterProps = { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts index 6c6a65f8c208..67e31571b0a7 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/utils.ts @@ -23,10 +23,10 @@ import { FilterConfiguration, NativeFilterType, NativeFilterTarget, - logging, Filter, Divider, } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; import { FilterChangesType, FilterRemoval, NativeFiltersForm } from './types'; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/utils.ts index 45bbe5b82693..1f859e7c0e85 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/utils.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/utils.ts @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { AdhocFilter, Behavior, @@ -26,7 +27,6 @@ import { Filter, getChartMetadataRegistry, QueryFormData, - t, ExtraFormDataOverride, TimeGranularity, ExtraFormDataAppend, diff --git a/superset-frontend/src/dashboard/containers/DashboardPage.tsx b/superset-frontend/src/dashboard/containers/DashboardPage.tsx index 92e4714a2573..909cccad2714 100644 --- a/superset-frontend/src/dashboard/containers/DashboardPage.tsx +++ b/superset-frontend/src/dashboard/containers/DashboardPage.tsx @@ -19,7 +19,7 @@ import { createContext, lazy, FC, useEffect, useMemo, useRef } from 'react'; import { Global } from '@emotion/react'; import { useHistory } from 'react-router-dom'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { useDispatch, useSelector } from 'react-redux'; import { createSelector } from '@reduxjs/toolkit'; diff --git a/superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts b/superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts index 7453e46984a0..0d52ccaec2f3 100644 --- a/superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts +++ b/superset-frontend/src/dashboard/hooks/useDownloadScreenshot.ts @@ -21,12 +21,9 @@ import { useSelector } from 'react-redux'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { last } from 'lodash'; import contentDisposition from 'content-disposition'; -import { - logging, - t, - SupersetClient, - SupersetApiError, -} from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient, SupersetApiError } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; 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 eb90138f546b..e3203fa6bed3 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { FETCH_ALL_SLICES_FAILED, diff --git a/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts b/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts index 0058e71bbf48..ea0558462109 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 e1ec1ade7c89..21f84f4a1293 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { getDashboardFilterKey } from './getDashboardFilterKey'; import { ALL_FILTERS_ROOT } from './constants'; diff --git a/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.js b/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.js index aed133b1f399..7e4405024bd6 100644 --- a/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.js +++ b/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.js @@ -17,7 +17,7 @@ * under the License. */ import { isEmpty } from 'lodash'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; 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 a1637b84f655..1e2c10c9bfcd 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 3ebc3a88389d..73afacb811cb 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { SMALL_HEADER, MEDIUM_HEADER, LARGE_HEADER } from './constants'; export default [ diff --git a/superset-frontend/src/dashboard/util/newComponentFactory.js b/superset-frontend/src/dashboard/util/newComponentFactory.js index 0178f52ecba7..1dcc93c768e9 100644 --- a/superset-frontend/src/dashboard/util/newComponentFactory.js +++ b/superset-frontend/src/dashboard/util/newComponentFactory.js @@ -17,7 +17,7 @@ * under the License. */ import { nanoid } from 'nanoid'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; import { CHART_TYPE, diff --git a/superset-frontend/src/dashboard/util/updateComponentParentsList.ts b/superset-frontend/src/dashboard/util/updateComponentParentsList.ts index 72000f1ae3ed..5df87114efb3 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 '@superset-ui/core'; +import { logging } from '@apache-superset/core'; interface LayoutComponent { id: string; diff --git a/superset-frontend/src/embedded/index.tsx b/superset-frontend/src/embedded/index.tsx index 11730d5ed88f..305b254e3148 100644 --- a/superset-frontend/src/embedded/index.tsx +++ b/superset-frontend/src/embedded/index.tsx @@ -21,7 +21,9 @@ import 'src/public-path'; import { lazy, Suspense } from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter as Router, Route } from 'react-router-dom'; -import { makeApi, t, logging } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { makeApi } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { type SupersetThemeConfig, ThemeMode } from '@apache-superset/core/ui'; import Switchboard from '@superset-ui/switchboard'; import getBootstrapData, { applicationRoot } from 'src/utils/getBootstrapData'; diff --git a/superset-frontend/src/embedded/utils.ts b/superset-frontend/src/embedded/utils.ts index 7a79938bf04b..d2e085509c2c 100644 --- a/superset-frontend/src/embedded/utils.ts +++ b/superset-frontend/src/embedded/utils.ts @@ -17,7 +17,8 @@ * under the License. */ -import { DataMaskStateWithId, JsonObject, logging } from '@superset-ui/core'; +import { DataMaskStateWithId, JsonObject } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; 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 25b03ec9f2d1..3855e3b93bfd 100644 --- a/superset-frontend/src/explore/actions/exploreActions.ts +++ b/superset-frontend/src/explore/actions/exploreActions.ts @@ -19,7 +19,8 @@ /* eslint camelcase: 0 */ import rison from 'rison'; import { Dataset } from '@superset-ui/chart-controls'; -import { t, SupersetClient, QueryFormData } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient, QueryFormData } from '@superset-ui/core'; import { Dispatch } from 'redux'; import { addDangerToast, diff --git a/superset-frontend/src/explore/actions/saveModalActions.ts b/superset-frontend/src/explore/actions/saveModalActions.ts index 2e1e48431c53..978c5cb09baa 100644 --- a/superset-frontend/src/explore/actions/saveModalActions.ts +++ b/superset-frontend/src/explore/actions/saveModalActions.ts @@ -18,12 +18,12 @@ */ import rison from 'rison'; import { Dispatch } from 'redux'; +import { t } from '@apache-superset/core'; import { DatasourceType, type QueryFormData, SimpleAdhocFilter, SupersetClient, - t, } from '@superset-ui/core'; import { addSuccessToast } from 'src/components/MessageToasts/actions'; import { isEmpty } from 'lodash'; diff --git a/superset-frontend/src/explore/components/ControlHeader.tsx b/superset-frontend/src/explore/components/ControlHeader.tsx index dc78b796cc62..8213bf6267cd 100644 --- a/superset-frontend/src/explore/components/ControlHeader.tsx +++ b/superset-frontend/src/explore/components/ControlHeader.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC, ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, useTheme, SupersetTheme } from '@apache-superset/core/ui'; 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 3312e21c99aa..5739496f77f0 100644 --- a/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx +++ b/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx @@ -23,10 +23,10 @@ import { userEvent, waitFor, } from 'spec/helpers/testing-library'; +import { t } from '@apache-superset/core'; import { DatasourceType, getChartControlPanelRegistry, - t, } from '@superset-ui/core'; import { defaultControls, defaultState } from 'src/explore/store'; import { ExplorePageState } from 'src/explore/types'; diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx index 1b1e5046b2c9..057a381cad4e 100644 --- a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx +++ b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx @@ -28,9 +28,9 @@ import { useRef, useState, } from 'react'; +import { t } from '@apache-superset/core'; import { ensureIsArray, - t, getChartControlPanelRegistry, QueryFormData, DatasourceType, diff --git a/superset-frontend/src/explore/components/DataTableControl/index.tsx b/superset-frontend/src/explore/components/DataTableControl/index.tsx index 3c6cc551d006..3cb98afe41a2 100644 --- a/superset-frontend/src/explore/components/DataTableControl/index.tsx +++ b/superset-frontend/src/explore/components/DataTableControl/index.tsx @@ -17,12 +17,8 @@ * under the License. */ import { useMemo, useState, useEffect, useRef, RefObject } from 'react'; -import { - getTimeFormatter, - safeHtmlSpan, - t, - TimeFormats, -} from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +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 { Column } from 'react-table'; diff --git a/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx index 517d519f6974..19300e29c57b 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useCallback, useEffect, useMemo, useState, MouseEvent } from 'react'; -import { isFeatureEnabled, FeatureFlag, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import Tabs from '@superset-ui/core/components/Tabs'; diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx index 66895941a99f..0883505b1931 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx @@ -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 Tabs from '@superset-ui/core/components/Tabs'; import { ResultTypes, ResultsPaneProps } from '../types'; diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx index d442860eb2df..b48e19a44cc7 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useState, useEffect, useMemo, useCallback } from 'react'; -import { ensureIsArray, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsArray } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { TableView, diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx index e2cc2f79c3ac..73fa093bec51 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 6afc1babeb27..143a07e0148f 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx @@ -18,9 +18,9 @@ */ import { useState, useEffect, ReactElement, useCallback } from 'react'; +import { t } from '@apache-superset/core'; import { ensureIsArray, - t, getChartMetadataRegistry, getClientErrorObject, } from '@superset-ui/core'; diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx index 8740fbf0d098..d97ada34d1b4 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx @@ -18,7 +18,8 @@ */ import { CSSProperties, ReactNode, useCallback } from 'react'; -import { t, useCSSTextTruncation } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { useCSSTextTruncation } from '@superset-ui/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx index ad56f01626bb..f1c20cc684c9 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx +++ b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useContext, useMemo, useState } from 'react'; -import { DatasourceType, Metric, QueryFormData, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { DatasourceType, Metric, QueryFormData } from '@superset-ui/core'; import { css, styled, useTheme, Alert } from '@apache-superset/core/ui'; import { ControlConfig } from '@superset-ui/chart-controls'; diff --git a/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts b/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts index dd7368b9dbd0..e170d7ca0506 100644 --- a/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts +++ b/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Metric, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Metric } from '@superset-ui/core'; import { ColumnItem, DatasourceFolder, diff --git a/superset-frontend/src/explore/components/EmbedCodeContent.jsx b/superset-frontend/src/explore/components/EmbedCodeContent.jsx index 1625f3b76ec6..dd373a73ee60 100644 --- a/superset-frontend/src/explore/components/EmbedCodeContent.jsx +++ b/superset-frontend/src/explore/components/EmbedCodeContent.jsx @@ -17,8 +17,7 @@ * under the License. */ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { t } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { css, t } from '@apache-superset/core/ui'; 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/ExploreChartHeader/index.jsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx index 147148c567c2..8be2bea51bc5 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx @@ -27,8 +27,9 @@ import { UnsavedChangesModal, } from '@superset-ui/core/components'; import { AlteredSliceTag } from 'src/components'; -import { logging, SupersetClient, t } from '@superset-ui/core'; -import { css } from '@apache-superset/core/ui'; +import { SupersetClient } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; +import { css, t } from '@apache-superset/core/ui'; import { chartPropShape } from 'src/dashboard/util/propShapes'; import { Icons } from '@superset-ui/core/components/Icons'; import PropertiesModal from 'src/explore/components/PropertiesModal'; diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx index c0fc1917fb55..0b95f29bde6d 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useMemo } from 'react'; -import { t, tn } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { tn } from '@apache-superset/core'; 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 ab11f2a5bf42..7dbf93c4d394 100644 --- a/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx +++ b/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx @@ -18,6 +18,7 @@ */ import { useState, useEffect, useCallback, useMemo, ReactNode } from 'react'; import Split from 'react-split'; +import { t } from '@apache-superset/core'; import { DatasourceType, ensureIsArray, @@ -25,7 +26,6 @@ import { FeatureFlag, getChartMetadataRegistry, SupersetClient, - t, QueryFormData, JsonObject, getExtensionsRegistry, diff --git a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx index d837659335d1..f8556a19ce37 100644 --- a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx +++ b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx @@ -22,14 +22,13 @@ import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { - t, - logging, useChangeEffect, useComponentDidMount, usePrevious, isMatrixifyEnabled, } from '@superset-ui/core'; -import { styled, css, useTheme } from '@apache-superset/core/ui'; +import { t, styled, css, useTheme } from '@apache-superset/core/ui'; +import { logging } from '@apache-superset/core'; 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 b07d8e6c50fd..b182f6bc662d 100644 --- a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx +++ b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx @@ -18,7 +18,7 @@ */ import { ReactChild, useCallback, Key } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; 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 a9188bf4d8f9..f5a08698529c 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx @@ -26,8 +26,8 @@ import { type SelectValue, } from '@superset-ui/core/components'; import rison from 'rison'; +import { t } from '@apache-superset/core'; import { - t, SupersetClient, isFeatureEnabled, FeatureFlag, diff --git a/superset-frontend/src/explore/components/RunQueryButton/index.tsx b/superset-frontend/src/explore/components/RunQueryButton/index.tsx index eb1b4e82181e..9e2e71e3bdb0 100644 --- a/superset-frontend/src/explore/components/RunQueryButton/index.tsx +++ b/superset-frontend/src/explore/components/RunQueryButton/index.tsx @@ -18,7 +18,7 @@ */ import { ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; 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 c37aa2013b1c..91410448e7eb 100644 --- a/superset-frontend/src/explore/components/SaveModal.tsx +++ b/superset-frontend/src/explore/components/SaveModal.tsx @@ -33,13 +33,8 @@ import { Loading, Divider, } from '@superset-ui/core/components'; -import { - DatasourceType, - isDefined, - logging, - SupersetClient, - t, -} from '@superset-ui/core'; +import { t, logging } from '@apache-superset/core'; +import { DatasourceType, isDefined, SupersetClient } from '@superset-ui/core'; import { css, styled, Alert } from '@apache-superset/core/ui'; import { Radio } from '@superset-ui/core/components/Radio'; 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 bdffa8c14e65..9a8613cb96d3 100644 --- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx +++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx @@ -25,7 +25,6 @@ import { ColorPicker, } from '@superset-ui/core/components'; import { - t, SupersetClient, getCategoricalSchemeRegistry, getChartMetadataRegistry, @@ -35,6 +34,7 @@ import { VizType, type QueryFormColumn, } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, withTheme, diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts index b29cde8b6e26..2c44a6fd97c4 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 b4670fd3ce3d..ed07eebef0a5 100644 --- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx @@ -18,12 +18,12 @@ */ import { connect } from 'react-redux'; import { PureComponent } from 'react'; +import { t } from '@apache-superset/core'; import { HandlerFunction, JsonObject, Payload, QueryFormData, - t, } from '@superset-ui/core'; import { SupersetTheme, withTheme } from '@apache-superset/core/ui'; import { diff --git a/superset-frontend/src/explore/components/controls/BoundsControl.tsx b/superset-frontend/src/explore/components/controls/BoundsControl.tsx index 3cda5ebb877c..788ba89aa231 100644 --- a/superset-frontend/src/explore/components/controls/BoundsControl.tsx +++ b/superset-frontend/src/explore/components/controls/BoundsControl.tsx @@ -18,7 +18,7 @@ */ import { useEffect, useRef, useState } from 'react'; import { InputNumber } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { debounce } from 'lodash'; import ControlHeader from 'src/explore/components/ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx b/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx index cf86cffd6466..11dd1ca686af 100644 --- a/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx @@ -20,7 +20,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { IconTooltip, List } from '@superset-ui/core/components'; import { nanoid } from 'nanoid'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { withTheme, type SupersetTheme } from '@apache-superset/core/ui'; import { SortableContainer, diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx index 9c20732858ed..fc6ef70c0b8c 100644 --- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx +++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx @@ -18,7 +18,8 @@ */ import { useState, useMemo } from 'react'; import { Button, Row, Col, InputNumber } from '@superset-ui/core/components'; -import { t, validateNumber } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNumber } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import ControlHeader from '../../ControlHeader'; import ColorPickerControl from '../ColorPickerControl'; diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx index f3bb1e13ad7d..8ef3cee64fd0 100644 --- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx @@ -18,7 +18,7 @@ */ import { useState, useEffect } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel'; import ColorBreakpointOption from './ColorBreakpointOption'; diff --git a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx index f5e6b8c187b4..06777530c72e 100644 --- a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx @@ -18,11 +18,11 @@ */ import { useMemo, ReactNode } from 'react'; +import { t } from '@apache-superset/core'; import { ColorScheme, ColorSchemeGroup, SequentialScheme, - t, getLabelsColorMap, CategoricalColorNamespace, } from '@superset-ui/core'; diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx index 1086e6f05fbf..6db50d1e3f11 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo, useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { GenericDataType } from '@apache-superset/core/api/core'; import { diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx index 9f94811cd7cc..1275242fe7b8 100644 --- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx +++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNumber } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNumber } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { ControlFormItemSpec, diff --git a/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx b/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx index 9dd45d18fdc4..aaa8d116bff4 100644 --- a/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx +++ b/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx @@ -20,6 +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 { BinaryAdhocFilter, ensureIsArray, @@ -27,7 +28,6 @@ import { getTimeOffset, parseDttmToDate, SimpleAdhocFilter, - t, } from '@superset-ui/core'; import { css } from '@apache-superset/core/ui'; import ControlHeader, { diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx index ebfcabd26da6..54adad535147 100644 --- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx +++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css } from '@apache-superset/core/ui'; import { Comparator } from '@superset-ui/chart-controls'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx index 0a299484b453..4d8d9220246d 100644 --- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx +++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo, useState, useEffect } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { GenericDataType } from '@apache-superset/core/api/core'; import { diff --git a/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx b/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx index 002cc629cc48..e4e623c49a9f 100644 --- a/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx +++ b/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { ContourOptionProps } from './types'; import ContourPopoverTrigger from './ContourPopoverTrigger'; diff --git a/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx b/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx index 03f7097a6433..ae734d21cb7a 100644 --- a/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx +++ b/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx @@ -19,7 +19,8 @@ import { useState, useEffect } from 'react'; import { Button, Row, Col } from '@superset-ui/core/components'; import Tabs from '@superset-ui/core/components/Tabs'; -import { legacyValidateInteger, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { legacyValidateInteger } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import ControlHeader from '../../ControlHeader'; import TextControl from '../TextControl'; diff --git a/superset-frontend/src/explore/components/controls/ContourControl/index.tsx b/superset-frontend/src/explore/components/controls/ContourControl/index.tsx index 6e5d5f8c2610..c8148071c913 100644 --- a/superset-frontend/src/explore/components/controls/ContourControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/ContourControl/index.tsx @@ -18,7 +18,7 @@ */ import { useState, useEffect } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel'; import ContourPopoverTrigger from './ContourPopoverTrigger'; diff --git a/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx b/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx index 9b80777e2281..d4c5c6e6ab5b 100644 --- a/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx +++ b/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx @@ -18,12 +18,8 @@ */ import { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { - Currency, - ensureIsArray, - getCurrencySymbol, - t, -} from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Currency, ensureIsArray, getCurrencySymbol } from '@superset-ui/core'; import { css, styled } from '@apache-superset/core/ui'; import { CSSObject } from '@emotion/react'; import { Select, type SelectProps } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx b/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx index 6c611f69d659..e698b036e877 100644 --- a/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx @@ -20,12 +20,8 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; -import { - DatasourceType, - SupersetClient, - t, - Datasource, -} from '@superset-ui/core'; +import { DatasourceType, SupersetClient, Datasource } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx index cb47f906d27a..b35530b0295a 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx @@ -17,8 +17,8 @@ * under the License. */ import { ReactNode, useState, useEffect, useMemo } from 'react'; +import { t } from '@apache-superset/core'; import { - t, NO_TIME_RANGE, useCSSTextTruncation, fetchTimeRange, 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 c410196cd19d..e9f2b5aaf644 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SEPARATOR, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SEPARATOR } from '@superset-ui/core'; import { Input, Icons, InfoTooltip } from '@superset-ui/core/components'; import { FrameComponentProps } from 'src/explore/components/controls/DateFilterControl/types'; import DateFunctionTooltip from './DateFunctionTooltip'; 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 631d1345da3a..505e3a0ea65e 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 6c853d866dc6..da14f0a96386 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 7783ea719dcf..65d07c747d2c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 cab8d5f309e8..f7b8d932215c 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,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, customTimeRangeDecode } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { customTimeRangeDecode } from '@superset-ui/core'; import { InfoTooltip, DatePicker, 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 8e69cc0d2c38..94a867e8624a 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx @@ -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 { useTheme } from '@apache-superset/core/ui'; import { Tooltip } from '@superset-ui/core/components'; 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 338c3e064856..619c9624dc85 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx @@ -19,7 +19,7 @@ import { forwardRef, MouseEvent, ReactNode, RefObject } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; 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 fd81e07bf999..795e25cafc09 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 175b05721301..51fbab696eff 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx @@ -27,10 +27,10 @@ import { useState, } from 'react'; import { useSelector } from 'react-redux'; +import { t } from '@apache-superset/core'; import { AdhocColumn, isAdhocColumn, - t, DatasourceType, Metric, QueryFormMetric, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx index 250d8c7a6715..5509eae785b5 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx @@ -19,9 +19,9 @@ import { useCallback, useEffect, useMemo, useState, ReactNode } from 'react'; import { useSelector } from 'react-redux'; +import { t } from '@apache-superset/core'; import { AdhocColumn, - t, isAdhocColumn, Metric, QueryFormMetric, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx index 86ab24a897be..5d4b4b206d6b 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 806d66fe818d..b7b8bd3d67a9 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx @@ -17,10 +17,9 @@ * under the License. */ import { useCallback, useMemo, useState } from 'react'; +import { t } from '@apache-superset/core'; import { AdhocColumn, - tn, - t, isAdhocColumn, Metric, ensureIsArray, @@ -28,6 +27,7 @@ import { QueryFormMetric, QueryFormData, } from '@superset-ui/core'; +import { tn } from '@apache-superset/core'; 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 faceb68336e1..6f560d1ff199 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx @@ -17,13 +17,9 @@ * under the License. */ import { useCallback, useMemo, useState } from 'react'; -import { - AdhocColumn, - tn, - QueryFormColumn, - t, - isAdhocColumn, -} from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { AdhocColumn, QueryFormColumn, isAdhocColumn } from '@superset-ui/core'; +import { tn } from '@apache-superset/core'; 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 f0cb5b939cc1..8189668907b9 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ChangeEvent, useCallback, useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme } from '@apache-superset/core/ui'; 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.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx index 57579313a85b..9b1a9a371df3 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx @@ -17,13 +17,12 @@ * under the License. */ import { useCallback, useEffect, useMemo, useState } from 'react'; +import { t, logging } from '@apache-superset/core'; import { - logging, Metric, QueryFormData, QueryFormMetric, SupersetClient, - t, } from '@superset-ui/core'; import { ColumnMeta, diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx index 6b6b1331e795..aefdc781cdf0 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx @@ -19,15 +19,15 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { nanoid } from 'nanoid'; +import { t } from '@apache-superset/core'; import { ensureIsArray, isAdhocMetricSimple, isSavedMetric, Metric, QueryFormMetric, - t, - tn, } from '@superset-ui/core'; +import { tn } from '@apache-superset/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { ColumnMeta } from '@superset-ui/chart-controls'; import AdhocMetric from 'src/explore/components/controls/MetricControl/AdhocMetric'; diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx index 161d4b21edd8..153d97d6384f 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 a460ad926d88..f00eb3f2e501 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useCallback } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { Icons, InfoTooltip } from '@superset-ui/core/components'; import { 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 70e22b31ed20..574578983b87 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts @@ -17,12 +17,12 @@ * under the License. */ import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls'; +import { t } from '@apache-superset/core'; import { AdhocColumn, ensureIsArray, QueryFormColumn, isPhysicalColumn, - t, } from '@superset-ui/core'; const getColumnNameOrAdhocColumn = ( 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 7ca2a8c491e2..2f7b34fc30a6 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx @@ -18,7 +18,9 @@ */ import { Component, ReactNode } from 'react'; import PropTypes from 'prop-types'; -import { t, logging, SupersetClient, ensureIsArray } from '@superset-ui/core'; +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 ControlHeader from 'src/explore/components/ControlHeader'; 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 7bb635594d81..911d2a16b32e 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx @@ -22,7 +22,8 @@ import PropTypes from 'prop-types'; import type { SupersetTheme } from '@apache-superset/core/ui'; import { Button, Icons, Select } from '@superset-ui/core/components'; import { ErrorBoundary } from 'src/components'; -import { t, SupersetClient } from '@superset-ui/core'; +import { SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import Tabs from '@superset-ui/core/components/Tabs'; 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 12d8b109d543..aff052566d40 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx @@ -25,12 +25,12 @@ import { Tooltip, type SelectValue, } from '@superset-ui/core/components'; +import { t } from '@apache-superset/core'; import { isFeatureEnabled, FeatureFlag, isDefined, SupersetClient, - t, } from '@superset-ui/core'; import { styled, useTheme, css } from '@apache-superset/core/ui'; import { 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 91f7bd8263ba..44b2a4f5185e 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,8 @@ * under the License. */ import { useCallback, useState } from 'react'; -import { ensureIsArray, SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ensureIsArray, SupersetClient } from '@superset-ui/core'; import { debounce } from 'lodash'; import rison from 'rison'; import { AdvancedDataTypesState, Props } from './index'; 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 328a3e6e479a..01c027f6e33c 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/index.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/index.tsx @@ -18,7 +18,7 @@ */ import { useEffect, useRef, useMemo } from 'react'; import { Select } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import sqlKeywords from 'src/SqlLab/utils/sqlKeywords'; import { getColumnKeywords } from 'src/explore/controlUtils/getColumnKeywords'; 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 8d2f895fb522..827f7eb87d59 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,8 @@ */ import { ReactElement } from 'react'; -import { getExtensionsRegistry, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getExtensionsRegistry } from '@superset-ui/core'; import { Dataset, isTemporalColumn } from '@superset-ui/chart-controls'; import DateFilterControl from 'src/explore/components/controls/DateFilterControl/DateFilterLabel'; import ControlHeader from 'src/explore/components/ControlHeader'; diff --git a/superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.tsx b/superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.tsx index fb8a1ab945ae..4a2d59f87030 100644 --- a/superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.tsx @@ -18,7 +18,7 @@ */ import { Component } from 'react'; import PropTypes from 'prop-types'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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/LayerConfigsControl/FlatLayerTree.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx index 61ce55a817b3..0dcae09d08ed 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Icons } from '@superset-ui/core/components/Icons'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { Button } from '@superset-ui/core/components'; import Tree, { TreeProps } from '@superset-ui/core/components/Tree'; diff --git a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsControl.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsControl.tsx index 64309c9334d7..7398784050d2 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsControl.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ControlHeader } from '@superset-ui/chart-controls'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { Popover } from '@superset-ui/core/components'; import { FC, useState } from 'react'; diff --git a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx index 2d9d299d8d9c..e094ff9cd11a 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { JsonValue, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { JsonValue } from '@superset-ui/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; // eslint-disable-next-line no-restricted-imports import { Button } from '@superset-ui/core/components/Button'; diff --git a/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx b/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx index b305f595599d..5513f72b15cf 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 2e8477bf77fb..33c7ce230962 100644 --- a/superset-frontend/src/explore/components/controls/MapViewControl/MapViewControl.tsx +++ b/superset-frontend/src/explore/components/controls/MapViewControl/MapViewControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ControlHeader } from '@superset-ui/chart-controls'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { Button, Popover } from '@superset-ui/core/components'; import { FC, useState } from 'react'; diff --git a/superset-frontend/src/explore/components/controls/MapViewControl/MapViewPopoverContent.tsx b/superset-frontend/src/explore/components/controls/MapViewControl/MapViewPopoverContent.tsx index f7c456da1864..2d1ec4d282de 100644 --- a/superset-frontend/src/explore/components/controls/MapViewControl/MapViewPopoverContent.tsx +++ b/superset-frontend/src/explore/components/controls/MapViewControl/MapViewPopoverContent.tsx @@ -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 { css, styled } from '@apache-superset/core/ui'; import { Button, Form } from '@superset-ui/core/components'; import { FC, useEffect, useState } from 'react'; diff --git a/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.tsx b/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.tsx index 72e27b6b9b48..87a1efe2910c 100644 --- a/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.tsx +++ b/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useEffect, useState, useRef, useMemo } from 'react'; -import { t, SupersetClient, getColumnLabel } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient, getColumnLabel } from '@superset-ui/core'; import { Select, Space } from '@superset-ui/core/components'; import ControlHeader from 'src/explore/components/ControlHeader'; import { optionLabel } from 'src/utils/common'; 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 2690c70e3279..21f303a0a4f3 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx @@ -19,7 +19,8 @@ /* eslint-disable camelcase */ import { PureComponent, createRef } from 'react'; import PropTypes from 'prop-types'; -import { isDefined, t, ensureIsArray, DatasourceType } from '@superset-ui/core'; +import { isDefined, ensureIsArray, DatasourceType } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import Tabs from '@superset-ui/core/components/Tabs'; import { diff --git a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx index f4a57534f99d..9fced1e3c403 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx @@ -25,7 +25,7 @@ import { FC, } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme } from '@apache-superset/core/ui'; 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 95580a742fde..b4f8e5809743 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger.tsx @@ -17,7 +17,8 @@ * under the License. */ import { PureComponent, ReactNode } from 'react'; -import { Metric, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Metric } from '@superset-ui/core'; import AdhocMetricEditPopoverTitle from 'src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle'; import { ExplorePopoverContent } from 'src/explore/components/ExploreContentPopover'; import { diff --git a/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.tsx b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.tsx index c9c3fd6b29d9..c7681410650d 100644 --- a/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.tsx +++ b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.tsx @@ -18,7 +18,8 @@ */ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import PropTypes from 'prop-types'; -import { ensureIsArray, t, usePrevious } from '@superset-ui/core'; +import { ensureIsArray, usePrevious } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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/OptionControls/index.tsx b/superset-frontend/src/explore/components/controls/OptionControls/index.tsx index 91b574a2015e..03c6a3d30a99 100644 --- a/superset-frontend/src/explore/components/controls/OptionControls/index.tsx +++ b/superset-frontend/src/explore/components/controls/OptionControls/index.tsx @@ -19,7 +19,7 @@ import { useRef, ReactNode } from 'react'; import { useDrag, useDrop, DropTargetMonitor } from 'react-dnd'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, useTheme, css, keyframes } from '@apache-superset/core/ui'; import { InfoTooltip, Icons, Tooltip } from '@superset-ui/core/components'; import { savedMetricType } from 'src/explore/components/controls/MetricControl/types'; diff --git a/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx b/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx index 42e4e6443945..d17267163cff 100644 --- a/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useEffect, useState } from 'react'; -import { t, SupersetClient, getClientErrorObject } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient, getClientErrorObject } from '@superset-ui/core'; import ControlHeader from 'src/explore/components/ControlHeader'; import { Select, diff --git a/superset-frontend/src/explore/components/controls/SelectControl.tsx b/superset-frontend/src/explore/components/controls/SelectControl.tsx index 932538ceff1d..5d640fb0ee17 100644 --- a/superset-frontend/src/explore/components/controls/SelectControl.tsx +++ b/superset-frontend/src/explore/components/controls/SelectControl.tsx @@ -18,7 +18,8 @@ */ import { PureComponent, type ReactNode } from 'react'; import PropTypes from 'prop-types'; -import { isEqualArray, t } from '@superset-ui/core'; +import { isEqualArray } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css } from '@apache-superset/core/ui'; 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 3ec41e37fff1..6fec8797d15c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 90b2c352c33c..b28f3f0e98f3 100644 --- a/superset-frontend/src/explore/components/controls/TextAreaControl.tsx +++ b/superset-frontend/src/explore/components/controls/TextAreaControl.tsx @@ -26,7 +26,7 @@ import { TextAreaEditor, ModalTrigger, } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { withTheme } from '@apache-superset/core/ui'; 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 d614c4d56308..5a76d4042eb1 100644 --- a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.tsx @@ -27,7 +27,7 @@ import { Row, Select, } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import BoundsControl from '../BoundsControl'; diff --git a/superset-frontend/src/explore/components/controls/ViewQuery.tsx b/superset-frontend/src/explore/components/controls/ViewQuery.tsx index 86f51d97a755..77fc01a5daa1 100644 --- a/superset-frontend/src/explore/components/controls/ViewQuery.tsx +++ b/superset-frontend/src/explore/components/controls/ViewQuery.tsx @@ -26,7 +26,8 @@ import { } from 'react'; import { useSelector } from 'react-redux'; import rison from 'rison'; -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import { Icons, diff --git a/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx b/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx index 8064f973fd3d..2221f018438f 100644 --- a/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx +++ b/superset-frontend/src/explore/components/controls/ViewQueryModal.tsx @@ -18,9 +18,9 @@ */ import { FC, Fragment, useEffect, useState } from 'react'; +import { t } from '@apache-superset/core'; import { ensureIsArray, - t, getClientErrorObject, QueryFormData, } from '@superset-ui/core'; diff --git a/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx b/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx index 5834cbd16ed4..2015b04efdf9 100644 --- a/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx +++ b/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx @@ -18,7 +18,8 @@ */ import { FC } from 'react'; import { isObject } from 'lodash'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +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 431a2505e2e2..442ef7174f94 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { Popover, FormLabel, Label } from '@superset-ui/core/components'; import { decimal2sexagesimal } from 'geolib'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx index 84fac0150b13..27218fbf4f21 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { Tooltip } from '@superset-ui/core/components'; import { usePluginContext } from 'src/components'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 52f8a99be330..d1aa9929f8be 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -29,8 +29,8 @@ import { import Fuse from 'fuse.js'; import cx from 'classnames'; +import { t } from '@apache-superset/core'; import { - t, ChartMetadata, chartLabelWeight, chartLabelExplanations, diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx index f82fca79b230..352735265d58 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useCallback, useState } from 'react'; -import { t, getChartMetadataRegistry } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getChartMetadataRegistry } from '@superset-ui/core'; import { css, styled, SupersetTheme } from '@apache-superset/core/ui'; import { usePluginContext } from 'src/components'; import { Icons, Modal } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx index c7913fac8e3c..eedb53298ebd 100644 --- a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx +++ b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx @@ -17,7 +17,7 @@ * under the License. */ import { ControlHeader } from '@superset-ui/chart-controls'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { Form } from '@superset-ui/core/components'; import { Tag } from 'src/components'; diff --git a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigsChart.tsx b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigsChart.tsx index d3f755bd03c5..92892b57291b 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 5ed60aea4d35..84836c4b5c00 100644 --- a/superset-frontend/src/explore/components/controls/withAsyncVerification.tsx +++ b/superset-frontend/src/explore/components/controls/withAsyncVerification.tsx @@ -21,7 +21,8 @@ import { ExtraControlProps, sharedControlComponents, } from '@superset-ui/chart-controls'; -import { JsonArray, JsonValue, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { JsonArray, JsonValue } from '@superset-ui/core'; import { ControlProps } from 'src/explore/components/Control'; import builtInControlComponents from 'src/explore/components/controls'; import useEffectEvent from 'src/hooks/useEffectEvent'; diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx index 8112c309b606..a4f99e506d88 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/DashboardsSubMenu.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { MenuItem } from '@superset-ui/core/components/Menu'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx index 48f5b27a727c..72bd4fdecd4c 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx @@ -19,8 +19,8 @@ import { useCallback, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useDebounceValue } from 'src/hooks/useDebounceValue'; -import { isFeatureEnabled, FeatureFlag, t, VizType } from '@superset-ui/core'; -import { css, styled, useTheme } from '@apache-superset/core/ui'; +import { isFeatureEnabled, FeatureFlag, VizType } from '@superset-ui/core'; +import { css, styled, useTheme, t } from '@apache-superset/core/ui'; import { Icons, ModalTrigger, diff --git a/superset-frontend/src/explore/constants.ts b/superset-frontend/src/explore/constants.ts index 6b927b4198a7..ff7118c95c33 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; export const AGGREGATES = { AVG: 'AVG', diff --git a/superset-frontend/src/explore/controlPanels/Separator.ts b/superset-frontend/src/explore/controlPanels/Separator.ts index 170d09c997f0..7e687e00d2a3 100644 --- a/superset-frontend/src/explore/controlPanels/Separator.ts +++ b/superset-frontend/src/explore/controlPanels/Separator.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import type { ControlPanelConfig, ControlPanelState, diff --git a/superset-frontend/src/explore/controlPanels/sections.tsx b/superset-frontend/src/explore/controlPanels/sections.tsx index a1b2e2ed4795..141c1d63dc08 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelSectionConfig, ControlSubSectionHeader, diff --git a/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx b/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx index 266ec5f75cce..a00523bad881 100644 --- a/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx +++ b/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { DatasourceType, getChartControlPanelRegistry, - t, VizType, } from '@superset-ui/core'; import { diff --git a/superset-frontend/src/explore/controlUtils/getColumnKeywords.tsx b/superset-frontend/src/explore/controlUtils/getColumnKeywords.tsx index 3216509a3fa0..a6ace5ae01a8 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 3decceb081f1..e49991ed3436 100644 --- a/superset-frontend/src/explore/controls.tsx +++ b/superset-frontend/src/explore/controls.tsx @@ -58,12 +58,12 @@ */ import type { Column, SequentialScheme } from '@superset-ui/core'; import { - t, getCategoricalSchemeRegistry, getSequentialSchemeRegistry, legacyValidateInteger, validateNonEmpty, } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 815790885dae..3313d707fe0a 100644 --- a/superset-frontend/src/explore/fixtures.tsx +++ b/superset-frontend/src/explore/fixtures.tsx @@ -17,7 +17,8 @@ * under the License. */ -import { DatasourceType, t, VizType } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { DatasourceType, VizType } from '@superset-ui/core'; import { ColumnMeta, ColumnOption, diff --git a/superset-frontend/src/extensions/ExtensionPlaceholder.tsx b/superset-frontend/src/extensions/ExtensionPlaceholder.tsx index b9b721e084bc..43a7f81e3055 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; const ExtensionPlaceholder = ({ id }: { id: string }) => ( { if (isFeatureEnabled(FeatureFlag.EnableExtensions)) { try { ExtensionsManager.getInstance().initializeExtensions(); - logging.info('Extensions initialized successfully.'); + supersetCore.logging.info('Extensions initialized successfully.'); } catch (error) { - logging.error('Error setting up extensions:', error); + supersetCore.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 bb85bc12ff19..050e3cfaea46 100644 --- a/superset-frontend/src/features/alerts/AlertReportModal.tsx +++ b/superset-frontend/src/features/alerts/AlertReportModal.tsx @@ -26,11 +26,11 @@ import { ReactNode, } from 'react'; +import { t } from '@apache-superset/core'; import { isFeatureEnabled, FeatureFlag, SupersetClient, - t, VizType, getExtensionsRegistry, } from '@superset-ui/core'; diff --git a/superset-frontend/src/features/alerts/components/AlertReportCronScheduler.tsx b/superset-frontend/src/features/alerts/components/AlertReportCronScheduler.tsx index 261edf8d2e06..f6cfbc8b800f 100644 --- a/superset-frontend/src/features/alerts/components/AlertReportCronScheduler.tsx +++ b/superset-frontend/src/features/alerts/components/AlertReportCronScheduler.tsx @@ -18,7 +18,7 @@ */ import { useState, useCallback, FocusEvent, FC } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { diff --git a/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx b/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx index 04bd225c4adb..af9dbc31230c 100644 --- a/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx +++ b/superset-frontend/src/features/alerts/components/AlertStatusIcon.tsx @@ -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 { SupersetTheme, useTheme, css } from '@apache-superset/core/ui'; import { Tooltip } from '@superset-ui/core/components'; import { Icons } from '@superset-ui/core/components/Icons'; diff --git a/superset-frontend/src/features/alerts/components/NotificationMethod.tsx b/superset-frontend/src/features/alerts/components/NotificationMethod.tsx index f9c3c75f65d4..fdf035d6a071 100644 --- a/superset-frontend/src/features/alerts/components/NotificationMethod.tsx +++ b/superset-frontend/src/features/alerts/components/NotificationMethod.tsx @@ -25,12 +25,12 @@ import { } from 'react'; import rison from 'rison'; +import { t } from '@apache-superset/core'; import { FeatureFlag, JsonResponse, SupersetClient, isFeatureEnabled, - t, } from '@superset-ui/core'; import { styled, useTheme } from '@apache-superset/core/ui'; 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 4e1e1303f0f1..f67285d07fc6 100644 --- a/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx +++ b/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx @@ -17,7 +17,7 @@ * under the License. */ import { extendedDayjs } from '@superset-ui/core/utils/dates'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { TableView, diff --git a/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx b/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx index d4a82e3ee21b..8074566362f6 100644 --- a/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx +++ b/superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx @@ -18,7 +18,7 @@ */ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; diff --git a/superset-frontend/src/features/annotations/AnnotationModal.tsx b/superset-frontend/src/features/annotations/AnnotationModal.tsx index 6896825031d1..13f86bde0021 100644 --- a/superset-frontend/src/features/annotations/AnnotationModal.tsx +++ b/superset-frontend/src/features/annotations/AnnotationModal.tsx @@ -18,7 +18,7 @@ */ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; diff --git a/superset-frontend/src/features/charts/ChartCard.tsx b/superset-frontend/src/features/charts/ChartCard.tsx index a833b477e2c4..a6c1b9d7f1d3 100644 --- a/superset-frontend/src/features/charts/ChartCard.tsx +++ b/superset-frontend/src/features/charts/ChartCard.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { isFeatureEnabled, FeatureFlag, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { css } from '@apache-superset/core/ui'; import { Link, useHistory } from 'react-router-dom'; import { diff --git a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx index b733016c2651..46dba2b8524c 100644 --- a/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx +++ b/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; diff --git a/superset-frontend/src/features/dashboards/DashboardCard.tsx b/superset-frontend/src/features/dashboards/DashboardCard.tsx index 5ae14f9a6c84..a80965787ab8 100644 --- a/superset-frontend/src/features/dashboards/DashboardCard.tsx +++ b/superset-frontend/src/features/dashboards/DashboardCard.tsx @@ -18,10 +18,10 @@ */ import { useEffect, useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; +import { t } from '@apache-superset/core'; import { isFeatureEnabled, FeatureFlag, - t, SupersetClient, } from '@superset-ui/core'; import { CardStyles } from 'src/views/CRUD/utils'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx index 1f2993a13458..49a9b002f8a0 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx @@ -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 { SupersetTheme } from '@apache-superset/core/ui'; import { Switch } from '@superset-ui/core/components/Switch'; import { diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx index 3ca76039a2f0..e508970528ca 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState, useEffect } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { SupersetTheme, css } from '@apache-superset/core/ui'; import { Input, diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx index 4798f5f3c028..4aafa84137d6 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx @@ -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 { css, SupersetTheme } from '@apache-superset/core/ui'; import { FormLabel, diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx index 548ae77398bf..7edba38f9179 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { LabeledErrorBoundInput as ValidatedInput } from '@superset-ui/core/components'; import { DatabaseParameters, FieldPropTypes } from '../../types'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.test.tsx index 590b4c97030a..1847a7e35d0d 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 750a4de859ec..5c3c27e92279 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/ExtraOptions.tsx @@ -18,8 +18,8 @@ */ import { ChangeEvent, EventHandler, useState, useEffect } from 'react'; import cx from 'classnames'; +import { t } from '@apache-superset/core'; import { - t, DatabaseConnectionExtension, isFeatureEnabled, FeatureFlag, diff --git a/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx b/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx index 627e77823443..2738da207288 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 79e2a6fab7dd..f71cf073fb39 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Form, diff --git a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx index 4c122c0c6812..0b469489e076 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useEffect, useState } from 'react'; -import { t, isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { SupersetTheme } from '@apache-superset/core/ui'; import { Switch } from '@superset-ui/core/components/Switch'; import { InfoTooltip } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/SqlAlchemyForm.tsx b/superset-frontend/src/features/databases/DatabaseModal/SqlAlchemyForm.tsx index 81b0927a924f..4774821a2e0a 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/SqlAlchemyForm.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/SqlAlchemyForm.tsx @@ -17,7 +17,7 @@ * under the License. */ import { EventHandler, ChangeEvent, MouseEvent, ReactNode } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { SupersetTheme } from '@apache-superset/core/ui'; import SupersetText from 'src/utils/textUtils'; import { Input, Button } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/databases/DatabaseModal/index.tsx b/superset-frontend/src/features/databases/DatabaseModal/index.tsx index bbcdfe160314..bbb4dd6bf5cf 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/index.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/index.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, getExtensionsRegistry } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getExtensionsRegistry } from '@superset-ui/core'; import { styled, SupersetTheme, Alert } from '@apache-superset/core/ui'; import { diff --git a/superset-frontend/src/features/databases/UploadDataModel/ColumnsPreview.tsx b/superset-frontend/src/features/databases/UploadDataModel/ColumnsPreview.tsx index adcd70b405c2..c5c128df2683 100644 --- a/superset-frontend/src/features/databases/UploadDataModel/ColumnsPreview.tsx +++ b/superset-frontend/src/features/databases/UploadDataModel/ColumnsPreview.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FC } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; 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 67122178dc16..0e38126d4791 100644 --- a/superset-frontend/src/features/databases/UploadDataModel/index.tsx +++ b/superset-frontend/src/features/databases/UploadDataModel/index.tsx @@ -25,7 +25,8 @@ import { FC, } from 'react'; -import { getClientErrorObject, SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getClientErrorObject, SupersetClient } from '@superset-ui/core'; import { SupersetTheme } from '@apache-superset/core/ui'; import { Button, diff --git a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx index b54c83548705..49bafe421adc 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx @@ -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, Alert } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { Loading } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx index e6b4186fb451..a8f3eff54dbe 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/MessageContent.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; 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 86f94ad23af8..5ce5eb0a2482 100644 --- a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/index.tsx @@ -17,7 +17,9 @@ * under the License. */ import { useEffect, useState, useRef } from 'react'; -import { SupersetClient, logging, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; 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 8998a75941c7..833e1e07fb38 100644 --- a/superset-frontend/src/features/datasets/AddDataset/EditDataset/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/EditDataset/index.tsx @@ -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 useGetDatasetRelatedCounts from 'src/features/datasets/hooks/useGetDatasetRelatedCounts'; import { Badge } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/datasets/AddDataset/Footer/index.tsx b/superset-frontend/src/features/datasets/AddDataset/Footer/index.tsx index 9e41d8876a1a..0cbea6611514 100644 --- a/superset-frontend/src/features/datasets/AddDataset/Footer/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/Footer/index.tsx @@ -23,7 +23,7 @@ import { Menu, Flex, } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useTheme } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; diff --git a/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx b/superset-frontend/src/features/datasets/AddDataset/Header/index.tsx index da17182a971e..c2e3cf57b92b 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 40b8a2ed52b3..fec2e106e1ec 100644 --- a/superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx +++ b/superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, SetStateAction, Dispatch, useCallback } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import TableSelector, { TableOption } from 'src/components/TableSelector'; import { EmptyState } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/datasets/DatasetSelectLabel/index.tsx b/superset-frontend/src/features/datasets/DatasetSelectLabel/index.tsx index 07490bcdb4d3..ba8ec7a32d66 100644 --- a/superset-frontend/src/features/datasets/DatasetSelectLabel/index.tsx +++ b/superset-frontend/src/features/datasets/DatasetSelectLabel/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { Tooltip } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; type Database = { diff --git a/superset-frontend/src/features/datasets/DuplicateDatasetModal.tsx b/superset-frontend/src/features/datasets/DuplicateDatasetModal.tsx index e10767c7427c..38d4bd77362b 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 cb0b5d3c0adb..bd8172ae12b5 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 98aea19aa092..1709f92d4483 100644 --- a/superset-frontend/src/features/datasets/hooks/useDatasetLists.ts +++ b/superset-frontend/src/features/datasets/hooks/useDatasetLists.ts @@ -17,7 +17,9 @@ * under the License. */ import { useState, useEffect, useCallback, useMemo } from 'react'; -import { SupersetClient, logging, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; 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 d2521a772a3e..4d882cedc880 100644 --- a/superset-frontend/src/features/datasets/hooks/useGetDatasetRelatedCounts.ts +++ b/superset-frontend/src/features/datasets/hooks/useGetDatasetRelatedCounts.ts @@ -17,7 +17,9 @@ * under the License. */ import { useState, useEffect, useCallback } from 'react'; -import { SupersetClient, logging, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { addDangerToast } from 'src/components/MessageToasts/actions'; const useGetDatasetRelatedCounts = (id: string) => { diff --git a/superset-frontend/src/features/datasets/metadataBar/useDatasetMetadataBar.tsx b/superset-frontend/src/features/datasets/metadataBar/useDatasetMetadataBar.tsx index fedbd63828ae..d28c0973ed35 100644 --- a/superset-frontend/src/features/datasets/metadataBar/useDatasetMetadataBar.tsx +++ b/superset-frontend/src/features/datasets/metadataBar/useDatasetMetadataBar.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, useTheme } from '@apache-superset/core/ui'; import { Dataset } from 'src/components/Chart/types'; import MetadataBar from '@superset-ui/core/components/MetadataBar'; diff --git a/superset-frontend/src/features/groups/GroupListModal.tsx b/superset-frontend/src/features/groups/GroupListModal.tsx index 62bd49e0513b..79484647ba86 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 89e3dc05ccd7..a340de06a382 100644 --- a/superset-frontend/src/features/groups/utils.ts +++ b/superset-frontend/src/features/groups/utils.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +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 d77e924276ed..a2f53a23b8d9 100644 --- a/superset-frontend/src/features/home/ActivityTable.tsx +++ b/superset-frontend/src/features/home/ActivityTable.tsx @@ -18,7 +18,7 @@ */ import { useEffect, useState } from 'react'; import { extendedDayjs } from '@superset-ui/core/utils/dates'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { setItem, LocalStorageKeys } from 'src/utils/localStorageHelpers'; import { Link } from 'react-router-dom'; diff --git a/superset-frontend/src/features/home/ChartTable.tsx b/superset-frontend/src/features/home/ChartTable.tsx index e86b2a8f67cd..9da1e91962a2 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { useChartEditModal, useFavoriteStatus, diff --git a/superset-frontend/src/features/home/DashboardTable.tsx b/superset-frontend/src/features/home/DashboardTable.tsx index 9857df4ca477..0bc5f5fa4461 100644 --- a/superset-frontend/src/features/home/DashboardTable.tsx +++ b/superset-frontend/src/features/home/DashboardTable.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useEffect, useMemo, useState } from 'react'; -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { useFavoriteStatus, useListViewResource } from 'src/views/CRUD/hooks'; import { Dashboard, DashboardTableProps, TableTab } from 'src/views/CRUD/types'; import handleResourceExport from 'src/utils/export'; diff --git a/superset-frontend/src/features/home/EmptyState.tsx b/superset-frontend/src/features/home/EmptyState.tsx index 35a7050fa15c..a8f443e2c97f 100644 --- a/superset-frontend/src/features/home/EmptyState.tsx +++ b/superset-frontend/src/features/home/EmptyState.tsx @@ -21,7 +21,7 @@ import { EmptyState as EmptyStateComponent, } from '@superset-ui/core/components'; import { TableTab } from 'src/views/CRUD/types'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { navigateTo } from 'src/utils/navigationUtils'; import { makeUrl } from 'src/utils/pathUtils'; diff --git a/superset-frontend/src/features/home/LanguagePicker.tsx b/superset-frontend/src/features/home/LanguagePicker.tsx index 2b8dec6b41b0..c311d1dfca6f 100644 --- a/superset-frontend/src/features/home/LanguagePicker.tsx +++ b/superset-frontend/src/features/home/LanguagePicker.tsx @@ -18,7 +18,7 @@ */ import { useMemo } from 'react'; import { MenuItem } from '@superset-ui/core/components/Menu'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Icons } from '@superset-ui/core/components/Icons'; import { Typography } from '@superset-ui/core/components/Typography'; diff --git a/superset-frontend/src/features/home/RightMenu.tsx b/superset-frontend/src/features/home/RightMenu.tsx index b0dc717d6740..05a7d0f85a6e 100644 --- a/superset-frontend/src/features/home/RightMenu.tsx +++ b/superset-frontend/src/features/home/RightMenu.tsx @@ -22,7 +22,8 @@ import { useSelector } from 'react-redux'; import { Link } from 'react-router-dom'; import { useQueryParams, BooleanParam } from 'use-query-params'; import { isEmpty } from 'lodash'; -import { t, SupersetClient, getExtensionsRegistry } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient, getExtensionsRegistry } from '@superset-ui/core'; import { styled, css, SupersetTheme, useTheme } from '@apache-superset/core/ui'; import { Tag, diff --git a/superset-frontend/src/features/home/SavedQueries.tsx b/superset-frontend/src/features/home/SavedQueries.tsx index ab586a794726..cf20c49265cf 100644 --- a/superset-frontend/src/features/home/SavedQueries.tsx +++ b/superset-frontend/src/features/home/SavedQueries.tsx @@ -18,7 +18,8 @@ */ import { useCallback, useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { styled, useTheme, css } from '@apache-superset/core/ui'; import CodeSyntaxHighlighter, { preloadLanguages, diff --git a/superset-frontend/src/features/home/SubMenu.tsx b/superset-frontend/src/features/home/SubMenu.tsx index 3af4e5df9ace..107700a25391 100644 --- a/superset-frontend/src/features/home/SubMenu.tsx +++ b/superset-frontend/src/features/home/SubMenu.tsx @@ -19,7 +19,7 @@ import { ReactNode, useState, useEffect, FunctionComponent } from 'react'; import { Link, useHistory } from 'react-router-dom'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, SupersetTheme, css, useTheme } from '@apache-superset/core/ui'; import cx from 'classnames'; import { debounce } from 'lodash'; diff --git a/superset-frontend/src/features/home/commonMenuData.ts b/superset-frontend/src/features/home/commonMenuData.ts index ae36697aad3a..3a8c5c6260e5 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; /** * Shared popup offset configuration for navbar menu dropdowns. diff --git a/superset-frontend/src/features/queries/QueryPreviewModal.tsx b/superset-frontend/src/features/queries/QueryPreviewModal.tsx index 92d6eb3bba6b..85a670f87045 100644 --- a/superset-frontend/src/features/queries/QueryPreviewModal.tsx +++ b/superset-frontend/src/features/queries/QueryPreviewModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import cx from 'classnames'; import { Button, Modal } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/features/queries/SavedQueryPreviewModal.tsx b/superset-frontend/src/features/queries/SavedQueryPreviewModal.tsx index 03650c8965da..d88db6558a61 100644 --- a/superset-frontend/src/features/queries/SavedQueryPreviewModal.tsx +++ b/superset-frontend/src/features/queries/SavedQueryPreviewModal.tsx @@ -17,7 +17,7 @@ * under the License. */ import { FunctionComponent } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { Button, Modal } from '@superset-ui/core/components'; import SyntaxHighlighterCopy from 'src/features/queries/SyntaxHighlighterCopy'; diff --git a/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx b/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx index bc6e0df23426..f3368fed23e0 100644 --- a/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx +++ b/superset-frontend/src/features/queries/SyntaxHighlighterCopy.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import CodeSyntaxHighlighter, { SupportedLanguage, diff --git a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx index 35e18fc6adbd..cf2792dfcc8b 100644 --- a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx +++ b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx @@ -18,8 +18,8 @@ */ import { useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; +import { t } from '@apache-superset/core'; import { - t, FeatureFlag, isFeatureEnabled, getExtensionsRegistry, diff --git a/superset-frontend/src/features/reports/ReportModal/actions.js b/superset-frontend/src/features/reports/ReportModal/actions.js index 45edc9012929..eea5bf6621c2 100644 --- a/superset-frontend/src/features/reports/ReportModal/actions.js +++ b/superset-frontend/src/features/reports/ReportModal/actions.js @@ -17,7 +17,8 @@ * under the License. */ /* eslint camelcase: 0 */ -import { t, SupersetClient } from '@superset-ui/core'; +import { SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core/ui'; 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 ce1de76eafd7..b3ef249cda9b 100644 --- a/superset-frontend/src/features/reports/ReportModal/index.tsx +++ b/superset-frontend/src/features/reports/ReportModal/index.tsx @@ -25,7 +25,8 @@ import { ChangeEvent, } from 'react'; -import { t, getClientErrorObject, VizType } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getClientErrorObject, VizType } from '@superset-ui/core'; import { SupersetTheme, Alert } from '@apache-superset/core/ui'; import { useDispatch, useSelector } from 'react-redux'; import { diff --git a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx index 5235430a4ffb..b362eb2282ec 100644 --- a/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx +++ b/superset-frontend/src/features/rls/RowLevelSecurityModal.tsx @@ -17,7 +17,8 @@ * under the License. */ -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { css, styled } from '@apache-superset/core/ui'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; diff --git a/superset-frontend/src/features/rls/constants.ts b/superset-frontend/src/features/rls/constants.ts index 9bb0ca3e6cb4..d35ff7bcb954 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; export const FILTER_OPTIONS = [ { diff --git a/superset-frontend/src/features/roles/RoleFormItems.tsx b/superset-frontend/src/features/roles/RoleFormItems.tsx index 78075d4dc14f..2be776bcbd77 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 cc6491237f2d..4a2e5f724e9d 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 749b5448665e..429dda315f83 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 fa46607b1bd0..0cef1ebea928 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 d62f37973ecc..c183c3cf6e9b 100644 --- a/superset-frontend/src/features/tags/BulkTagModal.tsx +++ b/superset-frontend/src/features/tags/BulkTagModal.tsx @@ -18,7 +18,8 @@ */ import { useState, useEffect, FC } from 'react'; import { ModalTitleWithIcon } from 'src/components/ModalTitleWithIcon'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { FormLabel, diff --git a/superset-frontend/src/features/tags/TagCard.tsx b/superset-frontend/src/features/tags/TagCard.tsx index 909af08e45dd..8f2a737539aa 100644 --- a/superset-frontend/src/features/tags/TagCard.tsx +++ b/superset-frontend/src/features/tags/TagCard.tsx @@ -17,7 +17,8 @@ * under the License. */ import { Link } from 'react-router-dom'; -import { isFeatureEnabled, FeatureFlag, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { CardStyles } from 'src/views/CRUD/utils'; import { Button, diff --git a/superset-frontend/src/features/tags/TagModal.tsx b/superset-frontend/src/features/tags/TagModal.tsx index 324a10292cbb..8e5d6467e61d 100644 --- a/superset-frontend/src/features/tags/TagModal.tsx +++ b/superset-frontend/src/features/tags/TagModal.tsx @@ -28,7 +28,8 @@ import { Input, Modal, } from '@superset-ui/core/components'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { styled, useTheme } from '@apache-superset/core/ui'; import { Tag } from 'src/views/CRUD/types'; import { fetchObjectsByTagIds } from 'src/features/tags/tags'; diff --git a/superset-frontend/src/features/themes/ThemeModal.tsx b/superset-frontend/src/features/themes/ThemeModal.tsx index 6b578cb650ee..b56eef55b761 100644 --- a/superset-frontend/src/features/themes/ThemeModal.tsx +++ b/superset-frontend/src/features/themes/ThemeModal.tsx @@ -26,7 +26,7 @@ import { } from 'react'; import { omit } from 'lodash'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled, useTheme, Alert } from '@apache-superset/core/ui'; import { useSingleViewResource } from 'src/views/CRUD/hooks'; import { useThemeContext } from 'src/theme/ThemeProvider'; diff --git a/superset-frontend/src/features/userInfo/UserInfoModal.tsx b/superset-frontend/src/features/userInfo/UserInfoModal.tsx index 2fc82b4e7d09..c6bd92d6a72a 100644 --- a/superset-frontend/src/features/userInfo/UserInfoModal.tsx +++ b/superset-frontend/src/features/userInfo/UserInfoModal.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { FormModal, FormItem, Input } from '@superset-ui/core/components'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { User } from 'src/types/bootstrapTypes'; diff --git a/superset-frontend/src/features/users/UserListModal.tsx b/superset-frontend/src/features/users/UserListModal.tsx index 480927476522..af20b0340f0f 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 fa653cb36b69..d5cb04883e99 100644 --- a/superset-frontend/src/features/users/utils.ts +++ b/superset-frontend/src/features/users/utils.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +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.tsx b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx index 60add20e7efc..2ed450e8f636 100644 --- a/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { ensureIsArray, getColumnLabel, getNumberFormatter, isEqualArray, NumberFormats, - t, } from '@superset-ui/core'; import { styled, useTheme, css } from '@apache-superset/core/ui'; import { useCallback, useEffect, useMemo, useState, useRef } from 'react'; diff --git a/superset-frontend/src/filters/components/Range/controlPanel.ts b/superset-frontend/src/filters/components/Range/controlPanel.ts index 12d7331b0012..c4603159232c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ControlPanelConfig, sharedControls, diff --git a/superset-frontend/src/filters/components/Range/index.ts b/superset-frontend/src/filters/components/Range/index.ts index d6729bb842e1..51cbbf2d6adf 100644 --- a/superset-frontend/src/filters/components/Range/index.ts +++ b/superset-frontend/src/filters/components/Range/index.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior, ChartMetadata, ChartPlugin } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; diff --git a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx index f96dc9e8f0ec..fcdf60fca8fe 100644 --- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx @@ -18,6 +18,7 @@ */ /* eslint-disable no-param-reassign */ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { t } from '@apache-superset/core'; import { AppSection, DataMask, @@ -26,9 +27,8 @@ import { getColumnLabel, JsonObject, finestTemporalGrainFormatter, - t, - tn, } 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 { debounce, isUndefined } from 'lodash'; diff --git a/superset-frontend/src/filters/components/Select/controlPanel.ts b/superset-frontend/src/filters/components/Select/controlPanel.ts index 954c9a853c9c..828e5952b308 100644 --- a/superset-frontend/src/filters/components/Select/controlPanel.ts +++ b/superset-frontend/src/filters/components/Select/controlPanel.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, sharedControls, diff --git a/superset-frontend/src/filters/components/Select/index.ts b/superset-frontend/src/filters/components/Select/index.ts index 8e2ef68a7d68..193c78a14555 100644 --- a/superset-frontend/src/filters/components/Select/index.ts +++ b/superset-frontend/src/filters/components/Select/index.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior, ChartMetadata, ChartPlugin } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; diff --git a/superset-frontend/src/filters/components/Time/controlPanel.ts b/superset-frontend/src/filters/components/Time/controlPanel.ts index 2dbded365160..44b19a550a83 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 f6c3d27ce265..9a2fab7b1268 100644 --- a/superset-frontend/src/filters/components/Time/index.ts +++ b/superset-frontend/src/filters/components/Time/index.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior, ChartMetadata, ChartPlugin } from '@superset-ui/core'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; import thumbnail from './images/thumbnail.png'; diff --git a/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx b/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx index ec8f65d9719e..6faf49f1171b 100644 --- a/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { ensureIsArray, ExtraFormData, t, tn } from '@superset-ui/core'; +import { t, tn } from '@apache-superset/core'; +import { ensureIsArray, ExtraFormData } from '@superset-ui/core'; import { GenericDataType } from '@apache-superset/core/api/core'; import { useEffect, useState } from 'react'; import { diff --git a/superset-frontend/src/filters/components/TimeColumn/controlPanel.ts b/superset-frontend/src/filters/components/TimeColumn/controlPanel.ts index bd6e9dcd0f46..cef113e38656 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 046eb4c8d0a4..59182011f00c 100644 --- a/superset-frontend/src/filters/components/TimeColumn/index.ts +++ b/superset-frontend/src/filters/components/TimeColumn/index.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior, ChartMetadata, ChartPlugin } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; diff --git a/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx b/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx index aeff9fbc5ac2..3c65cbc4b63c 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 { ensureIsArray, ExtraFormData, - t, TimeGranularity, - tn, } from '@superset-ui/core'; +import { tn } from '@apache-superset/core'; 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 bd6e9dcd0f46..cef113e38656 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 0b6c27901f29..c4f67379e4bb 100644 --- a/superset-frontend/src/filters/components/TimeGrain/index.ts +++ b/superset-frontend/src/filters/components/TimeGrain/index.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { Behavior, ChartMetadata, ChartPlugin } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; diff --git a/superset-frontend/src/hooks/apiResources/datasets.ts b/superset-frontend/src/hooks/apiResources/datasets.ts index d48dac46fd37..e5f633091a2a 100644 --- a/superset-frontend/src/hooks/apiResources/datasets.ts +++ b/superset-frontend/src/hooks/apiResources/datasets.ts @@ -19,12 +19,12 @@ */ import { Column, - logging, Metric, ensureIsArray, getExtensionsRegistry, QueryFormData, } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import { useEffect, useState } from 'react'; import { Dataset } from 'src/components/Chart/types'; import { diff --git a/superset-frontend/src/hooks/useThemeMenuItems.tsx b/superset-frontend/src/hooks/useThemeMenuItems.tsx index 4fcf9ef6a39e..3af77482f294 100644 --- a/superset-frontend/src/hooks/useThemeMenuItems.tsx +++ b/superset-frontend/src/hooks/useThemeMenuItems.tsx @@ -19,7 +19,7 @@ import { useMemo } from 'react'; import { Icons, Tooltip } from '@superset-ui/core/components'; import type { MenuItem } from '@superset-ui/core/components/Menu'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { ThemeMode, ThemeAlgorithm } from '@apache-superset/core/ui'; import { NAVBAR_MENU_POPUP_OFFSET } from 'src/features/home/commonMenuData'; diff --git a/superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts b/superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts index 3d912a0af078..331a4fba22d7 100644 --- a/superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts +++ b/superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { getClientErrorObject, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getClientErrorObject } from '@superset-ui/core'; import { useEffect, useRef, useCallback, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { useBeforeUnload } from 'src/hooks/useBeforeUnload'; diff --git a/superset-frontend/src/middleware/asyncEvent.ts b/superset-frontend/src/middleware/asyncEvent.ts index 0512e6817b32..303051ec4f17 100644 --- a/superset-frontend/src/middleware/asyncEvent.ts +++ b/superset-frontend/src/middleware/asyncEvent.ts @@ -22,11 +22,11 @@ import { FeatureFlag, makeApi, SupersetClient, - logging, getClientErrorObject, parseErrorJson, SupersetError, } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; 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 01f9a518f215..25fba190a3d1 100644 --- a/superset-frontend/src/pages/ActionLog/index.tsx +++ b/superset-frontend/src/pages/ActionLog/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useMemo } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css } from '@apache-superset/core/ui'; import SubMenu, { SubMenuProps } from 'src/features/home/SubMenu'; import { useListViewResource } from 'src/views/CRUD/hooks'; diff --git a/superset-frontend/src/pages/AlertReportList/index.tsx b/superset-frontend/src/pages/AlertReportList/index.tsx index 918ffdfac56c..174b95640428 100644 --- a/superset-frontend/src/pages/AlertReportList/index.tsx +++ b/superset-frontend/src/pages/AlertReportList/index.tsx @@ -19,8 +19,8 @@ import { useState, useMemo, useEffect, useCallback } from 'react'; import { useHistory } from 'react-router-dom'; +import { t } from '@apache-superset/core'; import { - t, SupersetClient, makeApi, getExtensionsRegistry, diff --git a/superset-frontend/src/pages/AllEntities/index.tsx b/superset-frontend/src/pages/AllEntities/index.tsx index fa7356085a90..5f1e4b2666fa 100644 --- a/superset-frontend/src/pages/AllEntities/index.tsx +++ b/superset-frontend/src/pages/AllEntities/index.tsx @@ -17,7 +17,7 @@ * under the License. */ import { useEffect, useState } from 'react'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled, css, SupersetTheme } from '@apache-superset/core/ui'; import { NumberParam, useQueryParam } from 'use-query-params'; import AllEntitiesTable from 'src/features/allEntities/AllEntitiesTable'; diff --git a/superset-frontend/src/pages/AnnotationLayerList/index.tsx b/superset-frontend/src/pages/AnnotationLayerList/index.tsx index 523cca2ece64..4b57dc11968a 100644 --- a/superset-frontend/src/pages/AnnotationLayerList/index.tsx +++ b/superset-frontend/src/pages/AnnotationLayerList/index.tsx @@ -19,7 +19,8 @@ import { useMemo, useState } from 'react'; import rison from 'rison'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { Link, useHistory } from 'react-router-dom'; import { useListViewResource } from 'src/views/CRUD/hooks'; import { createFetchRelated, createErrorHandler } from 'src/views/CRUD/utils'; diff --git a/superset-frontend/src/pages/AnnotationList/index.tsx b/superset-frontend/src/pages/AnnotationList/index.tsx index 4284b427fb6a..6b0e07751670 100644 --- a/superset-frontend/src/pages/AnnotationList/index.tsx +++ b/superset-frontend/src/pages/AnnotationList/index.tsx @@ -19,7 +19,8 @@ import { useMemo, useState, useEffect, useCallback } from 'react'; import { useParams, Link, useHistory } from 'react-router-dom'; -import { t, SupersetClient, getClientErrorObject } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient, getClientErrorObject } from '@superset-ui/core'; import { css, styled } from '@apache-superset/core/ui'; 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 7ab6ba98d713..26926a1c8d64 100644 --- a/superset-frontend/src/pages/Chart/index.tsx +++ b/superset-frontend/src/pages/Chart/index.tsx @@ -19,13 +19,13 @@ import { useEffect, useRef, useState } from 'react'; import { useDispatch } from 'react-redux'; import { useLocation } from 'react-router-dom'; +import { t } from '@apache-superset/core'; import { getLabelsColorMap, isDefined, JsonObject, makeApi, LabelsColorMapSource, - t, getClientErrorObject, } from '@superset-ui/core'; import { Loading } from '@superset-ui/core/components'; diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx b/superset-frontend/src/pages/ChartCreation/index.tsx index 3da0d7737eb6..2c61fc59d53e 100644 --- a/superset-frontend/src/pages/ChartCreation/index.tsx +++ b/superset-frontend/src/pages/ChartCreation/index.tsx @@ -18,7 +18,8 @@ */ import { PureComponent, ReactNode } from 'react'; import rison from 'rison'; -import { isDefined, JsonResponse, SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isDefined, JsonResponse, SupersetClient } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { withTheme, Theme } from '@emotion/react'; import { getUrlParam } from 'src/utils/urlUtils'; diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx index 00dfb26c10cf..b0abfe0c8ecb 100644 --- a/superset-frontend/src/pages/ChartList/index.tsx +++ b/superset-frontend/src/pages/ChartList/index.tsx @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { isFeatureEnabled, FeatureFlag, getChartMetadataRegistry, JsonResponse, SupersetClient, - t, } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { useState, useMemo, useCallback } from 'react'; diff --git a/superset-frontend/src/pages/CssTemplateList/index.tsx b/superset-frontend/src/pages/CssTemplateList/index.tsx index ae39bbdede67..2c3e8944adaf 100644 --- a/superset-frontend/src/pages/CssTemplateList/index.tsx +++ b/superset-frontend/src/pages/CssTemplateList/index.tsx @@ -18,7 +18,8 @@ */ import { useMemo, useState } from 'react'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import rison from 'rison'; import { useListViewResource } from 'src/views/CRUD/hooks'; diff --git a/superset-frontend/src/pages/DashboardList/index.tsx b/superset-frontend/src/pages/DashboardList/index.tsx index 799055dddb8d..6b9454f7adcd 100644 --- a/superset-frontend/src/pages/DashboardList/index.tsx +++ b/superset-frontend/src/pages/DashboardList/index.tsx @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ +import { t } from '@apache-superset/core'; import { isFeatureEnabled, FeatureFlag, SupersetClient, - t, } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { useSelector } from 'react-redux'; diff --git a/superset-frontend/src/pages/DatabaseList/index.tsx b/superset-frontend/src/pages/DatabaseList/index.tsx index 09c7640da44d..84baa209bbe0 100644 --- a/superset-frontend/src/pages/DatabaseList/index.tsx +++ b/superset-frontend/src/pages/DatabaseList/index.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { getExtensionsRegistry, SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getExtensionsRegistry, SupersetClient } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { useState, useMemo, useEffect } from 'react'; import rison from 'rison'; diff --git a/superset-frontend/src/pages/DatasetList/index.tsx b/superset-frontend/src/pages/DatasetList/index.tsx index 80c3691b02e3..7822e15a9e57 100644 --- a/superset-frontend/src/pages/DatasetList/index.tsx +++ b/superset-frontend/src/pages/DatasetList/index.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { getExtensionsRegistry, SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { getExtensionsRegistry, SupersetClient } from '@superset-ui/core'; import { styled, useTheme, css } from '@apache-superset/core/ui'; import { FunctionComponent, useState, useMemo, useCallback, Key } from 'react'; import { Link, useHistory } from 'react-router-dom'; diff --git a/superset-frontend/src/pages/ExecutionLogList/index.tsx b/superset-frontend/src/pages/ExecutionLogList/index.tsx index 32fe554a2458..2c2a31d0b8d0 100644 --- a/superset-frontend/src/pages/ExecutionLogList/index.tsx +++ b/superset-frontend/src/pages/ExecutionLogList/index.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { css, styled } from '@apache-superset/core/ui'; import { extendedDayjs as dayjs, diff --git a/superset-frontend/src/pages/GroupsList/index.tsx b/superset-frontend/src/pages/GroupsList/index.tsx index f11c93cec476..b19fe494eb40 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 7596e34564f3..6b0d31f31f3d 100644 --- a/superset-frontend/src/pages/Home/index.tsx +++ b/superset-frontend/src/pages/Home/index.tsx @@ -17,12 +17,12 @@ * under the License. */ import { useEffect, useMemo, useState } from 'react'; +import { t } from '@apache-superset/core'; import { isFeatureEnabled, FeatureFlag, getExtensionsRegistry, JsonObject, - t, } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import rison from 'rison'; diff --git a/superset-frontend/src/pages/Login/index.tsx b/superset-frontend/src/pages/Login/index.tsx index 9162bb0e1557..1dee883cf5b8 100644 --- a/superset-frontend/src/pages/Login/index.tsx +++ b/superset-frontend/src/pages/Login/index.tsx @@ -17,7 +17,8 @@ * under the License. */ -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { styled, css } from '@apache-superset/core/ui'; import { Button, diff --git a/superset-frontend/src/pages/QueryHistoryList/index.tsx b/superset-frontend/src/pages/QueryHistoryList/index.tsx index 5825ea6bed5d..53a20882576b 100644 --- a/superset-frontend/src/pages/QueryHistoryList/index.tsx +++ b/superset-frontend/src/pages/QueryHistoryList/index.tsx @@ -18,7 +18,8 @@ */ import { useMemo, useState, useCallback, ReactElement, useEffect } from 'react'; import { Link, useHistory } from 'react-router-dom'; -import { QueryState, SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { QueryState, SupersetClient } from '@superset-ui/core'; import { css, styled, useTheme } from '@apache-superset/core/ui'; import { createFetchRelated, diff --git a/superset-frontend/src/pages/Register/index.tsx b/superset-frontend/src/pages/Register/index.tsx index 9d8add2df924..a30cc759bef2 100644 --- a/superset-frontend/src/pages/Register/index.tsx +++ b/superset-frontend/src/pages/Register/index.tsx @@ -17,7 +17,8 @@ * under the License. */ -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { styled, css } from '@apache-superset/core/ui'; import { Button, diff --git a/superset-frontend/src/pages/RolesList/index.tsx b/superset-frontend/src/pages/RolesList/index.tsx index 0a27cd019fa8..af309fdbfb93 100644 --- a/superset-frontend/src/pages/RolesList/index.tsx +++ b/superset-frontend/src/pages/RolesList/index.tsx @@ -18,7 +18,8 @@ */ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { useListViewResource } from 'src/views/CRUD/hooks'; import RoleListAddModal from 'src/features/roles/RoleListAddModal'; import RoleListEditModal from 'src/features/roles/RoleListEditModal'; diff --git a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx index 2e57c8232a27..e6e86413a382 100644 --- a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx +++ b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { useMemo, useState } from 'react'; import { ConfirmStatusChange, Tooltip } from '@superset-ui/core/components'; import { diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx index 9057ec34b2c9..9b32384ce5bc 100644 --- a/superset-frontend/src/pages/SavedQueryList/index.tsx +++ b/superset-frontend/src/pages/SavedQueryList/index.tsx @@ -17,11 +17,11 @@ * under the License. */ +import { t } from '@apache-superset/core'; import { FeatureFlag, isFeatureEnabled, SupersetClient, - t, } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; import { useCallback, useMemo, useState, MouseEvent } from 'react'; diff --git a/superset-frontend/src/pages/Tags/index.tsx b/superset-frontend/src/pages/Tags/index.tsx index 933f5c3a3b56..67b8140a1278 100644 --- a/superset-frontend/src/pages/Tags/index.tsx +++ b/superset-frontend/src/pages/Tags/index.tsx @@ -17,7 +17,8 @@ * under the License. */ import { useMemo, useState } from 'react'; -import { isFeatureEnabled, FeatureFlag, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { Actions, createErrorHandler, diff --git a/superset-frontend/src/pages/ThemeList/index.tsx b/superset-frontend/src/pages/ThemeList/index.tsx index 630bc7795022..002e925bf69c 100644 --- a/superset-frontend/src/pages/ThemeList/index.tsx +++ b/superset-frontend/src/pages/ThemeList/index.tsx @@ -18,7 +18,8 @@ */ import { useCallback, useMemo, useState, useEffect } from 'react'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { styled, Alert } from '@apache-superset/core/ui'; import { Tag, diff --git a/superset-frontend/src/pages/UserInfo/index.tsx b/superset-frontend/src/pages/UserInfo/index.tsx index 367e5c98470e..8f1138a6d64a 100644 --- a/superset-frontend/src/pages/UserInfo/index.tsx +++ b/superset-frontend/src/pages/UserInfo/index.tsx @@ -18,7 +18,8 @@ */ import { useCallback, useEffect, useState } from 'react'; -import { t, SupersetClient } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { css, useTheme, styled } from '@apache-superset/core/ui'; import SubMenu, { SubMenuProps } from 'src/features/home/SubMenu'; import { useToasts } from 'src/components/MessageToasts/withToasts'; diff --git a/superset-frontend/src/pages/UserRegistrations/index.tsx b/superset-frontend/src/pages/UserRegistrations/index.tsx index 750d1efddc41..0906f613ce61 100644 --- a/superset-frontend/src/pages/UserRegistrations/index.tsx +++ b/superset-frontend/src/pages/UserRegistrations/index.tsx @@ -18,7 +18,8 @@ */ import { useMemo, useState } from 'react'; -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { SupersetClient } from '@superset-ui/core'; import { useListViewResource } from 'src/views/CRUD/hooks'; import { useToasts } from 'src/components/MessageToasts/withToasts'; import { diff --git a/superset-frontend/src/pages/UsersList/index.tsx b/superset-frontend/src/pages/UsersList/index.tsx index f9787a214e3b..7a71490bc3bc 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; 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 c1dfa889cf5c..5fce7ccab029 100644 --- a/superset-frontend/src/preamble.ts +++ b/superset-frontend/src/preamble.ts @@ -17,14 +17,8 @@ * under the License. */ import { setConfig as setHotLoaderConfig } from 'react-hot-loader'; -// eslint-disable-next-line no-restricted-imports -import { - configure, - makeApi, - initFeatureFlags, - SupersetClient, - LanguagePack, -} from '@superset-ui/core'; +import { configure, LanguagePack } from '@apache-superset/core/ui'; +import { makeApi, initFeatureFlags, SupersetClient } from '@superset-ui/core'; import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates'; import setupClient from './setup/setupClient'; import setupColors from './setup/setupColors'; diff --git a/superset-frontend/src/setup/setupClient.ts b/superset-frontend/src/setup/setupClient.ts index d5467bafd86b..3f61dec29639 100644 --- a/superset-frontend/src/setup/setupClient.ts +++ b/superset-frontend/src/setup/setupClient.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SupersetClient, logging, ClientConfig } from '@superset-ui/core'; +import { SupersetClient, ClientConfig } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import parseCookie from 'src/utils/parseCookie'; import getBootstrapData from 'src/utils/getBootstrapData'; diff --git a/superset-frontend/src/types/bootstrapTypes.ts b/superset-frontend/src/types/bootstrapTypes.ts index f51df08c2cf5..44de2bd84aec 100644 --- a/superset-frontend/src/types/bootstrapTypes.ts +++ b/superset-frontend/src/types/bootstrapTypes.ts @@ -28,11 +28,11 @@ import type { ColorSchemeConfig, FeatureFlagMap, JsonObject, - LanguagePack, - Locale, SequentialSchemeConfig, } from '@superset-ui/core'; +import type { LanguagePack, Locale } from '@apache-superset/core/ui'; + export type User = { createdOn?: string; email?: string; diff --git a/superset-frontend/src/utils/downloadAsImage.tsx b/superset-frontend/src/utils/downloadAsImage.tsx index 95a2c5e67b72..e525b8c3d676 100644 --- a/superset-frontend/src/utils/downloadAsImage.tsx +++ b/superset-frontend/src/utils/downloadAsImage.tsx @@ -20,7 +20,7 @@ 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { SupersetTheme } from '@apache-superset/core/ui'; import { addWarningToast } from 'src/components/MessageToasts/actions'; diff --git a/superset-frontend/src/utils/downloadAsPdf.ts b/superset-frontend/src/utils/downloadAsPdf.ts index c9c012a4a873..b65600719829 100644 --- a/superset-frontend/src/utils/downloadAsPdf.ts +++ b/superset-frontend/src/utils/downloadAsPdf.ts @@ -19,7 +19,8 @@ import { SyntheticEvent } from 'react'; import domToPdf from 'dom-to-pdf'; import { kebabCase } from 'lodash'; -import { logging, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { logging } from '@apache-superset/core'; 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 c6900d536225..9f590005bf37 100644 --- a/superset-frontend/src/utils/export.test.ts +++ b/superset-frontend/src/utils/export.test.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SupersetClient, logging } from '@superset-ui/core'; +import { SupersetClient } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import contentDisposition from 'content-disposition'; import handleResourceExport from './export'; @@ -25,6 +26,9 @@ jest.mock('@superset-ui/core', () => ({ SupersetClient: { get: jest.fn(), }, +})); + +jest.mock('@apache-superset/core', () => ({ logging: { warn: jest.fn(), error: jest.fn(), diff --git a/superset-frontend/src/utils/export.ts b/superset-frontend/src/utils/export.ts index 748afd9f1f45..e26ab299215c 100644 --- a/superset-frontend/src/utils/export.ts +++ b/superset-frontend/src/utils/export.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { SupersetClient, logging } from '@superset-ui/core'; +import { SupersetClient } from '@superset-ui/core'; +import { logging } from '@apache-superset/core'; import rison from 'rison'; import contentDisposition from 'content-disposition'; import { ensureAppRoot } from './pathUtils'; diff --git a/superset-frontend/src/utils/fetchOptions.ts b/superset-frontend/src/utils/fetchOptions.ts index a09ca471e3e4..3dde8b0daabb 100644 --- a/superset-frontend/src/utils/fetchOptions.ts +++ b/superset-frontend/src/utils/fetchOptions.ts @@ -17,7 +17,8 @@ * under the License. */ -import { SupersetClient, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +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 865452ade825..421e2b36226c 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 '@superset-ui/core'; +import { t } from '@apache-superset/core'; const CREATE_CHART_TEXT = t('Create chart'); const UPDATE_CHART_TEXT = t('Update chart'); diff --git a/superset-frontend/src/views/CRUD/hooks.ts b/superset-frontend/src/views/CRUD/hooks.ts index 5a5721205eec..85f221834859 100644 --- a/superset-frontend/src/views/CRUD/hooks.ts +++ b/superset-frontend/src/views/CRUD/hooks.ts @@ -18,10 +18,10 @@ */ import rison from 'rison'; import { useState, useEffect, useCallback } from 'react'; +import { t } from '@apache-superset/core'; import { makeApi, SupersetClient, - t, JsonObject, getClientErrorObject, } from '@superset-ui/core'; diff --git a/superset-frontend/src/views/CRUD/utils.tsx b/superset-frontend/src/views/CRUD/utils.tsx index c88aa382598b..976d947df83e 100644 --- a/superset-frontend/src/views/CRUD/utils.tsx +++ b/superset-frontend/src/views/CRUD/utils.tsx @@ -17,12 +17,11 @@ * under the License. */ +import { t, logging } from '@apache-superset/core'; import { - logging, SupersetClient, SupersetClientResponse, getClientErrorObject, - t, lruCache, } from '@superset-ui/core'; import { styled } from '@apache-superset/core/ui'; diff --git a/superset-frontend/src/visualizations/TimeTable/TimeTable.tsx b/superset-frontend/src/visualizations/TimeTable/TimeTable.tsx index 1877bf7547f5..9b179d1a8b24 100644 --- a/superset-frontend/src/visualizations/TimeTable/TimeTable.tsx +++ b/superset-frontend/src/visualizations/TimeTable/TimeTable.tsx @@ -18,7 +18,7 @@ */ import { useMemo, ReactNode } from 'react'; import { InfoTooltip, TableView } from '@superset-ui/core/components'; -import { t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; import { styled } from '@apache-superset/core/ui'; import { sortNumberWithMixedTypes, processTimeTableData } from './utils'; import { ValueCell, LeftCell, Sparkline } from './components'; diff --git a/superset-frontend/src/visualizations/TimeTable/config/controlPanel/controlPanel.ts b/superset-frontend/src/visualizations/TimeTable/config/controlPanel/controlPanel.ts index 7b212b1bf29e..98c81221fc5b 100644 --- a/superset-frontend/src/visualizations/TimeTable/config/controlPanel/controlPanel.ts +++ b/superset-frontend/src/visualizations/TimeTable/config/controlPanel/controlPanel.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, validateNonEmpty } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, getStandardizedControls, diff --git a/superset-frontend/src/visualizations/TimeTable/index.ts b/superset-frontend/src/visualizations/TimeTable/index.ts index a407fa58da49..bc6a5e23f391 100644 --- a/superset-frontend/src/visualizations/TimeTable/index.ts +++ b/superset-frontend/src/visualizations/TimeTable/index.ts @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { ChartMetadata, ChartPlugin } from '@superset-ui/core'; import { transformProps, controlPanel } from './config'; import thumbnail from './images/thumbnail.png'; import thumbnailDark from './images/thumbnail-dark.png'; diff --git a/superset-frontend/src/visualizations/dashboardComponents/ExampleComponent/ExampleComponent.tsx b/superset-frontend/src/visualizations/dashboardComponents/ExampleComponent/ExampleComponent.tsx index 030a1e4fbb43..23045052c422 100644 --- a/superset-frontend/src/visualizations/dashboardComponents/ExampleComponent/ExampleComponent.tsx +++ b/superset-frontend/src/visualizations/dashboardComponents/ExampleComponent/ExampleComponent.tsx @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -import { DashboardComponentMetadata, t } from '@superset-ui/core'; +import { t } from '@apache-superset/core'; +import { DashboardComponentMetadata } from '@superset-ui/core'; // TODO: POC only component can be removed after PR approved const ExampleComponent = ({