perf: Implement Echarts treeshaking (#29874)

This commit is contained in:
Kamil Gabryjelski
2024-08-07 06:53:52 +02:00
committed by GitHub
parent db1d77cba2
commit c220245414
36 changed files with 149 additions and 66 deletions

View File

@@ -27,9 +27,9 @@ import {
LegendState,
ensureIsArray,
} from '@superset-ui/core';
import { ViewRootGroup } from 'echarts/types/src/util/types';
import GlobalModel from 'echarts/types/src/model/Global';
import ComponentModel from 'echarts/types/src/model/Component';
import type { ViewRootGroup } from 'echarts/types/src/util/types';
import type GlobalModel from 'echarts/types/src/model/Global';
import type ComponentModel from 'echarts/types/src/model/Component';
import { EchartsHandler, EventHandlers } from '../types';
import Echart from '../components/Echart';
import { TimeseriesChartTransformedProps } from './types';

View File

@@ -47,8 +47,9 @@ import {
isDerivedSeries,
getTimeOffset,
} from '@superset-ui/chart-controls';
import { EChartsCoreOption, SeriesOption } from 'echarts';
import { LineStyleOption } from 'echarts/types/src/util/types';
import type { EChartsCoreOption } from 'echarts/core';
import type { LineStyleOption } from 'echarts/types/src/util/types';
import type { SeriesOption } from 'echarts';
import {
EchartsTimeseriesChartProps,
EchartsTimeseriesFormData,

View File

@@ -32,8 +32,7 @@ import {
TimeseriesDataRecord,
ValueFormatter,
} from '@superset-ui/core';
import { SeriesOption } from 'echarts';
import {
import type {
CallbackDataParams,
DefaultStatesMixin,
ItemStyleOption,
@@ -43,11 +42,12 @@ import {
SeriesLineLabelOption,
ZRLineType,
} from 'echarts/types/src/util/types';
import {
import type { SeriesOption } from 'echarts';
import type {
MarkArea1DDataItemOption,
MarkArea2DDataItemOption,
} from 'echarts/types/src/component/marker/MarkAreaModel';
import { MarkLine1DDataItemOption } from 'echarts/types/src/component/marker/MarkLineModel';
import type { MarkLine1DDataItemOption } from 'echarts/types/src/component/marker/MarkLineModel';
import { extractForecastSeriesContext } from '../utils/forecast';
import {
EchartsTimeseriesSeriesType,

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { OptionName } from 'echarts/types/src/util/types';
import type { OptionName } from 'echarts/types/src/util/types';
import {
AnnotationLayer,
AxisType,