@progress/kendo-react-chart-wizard 8.3.0-develop.12 → 8.3.0-develop.13
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 +1559 -784
- package/SeriesGrid.js +1 -1
- package/SeriesGrid.mjs +37 -36
- package/chart-wizard-state.js +1 -1
- package/chart-wizard-state.mjs +11 -350
- package/common/get-wizard-data-from-data-rows.js +1 -1
- package/common/get-wizard-data-from-data-rows.mjs +3 -14
- package/dist/cdn/js/kendo-react-chart-wizard.js +1 -1
- package/grid-integration/get-wizard-data-from-grid-selection.js +1 -1
- package/grid-integration/get-wizard-data-from-grid-selection.mjs +4 -4
- package/index.d.mts +13 -189
- package/index.d.ts +13 -189
- package/index.js +1 -1
- package/index.mjs +8 -18
- package/messages.js +1 -1
- package/messages.mjs +109 -215
- package/package.json +15 -15
package/SeriesGrid.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),
|
|
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/SeriesGrid.mjs
CHANGED
|
@@ -6,42 +6,43 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import
|
|
10
|
-
import { Button as
|
|
11
|
-
import { Grid as
|
|
12
|
-
import { useLocalization as
|
|
13
|
-
import { plusIcon as
|
|
14
|
-
import { RemoveSeriesContext as
|
|
15
|
-
import { configurationSeriesAdd as
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
import i from "react";
|
|
10
|
+
import { Button as x } from "@progress/kendo-react-buttons";
|
|
11
|
+
import { Grid as D, GridToolbar as I, GridColumn as c } from "@progress/kendo-react-grid";
|
|
12
|
+
import { useLocalization as S } from "@progress/kendo-react-intl";
|
|
13
|
+
import { plusIcon as b } from "@progress/kendo-svg-icons";
|
|
14
|
+
import { RemoveSeriesContext as w, ReorderContext as A, SeriesEditContext as G, SeriesHeaderCell as R, SeriesDataCell as k, SeriesDataEditCell as l } from "./SeriesGridCells.mjs";
|
|
15
|
+
import { configurationSeriesAdd as y } from "./messages.mjs";
|
|
16
|
+
import { ChartWizardCommon as z } from "@progress/kendo-charts";
|
|
17
|
+
const { messages: L } = z, m = "inEdit", M = (e) => {
|
|
18
|
+
const [o, s] = i.useState(null), f = (t) => {
|
|
18
19
|
if (o === t)
|
|
19
20
|
return;
|
|
20
|
-
const a = e.data.slice(),
|
|
21
|
-
a.splice(
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
const t = e.initialData.find((a) => !e.data.find((
|
|
21
|
+
const a = e.data.slice(), n = a.findIndex((r) => r === o), d = a.findIndex((r) => r === t);
|
|
22
|
+
a.splice(n, 1), a.splice(d, 0, o || a[0]), e.onChange.call(void 0, a);
|
|
23
|
+
}, u = (t) => {
|
|
24
|
+
s(t);
|
|
25
|
+
}, g = () => {
|
|
26
|
+
const t = e.initialData.find((a) => !e.data.find((n) => n.id === a.id));
|
|
26
27
|
t && e.onChange.call(void 0, [...e.data, t]);
|
|
27
|
-
},
|
|
28
|
-
const
|
|
28
|
+
}, v = (t, a) => {
|
|
29
|
+
const n = e.data.map((d) => ({
|
|
29
30
|
...d,
|
|
30
31
|
[m]: d.id === t.id ? a : void 0
|
|
31
32
|
}));
|
|
32
|
-
e.onChange.call(void 0,
|
|
33
|
-
},
|
|
33
|
+
e.onChange.call(void 0, n);
|
|
34
|
+
}, C = () => {
|
|
34
35
|
const t = e.data.map((a) => ({ ...a, [m]: void 0 }));
|
|
35
36
|
e.onChange.call(void 0, t);
|
|
36
37
|
}, h = (t) => {
|
|
37
|
-
const a = t.field || "",
|
|
38
|
-
e.onChange.call(void 0,
|
|
39
|
-
},
|
|
40
|
-
const a = e.data.filter((
|
|
38
|
+
const a = t.field || "", n = e.data.map((d) => d.id === t.dataItem.id ? { ...d, [a]: t.value } : d);
|
|
39
|
+
e.onChange.call(void 0, n);
|
|
40
|
+
}, E = (t) => {
|
|
41
|
+
const a = e.data.filter((n) => n.id !== t);
|
|
41
42
|
e.onChange.call(void 0, a);
|
|
42
43
|
};
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
44
|
+
return /* @__PURE__ */ i.createElement(w.Provider, { value: { onRemove: E, count: e.data.length } }, /* @__PURE__ */ i.createElement(A.Provider, { value: { reorder: f, dragStart: u } }, /* @__PURE__ */ i.createElement(G.Provider, { value: { enterEdit: v, exitEdit: C } }, /* @__PURE__ */ i.createElement(
|
|
45
|
+
D,
|
|
45
46
|
{
|
|
46
47
|
className: "k-series-grid",
|
|
47
48
|
style: { width: "100%" },
|
|
@@ -52,8 +53,8 @@ const m = "inEdit", H = (e) => {
|
|
|
52
53
|
scrollable: "none",
|
|
53
54
|
editField: m,
|
|
54
55
|
cells: {
|
|
55
|
-
headerCell:
|
|
56
|
-
data:
|
|
56
|
+
headerCell: R,
|
|
57
|
+
data: k,
|
|
57
58
|
edit: {
|
|
58
59
|
text: l,
|
|
59
60
|
boolean: l,
|
|
@@ -62,24 +63,24 @@ const m = "inEdit", H = (e) => {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
},
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
66
|
+
/* @__PURE__ */ i.createElement(I, null, /* @__PURE__ */ i.createElement(
|
|
67
|
+
x,
|
|
67
68
|
{
|
|
68
69
|
type: "button",
|
|
69
70
|
className: "k-toolbar-button",
|
|
70
71
|
fillMode: "flat",
|
|
71
|
-
onClick:
|
|
72
|
+
onClick: g,
|
|
72
73
|
disabled: e.data.length === e.initialData.length,
|
|
73
|
-
svgIcon:
|
|
74
|
+
svgIcon: b,
|
|
74
75
|
icon: "plus"
|
|
75
76
|
},
|
|
76
|
-
|
|
77
|
+
S().toLanguageString(y, L.configurationSeriesAdd)
|
|
77
78
|
)),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ i.createElement(c, { field: "reorder", width: "40px", editable: !1 }),
|
|
80
|
+
/* @__PURE__ */ i.createElement(c, { field: "name", title: "Name" }),
|
|
81
|
+
/* @__PURE__ */ i.createElement(c, { field: "delete", width: "40px", editable: !1 })
|
|
81
82
|
))));
|
|
82
83
|
};
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
M as SeriesGrid
|
|
85
86
|
};
|
package/chart-wizard-state.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var _=(t=>(t[t.seriesType=0]="seriesType",t[t.stacked=1]="stacked",t[t.categoryAxisX=2]="categoryAxisX",t[t.valueAxisY=3]="valueAxisY",t[t.seriesChange=4]="seriesChange",t[t.areaMarginLeft=5]="areaMarginLeft",t[t.areaMarginRight=6]="areaMarginRight",t[t.areaMarginTop=7]="areaMarginTop",t[t.areaMarginBottom=8]="areaMarginBottom",t[t.areaBackground=9]="areaBackground",t[t.titleText=10]="titleText",t[t.titleFontName=11]="titleFontName",t[t.titleFontSize=12]="titleFontSize",t[t.titleColor=13]="titleColor",t[t.subtitleText=14]="subtitleText",t[t.subtitleFontName=15]="subtitleFontName",t[t.subtitleFontSize=16]="subtitleFontSize",t[t.subtitleColor=17]="subtitleColor",t[t.seriesColor=18]="seriesColor",t[t.seriesLabel=19]="seriesLabel",t[t.legendVisible=20]="legendVisible",t[t.legendFontName=21]="legendFontName",t[t.legendFontSize=22]="legendFontSize",t[t.legendColor=23]="legendColor",t[t.legendPosition=24]="legendPosition",t[t.categoryAxisTitleText=25]="categoryAxisTitleText",t[t.categoryAxisTitleFontName=26]="categoryAxisTitleFontName",t[t.categoryAxisTitleFontSize=27]="categoryAxisTitleFontSize",t[t.categoryAxisTitleColor=28]="categoryAxisTitleColor",t[t.categoryAxisLabelsFontName=29]="categoryAxisLabelsFontName",t[t.categoryAxisLabelsFontSize=30]="categoryAxisLabelsFontSize",t[t.categoryAxisLabelsColor=31]="categoryAxisLabelsColor",t[t.categoryAxisLabelsRotation=32]="categoryAxisLabelsRotation",t[t.categoryAxisReverseOrder=33]="categoryAxisReverseOrder",t[t.valueAxisTitleText=34]="valueAxisTitleText",t[t.valueAxisTitleFontName=35]="valueAxisTitleFontName",t[t.valueAxisTitleFontSize=36]="valueAxisTitleFontSize",t[t.valueAxisTitleColor=37]="valueAxisTitleColor",t[t.valueAxisLabelsFormat=38]="valueAxisLabelsFormat",t[t.valueAxisLabelsFontName=39]="valueAxisLabelsFontName",t[t.valueAxisLabelsFontSize=40]="valueAxisLabelsFontSize",t[t.valueAxisLabelsColor=41]="valueAxisLabelsColor",t[t.valueAxisLabelsRotation=42]="valueAxisLabelsRotation",t))(_||{});const f=[{text:"8",value:"8px"},{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"24",value:"24px"},{text:"48",value:"48px"},{text:"60",value:"60px"},{text:"96",value:"96px"}],d=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],ue="column",ce="bar",T="line",Z="pie",ee="scatter",ge=[ue,ce,T,ee],xe={type:T,width:0},S=t=>t&&ge.includes(t),L=["string","date","number"],N=["number"],te={bar:[{axisType:"category",types:L},{axisType:"value",types:N}],column:[{axisType:"category",types:L},{axisType:"value",types:N}],line:[{axisType:"category",types:L},{axisType:"value",types:N}],pie:[{axisType:"category",types:L},{axisType:"value",types:N,count:1}],scatter:[{axisType:"category",types:L},{axisType:"value",types:N}]},ae=(t,l)=>`${l||""} ${t||""}`.trim(),A=t=>{const l=(t||"").indexOf(" "),a=t==null?void 0:t.substring(0,l),e=t==null?void 0:t.substring(l+1);return{size:a,name:e}},h=(t,l,a)=>{const{size:e}=A(a);return t?ae(t,e||l):""},C=(t,l,a)=>{const{name:e}=A(a);return t?ae(e||l,t):""},z=t=>t!=null,re=t=>{const l=structuredClone(t[0]);return l.forEach((a,e)=>{if(!z(a.value))for(let c=0;c<t.length;c++){const n=t[c][e].value;if(z(n)){a.value=n;break}}}),l},le=(t,l)=>{const a=[],e=re(t);l.types.forEach(n=>{e.forEach((g,o)=>{typeof g.value===n&&a.push(o)})});const c=a.findIndex(n=>{const g=t.map(o=>o[n].value);return new Set(g).size===g.length});return Math.max(c,0)},se=(t,l)=>{const a=[],e=re(t);return l.forEach(c=>{c.types.forEach(n=>{e.forEach((g,o)=>{typeof g.value===n&&a.push(o)})})}),a},ie=()=>structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[],valueAxis:[{labels:{visible:!0}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},stack:!1}),oe=(t,l,a)=>{const e=ie();e.seriesType=l,e.data=t;const c=te[l];if(!c)return e;const n=t[0].slice();e.columns=t[0].map(s=>String(s.field));const g=c.find(s=>s.axisType==="category");let o=-1;g&&(o=a!=null&&a.categoryAxis?e.columns.indexOf(a==null?void 0:a.categoryAxis):le(t,g));const m=c.filter(s=>s.axisType==="value");let u=se(t,m);u.includes(o)&&(u.length>1?u=u.filter(s=>s!==o):o=-1);const b=[];u.forEach(s=>{const x=n[s],y=[];t.forEach(F=>{y.push(F[s].value)}),b.push({name:x.field,type:l,data:y,stack:!1,labels:{visible:!1},...l===ee?xe:{}})});const v=o>-1?t.map(s=>String(z(s[o].value)?s[o].value:" ")):[];return b.length&&(e.series=b.map((s,x)=>({...s,id:x})),e.initialSeries=structuredClone(e.series)),e.categoryAxis=[{categories:v,labels:{visible:!0,rotation:"auto"}}],e.categoryField=e.columns[o],e.legend={visible:!0},e.title={text:void 0},e.subtitle={text:void 0},e},R=(t,l,a)=>{const e=ie();e.seriesType=l,e.data=t;const c=te[l];if(!c)return e;const n=t[0].map(s=>s.field),g=c.find(s=>s.axisType==="category");let o=-1;g&&(o=a!=null&&a.categoryAxis?n.indexOf(a==null?void 0:a.categoryAxis):le(t,g));const m=c.filter(s=>s.axisType==="value");let u=[];a!=null&&a.valueAxis?u=[n.indexOf(a.valueAxis)]:u=se(t,m),u.includes(o)&&u.length>1&&(u=u.filter(s=>s!==o)),typeof m[0].count=="number"&&(u=u.slice(0,m[0].count));const b=o>-1?t.map(s=>String(s[o].value)):[],v=[];return t.forEach(s=>{const x={};u.forEach(y=>{const F=s[y];x[F.field]=F.value||0,x[s[o].field]=s[o].value||" "}),v.push(x)}),e.columns=n,e.categoryAxis=[{categories:b,title:{text:""}}],e.series=[{id:0,data:v,type:l,name:n[o],labels:{visible:!0},categoryField:n[o],field:n[u[0]]}],e.categoryField=n[o],e.valueField=n[u[0]],e.initialSeries=structuredClone(e.series),e},me=(t,l,a)=>{const e=I(t,(a==null?void 0:a.seriesType)||l);return typeof(a==null?void 0:a.stack)!="undefined"?ne(e,1,a.stack):e},I=(t,l)=>(S(l)?oe:R)(t,l),M=(t,l)=>{if(l.legend=t.legend,l.area=t.area,l.title=t.title,l.subtitle=t.subtitle,l.series.length===t.series.length)for(let a=0;a<l.series.length;a++)l.series[a].color=t.series[a].color,l.series[a].labels=t.series[a].labels;return t.series.every(a=>{var e;return(e=a.labels)==null?void 0:e.visible})&&S(l.seriesType)&&S(t.seriesType)&&l.series.forEach(a=>{a.labels=a.labels||{},a.labels.visible=!0}),l},ne=(t,l,a)=>{var c,n,g,o,m,u,b,v,s,x,y,F,k,E,p,V,D,G,O,B,H,P,w,X,Y,$,j,W,q,J,K,Q,U;const e={...t};switch(l){case 0:return I(e.data,a);case 1:return e.series=e.series.map(r=>({...r,stack:a})),e;case 2:{if(e.seriesType&&S(e.seriesType)){const r=oe(e.data,e.seriesType,{categoryAxis:a});return M(e,r)}else if(e.seriesType===Z){const r=R(e.data,e.seriesType,{categoryAxis:a});return M(e,r)}return e}case 3:{if(e.seriesType===Z){const r=R(e.data,e.seriesType,{categoryAxis:e.categoryField,valueAxis:a});return M(e,r)}return e}case 4:return e.series=a,e;case 5:return e.area={...e.area,margin:{...((c=e.area)==null?void 0:c.margin)||{},left:a}},e;case 6:return e.area={...e.area,margin:{...((n=e.area)==null?void 0:n.margin)||{},right:a}},e;case 7:return e.area={...e.area,margin:{...((g=e.area)==null?void 0:g.margin)||{},top:a}},e;case 8:return e.area={...e.area,margin:{...((o=e.area)==null?void 0:o.margin)||{},bottom:a}},e;case 9:return e.area={...e.area,background:a},e;case 10:return e.title={...e.title,text:a},e;case 11:return e.title={...e.title,font:h(a,f[0].value,(m=e.title)==null?void 0:m.font)},e;case 12:return e.title={...e.title,font:C(a,d[0].value,(u=e.title)==null?void 0:u.font)},e;case 13:return e.title={...e.title,color:a},e;case 14:return e.subtitle={...e.subtitle,text:a},e;case 15:return e.subtitle={...e.subtitle,font:h(a,f[0].value,(b=e.subtitle)==null?void 0:b.font)},e;case 16:return e.subtitle={...e.subtitle,font:C(a,d[0].value,(v=e.subtitle)==null?void 0:v.font)},e;case 17:return e.subtitle={...e.subtitle,color:a},e;case 18:return e.series=e.series.map(r=>({...r,color:a.seriesName===r.name?a.color:r.color})),e;case 19:return e.series=e.series.map(r=>a.all||a.seriesName===r.name?{...r,labels:{visible:a.visible}}:r),e;case 20:return e.legend={...e.legend,visible:a},e;case 21:return e.legend={...e.legend,labels:{...(s=e.legend)==null?void 0:s.labels,font:h(a,f[0].value,(y=(x=e.legend)==null?void 0:x.labels)==null?void 0:y.font)}},e;case 22:return e.legend={...e.legend,labels:{...(F=e.legend)==null?void 0:F.labels,font:C(a,d[0].value,(E=(k=e.legend)==null?void 0:k.labels)==null?void 0:E.font)}},e;case 23:return e.legend={...e.legend,labels:{...(p=e.legend)==null?void 0:p.labels,color:a}},e;case 24:return e.legend={...e.legend,position:a},e;case 25:return e.categoryAxis=(V=e.categoryAxis)==null?void 0:V.map(r=>({...r,title:{...r.title,text:a}})),e;case 26:return e.categoryAxis=(D=e.categoryAxis)==null?void 0:D.map(r=>{var i;return{...r,title:{...r.title,font:h(a,f[0].value,(i=r.title)==null?void 0:i.font)}}}),e;case 27:return e.categoryAxis=(G=e.categoryAxis)==null?void 0:G.map(r=>{var i;return{...r,title:{...r.title,font:C(a,d[0].value,(i=r.title)==null?void 0:i.font)}}}),e;case 28:return e.categoryAxis=(O=e.categoryAxis)==null?void 0:O.map(r=>({...r,title:{...r.title,color:a}})),e;case 29:return e.categoryAxis=(B=e.categoryAxis)==null?void 0:B.map(r=>{var i;return{...r,labels:{...r.labels,font:h(a,f[0].value,(i=r.labels)==null?void 0:i.font)}}}),e;case 30:return e.categoryAxis=(H=e.categoryAxis)==null?void 0:H.map(r=>{var i;return{...r,labels:{...r.labels,font:C(a,d[0].value,(i=r.labels)==null?void 0:i.font)}}}),e;case 31:return e.categoryAxis=(P=e.categoryAxis)==null?void 0:P.map(r=>({...r,labels:{...r.labels,color:a}})),e;case 32:{const r=z(a)?a:"auto";return e.categoryAxis=(w=e.categoryAxis)==null?void 0:w.map(i=>({...i,labels:{...i.labels,rotation:r}})),e}case 33:return e.categoryAxis=(X=e.categoryAxis)==null?void 0:X.map(r=>({...r,reverse:a})),e;case 34:return!e.valueAxis||e.valueAxis.length===0?e.valueAxis=[{title:{text:a}}]:e.valueAxis=(Y=e.valueAxis)==null?void 0:Y.map(r=>({...r,title:{...r.title,text:a}})),e;case 35:return e.valueAxis=($=e.valueAxis)==null?void 0:$.map(r=>{var i;return{...r,title:{...r.title,font:h(a,f[0].value,(i=r.title)==null?void 0:i.font)}}}),e;case 36:return e.valueAxis=(j=e.valueAxis)==null?void 0:j.map(r=>{var i;return{...r,title:{...r.title,font:C(a,d[0].value,(i=r.title)==null?void 0:i.font)}}}),e;case 37:return e.valueAxis=(W=e.valueAxis)==null?void 0:W.map(r=>({...r,title:{...r.title,color:a}})),e;case 38:return e.valueAxis=(q=e.valueAxis)==null?void 0:q.map(r=>({...r,labels:{...r.labels,format:a}})),e;case 39:return e.valueAxis=(J=e.valueAxis)==null?void 0:J.map(r=>{var i;return{...r,labels:{...r.labels,font:h(a,f[0].value,(i=r.labels)==null?void 0:i.font)}}}),e;case 40:return e.valueAxis=(K=e.valueAxis)==null?void 0:K.map(r=>{var i;return{...r,labels:{...r.labels,font:C(a,d[0].value,(i=r.labels)==null?void 0:i.font)}}}),e;case 41:return e.valueAxis=(Q=e.valueAxis)==null?void 0:Q.map(r=>({...r,labels:{...r.labels,color:a}})),e;case 42:{const r=z(a)?a:"auto";return e.valueAxis=(U=e.valueAxis)==null?void 0:U.map(i=>({...i,labels:{...i.labels,rotation:r}})),e}default:return e}};exports.ActionTypes=_;exports.createInitialState=me;exports.createState=I;exports.fontNames=d;exports.fontSizes=f;exports.isCategorical=S;exports.mergeStates=M;exports.parseFont=A;exports.updateState=ne;
|
|
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
CHANGED
|
@@ -6,355 +6,16 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
{ text: "8", value: "8px" },
|
|
12
|
-
{ text: "10", value: "10px" },
|
|
13
|
-
{ text: "12", value: "12px" },
|
|
14
|
-
{ text: "14", value: "14px" },
|
|
15
|
-
{ text: "16", value: "16px" },
|
|
16
|
-
{ text: "20", value: "20px" },
|
|
17
|
-
{ text: "24", value: "24px" },
|
|
18
|
-
{ text: "48", value: "48px" },
|
|
19
|
-
{ text: "60", value: "60px" },
|
|
20
|
-
{ text: "96", value: "96px" }
|
|
21
|
-
], F = [
|
|
22
|
-
{
|
|
23
|
-
text: "Arial",
|
|
24
|
-
value: "Arial, Helvetica, sans-serif",
|
|
25
|
-
style: { fontFamily: "Arial, Helvetica, sans-serif" }
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
text: "Courier New",
|
|
29
|
-
value: "'Courier New', Courier, monospace",
|
|
30
|
-
style: { fontFamily: "'Courier New', Courier, monospace" }
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
text: "Georgia",
|
|
34
|
-
value: "Georgia, serif",
|
|
35
|
-
style: { fontFamily: "Georgia, serif" }
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
text: "Impact",
|
|
39
|
-
value: "Impact, Charcoal, sans-serif",
|
|
40
|
-
style: { fontFamily: "Impact, Charcoal, sans-serif" }
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
text: "Lucida Console",
|
|
44
|
-
value: "'Lucida Console', Monaco, monospace",
|
|
45
|
-
style: { fontFamily: "'Lucida Console', Monaco, monospace" }
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
text: "Tahoma",
|
|
49
|
-
value: "Tahoma, Geneva, sans-serif",
|
|
50
|
-
style: { fontFamily: "Tahoma, Geneva, sans-serif" }
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
text: "Times New Roman",
|
|
54
|
-
value: "'Times New Roman', Times,serif",
|
|
55
|
-
style: { fontFamily: "'Times New Roman', Times,serif" }
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
text: "Trebuchet MS",
|
|
59
|
-
value: "'Trebuchet MS', Helvetica, sans-serif",
|
|
60
|
-
style: { fontFamily: "'Trebuchet MS', Helvetica, sans-serif" }
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
text: "Verdana",
|
|
64
|
-
value: "Verdana, Geneva, sans-serif",
|
|
65
|
-
style: { fontFamily: "Verdana, Geneva, sans-serif" }
|
|
66
|
-
}
|
|
67
|
-
], ne = "column", ue = "bar", U = "line", Q = "pie", Z = "scatter", ce = [ne, ue, U, Z], ge = {
|
|
68
|
-
type: U,
|
|
69
|
-
width: 0
|
|
70
|
-
}, S = (t) => t && ce.includes(t), L = ["string", "date", "number"], N = ["number"], _ = {
|
|
71
|
-
bar: [
|
|
72
|
-
{ axisType: "category", types: L },
|
|
73
|
-
{ axisType: "value", types: N }
|
|
74
|
-
],
|
|
75
|
-
column: [
|
|
76
|
-
{ axisType: "category", types: L },
|
|
77
|
-
{ axisType: "value", types: N }
|
|
78
|
-
],
|
|
79
|
-
line: [
|
|
80
|
-
{ axisType: "category", types: L },
|
|
81
|
-
{ axisType: "value", types: N }
|
|
82
|
-
],
|
|
83
|
-
pie: [
|
|
84
|
-
{ axisType: "category", types: L },
|
|
85
|
-
{ axisType: "value", types: N, count: 1 }
|
|
86
|
-
],
|
|
87
|
-
scatter: [
|
|
88
|
-
{ axisType: "category", types: L },
|
|
89
|
-
{ axisType: "value", types: N }
|
|
90
|
-
]
|
|
91
|
-
}, T = (t, l) => `${l || ""} ${t || ""}`.trim(), ee = (t) => {
|
|
92
|
-
const l = (t || "").indexOf(" "), a = t == null ? void 0 : t.substring(0, l), e = t == null ? void 0 : t.substring(l + 1);
|
|
93
|
-
return { size: a, name: e };
|
|
94
|
-
}, y = (t, l, a) => {
|
|
95
|
-
const { size: e } = ee(a);
|
|
96
|
-
return t ? T(t, e || l) : "";
|
|
97
|
-
}, C = (t, l, a) => {
|
|
98
|
-
const { name: e } = ee(a);
|
|
99
|
-
return t ? T(e || l, t) : "";
|
|
100
|
-
}, z = (t) => t != null, te = (t) => {
|
|
101
|
-
const l = structuredClone(t[0]);
|
|
102
|
-
return l.forEach((a, e) => {
|
|
103
|
-
if (!z(a.value))
|
|
104
|
-
for (let c = 0; c < t.length; c++) {
|
|
105
|
-
const n = t[c][e].value;
|
|
106
|
-
if (z(n)) {
|
|
107
|
-
a.value = n;
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}), l;
|
|
112
|
-
}, ae = (t, l) => {
|
|
113
|
-
const a = [], e = te(t);
|
|
114
|
-
l.types.forEach((n) => {
|
|
115
|
-
e.forEach((g, o) => {
|
|
116
|
-
typeof g.value === n && a.push(o);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
const c = a.findIndex((n) => {
|
|
120
|
-
const g = t.map((o) => o[n].value);
|
|
121
|
-
return new Set(g).size === g.length;
|
|
122
|
-
});
|
|
123
|
-
return Math.max(c, 0);
|
|
124
|
-
}, re = (t, l) => {
|
|
125
|
-
const a = [], e = te(t);
|
|
126
|
-
return l.forEach((c) => {
|
|
127
|
-
c.types.forEach((n) => {
|
|
128
|
-
e.forEach((g, o) => {
|
|
129
|
-
typeof g.value === n && a.push(o);
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
}), a;
|
|
133
|
-
}, le = () => structuredClone({
|
|
134
|
-
columns: [],
|
|
135
|
-
data: [],
|
|
136
|
-
series: [],
|
|
137
|
-
initialSeries: [],
|
|
138
|
-
categoryAxis: [],
|
|
139
|
-
valueAxis: [{ labels: { visible: !0 } }],
|
|
140
|
-
area: {
|
|
141
|
-
margin: { left: void 0, right: void 0, top: void 0, bottom: void 0 }
|
|
142
|
-
},
|
|
143
|
-
stack: !1
|
|
144
|
-
}), se = (t, l, a) => {
|
|
145
|
-
const e = le();
|
|
146
|
-
e.seriesType = l, e.data = t;
|
|
147
|
-
const c = _[l];
|
|
148
|
-
if (!c)
|
|
149
|
-
return e;
|
|
150
|
-
const n = t[0].slice();
|
|
151
|
-
e.columns = t[0].map((s) => String(s.field));
|
|
152
|
-
const g = c.find((s) => s.axisType === "category");
|
|
153
|
-
let o = -1;
|
|
154
|
-
g && (o = a != null && a.categoryAxis ? e.columns.indexOf(a == null ? void 0 : a.categoryAxis) : ae(t, g));
|
|
155
|
-
const b = c.filter((s) => s.axisType === "value");
|
|
156
|
-
let u = re(t, b);
|
|
157
|
-
u.includes(o) && (u.length > 1 ? u = u.filter((s) => s !== o) : o = -1);
|
|
158
|
-
const m = [];
|
|
159
|
-
u.forEach((s) => {
|
|
160
|
-
const x = n[s], v = [];
|
|
161
|
-
t.forEach((d) => {
|
|
162
|
-
v.push(d[s].value);
|
|
163
|
-
}), m.push({
|
|
164
|
-
name: x.field,
|
|
165
|
-
type: l,
|
|
166
|
-
data: v,
|
|
167
|
-
stack: !1,
|
|
168
|
-
labels: { visible: !1 },
|
|
169
|
-
...l === Z ? ge : {}
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
const f = o > -1 ? t.map((s) => String(z(s[o].value) ? s[o].value : " ")) : [];
|
|
173
|
-
return m.length && (e.series = m.map((s, x) => ({ ...s, id: x })), e.initialSeries = structuredClone(e.series)), e.categoryAxis = [{ categories: f, labels: { visible: !0, rotation: "auto" } }], e.categoryField = e.columns[o], e.legend = { visible: !0 }, e.title = { text: void 0 }, e.subtitle = { text: void 0 }, e;
|
|
174
|
-
}, M = (t, l, a) => {
|
|
175
|
-
const e = le();
|
|
176
|
-
e.seriesType = l, e.data = t;
|
|
177
|
-
const c = _[l];
|
|
178
|
-
if (!c)
|
|
179
|
-
return e;
|
|
180
|
-
const n = t[0].map((s) => s.field), g = c.find((s) => s.axisType === "category");
|
|
181
|
-
let o = -1;
|
|
182
|
-
g && (o = a != null && a.categoryAxis ? n.indexOf(a == null ? void 0 : a.categoryAxis) : ae(t, g));
|
|
183
|
-
const b = c.filter((s) => s.axisType === "value");
|
|
184
|
-
let u = [];
|
|
185
|
-
a != null && a.valueAxis ? u = [n.indexOf(a.valueAxis)] : u = re(t, b), u.includes(o) && u.length > 1 && (u = u.filter((s) => s !== o)), typeof b[0].count == "number" && (u = u.slice(0, b[0].count));
|
|
186
|
-
const m = o > -1 ? t.map((s) => String(s[o].value)) : [], f = [];
|
|
187
|
-
return t.forEach((s) => {
|
|
188
|
-
const x = {};
|
|
189
|
-
u.forEach((v) => {
|
|
190
|
-
const d = s[v];
|
|
191
|
-
x[d.field] = d.value || 0, x[s[o].field] = s[o].value || " ";
|
|
192
|
-
}), f.push(x);
|
|
193
|
-
}), e.columns = n, e.categoryAxis = [{ categories: m, title: { text: "" } }], e.series = [{
|
|
194
|
-
id: 0,
|
|
195
|
-
data: f,
|
|
196
|
-
type: l,
|
|
197
|
-
name: n[o],
|
|
198
|
-
labels: { visible: !0 },
|
|
199
|
-
categoryField: n[o],
|
|
200
|
-
field: n[u[0]]
|
|
201
|
-
}], e.categoryField = n[o], e.valueField = n[u[0]], e.initialSeries = structuredClone(e.series), e;
|
|
202
|
-
}, be = (t, l, a) => {
|
|
203
|
-
const e = ie(t, (a == null ? void 0 : a.seriesType) || l);
|
|
204
|
-
return typeof (a == null ? void 0 : a.stack) != "undefined" ? xe(e, 1, a.stack) : e;
|
|
205
|
-
}, ie = (t, l) => (S(l) ? se : M)(t, l), R = (t, l) => {
|
|
206
|
-
if (l.legend = t.legend, l.area = t.area, l.title = t.title, l.subtitle = t.subtitle, l.series.length === t.series.length)
|
|
207
|
-
for (let a = 0; a < l.series.length; a++)
|
|
208
|
-
l.series[a].color = t.series[a].color, l.series[a].labels = t.series[a].labels;
|
|
209
|
-
return t.series.every((a) => {
|
|
210
|
-
var e;
|
|
211
|
-
return (e = a.labels) == null ? void 0 : e.visible;
|
|
212
|
-
}) && S(l.seriesType) && S(t.seriesType) && l.series.forEach((a) => {
|
|
213
|
-
a.labels = a.labels || {}, a.labels.visible = !0;
|
|
214
|
-
}), l;
|
|
215
|
-
}, xe = (t, l, a) => {
|
|
216
|
-
var c, n, g, o, b, u, m, f, s, x, v, d, A, I, k, E, V, D, G, p, O, B, H, w, P, X, Y, $, W, j, q, J, K;
|
|
217
|
-
const e = { ...t };
|
|
218
|
-
switch (l) {
|
|
219
|
-
case 0:
|
|
220
|
-
return ie(e.data, a);
|
|
221
|
-
case 1:
|
|
222
|
-
return e.series = e.series.map((r) => ({ ...r, stack: a })), e;
|
|
223
|
-
case 2: {
|
|
224
|
-
if (e.seriesType && S(e.seriesType)) {
|
|
225
|
-
const r = se(e.data, e.seriesType, { categoryAxis: a });
|
|
226
|
-
return R(e, r);
|
|
227
|
-
} else if (e.seriesType === Q) {
|
|
228
|
-
const r = M(e.data, e.seriesType, { categoryAxis: a });
|
|
229
|
-
return R(e, r);
|
|
230
|
-
}
|
|
231
|
-
return e;
|
|
232
|
-
}
|
|
233
|
-
case 3: {
|
|
234
|
-
if (e.seriesType === Q) {
|
|
235
|
-
const r = M(e.data, e.seriesType, { categoryAxis: e.categoryField, valueAxis: a });
|
|
236
|
-
return R(e, r);
|
|
237
|
-
}
|
|
238
|
-
return e;
|
|
239
|
-
}
|
|
240
|
-
case 4:
|
|
241
|
-
return e.series = a, e;
|
|
242
|
-
case 5:
|
|
243
|
-
return e.area = { ...e.area, margin: { ...((c = e.area) == null ? void 0 : c.margin) || {}, left: a } }, e;
|
|
244
|
-
case 6:
|
|
245
|
-
return e.area = { ...e.area, margin: { ...((n = e.area) == null ? void 0 : n.margin) || {}, right: a } }, e;
|
|
246
|
-
case 7:
|
|
247
|
-
return e.area = { ...e.area, margin: { ...((g = e.area) == null ? void 0 : g.margin) || {}, top: a } }, e;
|
|
248
|
-
case 8:
|
|
249
|
-
return e.area = { ...e.area, margin: { ...((o = e.area) == null ? void 0 : o.margin) || {}, bottom: a } }, e;
|
|
250
|
-
case 9:
|
|
251
|
-
return e.area = { ...e.area, background: a }, e;
|
|
252
|
-
case 10:
|
|
253
|
-
return e.title = { ...e.title, text: a }, e;
|
|
254
|
-
case 11:
|
|
255
|
-
return e.title = { ...e.title, font: y(a, h[0].value, (b = e.title) == null ? void 0 : b.font) }, e;
|
|
256
|
-
case 12:
|
|
257
|
-
return e.title = { ...e.title, font: C(a, F[0].value, (u = e.title) == null ? void 0 : u.font) }, e;
|
|
258
|
-
case 13:
|
|
259
|
-
return e.title = { ...e.title, color: a }, e;
|
|
260
|
-
case 14:
|
|
261
|
-
return e.subtitle = { ...e.subtitle, text: a }, e;
|
|
262
|
-
case 15:
|
|
263
|
-
return e.subtitle = { ...e.subtitle, font: y(a, h[0].value, (m = e.subtitle) == null ? void 0 : m.font) }, e;
|
|
264
|
-
case 16:
|
|
265
|
-
return e.subtitle = { ...e.subtitle, font: C(a, F[0].value, (f = e.subtitle) == null ? void 0 : f.font) }, e;
|
|
266
|
-
case 17:
|
|
267
|
-
return e.subtitle = { ...e.subtitle, color: a }, e;
|
|
268
|
-
case 18:
|
|
269
|
-
return e.series = e.series.map((r) => ({ ...r, color: a.seriesName === r.name ? a.color : r.color })), e;
|
|
270
|
-
case 19:
|
|
271
|
-
return e.series = e.series.map((r) => a.all || a.seriesName === r.name ? { ...r, labels: { visible: a.visible } } : r), e;
|
|
272
|
-
case 20:
|
|
273
|
-
return e.legend = { ...e.legend, visible: a }, e;
|
|
274
|
-
case 21:
|
|
275
|
-
return e.legend = { ...e.legend, labels: { ...(s = e.legend) == null ? void 0 : s.labels, font: y(a, h[0].value, (v = (x = e.legend) == null ? void 0 : x.labels) == null ? void 0 : v.font) } }, e;
|
|
276
|
-
case 22:
|
|
277
|
-
return e.legend = { ...e.legend, labels: { ...(d = e.legend) == null ? void 0 : d.labels, font: C(a, F[0].value, (I = (A = e.legend) == null ? void 0 : A.labels) == null ? void 0 : I.font) } }, e;
|
|
278
|
-
case 23:
|
|
279
|
-
return e.legend = { ...e.legend, labels: { ...(k = e.legend) == null ? void 0 : k.labels, color: a } }, e;
|
|
280
|
-
case 24:
|
|
281
|
-
return e.legend = { ...e.legend, position: a }, e;
|
|
282
|
-
case 25:
|
|
283
|
-
return e.categoryAxis = (E = e.categoryAxis) == null ? void 0 : E.map((r) => ({ ...r, title: { ...r.title, text: a } })), e;
|
|
284
|
-
case 26:
|
|
285
|
-
return e.categoryAxis = (V = e.categoryAxis) == null ? void 0 : V.map((r) => {
|
|
286
|
-
var i;
|
|
287
|
-
return { ...r, title: { ...r.title, font: y(a, h[0].value, (i = r.title) == null ? void 0 : i.font) } };
|
|
288
|
-
}), e;
|
|
289
|
-
case 27:
|
|
290
|
-
return e.categoryAxis = (D = e.categoryAxis) == null ? void 0 : D.map((r) => {
|
|
291
|
-
var i;
|
|
292
|
-
return { ...r, title: { ...r.title, font: C(a, F[0].value, (i = r.title) == null ? void 0 : i.font) } };
|
|
293
|
-
}), e;
|
|
294
|
-
case 28:
|
|
295
|
-
return e.categoryAxis = (G = e.categoryAxis) == null ? void 0 : G.map((r) => ({ ...r, title: { ...r.title, color: a } })), e;
|
|
296
|
-
case 29:
|
|
297
|
-
return e.categoryAxis = (p = e.categoryAxis) == null ? void 0 : p.map((r) => {
|
|
298
|
-
var i;
|
|
299
|
-
return { ...r, labels: { ...r.labels, font: y(a, h[0].value, (i = r.labels) == null ? void 0 : i.font) } };
|
|
300
|
-
}), e;
|
|
301
|
-
case 30:
|
|
302
|
-
return e.categoryAxis = (O = e.categoryAxis) == null ? void 0 : O.map((r) => {
|
|
303
|
-
var i;
|
|
304
|
-
return { ...r, labels: { ...r.labels, font: C(a, F[0].value, (i = r.labels) == null ? void 0 : i.font) } };
|
|
305
|
-
}), e;
|
|
306
|
-
case 31:
|
|
307
|
-
return e.categoryAxis = (B = e.categoryAxis) == null ? void 0 : B.map((r) => ({ ...r, labels: { ...r.labels, color: a } })), e;
|
|
308
|
-
case 32: {
|
|
309
|
-
const r = z(a) ? a : "auto";
|
|
310
|
-
return e.categoryAxis = (H = e.categoryAxis) == null ? void 0 : H.map((i) => ({ ...i, labels: { ...i.labels, rotation: r } })), e;
|
|
311
|
-
}
|
|
312
|
-
case 33:
|
|
313
|
-
return e.categoryAxis = (w = e.categoryAxis) == null ? void 0 : w.map((r) => ({ ...r, reverse: a })), e;
|
|
314
|
-
case 34:
|
|
315
|
-
return !e.valueAxis || e.valueAxis.length === 0 ? e.valueAxis = [{ title: { text: a } }] : e.valueAxis = (P = e.valueAxis) == null ? void 0 : P.map((r) => ({ ...r, title: { ...r.title, text: a } })), e;
|
|
316
|
-
case 35:
|
|
317
|
-
return e.valueAxis = (X = e.valueAxis) == null ? void 0 : X.map((r) => {
|
|
318
|
-
var i;
|
|
319
|
-
return { ...r, title: { ...r.title, font: y(a, h[0].value, (i = r.title) == null ? void 0 : i.font) } };
|
|
320
|
-
}), e;
|
|
321
|
-
case 36:
|
|
322
|
-
return e.valueAxis = (Y = e.valueAxis) == null ? void 0 : Y.map((r) => {
|
|
323
|
-
var i;
|
|
324
|
-
return { ...r, title: { ...r.title, font: C(a, F[0].value, (i = r.title) == null ? void 0 : i.font) } };
|
|
325
|
-
}), e;
|
|
326
|
-
case 37:
|
|
327
|
-
return e.valueAxis = ($ = e.valueAxis) == null ? void 0 : $.map((r) => ({ ...r, title: { ...r.title, color: a } })), e;
|
|
328
|
-
case 38:
|
|
329
|
-
return e.valueAxis = (W = e.valueAxis) == null ? void 0 : W.map((r) => ({ ...r, labels: { ...r.labels, format: a } })), e;
|
|
330
|
-
case 39:
|
|
331
|
-
return e.valueAxis = (j = e.valueAxis) == null ? void 0 : j.map((r) => {
|
|
332
|
-
var i;
|
|
333
|
-
return { ...r, labels: { ...r.labels, font: y(a, h[0].value, (i = r.labels) == null ? void 0 : i.font) } };
|
|
334
|
-
}), e;
|
|
335
|
-
case 40:
|
|
336
|
-
return e.valueAxis = (q = e.valueAxis) == null ? void 0 : q.map((r) => {
|
|
337
|
-
var i;
|
|
338
|
-
return { ...r, labels: { ...r.labels, font: C(a, F[0].value, (i = r.labels) == null ? void 0 : i.font) } };
|
|
339
|
-
}), e;
|
|
340
|
-
case 41:
|
|
341
|
-
return e.valueAxis = (J = e.valueAxis) == null ? void 0 : J.map((r) => ({ ...r, labels: { ...r.labels, color: a } })), e;
|
|
342
|
-
case 42: {
|
|
343
|
-
const r = z(a) ? a : "auto";
|
|
344
|
-
return e.valueAxis = (K = e.valueAxis) == null ? void 0 : K.map((i) => ({ ...i, labels: { ...i.labels, rotation: r } })), e;
|
|
345
|
-
}
|
|
346
|
-
default:
|
|
347
|
-
return e;
|
|
348
|
-
}
|
|
349
|
-
};
|
|
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;
|
|
350
11
|
export {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
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
|
|
360
21
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@progress/kendo-charts"),{getWizardDataFromDataRows:a}=t.ChartWizardCommon;exports.getWizardDataFromDataRows=a;
|
|
@@ -6,19 +6,8 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const e = [];
|
|
12
|
-
return r.forEach((o) => {
|
|
13
|
-
const { dataItem: s, dataColumns: i } = o, a = [];
|
|
14
|
-
i.forEach((t) => {
|
|
15
|
-
a.push({
|
|
16
|
-
field: t.title || t.field,
|
|
17
|
-
value: f(t.field)(s)
|
|
18
|
-
});
|
|
19
|
-
}), e.push(a);
|
|
20
|
-
}), e;
|
|
21
|
-
}
|
|
9
|
+
import { ChartWizardCommon as o } from "@progress/kendo-charts";
|
|
10
|
+
const { getWizardDataFromDataRows: a } = o;
|
|
22
11
|
export {
|
|
23
|
-
|
|
12
|
+
a as getWizardDataFromDataRows
|
|
24
13
|
};
|