@progress/kendo-react-chart-wizard 8.3.0-develop.15 → 8.3.0-develop.16
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/ChartWizard.js +1 -1
- package/ChartWizard.mjs +74 -1711
- package/components/ChartComponent.js +8 -0
- package/components/ChartComponent.mjs +69 -0
- package/components/FormField.js +8 -0
- package/components/FormField.mjs +16 -0
- package/components/FormFieldSet.js +8 -0
- package/components/FormFieldSet.mjs +13 -0
- package/components/SeriesGrid.js +8 -0
- package/{SeriesGrid.mjs → components/SeriesGrid.mjs} +5 -2
- package/components/SeriesTypeButton.js +8 -0
- package/components/SeriesTypeButton.mjs +30 -0
- package/{common/get-wizard-data-from-data-rows.js → components/SeriesTypesWrap.js} +1 -1
- package/{common/get-wizard-data-from-data-rows.mjs → components/SeriesTypesWrap.mjs} +4 -3
- package/components/panels/BarChartPanel.js +8 -0
- package/components/panels/BarChartPanel.mjs +71 -0
- package/components/panels/CategoryAxisPanel.js +8 -0
- package/components/panels/CategoryAxisPanel.mjs +315 -0
- package/components/panels/ChartAreaPanel.js +8 -0
- package/components/panels/ChartAreaPanel.mjs +200 -0
- package/components/panels/ColumnChartPanel.js +8 -0
- package/components/panels/ColumnChartPanel.mjs +77 -0
- package/components/panels/ConfigurationPanel.js +8 -0
- package/components/panels/ConfigurationPanel.mjs +102 -0
- package/components/panels/LegendPanel.js +8 -0
- package/components/panels/LegendPanel.mjs +190 -0
- package/components/panels/LineChartPanel.js +8 -0
- package/components/panels/LineChartPanel.mjs +74 -0
- package/components/panels/PieChartPanel.js +8 -0
- package/components/panels/PieChartPanel.mjs +47 -0
- package/components/panels/ScatterChartPanel.js +8 -0
- package/components/panels/ScatterChartPanel.mjs +47 -0
- package/components/panels/SeriesPanel.js +8 -0
- package/components/panels/SeriesPanel.mjs +110 -0
- package/components/panels/TitlePanel.js +8 -0
- package/components/panels/TitlePanel.mjs +172 -0
- package/components/panels/ValueAxisPanel.js +8 -0
- package/components/panels/ValueAxisPanel.mjs +332 -0
- package/dist/cdn/js/kendo-react-chart-wizard.js +1 -1
- package/index.d.mts +3 -6
- package/index.d.ts +3 -6
- package/index.js +1 -1
- package/index.mjs +6 -6
- package/package.json +14 -14
- package/types/export.js +8 -0
- package/types/export.mjs +39 -0
- package/utils.js +8 -0
- package/utils.mjs +81 -0
- package/SeriesGrid.js +0 -8
- package/chart-wizard-state.js +0 -8
- package/chart-wizard-state.mjs +0 -21
- package/export.js +0 -8
- package/export.mjs +0 -70
- /package/{SeriesGridCells.js → components/SeriesGridCells.js} +0 -0
- /package/{SeriesGridCells.mjs → components/SeriesGridCells.mjs} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-chart-wizard",
|
|
3
|
-
"version": "8.3.0-develop.
|
|
3
|
+
"version": "8.3.0-develop.16",
|
|
4
4
|
"description": "React Chart Wizard lets you create a chart using data from a Grid, another data-bound component, or an external source",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
"@progress/kendo-drawing": "^1.20.1",
|
|
19
19
|
"@progress/kendo-file-saver": "^1.0.1",
|
|
20
20
|
"@progress/kendo-licensing": "^1.3.4",
|
|
21
|
-
"@progress/kendo-react-animation": "8.3.0-develop.
|
|
22
|
-
"@progress/kendo-react-buttons": "8.3.0-develop.
|
|
23
|
-
"@progress/kendo-react-charts": "8.3.0-develop.
|
|
24
|
-
"@progress/kendo-react-common": "8.3.0-develop.
|
|
25
|
-
"@progress/kendo-react-dialogs": "8.3.0-develop.
|
|
26
|
-
"@progress/kendo-react-form": "8.3.0-develop.
|
|
27
|
-
"@progress/kendo-react-dropdowns": "8.3.0-develop.
|
|
28
|
-
"@progress/kendo-react-grid": "8.3.0-develop.
|
|
29
|
-
"@progress/kendo-react-inputs": "8.3.0-develop.
|
|
30
|
-
"@progress/kendo-react-intl": "8.3.0-develop.
|
|
31
|
-
"@progress/kendo-react-labels": "8.3.0-develop.
|
|
32
|
-
"@progress/kendo-react-layout": "8.3.0-develop.
|
|
33
|
-
"@progress/kendo-react-popup": "8.3.0-develop.
|
|
21
|
+
"@progress/kendo-react-animation": "8.3.0-develop.16",
|
|
22
|
+
"@progress/kendo-react-buttons": "8.3.0-develop.16",
|
|
23
|
+
"@progress/kendo-react-charts": "8.3.0-develop.16",
|
|
24
|
+
"@progress/kendo-react-common": "8.3.0-develop.16",
|
|
25
|
+
"@progress/kendo-react-dialogs": "8.3.0-develop.16",
|
|
26
|
+
"@progress/kendo-react-form": "8.3.0-develop.16",
|
|
27
|
+
"@progress/kendo-react-dropdowns": "8.3.0-develop.16",
|
|
28
|
+
"@progress/kendo-react-grid": "8.3.0-develop.16",
|
|
29
|
+
"@progress/kendo-react-inputs": "8.3.0-develop.16",
|
|
30
|
+
"@progress/kendo-react-intl": "8.3.0-develop.16",
|
|
31
|
+
"@progress/kendo-react-labels": "8.3.0-develop.16",
|
|
32
|
+
"@progress/kendo-react-layout": "8.3.0-develop.16",
|
|
33
|
+
"@progress/kendo-react-popup": "8.3.0-develop.16",
|
|
34
34
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
35
35
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
36
36
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
package/types/export.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class e{constructor(){this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}}class s extends e{constructor(r,n){super(),this.chart=r,this.exportOptions=n}}exports.ExportEvent=s;exports.PreventableEvent=e;
|
package/types/export.mjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
class s {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.prevented = !1;
|
|
12
|
+
}
|
|
13
|
+
/* eslint-disable max-len */
|
|
14
|
+
/**
|
|
15
|
+
* Prevents the default action for a specified event.
|
|
16
|
+
* In this way, the source component suppresses the built-in behavior that follows the event.
|
|
17
|
+
*/
|
|
18
|
+
preventDefault() {
|
|
19
|
+
this.prevented = !0;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns `true` if the event was prevented by any of its subscribers.
|
|
23
|
+
*
|
|
24
|
+
* @returns - Returns `true` if the default action was prevented.
|
|
25
|
+
* Otherwise, returns `false`.
|
|
26
|
+
*/
|
|
27
|
+
isDefaultPrevented() {
|
|
28
|
+
return this.prevented;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class n extends s {
|
|
32
|
+
constructor(t, r) {
|
|
33
|
+
super(), this.chart = t, this.exportOptions = r;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
n as ExportEvent,
|
|
38
|
+
s as PreventableEvent
|
|
39
|
+
};
|
package/utils.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),r=require("@progress/kendo-charts"),i=require("@progress/kendo-react-charts"),c=require("@progress/kendo-drawing"),p=require("@progress/kendo-file-saver");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const u=g(f),h=t=>{t.stopPropagation()},n={fileName:"chart",pdf:{paperSize:"A4",margin:"1cm"},image:{width:800,height:600}},C=(t={})=>({fileName:t.fileName||n.fileName,pdf:{...n.pdf,...t.pdf},image:{...n.image,...t.image}}),x=t=>{const e=i.exportVisual(t.chart),a=t.exportOptions;e&&c.exportPDF(e,a.pdf).then(o=>p.saveAs(o,a.fileName+".pdf"))},S=t=>{const e=i.exportVisual(t.chart),a=t.exportOptions;e&&c.exportSVG(e).then(o=>p.saveAs(o,a.fileName+".svg"))},k=t=>{const e=t.exportOptions,a=i.exportVisual(t.chart,e.image);a&&c.exportImage(a,e.image).then(o=>p.saveAs(o,e.fileName+".png"))},y={value:null,text:""},N=(t,e)=>e.dataItem.style?u.cloneElement(t,t.props,u.createElement("span",{style:e.dataItem.style},t.props.children)):t,v=/^\d+$/,E=t=>{if(t.text==="")return!0;if(t.value===void 0){if(!v.test(t.text))return!1;t.value=t.text+"px"}return s.find(a=>a.value===t.value)||(s.push(t),s.sort((a,o)=>parseInt(a.text,10)-parseInt(o.text,10))),!0},I={fillMode:"outline",popupSettings:{animate:!1}},W={type:"normal"},z={type:"100%"},V=t=>{var l,m;const e=typeof((l=t.series[0])==null?void 0:l.stack)=="object"?(m=t.series[0])==null?void 0:m.stack:!1,a=e===!1,o=e&&e.type==="normal",d=e&&e.type==="100%";return{isStackFalse:a,isStackNormal:o,isStack100:d}},s=r.ChartWizardCommon.fontSizes,b=r.ChartWizardCommon.fontNames,D=r.ChartWizardCommon.createInitialState,F=r.ChartWizardCommon.createState,O=r.ChartWizardCommon.updateState,P=r.ChartWizardCommon.mergeStates,R=r.ChartWizardCommon.isCategorical,w=r.ChartWizardCommon.parseFont,A=r.ChartWizardCommon.ActionTypes,{getWizardDataFromDataRows:j}=r.ChartWizardCommon;exports.ActionTypes=A;exports.createInitialState=D;exports.createState=F;exports.dropdownlistCommonProps=I;exports.ensureValue=E;exports.fontNames=b;exports.fontSizes=s;exports.getWizardDataFromDataRows=j;exports.handleImageExport=k;exports.handlePDFExport=x;exports.handleSVGExport=S;exports.isCategorical=R;exports.itemRender=N;exports.mergeStates=P;exports.nullItem=y;exports.parseFont=w;exports.resolveExportOptions=C;exports.stack100=z;exports.stackNormal=W;exports.stackState=V;exports.stopPropagation=h;exports.updateState=O;
|
package/utils.mjs
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as l from "react";
|
|
10
|
+
import { ChartWizardCommon as s } from "@progress/kendo-charts";
|
|
11
|
+
import { exportVisual as c } from "@progress/kendo-react-charts";
|
|
12
|
+
import { exportPDF as u, exportSVG as d, exportImage as g } from "@progress/kendo-drawing";
|
|
13
|
+
import { saveAs as i } from "@progress/kendo-file-saver";
|
|
14
|
+
const k = (t) => {
|
|
15
|
+
t.stopPropagation();
|
|
16
|
+
}, n = {
|
|
17
|
+
fileName: "chart",
|
|
18
|
+
pdf: { paperSize: "A4", margin: "1cm" },
|
|
19
|
+
image: { width: 800, height: 600 }
|
|
20
|
+
}, I = (t = {}) => ({
|
|
21
|
+
fileName: t.fileName || n.fileName,
|
|
22
|
+
pdf: {
|
|
23
|
+
...n.pdf,
|
|
24
|
+
...t.pdf
|
|
25
|
+
},
|
|
26
|
+
image: {
|
|
27
|
+
...n.image,
|
|
28
|
+
...t.image
|
|
29
|
+
}
|
|
30
|
+
}), E = (t) => {
|
|
31
|
+
const e = c(t.chart), a = t.exportOptions;
|
|
32
|
+
e && u(e, a.pdf).then((o) => i(o, a.fileName + ".pdf"));
|
|
33
|
+
}, C = (t) => {
|
|
34
|
+
const e = c(t.chart), a = t.exportOptions;
|
|
35
|
+
e && d(e).then((o) => i(o, a.fileName + ".svg"));
|
|
36
|
+
}, V = (t) => {
|
|
37
|
+
const e = t.exportOptions, a = c(t.chart, e.image);
|
|
38
|
+
a && g(a, e.image).then((o) => i(o, e.fileName + ".png"));
|
|
39
|
+
}, v = { value: null, text: "" }, F = (t, e) => e.dataItem.style ? l.cloneElement(t, t.props, /* @__PURE__ */ l.createElement("span", { style: e.dataItem.style }, t.props.children)) : t, h = /^\d+$/, A = (t) => {
|
|
40
|
+
if (t.text === "")
|
|
41
|
+
return !0;
|
|
42
|
+
if (t.value === void 0) {
|
|
43
|
+
if (!h.test(t.text))
|
|
44
|
+
return !1;
|
|
45
|
+
t.value = t.text + "px";
|
|
46
|
+
}
|
|
47
|
+
return r.find((a) => a.value === t.value) || (r.push(t), r.sort((a, o) => parseInt(a.text, 10) - parseInt(o.text, 10))), !0;
|
|
48
|
+
}, D = {
|
|
49
|
+
fillMode: "outline",
|
|
50
|
+
popupSettings: {
|
|
51
|
+
animate: !1
|
|
52
|
+
}
|
|
53
|
+
}, P = { type: "normal" }, R = { type: "100%" }, w = (t) => {
|
|
54
|
+
var p, m;
|
|
55
|
+
const e = typeof ((p = t.series[0]) == null ? void 0 : p.stack) == "object" ? (m = t.series[0]) == null ? void 0 : m.stack : !1, a = e === !1, o = e && e.type === "normal", f = e && e.type === "100%";
|
|
56
|
+
return { isStackFalse: a, isStackNormal: o, isStack100: f };
|
|
57
|
+
}, r = s.fontSizes, O = s.fontNames, b = s.createInitialState, G = s.createState, T = s.updateState, W = s.mergeStates, j = s.isCategorical, M = s.parseFont, $ = s.ActionTypes, { getWizardDataFromDataRows: q } = s;
|
|
58
|
+
export {
|
|
59
|
+
$ as ActionTypes,
|
|
60
|
+
b as createInitialState,
|
|
61
|
+
G as createState,
|
|
62
|
+
D as dropdownlistCommonProps,
|
|
63
|
+
A as ensureValue,
|
|
64
|
+
O as fontNames,
|
|
65
|
+
r as fontSizes,
|
|
66
|
+
q as getWizardDataFromDataRows,
|
|
67
|
+
V as handleImageExport,
|
|
68
|
+
E as handlePDFExport,
|
|
69
|
+
C as handleSVGExport,
|
|
70
|
+
j as isCategorical,
|
|
71
|
+
F as itemRender,
|
|
72
|
+
W as mergeStates,
|
|
73
|
+
v as nullItem,
|
|
74
|
+
M as parseFont,
|
|
75
|
+
I as resolveExportOptions,
|
|
76
|
+
R as stack100,
|
|
77
|
+
P as stackNormal,
|
|
78
|
+
w as stackState,
|
|
79
|
+
k as stopPropagation,
|
|
80
|
+
T as updateState
|
|
81
|
+
};
|
package/SeriesGrid.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),h=require("@progress/kendo-react-buttons"),o=require("@progress/kendo-react-grid"),D=require("@progress/kendo-react-intl"),I=require("@progress/kendo-svg-icons"),d=require("./SeriesGridCells.js"),x=require("./messages.js"),b=require("@progress/kendo-charts"),{messages:G}=b.ChartWizardCommon,s="inEdit",k=e=>{const[r,u]=n.useState(null),m=t=>{if(r===t)return;const a=e.data.slice(),i=a.findIndex(c=>c===r),l=a.findIndex(c=>c===t);a.splice(i,1),a.splice(l,0,r||a[0]),e.onChange.call(void 0,a)},C=t=>{u(t)},g=()=>{const t=e.initialData.find(a=>!e.data.find(i=>i.id===a.id));t&&e.onChange.call(void 0,[...e.data,t])},v=(t,a)=>{const i=e.data.map(l=>({...l,[s]:l.id===t.id?a:void 0}));e.onChange.call(void 0,i)},f=()=>{const t=e.data.map(a=>({...a,[s]:void 0}));e.onChange.call(void 0,t)},E=t=>{const a=t.field||"",i=e.data.map(l=>l.id===t.dataItem.id?{...l,[a]:t.value}:l);e.onChange.call(void 0,i)},S=t=>{const a=e.data.filter(i=>i.id!==t);e.onChange.call(void 0,a)};return n.createElement(d.RemoveSeriesContext.Provider,{value:{onRemove:S,count:e.data.length}},n.createElement(d.ReorderContext.Provider,{value:{reorder:m,dragStart:C}},n.createElement(d.SeriesEditContext.Provider,{value:{enterEdit:v,exitEdit:f}},n.createElement(o.Grid,{className:"k-series-grid",style:{width:"100%"},size:"medium",data:e.data,dataItemKey:"id",onItemChange:E,scrollable:"none",editField:s,cells:{headerCell:d.SeriesHeaderCell,data:d.SeriesDataCell,edit:{text:d.SeriesDataEditCell,boolean:d.SeriesDataEditCell,numeric:d.SeriesDataEditCell,date:d.SeriesDataEditCell}}},n.createElement(o.GridToolbar,null,n.createElement(h.Button,{type:"button",className:"k-toolbar-button",fillMode:"flat",onClick:g,disabled:e.data.length===e.initialData.length,svgIcon:I.plusIcon,icon:"plus"},D.useLocalization().toLanguageString(x.configurationSeriesAdd,G.configurationSeriesAdd))),n.createElement(o.GridColumn,{field:"reorder",width:"40px",editable:!1}),n.createElement(o.GridColumn,{field:"name",title:"Name"}),n.createElement(o.GridColumn,{field:"delete",width:"40px",editable:!1})))))};exports.SeriesGrid=k;
|
package/chart-wizard-state.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@progress/kendo-charts"),e=t.ChartWizardCommon.fontSizes,a=t.ChartWizardCommon.fontNames,o=t.ChartWizardCommon.createInitialState,r=t.ChartWizardCommon.createState,n=t.ChartWizardCommon.updateState,i=t.ChartWizardCommon.mergeStates,s=t.ChartWizardCommon.isCategorical,c=t.ChartWizardCommon.parseFont,m=t.ChartWizardCommon.ActionTypes;exports.ActionTypes=m;exports.createInitialState=o;exports.createState=r;exports.fontNames=a;exports.fontSizes=e;exports.isCategorical=s;exports.mergeStates=i;exports.parseFont=c;exports.updateState=n;
|
package/chart-wizard-state.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";
|
|
9
|
-
import { ChartWizardCommon as t } from "@progress/kendo-charts";
|
|
10
|
-
const a = t.fontSizes, o = t.fontNames, s = t.createInitialState, n = t.createState, c = t.updateState, i = t.mergeStates, r = t.isCategorical, S = t.parseFont, m = t.ActionTypes;
|
|
11
|
-
export {
|
|
12
|
-
m as ActionTypes,
|
|
13
|
-
s as createInitialState,
|
|
14
|
-
n as createState,
|
|
15
|
-
o as fontNames,
|
|
16
|
-
a as fontSizes,
|
|
17
|
-
r as isCategorical,
|
|
18
|
-
i as mergeStates,
|
|
19
|
-
S as parseFont,
|
|
20
|
-
c as updateState
|
|
21
|
-
};
|
package/export.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-drawing"),n=require("@progress/kendo-file-saver"),i=require("@progress/kendo-react-charts");class p{constructor(){this.prevented=!1}preventDefault(){this.prevented=!0}isDefaultPrevented(){return this.prevented}}class l extends p{constructor(t,r){super(),this.chart=t,this.exportOptions=r}}const s={fileName:"chart",pdf:{paperSize:"A4",margin:"1cm"},image:{width:800,height:600}},c=(e={})=>({fileName:e.fileName||s.fileName,pdf:{...s.pdf,...e.pdf},image:{...s.image,...e.image}}),h=e=>{const t=i.exportVisual(e.chart),r=e.exportOptions;t&&a.exportPDF(t,r.pdf).then(o=>n.saveAs(o,r.fileName+".pdf"))},d=e=>{const t=i.exportVisual(e.chart),r=e.exportOptions;t&&a.exportSVG(t).then(o=>n.saveAs(o,r.fileName+".svg"))},u=e=>{const t=e.exportOptions,r=i.exportVisual(e.chart,t.image);r&&a.exportImage(r,t.image).then(o=>n.saveAs(o,t.fileName+".png"))};exports.ExportEvent=l;exports.PreventableEvent=p;exports.handleImageExport=u;exports.handlePDFExport=h;exports.handleSVGExport=d;exports.resolveExportOptions=c;
|
package/export.mjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";
|
|
9
|
-
import { exportPDF as n, exportSVG as p, exportImage as c } from "@progress/kendo-drawing";
|
|
10
|
-
import { saveAs as i } from "@progress/kendo-file-saver";
|
|
11
|
-
import { exportVisual as a } from "@progress/kendo-react-charts";
|
|
12
|
-
class f {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.prevented = !1;
|
|
15
|
-
}
|
|
16
|
-
/* eslint-disable max-len */
|
|
17
|
-
/**
|
|
18
|
-
* Prevents the default action for a specified event.
|
|
19
|
-
* In this way, the source component suppresses the built-in behavior that follows the event.
|
|
20
|
-
*/
|
|
21
|
-
preventDefault() {
|
|
22
|
-
this.prevented = !0;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Returns `true` if the event was prevented by any of its subscribers.
|
|
26
|
-
*
|
|
27
|
-
* @returns - Returns `true` if the default action was prevented.
|
|
28
|
-
* Otherwise, returns `false`.
|
|
29
|
-
*/
|
|
30
|
-
isDefaultPrevented() {
|
|
31
|
-
return this.prevented;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
class d extends f {
|
|
35
|
-
constructor(e, r) {
|
|
36
|
-
super(), this.chart = e, this.exportOptions = r;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
const s = {
|
|
40
|
-
fileName: "chart",
|
|
41
|
-
pdf: { paperSize: "A4", margin: "1cm" },
|
|
42
|
-
image: { width: 800, height: 600 }
|
|
43
|
-
}, u = (t = {}) => ({
|
|
44
|
-
fileName: t.fileName || s.fileName,
|
|
45
|
-
pdf: {
|
|
46
|
-
...s.pdf,
|
|
47
|
-
...t.pdf
|
|
48
|
-
},
|
|
49
|
-
image: {
|
|
50
|
-
...s.image,
|
|
51
|
-
...t.image
|
|
52
|
-
}
|
|
53
|
-
}), x = (t) => {
|
|
54
|
-
const e = a(t.chart), r = t.exportOptions;
|
|
55
|
-
e && n(e, r.pdf).then((o) => i(o, r.fileName + ".pdf"));
|
|
56
|
-
}, g = (t) => {
|
|
57
|
-
const e = a(t.chart), r = t.exportOptions;
|
|
58
|
-
e && p(e).then((o) => i(o, r.fileName + ".svg"));
|
|
59
|
-
}, v = (t) => {
|
|
60
|
-
const e = t.exportOptions, r = a(t.chart, e.image);
|
|
61
|
-
r && c(r, e.image).then((o) => i(o, e.fileName + ".png"));
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
d as ExportEvent,
|
|
65
|
-
f as PreventableEvent,
|
|
66
|
-
v as handleImageExport,
|
|
67
|
-
x as handlePDFExport,
|
|
68
|
-
g as handleSVGExport,
|
|
69
|
-
u as resolveExportOptions
|
|
70
|
-
};
|
|
File without changes
|
|
File without changes
|