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

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { TreeSeriesOption } from 'echarts';
import type { TreeSeriesOption } from 'echarts/charts';
import { EchartsTreeFormData } from './types';
export const DEFAULT_TREE_SERIES_OPTION: TreeSeriesOption = {

View File

@@ -21,12 +21,13 @@ import {
DataRecordValue,
tooltipHtml,
} from '@superset-ui/core';
import { EChartsCoreOption, TreeSeriesOption } from 'echarts';
import {
import type { EChartsCoreOption } from 'echarts/core';
import type { TreeSeriesOption } from 'echarts/charts';
import type {
TreeSeriesCallbackDataParams,
TreeSeriesNodeItemOption,
} from 'echarts/types/src/chart/tree/TreeSeries';
import { OptionName } from 'echarts/types/src/util/types';
import type { OptionName } from 'echarts/types/src/util/types';
import {
EchartsTreeChartProps,
EchartsTreeFormData,

View File

@@ -16,9 +16,9 @@
* 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 type { TreeSeriesNodeItemOption } from 'echarts/types/src/chart/tree/TreeSeries';
import { ChartDataResponseResult, QueryFormData } from '@superset-ui/core';
import { TreeSeriesNodeItemOption } from 'echarts/types/src/chart/tree/TreeSeries';
import { BaseChartProps, BaseTransformedProps } from '../types';
export type EchartsTreeFormData = QueryFormData & {