@mui/x-charts-pro 8.9.0 → 8.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/index.d.ts +1 -0
- package/BarChart/index.js +16 -0
- package/BarChartPro/BarChartPro.js +125 -1
- package/CHANGELOG.md +124 -0
- package/ChartContainer/index.d.ts +1 -0
- package/ChartContainer/index.js +16 -0
- package/ChartDataProvider/index.d.ts +1 -0
- package/ChartDataProvider/index.js +16 -0
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartsAxis/index.d.ts +1 -0
- package/ChartsAxis/index.js +16 -0
- package/ChartsAxisHighlight/index.d.ts +1 -0
- package/ChartsAxisHighlight/index.js +16 -0
- package/ChartsClipPath/index.d.ts +1 -0
- package/ChartsClipPath/index.js +16 -0
- package/ChartsGrid/index.d.ts +1 -0
- package/ChartsGrid/index.js +16 -0
- package/ChartsLabel/index.d.ts +1 -0
- package/ChartsLabel/index.js +16 -0
- package/ChartsLegend/index.d.ts +1 -0
- package/ChartsLegend/index.js +16 -0
- package/ChartsLocalizationProvider/index.d.ts +1 -0
- package/ChartsLocalizationProvider/index.js +16 -0
- package/ChartsOverlay/index.d.ts +1 -0
- package/ChartsOverlay/index.js +16 -0
- package/ChartsReferenceLine/index.d.ts +1 -0
- package/ChartsReferenceLine/index.js +16 -0
- package/ChartsSurface/index.d.ts +1 -0
- package/ChartsSurface/index.js +16 -0
- package/ChartsText/index.d.ts +1 -0
- package/ChartsText/index.js +16 -0
- package/ChartsTooltip/index.d.ts +1 -0
- package/ChartsTooltip/index.js +16 -0
- package/ChartsWrapper/index.d.ts +1 -0
- package/ChartsWrapper/index.js +16 -0
- package/ChartsXAxis/index.d.ts +1 -0
- package/ChartsXAxis/index.js +16 -0
- package/ChartsYAxis/index.d.ts +1 -0
- package/ChartsYAxis/index.js +16 -0
- package/FunnelChart/FunnelChart.js +12 -2
- package/FunnelChart/useFunnelChartProps.d.ts +1 -1
- package/Gauge/index.d.ts +1 -0
- package/Gauge/index.js +16 -0
- package/Heatmap/Heatmap.js +2 -2
- package/LineChart/index.d.ts +1 -0
- package/LineChart/index.js +16 -0
- package/LineChartPro/LineChartPro.js +125 -1
- package/PieChart/index.d.ts +1 -0
- package/PieChart/index.js +16 -0
- package/PieChartPro/PieChartPro.js +2 -1
- package/RadarChart/index.d.ts +1 -0
- package/RadarChart/index.js +16 -0
- package/RadarChartPro/RadarChartPro.js +2 -1
- package/ScatterChart/index.d.ts +1 -0
- package/ScatterChart/index.js +16 -0
- package/ScatterChartPro/ScatterChartPro.js +125 -1
- package/SparkLineChart/index.d.ts +1 -0
- package/SparkLineChart/index.js +16 -0
- package/Toolbar/index.d.ts +1 -0
- package/Toolbar/index.js +16 -0
- package/colorPalettes/index.d.ts +1 -0
- package/colorPalettes/index.js +16 -0
- package/constants/index.d.ts +1 -0
- package/constants/index.js +16 -0
- package/context/index.d.ts +1 -0
- package/context/index.js +11 -0
- package/esm/BarChart/index.d.ts +1 -0
- package/esm/BarChart/index.js +2 -0
- package/esm/BarChartPro/BarChartPro.js +125 -1
- package/esm/ChartContainer/index.d.ts +1 -0
- package/esm/ChartContainer/index.js +2 -0
- package/esm/ChartDataProvider/index.d.ts +1 -0
- package/esm/ChartDataProvider/index.js +2 -0
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartsAxis/index.d.ts +1 -0
- package/esm/ChartsAxis/index.js +2 -0
- package/esm/ChartsAxisHighlight/index.d.ts +1 -0
- package/esm/ChartsAxisHighlight/index.js +2 -0
- package/esm/ChartsClipPath/index.d.ts +1 -0
- package/esm/ChartsClipPath/index.js +2 -0
- package/esm/ChartsGrid/index.d.ts +1 -0
- package/esm/ChartsGrid/index.js +2 -0
- package/esm/ChartsLabel/index.d.ts +1 -0
- package/esm/ChartsLabel/index.js +2 -0
- package/esm/ChartsLegend/index.d.ts +1 -0
- package/esm/ChartsLegend/index.js +2 -0
- package/esm/ChartsLocalizationProvider/index.d.ts +1 -0
- package/esm/ChartsLocalizationProvider/index.js +2 -0
- package/esm/ChartsOverlay/index.d.ts +1 -0
- package/esm/ChartsOverlay/index.js +2 -0
- package/esm/ChartsReferenceLine/index.d.ts +1 -0
- package/esm/ChartsReferenceLine/index.js +2 -0
- package/esm/ChartsSurface/index.d.ts +1 -0
- package/esm/ChartsSurface/index.js +2 -0
- package/esm/ChartsText/index.d.ts +1 -0
- package/esm/ChartsText/index.js +2 -0
- package/esm/ChartsTooltip/index.d.ts +1 -0
- package/esm/ChartsTooltip/index.js +2 -0
- package/esm/ChartsWrapper/index.d.ts +1 -0
- package/esm/ChartsWrapper/index.js +2 -0
- package/esm/ChartsXAxis/index.d.ts +1 -0
- package/esm/ChartsXAxis/index.js +2 -0
- package/esm/ChartsYAxis/index.d.ts +1 -0
- package/esm/ChartsYAxis/index.js +2 -0
- package/esm/FunnelChart/FunnelChart.js +11 -1
- package/esm/FunnelChart/useFunnelChartProps.d.ts +1 -1
- package/esm/Gauge/index.d.ts +1 -0
- package/esm/Gauge/index.js +2 -0
- package/esm/Heatmap/Heatmap.js +1 -1
- package/esm/LineChart/index.d.ts +1 -0
- package/esm/LineChart/index.js +2 -0
- package/esm/LineChartPro/LineChartPro.js +125 -1
- package/esm/PieChart/index.d.ts +1 -0
- package/esm/PieChart/index.js +2 -0
- package/esm/PieChartPro/PieChartPro.js +2 -1
- package/esm/RadarChart/index.d.ts +1 -0
- package/esm/RadarChart/index.js +2 -0
- package/esm/RadarChartPro/RadarChartPro.js +2 -1
- package/esm/ScatterChart/index.d.ts +1 -0
- package/esm/ScatterChart/index.js +2 -0
- package/esm/ScatterChartPro/ScatterChartPro.js +125 -1
- package/esm/SparkLineChart/index.d.ts +1 -0
- package/esm/SparkLineChart/index.js +2 -0
- package/esm/Toolbar/index.d.ts +1 -0
- package/esm/Toolbar/index.js +2 -0
- package/esm/colorPalettes/index.d.ts +1 -0
- package/esm/colorPalettes/index.js +3 -0
- package/esm/constants/index.d.ts +1 -0
- package/esm/constants/index.js +3 -0
- package/esm/context/index.d.ts +1 -0
- package/esm/context/index.js +3 -0
- package/esm/hooks/index.d.ts +1 -0
- package/esm/hooks/index.js +3 -0
- package/esm/index.d.ts +6 -7
- package/esm/index.js +13 -7
- package/esm/internals/plugins/allPlugins.d.ts +2 -2
- package/esm/internals/plugins/useChartProExport/defaults.d.ts +1 -0
- package/esm/internals/plugins/useChartProExport/defaults.js +6 -0
- package/esm/internals/plugins/useChartProExport/exportImage.js +3 -2
- package/esm/internals/plugins/useChartProExport/print.js +3 -2
- package/esm/locales/index.js +3 -1
- package/esm/models/index.d.ts +3 -1
- package/esm/models/index.js +5 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +11 -0
- package/index.d.ts +6 -7
- package/index.js +65 -53
- package/internals/plugins/allPlugins.d.ts +2 -2
- package/internals/plugins/useChartProExport/defaults.d.ts +1 -0
- package/internals/plugins/useChartProExport/defaults.js +12 -0
- package/internals/plugins/useChartProExport/exportImage.js +3 -2
- package/internals/plugins/useChartProExport/print.js +3 -2
- package/models/index.d.ts +3 -1
- package/models/index.js +24 -1
- package/package.json +7 -8
|
@@ -14,7 +14,8 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
14
14
|
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
15
15
|
import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
16
16
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
17
|
-
import { useScatterChartProps
|
|
17
|
+
import { useScatterChartProps } from '@mui/x-charts/internals';
|
|
18
|
+
import { ChartsWrapper } from '@mui/x-charts/ChartsWrapper';
|
|
18
19
|
import { ChartZoomSlider } from "../ChartZoomSlider/index.js";
|
|
19
20
|
import { ChartsToolbarPro } from "../ChartsToolbarPro/index.js";
|
|
20
21
|
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
@@ -446,6 +447,68 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
446
447
|
}),
|
|
447
448
|
step: PropTypes.number
|
|
448
449
|
}), PropTypes.bool])
|
|
450
|
+
}), PropTypes.shape({
|
|
451
|
+
axis: PropTypes.oneOf(['x']),
|
|
452
|
+
classes: PropTypes.object,
|
|
453
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
454
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
455
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
456
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
457
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
458
|
+
}), PropTypes.shape({
|
|
459
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
460
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
461
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
462
|
+
})]),
|
|
463
|
+
constant: PropTypes.number,
|
|
464
|
+
data: PropTypes.array,
|
|
465
|
+
dataKey: PropTypes.string,
|
|
466
|
+
disableLine: PropTypes.bool,
|
|
467
|
+
disableTicks: PropTypes.bool,
|
|
468
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
469
|
+
fill: PropTypes.string,
|
|
470
|
+
height: PropTypes.number,
|
|
471
|
+
hideTooltip: PropTypes.bool,
|
|
472
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
473
|
+
ignoreTooltip: PropTypes.bool,
|
|
474
|
+
label: PropTypes.string,
|
|
475
|
+
labelStyle: PropTypes.object,
|
|
476
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
477
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
478
|
+
offset: PropTypes.number,
|
|
479
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
480
|
+
reverse: PropTypes.bool,
|
|
481
|
+
scaleType: PropTypes.oneOf(['symlog']),
|
|
482
|
+
slotProps: PropTypes.object,
|
|
483
|
+
slots: PropTypes.object,
|
|
484
|
+
stroke: PropTypes.string,
|
|
485
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
486
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
487
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
488
|
+
tickLabelMinGap: PropTypes.number,
|
|
489
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
490
|
+
tickLabelStyle: PropTypes.object,
|
|
491
|
+
tickMaxStep: PropTypes.number,
|
|
492
|
+
tickMinStep: PropTypes.number,
|
|
493
|
+
tickNumber: PropTypes.number,
|
|
494
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
495
|
+
tickSize: PropTypes.number,
|
|
496
|
+
valueFormatter: PropTypes.func,
|
|
497
|
+
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
498
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
499
|
+
maxEnd: PropTypes.number,
|
|
500
|
+
maxSpan: PropTypes.number,
|
|
501
|
+
minSpan: PropTypes.number,
|
|
502
|
+
minStart: PropTypes.number,
|
|
503
|
+
panning: PropTypes.bool,
|
|
504
|
+
slider: PropTypes.shape({
|
|
505
|
+
enabled: PropTypes.bool,
|
|
506
|
+
preview: PropTypes.bool,
|
|
507
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
508
|
+
size: PropTypes.number
|
|
509
|
+
}),
|
|
510
|
+
step: PropTypes.number
|
|
511
|
+
}), PropTypes.bool])
|
|
449
512
|
}), PropTypes.shape({
|
|
450
513
|
axis: PropTypes.oneOf(['x']),
|
|
451
514
|
classes: PropTypes.object,
|
|
@@ -949,6 +1012,67 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
949
1012
|
}),
|
|
950
1013
|
step: PropTypes.number
|
|
951
1014
|
}), PropTypes.bool])
|
|
1015
|
+
}), PropTypes.shape({
|
|
1016
|
+
axis: PropTypes.oneOf(['y']),
|
|
1017
|
+
classes: PropTypes.object,
|
|
1018
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
1019
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
1020
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
1021
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
1022
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
1023
|
+
}), PropTypes.shape({
|
|
1024
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
1025
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
1026
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
1027
|
+
})]),
|
|
1028
|
+
constant: PropTypes.number,
|
|
1029
|
+
data: PropTypes.array,
|
|
1030
|
+
dataKey: PropTypes.string,
|
|
1031
|
+
disableLine: PropTypes.bool,
|
|
1032
|
+
disableTicks: PropTypes.bool,
|
|
1033
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
1034
|
+
fill: PropTypes.string,
|
|
1035
|
+
hideTooltip: PropTypes.bool,
|
|
1036
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
1037
|
+
ignoreTooltip: PropTypes.bool,
|
|
1038
|
+
label: PropTypes.string,
|
|
1039
|
+
labelStyle: PropTypes.object,
|
|
1040
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
1041
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
1042
|
+
offset: PropTypes.number,
|
|
1043
|
+
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
1044
|
+
reverse: PropTypes.bool,
|
|
1045
|
+
scaleType: PropTypes.oneOf(['symlog']),
|
|
1046
|
+
slotProps: PropTypes.object,
|
|
1047
|
+
slots: PropTypes.object,
|
|
1048
|
+
stroke: PropTypes.string,
|
|
1049
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
1050
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
1051
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
1052
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
1053
|
+
tickLabelStyle: PropTypes.object,
|
|
1054
|
+
tickMaxStep: PropTypes.number,
|
|
1055
|
+
tickMinStep: PropTypes.number,
|
|
1056
|
+
tickNumber: PropTypes.number,
|
|
1057
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
1058
|
+
tickSize: PropTypes.number,
|
|
1059
|
+
valueFormatter: PropTypes.func,
|
|
1060
|
+
width: PropTypes.number,
|
|
1061
|
+
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1062
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
1063
|
+
maxEnd: PropTypes.number,
|
|
1064
|
+
maxSpan: PropTypes.number,
|
|
1065
|
+
minSpan: PropTypes.number,
|
|
1066
|
+
minStart: PropTypes.number,
|
|
1067
|
+
panning: PropTypes.bool,
|
|
1068
|
+
slider: PropTypes.shape({
|
|
1069
|
+
enabled: PropTypes.bool,
|
|
1070
|
+
preview: PropTypes.bool,
|
|
1071
|
+
showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
|
|
1072
|
+
size: PropTypes.number
|
|
1073
|
+
}),
|
|
1074
|
+
step: PropTypes.number
|
|
1075
|
+
}), PropTypes.bool])
|
|
952
1076
|
}), PropTypes.shape({
|
|
953
1077
|
axis: PropTypes.oneOf(['y']),
|
|
954
1078
|
classes: PropTypes.object,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/SparkLineChart';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/Toolbar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/colorPalettes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/constants';
|
package/esm/context/index.d.ts
CHANGED
package/esm/context/index.js
CHANGED
package/esm/hooks/index.d.ts
CHANGED
package/esm/hooks/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// This re-export-block is automatically generated, to customize, simply remove the block.
|
|
2
|
+
export * from '@mui/x-charts/hooks';
|
|
3
|
+
// End of re-export-block
|
|
1
4
|
export * from "./useHeatmapSeries.js";
|
|
2
5
|
export * from "./useFunnelSeries.js";
|
|
3
6
|
export * from "./zoom/index.js";
|
package/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import "./typeOverloads/modules.js";
|
|
2
|
-
export * from '@mui/x-charts/constants';
|
|
3
|
-
export type { FadeOptions, HighlightItemData, HighlightOptions, HighlightScope } from '@mui/x-charts/context';
|
|
4
|
-
export * from '@mui/x-charts/hooks';
|
|
5
|
-
export * from '@mui/x-charts/colorPalettes';
|
|
6
|
-
export * from '@mui/x-charts/models';
|
|
7
2
|
export * from '@mui/x-charts/ChartsClipPath';
|
|
8
3
|
export * from '@mui/x-charts/ChartsReferenceLine';
|
|
9
4
|
export * from '@mui/x-charts/ChartsAxis';
|
|
@@ -25,9 +20,13 @@ export * from '@mui/x-charts/RadarChart';
|
|
|
25
20
|
export * from '@mui/x-charts/ChartsSurface';
|
|
26
21
|
export * from '@mui/x-charts/ChartDataProvider';
|
|
27
22
|
export * from '@mui/x-charts/ChartsLabel';
|
|
28
|
-
export
|
|
29
|
-
export * from
|
|
23
|
+
export * from '@mui/x-charts/ChartsOverlay';
|
|
24
|
+
export * from '@mui/x-charts/ChartsWrapper';
|
|
25
|
+
export * from "./constants/index.js";
|
|
30
26
|
export * from "./hooks/index.js";
|
|
27
|
+
export * from "./context/index.js";
|
|
28
|
+
export * from "./models/index.js";
|
|
29
|
+
export * from "./colorPalettes/index.js";
|
|
31
30
|
export * from "./Heatmap/index.js";
|
|
32
31
|
export { ChartContainerPro } from "./ChartContainerPro/index.js";
|
|
33
32
|
export type { ChartContainerProProps } from "./ChartContainerPro/index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v8.9.
|
|
2
|
+
* @mui/x-charts-pro v8.9.2
|
|
3
3
|
*
|
|
4
4
|
* @license SEE LICENSE IN LICENSE
|
|
5
5
|
* This source code is licensed under the SEE LICENSE IN LICENSE license found in the
|
|
@@ -8,10 +8,6 @@
|
|
|
8
8
|
import "./typeOverloads/modules.js";
|
|
9
9
|
|
|
10
10
|
// exports from MIT package
|
|
11
|
-
export * from '@mui/x-charts/constants';
|
|
12
|
-
export * from '@mui/x-charts/hooks';
|
|
13
|
-
export * from '@mui/x-charts/colorPalettes';
|
|
14
|
-
export * from '@mui/x-charts/models';
|
|
15
11
|
export * from '@mui/x-charts/ChartsClipPath';
|
|
16
12
|
export * from '@mui/x-charts/ChartsReferenceLine';
|
|
17
13
|
export * from '@mui/x-charts/ChartsAxis';
|
|
@@ -33,9 +29,19 @@ export * from '@mui/x-charts/RadarChart';
|
|
|
33
29
|
export * from '@mui/x-charts/ChartsSurface';
|
|
34
30
|
export * from '@mui/x-charts/ChartDataProvider';
|
|
35
31
|
export * from '@mui/x-charts/ChartsLabel';
|
|
36
|
-
|
|
37
|
-
export * from
|
|
32
|
+
export * from '@mui/x-charts/ChartsOverlay';
|
|
33
|
+
export * from '@mui/x-charts/ChartsWrapper';
|
|
34
|
+
|
|
35
|
+
// Pro utilities
|
|
36
|
+
export * from "./constants/index.js";
|
|
38
37
|
export * from "./hooks/index.js";
|
|
38
|
+
export * from "./context/index.js";
|
|
39
|
+
export * from "./models/index.js";
|
|
40
|
+
// Locales should be imported from `@mui/x-charts-pro/locales`
|
|
41
|
+
// export * from './locales';
|
|
42
|
+
export * from "./colorPalettes/index.js";
|
|
43
|
+
|
|
44
|
+
// Pro components
|
|
39
45
|
export * from "./Heatmap/index.js";
|
|
40
46
|
export { ChartContainerPro } from "./ChartContainerPro/index.js";
|
|
41
47
|
export * from "./ChartDataProviderPro/index.js";
|
|
@@ -3,7 +3,7 @@ import { UseChartProExportSignature } from "./useChartProExport/index.js";
|
|
|
3
3
|
import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
|
|
4
4
|
export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
5
5
|
export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
|
|
6
|
-
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<
|
|
6
|
+
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
|
|
7
7
|
export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
8
8
|
export type DefaultPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<TSeries>>;
|
|
9
|
-
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<
|
|
9
|
+
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function defaultOnBeforeExport(iframe: HTMLIFrameElement): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { chartsToolbarClasses } from '@mui/x-charts/Toolbar';
|
|
2
|
+
export function defaultOnBeforeExport(iframe) {
|
|
3
|
+
const document = iframe.contentDocument;
|
|
4
|
+
const chartsToolbarEl = document.querySelector(`.${chartsToolbarClasses.root}`);
|
|
5
|
+
chartsToolbarEl?.remove();
|
|
6
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
2
2
|
import { loadStyleSheets } from '@mui/x-internals/export';
|
|
3
3
|
import { createExportIframe } from "./common.js";
|
|
4
|
+
import { defaultOnBeforeExport } from "./defaults.js";
|
|
4
5
|
export const getDrawDocument = async () => {
|
|
5
6
|
try {
|
|
6
7
|
const module = await import('rasterizehtml');
|
|
@@ -16,7 +17,7 @@ export async function exportImage(element, params) {
|
|
|
16
17
|
fileName,
|
|
17
18
|
type = 'image/png',
|
|
18
19
|
quality = 0.9,
|
|
19
|
-
onBeforeExport,
|
|
20
|
+
onBeforeExport = defaultOnBeforeExport,
|
|
20
21
|
copyStyles = true
|
|
21
22
|
} = params ?? {};
|
|
22
23
|
const drawDocumentPromise = getDrawDocument();
|
|
@@ -52,7 +53,7 @@ export async function exportImage(element, params) {
|
|
|
52
53
|
};
|
|
53
54
|
doc.body.appendChild(iframe);
|
|
54
55
|
await iframeLoadPromise;
|
|
55
|
-
await onBeforeExport
|
|
56
|
+
await onBeforeExport(iframe);
|
|
56
57
|
const drawDocument = await drawDocumentPromise;
|
|
57
58
|
try {
|
|
58
59
|
await drawDocument(iframe.contentDocument, canvas, {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
2
2
|
import { loadStyleSheets } from '@mui/x-internals/export';
|
|
3
3
|
import { createExportIframe } from "./common.js";
|
|
4
|
+
import { defaultOnBeforeExport } from "./defaults.js";
|
|
4
5
|
export function printChart(element, {
|
|
5
6
|
fileName,
|
|
6
|
-
onBeforeExport,
|
|
7
|
+
onBeforeExport = defaultOnBeforeExport,
|
|
7
8
|
copyStyles = true
|
|
8
9
|
} = {}) {
|
|
9
10
|
const printWindow = createExportIframe(fileName);
|
|
@@ -26,7 +27,7 @@ export function printChart(element, {
|
|
|
26
27
|
doc.body.removeChild(printWindow);
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
|
-
await onBeforeExport
|
|
30
|
+
await onBeforeExport(printWindow);
|
|
30
31
|
printWindow.contentWindow.print();
|
|
31
32
|
};
|
|
32
33
|
doc.body.appendChild(printWindow);
|
package/esm/locales/index.js
CHANGED
package/esm/models/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
export * from '@mui/x-charts/models';
|
|
1
2
|
export type { ZoomData, ZoomFilterMode, ZoomOptions, ZoomSliderOptions, ZoomSliderShowTooltip } from '@mui/x-charts/internals';
|
|
2
|
-
export * from "./seriesType/index.js";
|
|
3
|
+
export * from "./seriesType/index.js";
|
|
4
|
+
export { defaultOnBeforeExport } from "../internals/plugins/useChartProExport/defaults.js";
|
package/esm/models/index.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
// This re-export-block is automatically generated, to customize, simply remove the block.
|
|
2
|
+
export * from '@mui/x-charts/models';
|
|
3
|
+
// End of re-export-block
|
|
4
|
+
|
|
1
5
|
export * from "./seriesType/index.js";
|
|
2
|
-
export {};
|
|
6
|
+
export { defaultOnBeforeExport } from "../internals/plugins/useChartProExport/defaults.js";
|
package/hooks/index.d.ts
CHANGED
package/hooks/index.js
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _hooks = require("@mui/x-charts/hooks");
|
|
7
|
+
Object.keys(_hooks).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _hooks[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _hooks[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
6
17
|
var _useHeatmapSeries = require("./useHeatmapSeries");
|
|
7
18
|
Object.keys(_useHeatmapSeries).forEach(function (key) {
|
|
8
19
|
if (key === "default" || key === "__esModule") return;
|
package/index.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import "./typeOverloads/modules.js";
|
|
2
|
-
export * from '@mui/x-charts/constants';
|
|
3
|
-
export type { FadeOptions, HighlightItemData, HighlightOptions, HighlightScope } from '@mui/x-charts/context';
|
|
4
|
-
export * from '@mui/x-charts/hooks';
|
|
5
|
-
export * from '@mui/x-charts/colorPalettes';
|
|
6
|
-
export * from '@mui/x-charts/models';
|
|
7
2
|
export * from '@mui/x-charts/ChartsClipPath';
|
|
8
3
|
export * from '@mui/x-charts/ChartsReferenceLine';
|
|
9
4
|
export * from '@mui/x-charts/ChartsAxis';
|
|
@@ -25,9 +20,13 @@ export * from '@mui/x-charts/RadarChart';
|
|
|
25
20
|
export * from '@mui/x-charts/ChartsSurface';
|
|
26
21
|
export * from '@mui/x-charts/ChartDataProvider';
|
|
27
22
|
export * from '@mui/x-charts/ChartsLabel';
|
|
28
|
-
export
|
|
29
|
-
export * from
|
|
23
|
+
export * from '@mui/x-charts/ChartsOverlay';
|
|
24
|
+
export * from '@mui/x-charts/ChartsWrapper';
|
|
25
|
+
export * from "./constants/index.js";
|
|
30
26
|
export * from "./hooks/index.js";
|
|
27
|
+
export * from "./context/index.js";
|
|
28
|
+
export * from "./models/index.js";
|
|
29
|
+
export * from "./colorPalettes/index.js";
|
|
31
30
|
export * from "./Heatmap/index.js";
|
|
32
31
|
export { ChartContainerPro } from "./ChartContainerPro/index.js";
|
|
33
32
|
export type { ChartContainerProProps } from "./ChartContainerPro/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v8.9.
|
|
2
|
+
* @mui/x-charts-pro v8.9.2
|
|
3
3
|
*
|
|
4
4
|
* @license SEE LICENSE IN LICENSE
|
|
5
5
|
* This source code is licensed under the SEE LICENSE IN LICENSE license found in the
|
|
@@ -20,54 +20,6 @@ Object.defineProperty(exports, "ChartContainerPro", {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
require("./typeOverloads/modules");
|
|
23
|
-
var _constants = require("@mui/x-charts/constants");
|
|
24
|
-
Object.keys(_constants).forEach(function (key) {
|
|
25
|
-
if (key === "default" || key === "__esModule") return;
|
|
26
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
27
|
-
if (key in exports && exports[key] === _constants[key]) return;
|
|
28
|
-
Object.defineProperty(exports, key, {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function () {
|
|
31
|
-
return _constants[key];
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
var _hooks = require("@mui/x-charts/hooks");
|
|
36
|
-
Object.keys(_hooks).forEach(function (key) {
|
|
37
|
-
if (key === "default" || key === "__esModule") return;
|
|
38
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
39
|
-
if (key in exports && exports[key] === _hooks[key]) return;
|
|
40
|
-
Object.defineProperty(exports, key, {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
get: function () {
|
|
43
|
-
return _hooks[key];
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
var _colorPalettes = require("@mui/x-charts/colorPalettes");
|
|
48
|
-
Object.keys(_colorPalettes).forEach(function (key) {
|
|
49
|
-
if (key === "default" || key === "__esModule") return;
|
|
50
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
51
|
-
if (key in exports && exports[key] === _colorPalettes[key]) return;
|
|
52
|
-
Object.defineProperty(exports, key, {
|
|
53
|
-
enumerable: true,
|
|
54
|
-
get: function () {
|
|
55
|
-
return _colorPalettes[key];
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
var _models = require("@mui/x-charts/models");
|
|
60
|
-
Object.keys(_models).forEach(function (key) {
|
|
61
|
-
if (key === "default" || key === "__esModule") return;
|
|
62
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
63
|
-
if (key in exports && exports[key] === _models[key]) return;
|
|
64
|
-
Object.defineProperty(exports, key, {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
get: function () {
|
|
67
|
-
return _models[key];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
23
|
var _ChartsClipPath = require("@mui/x-charts/ChartsClipPath");
|
|
72
24
|
Object.keys(_ChartsClipPath).forEach(function (key) {
|
|
73
25
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -320,6 +272,54 @@ Object.keys(_ChartsLabel).forEach(function (key) {
|
|
|
320
272
|
}
|
|
321
273
|
});
|
|
322
274
|
});
|
|
275
|
+
var _ChartsOverlay = require("@mui/x-charts/ChartsOverlay");
|
|
276
|
+
Object.keys(_ChartsOverlay).forEach(function (key) {
|
|
277
|
+
if (key === "default" || key === "__esModule") return;
|
|
278
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
279
|
+
if (key in exports && exports[key] === _ChartsOverlay[key]) return;
|
|
280
|
+
Object.defineProperty(exports, key, {
|
|
281
|
+
enumerable: true,
|
|
282
|
+
get: function () {
|
|
283
|
+
return _ChartsOverlay[key];
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
var _ChartsWrapper = require("@mui/x-charts/ChartsWrapper");
|
|
288
|
+
Object.keys(_ChartsWrapper).forEach(function (key) {
|
|
289
|
+
if (key === "default" || key === "__esModule") return;
|
|
290
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
291
|
+
if (key in exports && exports[key] === _ChartsWrapper[key]) return;
|
|
292
|
+
Object.defineProperty(exports, key, {
|
|
293
|
+
enumerable: true,
|
|
294
|
+
get: function () {
|
|
295
|
+
return _ChartsWrapper[key];
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
var _constants = require("./constants");
|
|
300
|
+
Object.keys(_constants).forEach(function (key) {
|
|
301
|
+
if (key === "default" || key === "__esModule") return;
|
|
302
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
303
|
+
if (key in exports && exports[key] === _constants[key]) return;
|
|
304
|
+
Object.defineProperty(exports, key, {
|
|
305
|
+
enumerable: true,
|
|
306
|
+
get: function () {
|
|
307
|
+
return _constants[key];
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
var _hooks = require("./hooks");
|
|
312
|
+
Object.keys(_hooks).forEach(function (key) {
|
|
313
|
+
if (key === "default" || key === "__esModule") return;
|
|
314
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
315
|
+
if (key in exports && exports[key] === _hooks[key]) return;
|
|
316
|
+
Object.defineProperty(exports, key, {
|
|
317
|
+
enumerable: true,
|
|
318
|
+
get: function () {
|
|
319
|
+
return _hooks[key];
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
323
|
var _context = require("./context");
|
|
324
324
|
Object.keys(_context).forEach(function (key) {
|
|
325
325
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -332,15 +332,27 @@ Object.keys(_context).forEach(function (key) {
|
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
});
|
|
335
|
-
var
|
|
336
|
-
Object.keys(
|
|
335
|
+
var _models = require("./models");
|
|
336
|
+
Object.keys(_models).forEach(function (key) {
|
|
337
|
+
if (key === "default" || key === "__esModule") return;
|
|
338
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
339
|
+
if (key in exports && exports[key] === _models[key]) return;
|
|
340
|
+
Object.defineProperty(exports, key, {
|
|
341
|
+
enumerable: true,
|
|
342
|
+
get: function () {
|
|
343
|
+
return _models[key];
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
var _colorPalettes = require("./colorPalettes");
|
|
348
|
+
Object.keys(_colorPalettes).forEach(function (key) {
|
|
337
349
|
if (key === "default" || key === "__esModule") return;
|
|
338
350
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
339
|
-
if (key in exports && exports[key] ===
|
|
351
|
+
if (key in exports && exports[key] === _colorPalettes[key]) return;
|
|
340
352
|
Object.defineProperty(exports, key, {
|
|
341
353
|
enumerable: true,
|
|
342
354
|
get: function () {
|
|
343
|
-
return
|
|
355
|
+
return _colorPalettes[key];
|
|
344
356
|
}
|
|
345
357
|
});
|
|
346
358
|
});
|
|
@@ -3,7 +3,7 @@ import { UseChartProExportSignature } from "./useChartProExport/index.js";
|
|
|
3
3
|
import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
|
|
4
4
|
export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
5
5
|
export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
|
|
6
|
-
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<
|
|
6
|
+
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
|
|
7
7
|
export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
8
8
|
export type DefaultPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<TSeries>>;
|
|
9
|
-
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<
|
|
9
|
+
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function defaultOnBeforeExport(iframe: HTMLIFrameElement): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultOnBeforeExport = defaultOnBeforeExport;
|
|
7
|
+
var _Toolbar = require("@mui/x-charts/Toolbar");
|
|
8
|
+
function defaultOnBeforeExport(iframe) {
|
|
9
|
+
const document = iframe.contentDocument;
|
|
10
|
+
const chartsToolbarEl = document.querySelector(`.${_Toolbar.chartsToolbarClasses.root}`);
|
|
11
|
+
chartsToolbarEl?.remove();
|
|
12
|
+
}
|
|
@@ -10,6 +10,7 @@ var _interopRequireWildcard2 = _interopRequireDefault(require("@babel/runtime/he
|
|
|
10
10
|
var _ownerDocument = _interopRequireDefault(require("@mui/utils/ownerDocument"));
|
|
11
11
|
var _export = require("@mui/x-internals/export");
|
|
12
12
|
var _common = require("./common");
|
|
13
|
+
var _defaults = require("./defaults");
|
|
13
14
|
const getDrawDocument = async () => {
|
|
14
15
|
try {
|
|
15
16
|
const module = await Promise.resolve().then(() => (0, _interopRequireWildcard2.default)(require('rasterizehtml')));
|
|
@@ -26,7 +27,7 @@ async function exportImage(element, params) {
|
|
|
26
27
|
fileName,
|
|
27
28
|
type = 'image/png',
|
|
28
29
|
quality = 0.9,
|
|
29
|
-
onBeforeExport,
|
|
30
|
+
onBeforeExport = _defaults.defaultOnBeforeExport,
|
|
30
31
|
copyStyles = true
|
|
31
32
|
} = params ?? {};
|
|
32
33
|
const drawDocumentPromise = getDrawDocument();
|
|
@@ -62,7 +63,7 @@ async function exportImage(element, params) {
|
|
|
62
63
|
};
|
|
63
64
|
doc.body.appendChild(iframe);
|
|
64
65
|
await iframeLoadPromise;
|
|
65
|
-
await onBeforeExport
|
|
66
|
+
await onBeforeExport(iframe);
|
|
66
67
|
const drawDocument = await drawDocumentPromise;
|
|
67
68
|
try {
|
|
68
69
|
await drawDocument(iframe.contentDocument, canvas, {
|