diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryObject.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryObject.test.ts index 7a1d3e38f95..3c6afb2b45b 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryObject.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/buildQueryObject.test.ts @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +import { JsonObject } from '@superset-ui/core'; import { AnnotationLayer, AnnotationOpacity, @@ -25,7 +26,6 @@ import { buildQueryObject, QueryObject, } from '../../src/query'; -import { JsonObject } from '../../lib'; describe('buildQueryObject', () => { let query: QueryObject; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractTimegrain.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractTimegrain.test.ts index a96fb8370e0..444fc2289cb 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractTimegrain.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/extractTimegrain.test.ts @@ -17,7 +17,7 @@ * under the License. */ import extractTimegrain from '@superset-ui/core/src/query/extractTimegrain'; -import { QueryFormData } from '../../lib'; +import { QueryFormData } from '@superset-ui/core'; describe('extractTimegrain', () => { const baseFormData: QueryFormData = { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts index bce6ddc4355..d9853633c6e 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/query/types/AnnotationLayer.test.ts @@ -44,6 +44,7 @@ describe('AnnotationLayer type guards', () => { value: 'sin(2*x)', style: AnnotationStyle.Solid, show: true, + showLabel: false, }; const eventAnnotationLayer: EventAnnotationLayer = { annotationType: AnnotationType.Event, @@ -51,6 +52,7 @@ describe('AnnotationLayer type guards', () => { value: 1, style: AnnotationStyle.Solid, show: true, + showLabel: false, sourceType: AnnotationSourceType.Native, }; const intervalAnnotationLayer: IntervalAnnotationLayer = { @@ -60,6 +62,7 @@ describe('AnnotationLayer type guards', () => { value: 1, style: AnnotationStyle.Solid, show: true, + showLabel: false, }; const timeseriesAnnotationLayer: TimeseriesAnnotationLayer = { annotationType: AnnotationType.Timeseries, @@ -68,6 +71,7 @@ describe('AnnotationLayer type guards', () => { value: 1, style: AnnotationStyle.Solid, show: true, + showLabel: false, }; const tableAnnotationLayer: TableAnnotationLayer = { annotationType: AnnotationType.Interval, @@ -76,6 +80,7 @@ describe('AnnotationLayer type guards', () => { value: 1, style: AnnotationStyle.Solid, show: true, + showLabel: false, }; const timeseriesAnnotationResult: TimeseriesAnnotationResult = [ { diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/time-format/formatters/smartDateDetailed.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/time-format/formatters/smartDateDetailed.test.ts index 3d3acd34072..a9a87866fa2 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/time-format/formatters/smartDateDetailed.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/test/time-format/formatters/smartDateDetailed.test.ts @@ -28,22 +28,22 @@ describe('smartDateDetailedFormatter', () => { }); it('shows only year when 1st day of the year', () => { - expect(formatter(new Date('2020-01-01 0:00:00'))).toBe('2020'); + expect(formatter(new Date('2020-01-01T00:00:00.000+00:00'))).toBe('2020'); }); it('shows full date when a regular date', () => { - expect(formatter(new Date('2020-03-01 00:00:00'))).toBe('2020-03-01'); + expect(formatter(new Date('2020-03-01T00:00:00.000+00:00'))).toBe('2020-03-01'); }); it('shows full date including time of day without seconds when hour precision', () => { - expect(formatter(new Date('2020-03-01 13:00:00'))).toBe('2020-03-01 13:00'); + expect(formatter(new Date('2020-03-01T13:00:00.000+00:00'))).toBe('2020-03-01 13:00'); }); it('shows full date including time of day when minute precision', () => { - expect(formatter(new Date('2020-03-10 13:10:00'))).toBe('2020-03-10 13:10'); + expect(formatter(new Date('2020-03-10T13:10:00.000+00:00'))).toBe('2020-03-10 13:10'); }); it('shows full date including time of day when subsecond precision', () => { - expect(formatter(new Date('2020-03-10 13:10:00.1'))).toBe('2020-03-10 13:10:00.100'); + expect(formatter(new Date('2020-03-10T13:10:00.100+00:00'))).toBe('2020-03-10 13:10:00.100'); }); }); diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/index.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/index.ts index 1f39843bebf..9e2ee8e716b 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/index.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/index.ts @@ -33,6 +33,8 @@ export { default as EchartsFunnelChartPlugin } from './Funnel'; export { default as EchartsTreeChartPlugin } from './Tree'; export { default as EchartsTreemapChartPlugin } from './Treemap'; +export * from './types'; + /** * Note: this file exports the default export from EchartsTimeseries.tsx. * If you want to export multiple visualization modules, you will need to diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/types.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/types.ts index 48573330fdf..ce745df1373 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/types.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/types.ts @@ -132,3 +132,5 @@ export const DEFAULT_TITLE_FORM_DATA: EchartsTitleFormData = { yAxisTitleMargin: 0, yAxisTitlePosition: 'Top', }; + +export * from './Timeseries/types'; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/test/utils/series.test.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/test/utils/series.test.ts index d5d3dd89fa2..3987078a2e9 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/test/utils/series.test.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/test/utils/series.test.ts @@ -28,7 +28,7 @@ import { } from '../../src/utils/series'; import { LegendOrientation, LegendType } from '../../src/types'; import { defaultLegendPadding } from '../../src/defaults'; -import { NULL_STRING } from '../../lib/constants'; +import { NULL_STRING } from '../../src/constants'; describe('extractTimeseriesSeries', () => { it('should generate a valid ECharts timeseries series object', () => {