@mui/x-charts-pro 8.8.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 +126 -2
- package/CHANGELOG.md +225 -24
- 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.d.ts +3 -2
- package/FunnelChart/FunnelChart.js +13 -3
- package/FunnelChart/index.d.ts +1 -1
- package/FunnelChart/useFunnelChartProps.d.ts +1 -1
- package/Gauge/index.d.ts +1 -0
- package/Gauge/index.js +16 -0
- package/Heatmap/Heatmap.d.ts +3 -2
- package/Heatmap/Heatmap.js +3 -3
- package/Heatmap/index.d.ts +1 -0
- package/LineChart/index.d.ts +1 -0
- package/LineChart/index.js +16 -0
- package/LineChartPro/LineChartPro.js +126 -2
- package/PieChart/index.d.ts +1 -0
- package/PieChart/index.js +16 -0
- package/PieChartPro/PieChartPro.js +3 -2
- package/RadarChart/index.d.ts +1 -0
- package/RadarChart/index.js +16 -0
- package/RadarChartPro/RadarChartPro.js +22 -2
- package/ScatterChart/index.d.ts +1 -0
- package/ScatterChart/index.js +16 -0
- package/ScatterChartPro/ScatterChartPro.js +126 -2
- 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 +126 -2
- 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.d.ts +3 -2
- package/esm/FunnelChart/FunnelChart.js +12 -2
- package/esm/FunnelChart/index.d.ts +1 -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.d.ts +3 -2
- package/esm/Heatmap/Heatmap.js +2 -2
- package/esm/Heatmap/index.d.ts +1 -0
- package/esm/LineChart/index.d.ts +1 -0
- package/esm/LineChart/index.js +2 -0
- package/esm/LineChartPro/LineChartPro.js +126 -2
- package/esm/PieChart/index.d.ts +1 -0
- package/esm/PieChart/index.js +2 -0
- package/esm/PieChartPro/PieChartPro.js +3 -2
- package/esm/RadarChart/index.d.ts +1 -0
- package/esm/RadarChart/index.js +2 -0
- package/esm/RadarChartPro/RadarChartPro.js +22 -2
- package/esm/ScatterChart/index.d.ts +1 -0
- package/esm/ScatterChart/index.js +2 -0
- package/esm/ScatterChartPro/ScatterChartPro.js +126 -2
- 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 +15 -9
- 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 +67 -55
- 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 +8 -9
|
@@ -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, {
|
|
@@ -8,9 +8,10 @@ exports.printChart = printChart;
|
|
|
8
8
|
var _ownerDocument = _interopRequireDefault(require("@mui/utils/ownerDocument"));
|
|
9
9
|
var _export = require("@mui/x-internals/export");
|
|
10
10
|
var _common = require("./common");
|
|
11
|
+
var _defaults = require("./defaults");
|
|
11
12
|
function printChart(element, {
|
|
12
13
|
fileName,
|
|
13
|
-
onBeforeExport,
|
|
14
|
+
onBeforeExport = _defaults.defaultOnBeforeExport,
|
|
14
15
|
copyStyles = true
|
|
15
16
|
} = {}) {
|
|
16
17
|
const printWindow = (0, _common.createExportIframe)(fileName);
|
|
@@ -33,7 +34,7 @@ function printChart(element, {
|
|
|
33
34
|
doc.body.removeChild(printWindow);
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
|
-
await onBeforeExport
|
|
37
|
+
await onBeforeExport(printWindow);
|
|
37
38
|
printWindow.contentWindow.print();
|
|
38
39
|
};
|
|
39
40
|
doc.body.appendChild(printWindow);
|
package/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/models/index.js
CHANGED
|
@@ -3,9 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
defaultOnBeforeExport: true
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "defaultOnBeforeExport", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _defaults.defaultOnBeforeExport;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
var _models = require("@mui/x-charts/models");
|
|
16
|
+
Object.keys(_models).forEach(function (key) {
|
|
17
|
+
if (key === "default" || key === "__esModule") return;
|
|
18
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
+
if (key in exports && exports[key] === _models[key]) return;
|
|
20
|
+
Object.defineProperty(exports, key, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return _models[key];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
6
27
|
var _seriesType = require("./seriesType");
|
|
7
28
|
Object.keys(_seriesType).forEach(function (key) {
|
|
8
29
|
if (key === "default" || key === "__esModule") return;
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
9
31
|
if (key in exports && exports[key] === _seriesType[key]) return;
|
|
10
32
|
Object.defineProperty(exports, key, {
|
|
11
33
|
enumerable: true,
|
|
@@ -13,4 +35,5 @@ Object.keys(_seriesType).forEach(function (key) {
|
|
|
13
35
|
return _seriesType[key];
|
|
14
36
|
}
|
|
15
37
|
});
|
|
16
|
-
});
|
|
38
|
+
});
|
|
39
|
+
var _defaults = require("../internals/plugins/useChartProExport/defaults");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts-pro",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.2",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Pro plan edition of the MUI X Charts components.",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
"homepage": "https://mui.com/x/react-charts/",
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"publishConfig": {
|
|
14
|
-
"access": "public"
|
|
15
|
-
"directory": "build"
|
|
14
|
+
"access": "public"
|
|
16
15
|
},
|
|
17
16
|
"keywords": [
|
|
18
17
|
"react",
|
|
@@ -29,15 +28,15 @@
|
|
|
29
28
|
"directory": "packages/x-charts-pro"
|
|
30
29
|
},
|
|
31
30
|
"dependencies": {
|
|
32
|
-
"@babel/runtime": "^7.
|
|
31
|
+
"@babel/runtime": "^7.28.2",
|
|
33
32
|
"@mui/utils": "^7.2.0",
|
|
34
33
|
"clsx": "^2.1.1",
|
|
35
34
|
"prop-types": "^15.8.1",
|
|
36
|
-
"@mui/x-charts
|
|
37
|
-
"@mui/x-
|
|
38
|
-
"@mui/x-license": "8.
|
|
39
|
-
"@mui/x-
|
|
40
|
-
"@mui/x-
|
|
35
|
+
"@mui/x-charts": "8.9.2",
|
|
36
|
+
"@mui/x-internals": "8.9.2",
|
|
37
|
+
"@mui/x-license": "8.9.2",
|
|
38
|
+
"@mui/x-charts-vendor": "8.6.0",
|
|
39
|
+
"@mui/x-internal-gestures": "0.2.2"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
43
42
|
"@emotion/react": "^11.9.0",
|