diff --git a/superset-frontend/packages/superset-core/package.json b/superset-frontend/packages/superset-core/package.json index f7d31223e81..fd900b2f559 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 e570f52292a..b02156449f2 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 00000000000..024889ce5e7 --- /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 82cb0634d5e..ba78535d95d 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 bf27ec7ce4f..52283a7294e 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 216bf584759..c9efc51d0cb 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 420a2bda1e4..724adae6249 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 929c4d0fb9a..230dbdf2bdd 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 55ddae91e9c..82de6b7cecc 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 94984be4888..8487b865f45 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 d725dcb9efb..009d3bc35c2 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 09cbc387723..68ef3fbbed0 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 edf17053380..8a4fb2a745e 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 278526a4820..d467f1c522b 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 606abbb759a..12bb52af9e4 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 caabdfc9be7..97ec274ac58 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 1cbca5a8649..f828f083db3 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 7a15bbfc9ab..17cc5b73b7d 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 67c64725c0a..a3a874a15dc 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 f70df487fad..c92e8f911c6 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 a338f6e76bb..d5bd0ee2a37 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 901c34abc85..aacdbbe16d2 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 dadc5285233..bd2e32e136f 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 4a9bdfc0431..fc8f16ee88e 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 9ba1b944f58..bc8c0b0c774 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 39c32e7b8df..ab77740d428 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 6830d01974c..19310b83c82 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 a3fbaa4a0e7..0dc760c3cb5 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 3ff8fb9c1e2..7c43cef3b33 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 3671ba37d54..68a06e2d15a 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 ece0f3879fe..6955af4798c 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 63c33638c4f..90fcbb4d6a5 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 3f847ea4b57..9fea3c3153a 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 470e2aa4a50..4874f50a776 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 f55a0dfc0d9..b370ad7f6b4 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 92df41a4690..c340a2c2ed7 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 03413e906d4..47e1abc84d5 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 51fb11395b6..bb9d1cc5a41 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 15df60cb250..f329e090dcb 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 2c5efd2f873..3b3e27b466d 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 475a58d9fe2..14df91f4cf1 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 7a6ac61669f..3f4bc6e5e85 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 30b298f02dd..1c955deaa72 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 3d8d3d43a73..330563566c2 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 b3c3e379460..504341f60d0 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 b8f1dc1ef49..1506ecde1e7 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 b2268c22e23..553ac193084 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 eb3866aa73c..d8567d93b2a 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 ecb0977f1d1..86a80ed2fcd 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 b989b1ad66f..1816f2310eb 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 20c67c5cdcb..b2ba0530009 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 6a88d811362..a4a9f14f40c 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 9c9ea61f413..d4581e380c7 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 1788dc95b24..021341808e0 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 cd523ea6eae..469d9598f99 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 f48f101e07a..bfa2e801a30 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 e8300f6eb39..0c6a32a7047 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 dd2797b4a58..950ae40ec72 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 a5e405942a3..234fba49c9d 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 00fa5461505..e84aaf0487e 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 ce6b01d1ecd..084bea37530 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 21622b6d796..8b2dd2c18ff 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 ab7ef4fae56..7eef109a3a2 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 22622ff9750..e0fc92f37da 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 5ad85960a7f..55f7a51bf83 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 05b681c28f4..3999febd745 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 5c0e70e31f4..29d7d8154df 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 6cb0af8eec8..d544b8fd14e 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 8097134e6d6..78cdf2bde69 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 f5e38905ad5..c892037984d 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 bb099c9bf82..426af7e9f3f 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 59d5b08bb52..2ca22fcd79d 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 7034e58ca53..972fdf855da 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 3b63f12840a..d6a7b337f0d 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 1677f0ecf9b..bea18dca9d7 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 89ec2c73839..facbc149aef 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 27f6d0a590a..bb7e6c052b3 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 af4173cd446..835c433fe2e 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 3775a56cb5c..ce8db32cd28 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 202ca953990..1907a8198c5 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 c639ec6cafb..b362757db12 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 f34c4b84e84..b1c879cc221 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 4e290137167..b6e5257701b 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 df718afe415..00000000000 --- 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 2aa78faeed2..00000000000 --- 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 2c0f0d6f92d..00000000000 --- 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 00d52be8a27..00000000000 --- 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 b3c68f7e71d..0bdfae3ddc3 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 b1f0dc5f31e..00000000000 --- 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 ca4a8311375..5196a451729 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 ca3b580730a..bbc3e115bf6 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 904579867b3..4103411f6e4 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 6cdd79162ba..33780f5ef21 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 1a8bdb5c8a0..e83b45b2a8d 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 482a3153926..3240dd7b741 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 031382a45ef..f4469e8d173 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 5f28a879815..7da9d07b1c9 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 944bf9ded73..eed4fe0f088 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 ad4ed7c7972..0478dc122f8 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 51a43a450e1..880051fda29 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 24ef052a9b7..20564d19576 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 fec1b6fb6a3..58a3f327eb5 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 6da02227012..af58b4e70b1 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 1fc693dc172..e3fb8b46e7b 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 2bed314393c..1fefb490678 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 1f18d4e4e38..782a8cacc0a 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 fa276bcc741..641d9a8af63 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 29f85126fe7..537da7a8954 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 11b891b2586..ef30851d933 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 9807929f992..fe0c7da0bd8 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 01f70c098cc..8e005b5d454 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 f75764e9f5e..29cb3680661 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 5e2c78cc5ae..0a8d12bfe6c 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 f56b4eb9ec0..eaf990e07a5 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 290d338e211..9777b6fe5bb 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 89d666dd934..9cf7a1d08ee 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 364e57c469c..b3dcabb03de 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 42af03b6865..11a67569f6c 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 e920f07ed76..9e9d92b46f2 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 7d220b1ac02..223fa2fa529 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 88c5a1a4189..889af60f094 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 5b56c576bf0..587dcf181d1 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 fef74f6fe65..6d59561bac0 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 18144934aca..f3326b1bda0 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 03e163ea000..194906b50d9 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 fa30977f7ea..21f1dbe8514 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 23fc2ad58a8..95dd519f992 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 7779fa1c75d..580769f9a15 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 fda3cff9b40..eacfa995799 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 658e7c014a1..916ad8d7daa 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 0c5ea4b4210..a3c4f44bb17 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 69c21e9079b..e85c694b54a 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 9aec653e05b..67a398c8a9c 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 fa89cc4474b..b7499e27e38 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 2b722316263..20545763a65 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 f3c369ef347..7438dcd003f 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 cef908989a3..c0a99d61fe3 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 c2facd80242..e78561d3edb 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 32cc050305c..28884144506 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 87758e37cf7..04458664eb7 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 805ed682672..7666ec31441 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 a40b7734c3f..55c1cb83668 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 dd3e39040f8..5c03826029d 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 30ffd27287a..21909c6de0e 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 95b08d71c31..994e34e014f 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 8763f467f9f..03b56e727b2 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 18af4e41a20..41c7baa8340 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 17d5e7a88ed..22ca8771878 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 ed175c35799..4f6091424bd 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 fcae6dd3979..139a2c79b0e 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 47914b5a31b..b33682bdd8e 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 1ab7736981b..756959d73c2 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 db67811f374..1b1bd1fedf3 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 595d5d4b721..fef611203d5 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 57c33db3bb1..48851a88ecd 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 6a91617c5af..e9ff8299fb7 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 11401c77200..b1ae8231fe3 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 1a81b7f264c..267a0d59d6a 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 4546c543913..067b8845f2d 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 af997c021e9..23a02905126 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 41ce3fdb69f..add287c6f05 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 731985a6e01..ef0204805e0 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 a4135dc69e5..6818ad020de 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 d71d1ee1bc8..88e7bc23693 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 c4e714a54b1..465f744425a 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 163d9defd36..7bb5d2e186b 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 2b916739ef7..34c3dcb56d8 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 567aecf530a..a2ae810858c 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 22bc336402b..170fa261907 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 efd018dc43a..51571de05d6 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 35962b845f2..03f53fe18f0 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 d895dc92105..603fbcf9040 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 3af09913f02..bfda10d9028 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 04fca3c945e..01402741137 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 7c65baf3346..2928f532312 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 1dba8ac4dd2..d76f7a3d48a 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 e4b45d30410..c9f18207d96 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 9610497382d..d57d998d699 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 40b2697accd..64611323f3e 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 b1c0588a38a..b28e2db187f 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 c22264e2d1e..5d2775aee2f 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 37f834df8d5..7d55a84eb5e 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 71b7114dcf4..09adc2dbe6b 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 a9534978fa9..2fbf81aa270 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 bf8aa4e65fd..f914b7f4ace 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 71bfa74a43f..8db566d038e 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 736f9ffe2cd..998b8e49e97 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 5d6522498c1..62893e1cbd9 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 5d6df447ac7..b4aeafacdfa 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 0e39f3be292..dd7d9d5e39b 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 6407084029e..d792dc78669 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 f50170246a5..a4e7bc25b75 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 7a3d95c7e68..12fd9bda043 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 0fa02a3f37a..39b113af7b3 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 3061511b4c0..211b1170c63 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 85604c9b328..978b1427d6d 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 aef87b4db16..f399c62e88a 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 a4b0ca7c42c..0ec6080c50f 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 86d4b834cdc..108d41396a9 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 4f93c0ed2cb..e44ee3dddd9 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 a2ef43352d0..d1e20817916 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 e6fee12248e..fa2972383a1 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 683116f2ef8..0c7dbc85229 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 7b9d1293b78..732bc039530 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 05a7ac57cf6..ec5681a96db 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 9e78fe14879..8ff643616fb 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 8f1b486e331..7269eee8967 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 ee18c027933..cd0205ac4ef 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 22da9e02ce7..6c5614e042a 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 5b51242490d..56048de1d23 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 d49897c30bc..f8e134f38fe 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 894c6e51efd..6fffbc8e585 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 8e846784c2c..69a1cc703ea 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 05d7e8cca1e..1a45e7d23dd 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 b74a879ed84..1be5d44d99a 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 a081b850360..99702e13b39 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 55cdf7362cb..0d431e24962 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 00ea73742fd..62f805531b2 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 8681530d66a..bebc8f47199 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 cf2a8598e1a..c31d2a7604a 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 19bb8019e1d..31a53a66567 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 5aac81dc7f1..e00f62b15a6 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 3e9b1781770..c65110c52c6 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 0a0e08e761c..d1675454fee 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 8ff20ffe587..f72355ad044 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 c72655ec658..9df35c632a7 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 1e1dc475768..712d5698d97 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 cd9fc63447f..24f0f6e4ea1 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 17b7861f80a..4f41b53bafc 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 63824974e29..475f219a775 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 e66a86e70ab..b04293dca6b 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 938378aff66..9b04c75b3da 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 04764d4b433..1d407c6a607 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 771fbb95a76..006409c6ec9 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 f4bf43092d3..d23f575ba50 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 9189c75e68a..fe8ee183083 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 8e810e4c265..d7edc7f73a1 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 9525cc1acf2..d3e1a2b2d9a 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 dd1516098a5..0c866213f66 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 d2f52e8e9b1..84feb76ebd2 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 87178cc466b..d2d1e80ace3 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 2c65c478012..d6bd318e812 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 e2aade89af7..74c60fdcc39 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 556a51ca210..612e3fb19f4 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 a08f96a8ad9..09e62069fc4 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 0febff106a0..30b81a1e5f3 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 e1b5a497e06..a5378b45a79 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 60ea1e68f6b..13a983ecc3c 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 2c75e5fff2d..17f33a7ea86 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 0434a6c22e6..2572e9596e9 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 964ab72d473..a4c20bb8dfd 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 e8836228f86..7f2136767b1 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 ba00d26e05e..cdff93eb8e7 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 0518281d9cf..48712ebfc2f 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 ef634e01b86..0e80b9eb817 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 a4d7d689e7c..6408c07b2e8 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 22983ca2862..7400b5358a3 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 5c2ea555779..464312ae479 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 d7cb0ebdfa6..a8305489dc6 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 9ce86bf14f4..112b0256f84 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 5d9bb391cb0..bd1fabd7c7d 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 c64605c3958..0b4196be295 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 4ab5a31964b..19801df7e38 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 7e19359a03f..efe9597c9f7 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 6a22a39fc02..eba788e1ab4 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 3ac654173a4..2116340b775 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 e6ef2f4bad0..567842350bf 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 242cd3dfa68..227ff354ea1 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 8d8bc7b1cb4..ee4a0f04860 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 415b5beb3ef..c4853025106 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 b0c864927bc..2617babf0db 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 b17d8e15dee..c3188f9efa2 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 9884c1bb206..d3e37a3586d 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 c1c2f8718d6..59e9ba93bfb 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 344a0cb5135..9f7c4aaf17e 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 b52a7804885..def05372e70 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 5b86830e9fc..5c2e8fa6f56 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 ada65239f8f..e1891b77fce 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 048486bcdbd..490f35e6725 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 bdaa4fa3407..6aad652ead9 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 48c0a51a25f..a65416818b3 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 97f25e67a96..28e93f662bd 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 d7a2b0c44f6..661efb7171d 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 84256491ec0..529cdaec778 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 b3d3c75cfda..792cc0a9adc 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 060ea2c6afe..7d9a025864e 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 be3854553dd..e63da7ad287 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 53ed449784c..9a78a116bb0 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 0923db10f8e..6aa508902f0 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 5ac6b7c13b1..119fb2e1ed2 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 67e4f4d4d4d..402097d0a77 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 4422e4eac5e..3b656c3a46b 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 7d9f0fddaca..d614622dfff 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 55981f0aa5a..a63a34b2eea 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 ac0728339c9..94f71559579 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 b9025fd2d26..2ad313bbd69 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 2bb34906e23..503dbf17cb6 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 12522b53149..0b1ad8793b5 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 172f5c60681..945657278e6 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 61cf48fdb5a..bad557f8852 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 eec8fd8ce5b..6245945de45 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 642fb42ab38..9e3ebde3a07 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 38c38ca2d0d..8676d9fdb83 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 7b2b85052c6..da9d99ef91a 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 faea69a624f..89b61ecf42f 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 bcc05abb304..a07f58a7147 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 0e0f0f93468..9f4b2bd0c76 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 d8ad30d7939..5c2453bedaf 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 081bd415472..b4f089feae5 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 02988969e92..13c64f1550d 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 d822fee9f88..976f0059c30 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 6fc50b3e557..f1c95347913 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 3f95a756ad2..ea1e1e56298 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 96e271f9e59..413ddbd577d 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 2f010b02a32..aacc72dfead 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 82b0c626648..1412b4cedf6 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 ec1778324d4..05bd1aa65d7 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 4c38d07f1e2..94c2db12446 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 84ca08f4616..047eaeba461 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 28538a53ea3..f1170480a8b 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 1550f5e4f0c..8dcef63b406 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 f139703a498..3125ca92162 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 0da2973796a..f0f279e4a22 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 f907d4837fc..97c6ed70471 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 7884babc702..b969caa3446 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 11a32a9682c..98338af13c7 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 7ce24c6d5e9..b7eb1135227 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 19823f72f68..871c4eef394 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 0c5073dd57d..cb0e22b9873 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 56ac4f049d8..2e4dbf23d9e 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 64d3e48ff75..d9e5a26093d 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 c0c8b576657..9eae059b28d 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 afbb7e6d2e5..5b6e341fc0c 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 c9425ef3de9..fbf517619e1 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 a7eecee14c7..571d7bd9a5d 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 f835f6d9733..a485aecb5e6 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 6418d40b6a8..dd43e57b178 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 2dfb6c50444..5ec2a001b31 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 069f9c56388..88504e45e92 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 9a6117bb4f3..00703f63bb2 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 40cc0b961af..11efbad1b5e 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 c512b0aa2b7..9655a29b6c5 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 c7d4451159d..0d309b1b255 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 22db6196a3a..bfc0731924a 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 dd60ee97d34..97e4f8d638e 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 5d62901bfb3..4c3ab352cde 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 0e644c5c4f4..8b60b02f583 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 9885370e7f1..61e020d1bc6 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 4e2c31a29fc..995bcc53f64 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 f9e0482b8f9..60c6171e6df 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 b2756988687..bcb913f54a1 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 362218123bb..7eccc80b405 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 309bd3c3c04..b81fe818250 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 63570638ea9..e65b7143fb7 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 42759a8e9c4..ec320b4b76b 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 e19567d8c78..182b4d95128 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 de48b7f59ee..d9ca5723274 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 a677e1a64eb..e49b3b93a73 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 837444412aa..9412085db9d 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 be5ecd076ea..bf48c8ed33d 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 42e3b0bca51..e6f116f12e0 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 357957a916c..a6fb1b25d0f 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 4b47b340814..3c56dbbebc0 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 38f0dcac2b1..c45563616a4 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 1ea7fec11d8..1ce30c6d5e0 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 c9c88ded8a1..44d35ef9679 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 efaca53d51c..86bada7dc23 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 aad60240336..013797e106e 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 f73608666e7..ad44c17d649 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 16bec548f9e..eb1c437e4f7 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 3379607f84b..d5819a14faa 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 99d7a0c0a8e..331fb2d97d7 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 5332836b33e..6ff520af789 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 42d88d6643c..39f27192ab9 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 52de57b5a8a..f047db719e8 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 e67029e3497..b3a458e76e5 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 68aae0299b1..1798625cec7 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 970d584cdef..da1f1d990fb 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 43047725bee..1da89e8534a 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 66c70449341..c5ceaeacad4 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 5fa7c50a668..5c4264fefc2 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 33a151bb4c4..3ed4247d6ac 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 daa4bc2a34d..b05cd30bf3b 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 6accfe10060..453a063ed66 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 0478246becf..fec8821f734 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 a449b3bf109..4daf944df69 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 650521b0baa..a79a300c645 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 c08b9b3eb62..4b98c0f1404 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 849522e7e19..c7295ce8be4 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 0af6e6a2d21..142e7f8e65b 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 7f83e4fd533..7c5e798983c 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 14b9c211851..c54769d8a08 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 6ed6ced8704..294faf968ba 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 d3e1be992e3..ebd07fbf177 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 acdd5cbb3e4..d8047d08c3d 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 df50ed37b35..f990d16b1b7 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 87628dfde66..3bded7c8021 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 e4a6915ba11..28a274c49bb 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 b56066af05e..3934607899e 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, useRef } 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 6beb76db721..cc087af6ef9 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 b7e09e45ba2..11f38b468b9 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 8d3a745bb81..b95fa1c30b5 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 ceb74dafba3..0513cb6fa58 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 100f3f38333..96dedf76880 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 ce18f7a50ac..c8a87fabb7c 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 237dfb96b45..71145550492 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 ed032b39863..6c20491a5c0 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 b3f66cce8ba..d27b10364cc 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 e0c7b2cc0ec..3cd434aaae4 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 d65ad760c30..42a321ebc0a 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 ffd13db9084..277ad9e6c77 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 fc19e7ffdf8..415cc023f1a 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 ca6e0bf6730..70cec6e0684 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 cd6488a58be..d25fc769c49 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 e465a5eb78d..37a585b5a45 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 094ff5d3978..1ac7b1eb000 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 a1baa96c1bc..5675c2ec807 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 61859b3dd7a..3055b3ec15d 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 429c36e9ac0..dc97928471d 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 a58f3c2888a..58df9ddc141 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 1757f2a5ccd..132f6319963 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 34ac3c06613..bb1a547c448 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 938a56c760f..e2dcf047782 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 1262e5bcd75..4d7401ab3ab 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 9275de76da1..407ca540964 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 4c465e6e2dd..2c1233d757b 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 b8eb7da9b56..63e86324b15 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 47c192d655e..40668e5e529 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 dd610eda619..ef2ad2563f4 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 3a3bf0d66b8..b2c4a77b841 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 4de02922614..9ba19fc15be 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 70c8f23ffe7..b02102dfd6e 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 95326b186f9..3761e6ae04c 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 5cde4a214f1..ec0dc1353cf 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 dd11eca7f60..f0f4e33b30d 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 62bc0f8f9e3..8429c6ef360 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 23e652ca083..36afa216e49 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 3c49ededfff..c938f45c5dd 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 148cfa44197..133bef7d9f1 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 1ee3114d963..19869c6dcb2 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 341df0489d4..08e6c1f0943 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 347809f7471..ac34c107d49 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 f89cd6e918e..13f0eb90697 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 0594e0fcc79..432be5d8eb5 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 26162db2d15..aa4c1efcb70 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 680d09f009e..52f0fd83565 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 441ae95902e..42ce770a81f 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 ac558d1f623..3374c1180ea 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 ad5c154fc51..b2bebc9da1e 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 5ed3b2302f1..05eaa30969a 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 1fe1a977bc6..ce586b10c38 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 6c6a65f8c20..67e31571b0a 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 45bbe5b8269..1f859e7c0e8 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 8fa6bc66303..28790b0c253 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 7453e46984a..0d52ccaec2f 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 eb90138f546..e3203fa6bed 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 0058e71bbf4..ea055846210 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 e1ec1ade7c8..21f84f4a129 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 aed133b1f39..7e4405024bd 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 a1637b84f65..1e2c10c9bfc 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 3ebc3a88389..73afacb811c 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 0178f52ecba..1dcc93c768e 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 72000f1ae3e..5df87114efb 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 11730d5ed88..305b254e314 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 7a79938bf04..d2e085509c2 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 25b03ec9f2d..3855e3b93bf 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 2e1e48431c5..978c5cb09ba 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 dc78b796cc6..8213bf6267c 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 3312e21c99a..5739496f77f 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 1b1e5046b2c..057a381cad4 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 3c6cc551d00..3cb98afe41a 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 517d519f697..19300e29c57 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 66895941a99..0883505b193 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 d442860eb2d..b48e19a44cc 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 e2cc2f79c3a..73fa093bec5 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 6afc1babeb2..143a07e0148 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 8740fbf0d09..d97ada34d1b 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 ad56f01626b..f1c20cc684c 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 dd7368b9dbd..e170d7ca050 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 41a840df7d3..5668611d785 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 147148c567c..8be2bea51bc 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 c0fc1917fb5..0b95f29bde6 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 4287e19a407..c55fe306bff 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 d837659335d..f8556a19ce3 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 b07d8e6c50f..b182f6bc662 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 a9188bf4d8f..f5a08698529 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 eb1b4e82181..9e2e71e3bdb 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 c37aa2013b1..91410448e7e 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 bdffa8c14e6..9a8613cb96d 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 b29cde8b6e2..2c44a6fd97c 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 b4670fd3ce3..ed07eebef0a 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 3cda5ebb877..788ba89aa23 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 cf86cffd646..11dd1ca686a 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 9c20732858e..fc6ef70c0b8 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 f3bb1e13ad7..8ef3cee64fd 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 f5e6b8c187b..06777530c72 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 1086e6f05fb..6db50d1e3f1 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 9f94811cd7c..1275242fe7b 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 9dd45d18fdc..aaa8d116bff 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 ebfcabd26da..54adad53514 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 0a299484b45..4d8d9220246 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 002cc629cc4..e4e623c49a9 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 03f7097a643..ae734d21cb7 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 6e5d5f8c261..c8148071c91 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 9b80777e228..d4c5c6e6ab5 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 6c611f69d65..e698b036e87 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 cb47f906d27..b35530b0295 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 c410196cd19..e9f2b5aaf64 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 631d1345da3..505e3a0ea65 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 6c853d866dc..da14f0a9638 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 7783ea719dc..65d07c747d2 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 cab8d5f309e..f7b8d932215 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 8e69cc0d2c3..94a867e8624 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 338c3e06485..619c9624dc8 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 fd81e07bf99..795e25cafc0 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 175b0572130..51fbab696ef 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 250d8c7a671..5509eae785b 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 86ab24a897b..5d4b4b206d6 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 806d66fe818..b7b8bd3d67a 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 faceb68336e..6f560d1ff19 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 f0cb5b939cc..8189668907b 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 57579313a85..9b1a9a371df 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 6b6b1331e79..aefdc781cdf 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 161d4b21edd..153d97d6384 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 a460ad926d8..f00eb3f2e50 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 70e22b31ed2..574578983b8 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 7ca2a8c491e..2f7b34fc30a 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 7bb635594d8..911d2a16b32 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 12d8b109d54..aff052566d4 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 91f7bd8263b..44b2a4f5185 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 328a3e6e479..01c027f6e33 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 8d2f895fb52..827f7eb87d5 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 fb8a1ab945a..4a2d59f8703 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 61ce55a817b..0dcae09d08e 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 64309c9334d..7398784050d 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 2d9d299d8d9..e094ff9cd11 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 b305f595599..5513f72b15c 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 2e8477bf77f..33c7ce23096 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 f7c456da186..2d1ec4d282d 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 72e27b6b9b4..87a1efe2910 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 2690c70e327..21f303a0a4f 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 f4a57534f99..9fced1e3c40 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 95580a742fd..b4f8e580974 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 c9c3fd6b29d..c7681410650 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 91b574a2015..03c6a3d30a9 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 42e4e644394..d17267163cf 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 932538ceff1..5d640fb0ee1 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 3ec41e37fff..6fec8797d15 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 90b2c352c33..b28f3f0e98f 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 d614c4d5630..5a76d4042eb 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 86f51d97a75..77fc01a5daa 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 8064f973fd3..2221f018438 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 5834cbd16ed..2015b04efdf 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 431a2505e2e..442ef7174f9 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 84fac0150b1..27218fbf4f2 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 52f8a99be33..d1aa9929f8b 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 f82fca79b23..352735265d5 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 c7913fac8e3..eedb53298eb 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 d3f755bd03c..92892b57291 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 5ed60aea4d3..84836c4b5c0 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 8112c309b60..a4f99e506d8 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 c35881f3ea6..9e7425dc97c 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 6b927b4198a..ff7118c95c3 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 170d09c997f..7e687e00d2a 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 a1b2e2ed479..141c1d63dc0 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 266ec5f75cc..a00523bad88 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 3216509a3fa..a6ace5ae01a 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 3decceb081f..e49991ed343 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 815790885da..3313d707fe0 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 b9b721e084b..43a7f81e305 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 bb85bc12ff1..050e3cfaea4 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 261edf8d2e0..f6cfbc8b800 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 04bd225c4ad..af9dbc31230 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 f9c3c75f65d..fdf035d6a07 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 4e1e1303f0f..f67285d07fc 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 d4a82e3ee21..8074566362f 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 6896825031d..13f86bde002 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 a833b477e2c..a6c1b9d7f1d 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 b733016c265..46dba2b8524 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 5ae14f9a6c8..a80965787ab 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 1f2993a1345..49a9b002f8a 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 3ca76039a2f..e508970528c 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 4798f5f3c02..4aafa84137d 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 548ae77398b..7edba38f917 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 590b4c97030..1847a7e35d0 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 750a4de859e..5c3c27e9227 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 627e7782344..2738da20728 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 79e2a6fab7d..f71cf073fb3 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 4c122c0c681..0b469489e07 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 81b0927a924..4774821a2e0 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 bbcdfe16031..bbb4dd6bf5c 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 adcd70b405c..c5c128df268 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 67122178dc1..0e38126d479 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 b54c8354870..49bafe421ad 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 e6b4186fb45..a8f3eff54db 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 86f94ad23af..5ce5eb0a248 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 8998a75941c..833e1e07fb3 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 9e41d8876a1..0cbea661151 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 da17182a971..c2e3cf57b92 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 40b8a2ed52b..fec2e106e1e 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 07490bcdb4d..ba8ec7a32d6 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 e10767c7427..38d4bd77362 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 cb0b5d3c0ad..bd8172ae12b 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 98aea19aa09..1709f92d448 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 d2521a772a3..4d882cedc88 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 fedbd63828a..d28c0973ed3 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 62bd49e0513..79484647ba8 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 89e3dc05ccd..a340de06a38 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 d77e924276e..a2f53a23b8d 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 e86b2a8f67c..9da1e91962a 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 9857df4ca47..0bc5f5fa446 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 35a7050fa15..a8f443e2c97 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 2b8dec6b41b..c311d1dfca6 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 b0dc717d674..05a7d0f85a6 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 ab586a79472..cf20c49265c 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 3af4e5df9ac..107700a2539 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 ae36697aad3..3a8c5c6260e 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 92d6eb3bba6..85a670f8704 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 03650c8965d..d88db6558a6 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 bc6e0df2342..f3368fed23e 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 35e18fc6adb..cf2792dfcc8 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 45edc901292..eea5bf6621c 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 ce1de76eafd..b3ef249cda9 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 5235430a4ff..b362eb2282e 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 9bb0ca3e6cb..d35ff7bcb95 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 78075d4dc14..2be776bcbd7 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 cc6491237f2..4a2e5f724e9 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 749b5448665..429dda315f8 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 fa46607b1bd..0cef1ebea92 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 d62f37973ec..c183c3cf6e9 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 909af08e45d..8f2a737539a 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 324a10292cb..8e5d6467e61 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 6b578cb650e..b56eef55b76 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 2fc82b4e7d0..c6bd92d6a72 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 48092747652..af20b0340f0 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 fa653cb36b6..d5cb04883e9 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 60add20e7ef..2ed450e8f63 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 12d7331b001..c4603159232 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 d6729bb842e..51cbbf2d6ad 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 f96dc9e8f0e..fcdf60fca8f 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 954c9a853c9..828e5952b30 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 8e2ef68a7d6..193c78a1455 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 2dbded36516..44b19a550a8 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 f6c3d27ce26..9a2fab7b126 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 ec8f65d9719..6faf49f1171 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 bd6e9dcd0f4..cef113e3865 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 046eb4c8d0a..59182011f00 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 aeff9fbc5ac..3c65cbc4b63 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 bd6e9dcd0f4..cef113e3865 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 0b6c27901f2..c4f67379e4b 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 d48dac46fd3..e5f633091a2 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 4fcf9ef6a39..3af77482f29 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 3d912a0af07..331a4fba22d 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 0512e6817b3..303051ec4f1 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 01f9a518f21..25fba190a3d 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 918ffdfac56..174b9564042 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 fa7356085a9..5f1e4b2666f 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 523cca2ece6..4b57dc11968 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 4284b427fb6..6b0e0775167 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 7ab6ba98d71..26926a1c8d6 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 3da0d7737eb..2c61fc59d53 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 00dfb26c10c..b0abfe0c8ec 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 ae39bbdede6..2c3e8944ada 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 799055dddb8..6b9454f7adc 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 09c7640da44..84baa209bbe 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 80c3691b02e..7822e15a9e5 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 32fe554a245..2c2a31d0b8d 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 f11c93cec47..b19fe494eb4 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 7596e34564f..6b0d31f31f3 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 9162bb0e155..1dee883cf5b 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 5825ea6bed5..53a20882576 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 9d8add2df92..a30cc759bef 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 0a27cd019fa..af309fdbfb9 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 2e57c8232a2..e6e86413a38 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 9057ec34b2c..9b32384ce5b 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 933f5c3a3b5..67b8140a127 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 630bc779502..002e925bf69 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 367e5c98470..8f1138a6d64 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 750d1efddc4..0906f613ce6 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 f9787a214e3..7a71490bc3b 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 c1dfa889cf5..5fce7ccab02 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 d5467bafd86..3f61dec2963 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 f51df08c2cf..44de2bd84ae 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 95a2c5e67b7..e525b8c3d67 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 c9c012a4a87..b6560071982 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 c6900d53622..9f590005bf3 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 748afd9f1f4..e26ab299215 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 a09ca471e3e..3dde8b0daab 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 865452ade82..421e2b36226 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 5a5721205ee..85f22183485 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 c88aa382598..976d947df83 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 1877bf7547f..9b179d1a8b2 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 7b212b1bf29..98c81221fc5 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 a407fa58da4..bc6a5e23f39 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 030a1e4fbb4..23045052c42 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 = ({